Make SSL_CIPHER_get_version return a const char *
authorKurt Roeckx <kurt@roeckx.be>
Sun, 7 Feb 2016 19:11:56 +0000 (20:11 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Wed, 9 Mar 2016 18:10:28 +0000 (19:10 +0100)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

doc/ssl/ssl.pod
include/openssl/ssl.h
ssl/ssl_ciph.c

index fea4dc013f941eb877ce17665cdbcc3bb88dd181..b6d3334f5fffb0a8002a3e4908624df850322bad 100644 (file)
@@ -206,7 +206,7 @@ Return the internal name of I<cipher> as a string. These are the various
 strings defined by the I<SSL3_TXT_xxx> and I<TLS1_TXT_xxx>
 definitions in the header files.
 
 strings defined by the I<SSL3_TXT_xxx> and I<TLS1_TXT_xxx>
 definitions in the header files.
 
-=item char *B<SSL_CIPHER_get_version>(SSL_CIPHER *cipher);
+=item const char *B<SSL_CIPHER_get_version>(SSL_CIPHER *cipher);
 
 Returns a string like "C<SSLv3>" or "C<TLSv1.2>" which indicates the
 SSL/TLS protocol version to which I<cipher> belongs (i.e. where it was defined
 
 Returns a string like "C<SSLv3>" or "C<TLSv1.2>" which indicates the
 SSL/TLS protocol version to which I<cipher> belongs (i.e. where it was defined
index ca83c6009b9b6a26fcbfdfab50a16f4be03b0593..cc2a47f42a0cba1d1aeeee4a4e674e9202128765 100644 (file)
@@ -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 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);
 __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);
index 2f24fc3bea133df18a203615f22b8aeadcc778ad..16ff0b23b52e8e4cefc217c59e933b498e0491e3 100644 (file)
@@ -1807,7 +1807,7 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
     return (buf);
 }
 
     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;
 
 {
     uint32_t alg_ssl;