⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssl_ctx_set_session_id_context.pod

📁 开源的ssl算法openssl,版本0.9.8H
💻 POD
字号:
=pod=head1 NAMESSL_CTX_set_session_id_context, SSL_set_session_id_context - set context within which session can be reused (server side only)=head1 SYNOPSIS #include <openssl/ssl.h> int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,                                    unsigned int sid_ctx_len); int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,                                unsigned int sid_ctx_len);=head1 DESCRIPTIONSSL_CTX_set_session_id_context() sets the context B<sid_ctx> of lengthB<sid_ctx_len> within which a session can be reused for the B<ctx> object.SSL_set_session_id_context() sets the context B<sid_ctx> of lengthB<sid_ctx_len> within which a session can be reused for the B<ssl> object.=head1 NOTESSessions are generated within a certain context. When exporting/importingsessions with B<i2d_SSL_SESSION>/B<d2i_SSL_SESSION> it would be possible,to re-import a session generated from another context (e.g. anotherapplication), which might lead to malfunctions. Therefore each applicationmust set its own session id context B<sid_ctx> which is used to distinguishthe contexts and is stored in exported sessions. The B<sid_ctx> can beany kind of binary data with a given length, it is therefore possibleto use e.g. the name of the application and/or the hostname and/or servicename ...The session id context becomes part of the session. The session id contextis set by the SSL/TLS server. The SSL_CTX_set_session_id_context() andSSL_set_session_id_context() functions are therefore only useful on theserver side.OpenSSL clients will check the session id context returned by the serverwhen reusing a session.The maximum length of the B<sid_ctx> is limited toB<SSL_MAX_SSL_SESSION_ID_LENGTH>.=head1 WARNINGSIf the session id context is not set on an SSL/TLS server and clientcertificates are used, stored sessionswill not be reused but a fatal error will be flagged and the handshakewill fail.If a server returns a different session id context to an OpenSSL clientwhen reusing a session, an error will be flagged and the handshake willfail. OpenSSL servers will always return the correct session id context,as an OpenSSL server checks the session id context itself before reusinga session as described above.=head1 RETURN VALUESSSL_CTX_set_session_id_context() and SSL_set_session_id_context()return the following values:=over 4=item 0The length B<sid_ctx_len> of the session id context B<sid_ctx> exceededthe maximum allowed length of B<SSL_MAX_SSL_SESSION_ID_LENGTH>. The erroris logged to the error stack.=item 1The operation succeeded.=back=head1 SEE ALSOL<ssl(3)|ssl(3)>=cut

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -