Hi,

 

Quoting Andy  about applink : "New code should rather abstain from using above 
mentioned subset of OpenSSL API (whatever using FILE*)".

 

So using the bio* version instead,

PEM_write_bio_SSL_SESSION( bio_st*, ssl_session_st*)

PEM_read_bio_SSL_SESSION( bio_st*, ssl_session_st**, int (char*, int, int, 
void*) *, void* )

are declared and implemented using macros as you can see in 
include\openssl\pem.h, starting line 156

(or search for "PEM_read/PEM_write functions")

 

You can use them as simply as (s_server.c, s_client.c ) :

SSL_SESSION *sess = PEM_read_bio_SSL_SESSION( pBIO, NULL, 0, NULL );

PEM_write_bio_SSL_SESSION( pBIO, SSL_get_session( pSSL ) );

 

They finally call :

PEM_ASN1_write_bio()

PEM_ASN1_read_bio()

about which more info can be found on 
http://www.umich.edu/~x509/ssleay/pem_io.html

 

Hope this helps,

 

Michel

 

 

De : openssl-users [mailto:openssl-users-boun...@openssl.org] De la part de 
Shubham Chauhan
Envoyé : vendredi 26 février 2016 12:51
À : openssl-users@openssl.org
Objet : [openssl-users] PEM_read and write SSL_SESSION

 

If anyone is familiar with the PEM_read_SSL_SESSION and PEM_write_SSL_SESSION 
functions, please let me know about the arguments and the usage of these 
functions, in a bit detailed fashion.

It'll be really helpful.

Thanks


-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to