From b11836a63a8973c2b61f8ccd10a085361bced2ea Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Sun, 7 Feb 2016 20:11:56 +0100 Subject: [PATCH] Make SSL_CIPHER_get_version return a const char * Reviewed-by: Viktor Dukhovni MR: #1595 --- doc/ssl/ssl.pod | 2 +- include/openssl/ssl.h | 2 +- ssl/ssl_ciph.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ssl/ssl.pod b/doc/ssl/ssl.pod index fea4dc013f..b6d3334f5f 100644 --- a/doc/ssl/ssl.pod +++ b/doc/ssl/ssl.pod @@ -206,7 +206,7 @@ Return the internal name of I as a string. These are the various strings defined by the I and I definitions in the header files. -=item char *B(SSL_CIPHER *cipher); +=item const char *B(SSL_CIPHER *cipher); Returns a string like "C" or "C" which indicates the SSL/TLS protocol version to which I belongs (i.e. where it was defined diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index ca83c6009b..cc2a47f42a 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1397,7 +1397,7 @@ void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); __owur const SSL_CIPHER *SSL_get_current_cipher(const SSL *s); __owur int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits); -__owur char *SSL_CIPHER_get_version(const SSL_CIPHER *c); +__owur const char *SSL_CIPHER_get_version(const SSL_CIPHER *c); __owur const char *SSL_CIPHER_get_name(const SSL_CIPHER *c); __owur uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *c); __owur int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c); diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 2f24fc3bea..16ff0b23b5 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1807,7 +1807,7 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) return (buf); } -char *SSL_CIPHER_get_version(const SSL_CIPHER *c) +const char *SSL_CIPHER_get_version(const SSL_CIPHER *c) { uint32_t alg_ssl;