if (ssl_x509_store_ctx_idx < 0)
{
ssl_x509_store_ctx_idx=X509_STORE_CTX_get_ex_new_index(
- 0,"SSL for verifiy callback",NULL,NULL,NULL);
+ 0,"SSL for verify callback",NULL,NULL,NULL);
}
return(ssl_x509_store_ctx_idx);
}
{
int i;
+ if(c == NULL)
+ return;
+
i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT);
#ifdef REF_PRINT
REF_PRINT("CERT",c);
Free(c);
}
+int ssl_cert_instantiate(CERT **o, CERT *d)
+ {
+ CERT *n;
+ if (o == NULL)
+ {
+ SSLerr(SSL_F_SSL_CERT_INSTANTIATE, ERR_R_PASSED_NULL_PARAMETER);
+ return(0);
+ }
+ if (*o != NULL && d != NULL && *o != d)
+ return(1);
+ if ((n = ssl_cert_new()) == NULL)
+ {
+ SSLerr(SSL_F_SSL_CERT_INSTANTIATE, ERR_R_MALLOC_FAILURE);
+ return(0);
+ }
+ if (*o != NULL)
+ ssl_cert_free(*o);
+ *o = n;
+ return(1);
+ }
+
int ssl_set_cert_type(c, type)
CERT *c;
int type;