diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-12-08 16:42:08 +0300 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-12-08 16:42:08 +0300 |
commit | 5430200b8b9528861ec9759623107f407ba8c38f (patch) | |
tree | 13554bb74de1bacd69b49781c9f78a7966f49e18 /ssl | |
parent | 13f6d57b1ef964f2b9cbd8f68783884caef0e5cb (diff) |
Add ctrl and macro so we can determine if peer support secure renegotiation.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl.h | 4 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -625,6 +625,8 @@ typedef struct ssl_session_st #define SSL_set_mtu(ssl, mtu) \ SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL) +#define SSL_get_secure_renegotiation_support(ssl) \ + SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL) void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); @@ -1374,6 +1376,8 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) #define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52 +#define SSL_CTRL_GET_RI_SUPPORT 53 + /* see tls1.h for macros based on these */ #ifndef OPENSSL_NO_TLSEXT #define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 3583c4d0aa..39bd9d7cf0 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1062,6 +1062,10 @@ long SSL_ctrl(SSL *s,int cmd,long larg,void *parg) return 0; s->max_send_fragment = larg; return 1; + case SSL_CTRL_GET_RI_SUPPORT: + if (s->s3) + return s->s3->send_connection_binding; + else return 0; default: return(s->method->ssl_ctrl(s,cmd,larg,parg)); } |