From: Matt Caswell Date: Fri, 24 Feb 2017 14:08:59 +0000 (+0000) Subject: Make SSL_get_max_early_data() and SSL_CTX_get_max_early_data() take a const X-Git-Tag: OpenSSL_1_1_1-pre1~2146 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46dcb9457edc1bcf224a36f9d559363507440fd7;p=oweals%2Fopenssl.git Make SSL_get_max_early_data() and SSL_CTX_get_max_early_data() take a const Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2737) --- diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 0fd36a5768..dcd2b08b19 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -798,9 +798,9 @@ void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb); SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx); int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data); -uint32_t SSL_CTX_get_max_early_data(SSL_CTX *ctx); +uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx); int SSL_set_max_early_data(SSL *s, uint32_t max_early_data); -uint32_t SSL_get_max_early_data(SSL_CTX *s); +uint32_t SSL_get_max_early_data(const SSL_CTX *s); #ifdef __cplusplus } diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 1267844b04..70ff932b23 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -4815,7 +4815,7 @@ int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data) return 1; } -uint32_t SSL_CTX_get_max_early_data(SSL_CTX *ctx) +uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx) { return ctx->max_early_data; } @@ -4827,7 +4827,7 @@ int SSL_set_max_early_data(SSL *s, uint32_t max_early_data) return 1; } -uint32_t SSL_get_max_early_data(SSL_CTX *s) +uint32_t SSL_get_max_early_data(const SSL_CTX *s) { return s->max_early_data; }