summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_cert.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2015-03-14 18:09:44 +0100
committerKurt Roeckx <kurt@roeckx.be>2015-03-15 12:15:08 +0100
commit2c3823491d8812560922a58677e3ad2db4b2ec8d (patch)
treeba75df30b197152acc83c1c931d55c1a6121d1af /ssl/ssl_cert.c
parent9fbbdd73c58c29dc46cc314f7165e45e6d43fd60 (diff)
Remove ssl_cert_inst()
It created the cert structure in SSL_CTX or SSL if it was NULL, but they can never be NULL as the comments already said. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r--ssl/ssl_cert.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index fa0c693b2f..a88d211bc5 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -484,31 +484,6 @@ void ssl_cert_free(CERT *c)
OPENSSL_free(c);
}
-int ssl_cert_inst(CERT **o)
-{
- /*
- * Create a CERT if there isn't already one (which cannot really happen,
- * as it is initially created in SSL_CTX_new; but the earlier code
- * usually allows for that one being non-existant, so we follow that
- * behaviour, as it might turn out that there actually is a reason for it
- * -- but I'm not sure that *all* of the existing code could cope with
- * s->cert being NULL, otherwise we could do without the initialization
- * in SSL_CTX_new).
- */
-
- if (o == NULL) {
- SSLerr(SSL_F_SSL_CERT_INST, ERR_R_PASSED_NULL_PARAMETER);
- return (0);
- }
- if (*o == NULL) {
- if ((*o = ssl_cert_new()) == NULL) {
- SSLerr(SSL_F_SSL_CERT_INST, ERR_R_MALLOC_FAILURE);
- return (0);
- }
- }
- return (1);
-}
-
int ssl_cert_set0_chain(SSL *s, SSL_CTX *ctx, STACK_OF(X509) *chain)
{
int i, r;