summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Szakats <harbour.01@syenar.hu>2014-08-09 05:15:59 +0200
committerRich Salz <rsalz@akamai.com>2014-08-09 13:56:28 +0200
commit693b71fa719598a487165918cbbc0f7f62816c83 (patch)
treee7215543b18648b307e63a4378b1506422a59702
parentRT 1505: Use SSL3_AL_FATAL not "2" (diff)
downloadopenssl-693b71fa719598a487165918cbbc0f7f62816c83.tar.xz
openssl-693b71fa719598a487165918cbbc0f7f62816c83.zip
RT 1988: Add "const" to SSL_use_RSAPrivateKey_ASN1
The "unsigned char *d" should be const. Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
-rw-r--r--ssl/ssl.h2
-rw-r--r--ssl/ssl_rsa.c2
2 files changed, 2 insertions, 2 deletions
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;