[openssl-users] PEM_read and write SSL_SESSION

Shubham Chauhan shubham13099 at iiitd.ac.in
Sat Feb 27 15:02:47 UTC 2016


great!
Thanks, I'll give it a try, this looks promising enough :)

On Sat, Feb 27, 2016 at 7:42 PM, Michel <michel.sales at free.fr> wrote:

> 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-bounces at openssl.org] *De la
> part de* Shubham Chauhan
> *Envoyé :* vendredi 26 février 2016 12:51
> *À :* openssl-users at 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
>
>


-- 
Regards
Shubham Chauhan
2013099
B.Tech CSE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160227/4ac1b329/attachment-0001.html>


More information about the openssl-users mailing list