diff options
Diffstat (limited to 'src/lib/libssl/ssl_rsa.c')
-rw-r--r-- | src/lib/libssl/ssl_rsa.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c index 631aaa5077..4d2b1c9fb3 100644 --- a/src/lib/libssl/ssl_rsa.c +++ b/src/lib/libssl/ssl_rsa.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_rsa.c,v 1.29 2018/04/25 07:10:39 tb Exp $ */ | 1 | /* $OpenBSD: ssl_rsa.c,v 1.30 2018/11/08 20:55:18 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -77,10 +77,6 @@ SSL_use_certificate(SSL *ssl, X509 *x) | |||
77 | SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); | 77 | SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); |
78 | return (0); | 78 | return (0); |
79 | } | 79 | } |
80 | if (!ssl_cert_inst(&ssl->cert)) { | ||
81 | SSLerror(ssl, ERR_R_MALLOC_FAILURE); | ||
82 | return (0); | ||
83 | } | ||
84 | return (ssl_set_cert(ssl->cert, x)); | 80 | return (ssl_set_cert(ssl->cert, x)); |
85 | } | 81 | } |
86 | 82 | ||
@@ -154,10 +150,6 @@ SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) | |||
154 | SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); | 150 | SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); |
155 | return (0); | 151 | return (0); |
156 | } | 152 | } |
157 | if (!ssl_cert_inst(&ssl->cert)) { | ||
158 | SSLerror(ssl, ERR_R_MALLOC_FAILURE); | ||
159 | return (0); | ||
160 | } | ||
161 | if ((pkey = EVP_PKEY_new()) == NULL) { | 153 | if ((pkey = EVP_PKEY_new()) == NULL) { |
162 | SSLerror(ssl, ERR_R_EVP_LIB); | 154 | SSLerror(ssl, ERR_R_EVP_LIB); |
163 | return (0); | 155 | return (0); |
@@ -278,10 +270,6 @@ SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) | |||
278 | SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); | 270 | SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); |
279 | return (0); | 271 | return (0); |
280 | } | 272 | } |
281 | if (!ssl_cert_inst(&ssl->cert)) { | ||
282 | SSLerror(ssl, ERR_R_MALLOC_FAILURE); | ||
283 | return (0); | ||
284 | } | ||
285 | ret = ssl_set_pkey(ssl->cert, pkey); | 273 | ret = ssl_set_pkey(ssl->cert, pkey); |
286 | return (ret); | 274 | return (ret); |
287 | } | 275 | } |
@@ -349,10 +337,6 @@ SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) | |||
349 | SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); | 337 | SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); |
350 | return (0); | 338 | return (0); |
351 | } | 339 | } |
352 | if (!ssl_cert_inst(&ctx->internal->cert)) { | ||
353 | SSLerrorx(ERR_R_MALLOC_FAILURE); | ||
354 | return (0); | ||
355 | } | ||
356 | return (ssl_set_cert(ctx->internal->cert, x)); | 340 | return (ssl_set_cert(ctx->internal->cert, x)); |
357 | } | 341 | } |
358 | 342 | ||
@@ -482,10 +466,6 @@ SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) | |||
482 | SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); | 466 | SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); |
483 | return (0); | 467 | return (0); |
484 | } | 468 | } |
485 | if (!ssl_cert_inst(&ctx->internal->cert)) { | ||
486 | SSLerrorx(ERR_R_MALLOC_FAILURE); | ||
487 | return (0); | ||
488 | } | ||
489 | if ((pkey = EVP_PKEY_new()) == NULL) { | 469 | if ((pkey = EVP_PKEY_new()) == NULL) { |
490 | SSLerrorx(ERR_R_EVP_LIB); | 470 | SSLerrorx(ERR_R_EVP_LIB); |
491 | return (0); | 471 | return (0); |
@@ -562,10 +542,6 @@ SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) | |||
562 | SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); | 542 | SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); |
563 | return (0); | 543 | return (0); |
564 | } | 544 | } |
565 | if (!ssl_cert_inst(&ctx->internal->cert)) { | ||
566 | SSLerrorx(ERR_R_MALLOC_FAILURE); | ||
567 | return (0); | ||
568 | } | ||
569 | return (ssl_set_pkey(ctx->internal->cert, pkey)); | 545 | return (ssl_set_pkey(ctx->internal->cert, pkey)); |
570 | } | 546 | } |
571 | 547 | ||