diff options
author | Bodo Möller <bodo@openssl.org> | 2000-12-15 16:40:35 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-12-15 16:40:35 +0000 |
commit | 3ac82faae5eb02140f347610be0726f549a0aa0a (patch) | |
tree | 66436fe17f2753bb728a1455a5d8763b6c00c5d3 /crypto/x509 | |
parent | c08523d862276964e65d6a1de07439b9d0c2a6da (diff) |
Locking issues.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_vfy.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 0f4110cc64..32515cbcc4 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -80,10 +80,7 @@ const char *X509_version="X.509" OPENSSL_VERSION_PTEXT; static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_method=NULL; static int x509_store_ctx_num=0; -#if 0 -static int x509_store_num=1; -static STACK *x509_store_method=NULL; -#endif + static int null_callback(int ok, X509_STORE_CTX *e) { @@ -702,12 +699,17 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) - { - x509_store_ctx_num++; - return CRYPTO_get_ex_new_index(x509_store_ctx_num-1, + { + /* This function is (usually) called only once, by + * SSL_get_ex_data_X509_STORE_CTX_idx (ssl/ssl_cert.c). + * That function uses locking, so we don't (usually) + * have to worry about locking here. For the whole cruel + * truth, see crypto/ex_data.c */ + x509_store_ctx_num++; + return CRYPTO_get_ex_new_index(x509_store_ctx_num-1, &x509_store_ctx_method, - argl,argp,new_func,dup_func,free_func); - } + argl,argp,new_func,dup_func,free_func); + } int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) { |