summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_rsa.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-04-25 07:10:40 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-04-25 07:10:40 +0000
commitf9852403ee3e0260f03092f67dc3b6dfdcf2a276 (patch)
treeb3c3abf6f2aeb3ee1166a4aaf69a1027f3248e13 /lib/libssl/ssl_rsa.c
parentbd09dcb4f26a8c7e1121273a594e4b1172604c18 (diff)
OpenSSL started adding const to functions all over the place. Make all
our libssl functions match theirs wrt const, except for BIO_f_ssl(3) which will be fixed in a later step. this went through a i386 bulk by sthen ok jsing
Diffstat (limited to 'lib/libssl/ssl_rsa.c')
-rw-r--r--lib/libssl/ssl_rsa.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/libssl/ssl_rsa.c b/lib/libssl/ssl_rsa.c
index e99ce1e3ae2..631aaa5077d 100644
--- a/lib/libssl/ssl_rsa.c
+++ b/lib/libssl/ssl_rsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_rsa.c,v 1.28 2017/02/07 02:08:38 beck Exp $ */
+/* $OpenBSD: ssl_rsa.c,v 1.29 2018/04/25 07:10:39 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -133,7 +133,7 @@ SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len)
X509 *x;
int ret;
- x = d2i_X509(NULL, &d,(long)len);
+ x = d2i_X509(NULL, &d, (long)len);
if (x == NULL) {
SSLerror(ssl, ERR_R_ASN1_LIB);
return (0);
@@ -254,14 +254,12 @@ end:
}
int
-SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len)
+SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len)
{
int ret;
- const unsigned char *p;
RSA *rsa;
- p = d;
- if ((rsa = d2i_RSAPrivateKey(NULL, &p,(long)len)) == NULL) {
+ if ((rsa = d2i_RSAPrivateKey(NULL, &d, (long)len)) == NULL) {
SSLerror(ssl, ERR_R_ASN1_LIB);
return (0);
}
@@ -332,11 +330,9 @@ int
SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len)
{
int ret;
- const unsigned char *p;
EVP_PKEY *pkey;
- p = d;
- if ((pkey = d2i_PrivateKey(type, NULL, &p,(long)len)) == NULL) {
+ if ((pkey = d2i_PrivateKey(type, NULL, &d, (long)len)) == NULL) {
SSLerror(ssl, ERR_R_ASN1_LIB);
return (0);
}
@@ -465,7 +461,7 @@ SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d)
X509 *x;
int ret;
- x = d2i_X509(NULL, &d,(long)len);
+ x = d2i_X509(NULL, &d, (long)len);
if (x == NULL) {
SSLerrorx(ERR_R_ASN1_LIB);
return (0);
@@ -547,11 +543,9 @@ int
SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len)
{
int ret;
- const unsigned char *p;
RSA *rsa;
- p = d;
- if ((rsa = d2i_RSAPrivateKey(NULL, &p,(long)len)) == NULL) {
+ if ((rsa = d2i_RSAPrivateKey(NULL, &d, (long)len)) == NULL) {
SSLerrorx(ERR_R_ASN1_LIB);
return (0);
}
@@ -620,11 +614,9 @@ SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, const unsigned char *d,
long len)
{
int ret;
- const unsigned char *p;
EVP_PKEY *pkey;
- p = d;
- if ((pkey = d2i_PrivateKey(type, NULL, &p,(long)len)) == NULL) {
+ if ((pkey = d2i_PrivateKey(type, NULL, &d, (long)len)) == NULL) {
SSLerrorx(ERR_R_ASN1_LIB);
return (0);
}