From 30b967651c1d01562087d65a28707678125d731a Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 7 Jun 2016 15:14:14 +0100 Subject: [PATCH] Add SSL_CTX_get_tlsext_status_type() Reviewed-by: Rich Salz --- include/openssl/tls1.h | 7 +++++-- ssl/s3_lib.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/openssl/tls1.h b/include/openssl/tls1.h index 25a9b36f9a..11ad8e51e5 100644 --- a/include/openssl/tls1.h +++ b/include/openssl/tls1.h @@ -252,8 +252,8 @@ SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb) # define SSL_set_tlsext_debug_arg(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg) -# define SSL_get_tlsext_status_type(ssl, arg) \ -SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0, (void *)arg) +# define SSL_get_tlsext_status_type(ssl) \ +SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0, NULL) # define SSL_set_tlsext_status_type(ssl, type) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL) @@ -301,6 +301,9 @@ SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg) #define SSL_CTX_set_tlsext_status_type(ssl, type) \ SSL_CTX_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, type, NULL) +#define SSL_CTX_get_tlsext_status_type(ssl) \ + SSL_CTX_ctrl(ssl, SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE, 0, NULL) + # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index a6709187a6..44dac24c8c 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -3329,6 +3329,9 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) return 1; } + case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE: + return ctx->tlsext_status_type; + case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE: ctx->tlsext_status_type = larg; break; -- 2.25.1