diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/x509/x509_lu.c | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/x509/x509_lu.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c index 18bfecb11e..a20006d67e 100644 --- a/src/lib/libcrypto/x509/x509_lu.c +++ b/src/lib/libcrypto/x509/x509_lu.c | |||
@@ -61,8 +61,8 @@ | |||
61 | #include <openssl/lhash.h> | 61 | #include <openssl/lhash.h> |
62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
63 | 63 | ||
64 | static STACK *x509_store_meth=NULL; | 64 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_meth=NULL; |
65 | static STACK *x509_store_ctx_meth=NULL; | 65 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_meth=NULL; |
66 | 66 | ||
67 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | 67 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) |
68 | { | 68 | { |
@@ -244,7 +244,7 @@ void X509_STORE_free(X509_STORE *vfy) | |||
244 | } | 244 | } |
245 | sk_X509_LOOKUP_free(sk); | 245 | sk_X509_LOOKUP_free(sk); |
246 | 246 | ||
247 | CRYPTO_free_ex_data(x509_store_meth,(char *)vfy,&vfy->ex_data); | 247 | CRYPTO_free_ex_data(x509_store_meth,vfy,&vfy->ex_data); |
248 | lh_doall(vfy->certs,cleanup); | 248 | lh_doall(vfy->certs,cleanup); |
249 | lh_free(vfy->certs); | 249 | lh_free(vfy->certs); |
250 | Free(vfy); | 250 | Free(vfy); |
@@ -377,10 +377,24 @@ X509_OBJECT *X509_OBJECT_retrieve_by_subject(LHASH *h, int type, | |||
377 | abort(); | 377 | abort(); |
378 | } | 378 | } |
379 | 379 | ||
380 | tmp=(X509_OBJECT *)lh_retrieve(h,(char *)&stmp); | 380 | tmp=(X509_OBJECT *)lh_retrieve(h,&stmp); |
381 | return(tmp); | 381 | return(tmp); |
382 | } | 382 | } |
383 | 383 | ||
384 | X509_STORE_CTX *X509_STORE_CTX_new(void) | ||
385 | { | ||
386 | X509_STORE_CTX *ctx; | ||
387 | ctx = (X509_STORE_CTX *)Malloc(sizeof(X509_STORE_CTX)); | ||
388 | if(ctx) memset(ctx, 0, sizeof(X509_STORE_CTX)); | ||
389 | return ctx; | ||
390 | } | ||
391 | |||
392 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx) | ||
393 | { | ||
394 | X509_STORE_CTX_cleanup(ctx); | ||
395 | Free(ctx); | ||
396 | } | ||
397 | |||
384 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | 398 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, |
385 | STACK_OF(X509) *chain) | 399 | STACK_OF(X509) *chain) |
386 | { | 400 | { |
@@ -389,6 +403,8 @@ void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | |||
389 | ctx->cert=x509; | 403 | ctx->cert=x509; |
390 | ctx->untrusted=chain; | 404 | ctx->untrusted=chain; |
391 | ctx->last_untrusted=0; | 405 | ctx->last_untrusted=0; |
406 | ctx->purpose=0; | ||
407 | ctx->trust=0; | ||
392 | ctx->valid=0; | 408 | ctx->valid=0; |
393 | ctx->chain=NULL; | 409 | ctx->chain=NULL; |
394 | ctx->depth=9; | 410 | ctx->depth=9; |
@@ -404,7 +420,7 @@ void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) | |||
404 | sk_X509_pop_free(ctx->chain,X509_free); | 420 | sk_X509_pop_free(ctx->chain,X509_free); |
405 | ctx->chain=NULL; | 421 | ctx->chain=NULL; |
406 | } | 422 | } |
407 | CRYPTO_free_ex_data(x509_store_ctx_meth,(char *)ctx,&(ctx->ex_data)); | 423 | CRYPTO_free_ex_data(x509_store_ctx_meth,ctx,&(ctx->ex_data)); |
408 | memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA)); | 424 | memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA)); |
409 | } | 425 | } |
410 | 426 | ||