From: Viktor Szakats Date: Sat, 9 Aug 2014 03:15:59 +0000 (-0400) Subject: RT 1988: Add "const" to SSL_use_RSAPrivateKey_ASN1 X-Git-Tag: master-post-reformat~536 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=693b71fa719598a487165918cbbc0f7f62816c83;p=oweals%2Fopenssl.git RT 1988: Add "const" to SSL_use_RSAPrivateKey_ASN1 The "unsigned char *d" should be const. Reviewed-by: Kurt Roeckx --- diff --git a/ssl/ssl.h b/ssl/ssl.h index 256d1c32a6..376dd69818 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2098,7 +2098,7 @@ void SSL_set_cert_cb(SSL *s, int (*cb)(SSL *ssl, void *arg), void *arg); #ifndef OPENSSL_NO_RSA int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa); #endif -int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len); +int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len); int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); int SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, const unsigned char *d, long len); int SSL_use_certificate(SSL *ssl, X509 *x); diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c index 7c02878abb..c76a2a37cd 100644 --- a/ssl/ssl_rsa.c +++ b/ssl/ssl_rsa.c @@ -296,7 +296,7 @@ end: } #endif -int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len) +int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len) { int ret; const unsigned char *p;