diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2016-03-01 18:06:15 +0000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-08 11:10:34 -0500 |
commit | c001ce33137993a0c4ff15060ed1639826bfca0b (patch) | |
tree | 0589954d36d7138b51b4e9906a2d728e9c25669c /include/openssl | |
parent | 41cfbccc99f3ca3c9f656d8c71e2db5bcfcf6817 (diff) | |
download | openssl-c001ce33137993a0c4ff15060ed1639826bfca0b.zip openssl-c001ce33137993a0c4ff15060ed1639826bfca0b.tar.gz openssl-c001ce33137993a0c4ff15060ed1639826bfca0b.tar.bz2 |
Convert CRYPTO_LOCK_X509_* to new multi-threading API
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include/openssl')
-rw-r--r-- | include/openssl/asn1t.h | 4 | ||||
-rw-r--r-- | include/openssl/crypto.h | 5 | ||||
-rw-r--r-- | include/openssl/x509.h | 2 | ||||
-rw-r--r-- | include/openssl/x509_vfy.h | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/include/openssl/asn1t.h b/include/openssl/asn1t.h index 1a17ee9..455efff 100644 --- a/include/openssl/asn1t.h +++ b/include/openssl/asn1t.h @@ -207,8 +207,8 @@ extern "C" { static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \ ASN1_SEQUENCE(tname) -# define ASN1_SEQUENCE_ref(tname, cb, lck) \ - static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \ +# define ASN1_SEQUENCE_ref(tname, cb) \ + static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0}; \ ASN1_SEQUENCE(tname) # define ASN1_SEQUENCE_enc(tname, enc, cb) \ diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index ca3eb3c..41eac25 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -165,11 +165,6 @@ extern "C" { * names in cryptlib.c */ -# define CRYPTO_LOCK_X509 3 -# define CRYPTO_LOCK_X509_INFO 4 -# define CRYPTO_LOCK_X509_PKEY 5 -# define CRYPTO_LOCK_X509_CRL 6 -# define CRYPTO_LOCK_X509_REQ 7 # define CRYPTO_LOCK_X509_STORE 11 # define CRYPTO_LOCK_SSL_CTX 12 # define CRYPTO_LOCK_SSL_CERT 13 diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 294ab83..fe60dc8 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -312,6 +312,7 @@ typedef struct private_key_st { /* expanded version of 'enc_algor' */ EVP_CIPHER_INFO cipher; int references; + CRYPTO_RWLOCK *lock; } X509_PKEY; typedef struct X509_info_st { @@ -322,6 +323,7 @@ typedef struct X509_info_st { int enc_len; char *enc_data; int references; + CRYPTO_RWLOCK *lock; } X509_INFO; DEFINE_STACK_OF(X509_INFO) diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h index f2bd073..e883349 100644 --- a/include/openssl/x509_vfy.h +++ b/include/openssl/x509_vfy.h @@ -179,6 +179,7 @@ struct x509_store_st { int (*cleanup) (X509_STORE_CTX *ctx); CRYPTO_EX_DATA ex_data; int references; + CRYPTO_RWLOCK *lock; } /* X509_STORE */ ; int X509_STORE_set_depth(X509_STORE *store, int depth); @@ -430,6 +431,7 @@ void X509_OBJECT_up_ref_count(X509_OBJECT *a); void X509_OBJECT_free_contents(X509_OBJECT *a); X509_STORE *X509_STORE_new(void); void X509_STORE_free(X509_STORE *v); +int X509_STORE_up_ref(X509_STORE *v); STACK_OF(X509) *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm); STACK_OF(X509_CRL) *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm); |