doc: Document that the OBJ creation functions are now thread safe.
authorPauli <pauli@openssl.org>
Thu, 24 Jun 2021 13:51:53 +0000 (23:51 +1000)
committerPauli <ppzgs1@gmail.com>
Sat, 25 Sep 2021 00:39:20 +0000 (10:39 +1000)
With the OBJ_ thread locking in place, these documentation changes are not
required.

This reverts commit 0218bcdd3feab456135207c140998305df73ab7b.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15713)

doc/man3/OBJ_nid2obj.pod
doc/man7/provider-base.pod

index 58fc94f6dd97a921829e94de0070a54875f8f804..2d16cc83ccd6cdb797829f82c86c8b25246d0a50 100644 (file)
@@ -139,6 +139,8 @@ These functions cannot return B<const> because an B<ASN1_OBJECT> can
 represent both an internal, constant, OID and a dynamically-created one.
 The latter cannot be constant because it needs to be freed after use.
 
+These functions were not thread safe in OpenSSL 3.0 and before.
+
 =head1 RETURN VALUES
 
 OBJ_nid2obj() returns an B<ASN1_OBJECT> structure or B<NULL> is an
@@ -181,10 +183,6 @@ Instead I<buf> must point to a valid buffer and I<buf_len> should
 be set to a positive value. A buffer length of 80 should be more
 than enough to handle any OID encountered in practice.
 
-Neither OBJ_create() nor OBJ_add_sigid() do any locking and are thus not
-thread safe.  Moreover, none of the other functions should be called while
-concurrent calls to these two functions are possible.
-
 =head1 SEE ALSO
 
 L<ERR_get_error(3)>
index d1e26baa11dc1343b18cf98f9ae198d85444cea5..5af35bf4dcd39416def81fc4d9efa1eb5baeb8cf 100644 (file)
@@ -269,7 +269,6 @@ It will treat as success the case where the OID already exists (even if the
 short name I<sn> or long name I<ln> provided as arguments differ from those
 associated with the existing OID, in which case the new names are not
 associated).
-This function is not thread safe.
 
 The core_obj_add_sigid() function registers a new composite signature algorithm
 (I<sign_name>) consisting of an underlying signature algorithm (I<pkey_name>)
@@ -283,7 +282,6 @@ to identify the object. It will treat as success the case where the composite
 signature algorithm already exists (even if registered against a different
 underlying signature or digest algorithm). It returns 1 on success or 0 on
 failure.
-This function is not thread safe.
 
 CRYPTO_malloc(), CRYPTO_zalloc(), CRYPTO_memdup(), CRYPTO_strdup(),
 CRYPTO_strndup(), CRYPTO_free(), CRYPTO_clear_free(),
@@ -613,6 +611,11 @@ or maximum. A -1 indicates that the group should not be used in that protocol.
 
 =back
 
+=head1 NOTES
+
+The core_obj_create() and core_obj_add_sigid() functions were not thread safe
+in OpenSSL 3.0.
+
 =head1 EXAMPLES
 
 This is an example of a simple provider made available as a