120 #ifndef NO_SYS_TYPES_H
121 # include <sys/types.h>
129 #ifndef OPENSSL_NO_DH
137 static volatile int ssl_x509_store_ctx_idx= -1;
138 int got_write_lock = 0;
142 if (ssl_x509_store_ctx_idx < 0)
148 if (ssl_x509_store_ctx_idx < 0)
151 0,
"SSL for verify callback",NULL,NULL,NULL);
160 return ssl_x509_store_ctx_idx;
163 static void ssl_cert_set_default_md(
CERT *cert)
166 #ifndef OPENSSL_NO_DSA
169 #ifndef OPENSSL_NO_RSA
173 #ifndef OPENSSL_NO_ECDSA
188 memset(ret,0,
sizeof(
CERT));
192 ssl_cert_set_default_md(ret);
208 memset(ret, 0,
sizeof(
CERT));
220 #ifndef OPENSSL_NO_RSA
229 #ifndef OPENSSL_NO_DH
262 #ifndef OPENSSL_NO_ECDH
328 ssl_cert_set_default_md(ret);
332 #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH)
335 #ifndef OPENSSL_NO_RSA
339 #ifndef OPENSSL_NO_DH
343 #ifndef OPENSSL_NO_ECDH
375 fprintf(stderr,
"ssl_cert_free, bad reference count\n");
380 #ifndef OPENSSL_NO_RSA
383 #ifndef OPENSSL_NO_DH
386 #ifndef OPENSSL_NO_ECDH
397 if (c->
pkeys[i].publickey != NULL)
444 memset(ret, 0 ,
sizeof *ret);
460 REF_PRINT(
"SESS_CERT", sc);
467 fprintf(stderr,
"ssl_sess_cert_free, bad reference count\n");
473 if (sc->cert_chain != NULL)
487 #ifndef OPENSSL_NO_RSA
491 #ifndef OPENSSL_NO_DH
495 #ifndef OPENSSL_NO_ECDH
536 s->
server ?
"ssl_client" :
"ssl_server");
553 #ifndef OPENSSL_NO_X509_VERIFY
570 if (*ca_list != NULL)
597 set_client_CA_list(&(s->client_CA),name_list);
602 set_client_CA_list(&(ctx->client_CA),name_list);
607 return(ctx->client_CA);
616 return(s->
s3->
tmp.ca_names);
622 if (s->client_CA != NULL)
623 return(s->client_CA);
625 return(s->
ctx->client_CA);
633 if (x == NULL)
return(0);
642 X509_NAME_free(name);
650 return(add_client_CA(&(ssl->client_CA),x));
655 return(add_client_CA(&(ctx->client_CA),x));
663 #ifndef OPENSSL_NO_STDIO
683 if ((sk == NULL) || (in == NULL))
694 if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL)
708 if (xn == NULL)
goto err;
726 if (x != NULL) X509_free(x);
766 if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL)
770 if (xn == NULL)
goto err;
821 if(strlen(dir)+strlen(filename)+2 >
sizeof buf)
827 #ifdef OPENSSL_SYS_VMS
832 if (r <= 0 || r >= (
int)
sizeof(buf))