(C). This function is faster than repeated applications of
BN_mul().
@@ -108,7 +116,10 @@ the arguments.
=head1 RETURN VALUES
-For all functions, 1 is returned for success, 0 on error. The return
+The BN_mod_sqrt() returns the result (possibly incorrect if I is
+not a prime), or NULL.
+
+For all remaining functions, 1 is returned for success, 0 on error. The return
value should always be checked (e.g., C).
The error codes can be obtained by L.
@@ -119,7 +130,7 @@ L, L
=head1 COPYRIGHT
-Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
diff --git a/openssl/doc/man3/BN_cmp.pod b/openssl/doc/man3/BN_cmp.pod
index 95d162ff..261619c5 100644
--- a/openssl/doc/man3/BN_cmp.pod
+++ b/openssl/doc/man3/BN_cmp.pod
@@ -2,42 +2,47 @@
=head1 NAME
-BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd - BIGNUM comparison and test functions
+BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_abs_is_word, BN_is_odd - BIGNUM comparison and test functions
=head1 SYNOPSIS
#include
- int BN_cmp(BIGNUM *a, BIGNUM *b);
- int BN_ucmp(BIGNUM *a, BIGNUM *b);
+ int BN_cmp(const BIGNUM *a, const BIGNUM *b);
+ int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
- int BN_is_zero(BIGNUM *a);
- int BN_is_one(BIGNUM *a);
- int BN_is_word(BIGNUM *a, BN_ULONG w);
- int BN_is_odd(BIGNUM *a);
+ int BN_is_zero(const BIGNUM *a);
+ int BN_is_one(const BIGNUM *a);
+ int BN_is_word(const BIGNUM *a, const BN_ULONG w);
+ int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
+ int BN_is_odd(const BIGNUM *a);
=head1 DESCRIPTION
-BN_cmp() compares the numbers B and B. BN_ucmp() compares their
+BN_cmp() compares the numbers I and I. BN_ucmp() compares their
absolute values.
-BN_is_zero(), BN_is_one() and BN_is_word() test if B equals 0, 1,
-or B respectively. BN_is_odd() tests if a is odd.
-
-BN_is_zero(), BN_is_one(), BN_is_word() and BN_is_odd() are macros.
+BN_is_zero(), BN_is_one(), BN_is_word() and BN_abs_is_word() test if
+I equals 0, 1, I, or EIE respectively.
+BN_is_odd() tests if I is odd.
=head1 RETURN VALUES
-BN_cmp() returns -1 if B E B, 0 if B == B and 1 if
-B E B. BN_ucmp() is the same using the absolute values
-of B and B.
+BN_cmp() returns -1 if I E I, 0 if I == I and 1 if
+I E I. BN_ucmp() is the same using the absolute values
+of I and I.
+
+BN_is_zero(), BN_is_one() BN_is_word(), BN_abs_is_word() and
+BN_is_odd() return 1 if the condition is true, 0 otherwise.
+
+=head1 HISTORY
-BN_is_zero(), BN_is_one() BN_is_word() and BN_is_odd() return 1 if
-the condition is true, 0 otherwise.
+Prior to OpenSSL 1.1.0, BN_is_zero(), BN_is_one(), BN_is_word(),
+BN_abs_is_word() and BN_is_odd() were macros.
=head1 COPYRIGHT
-Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
diff --git a/openssl/doc/man3/BN_rand.pod b/openssl/doc/man3/BN_rand.pod
index d57348e6..5ed14a92 100644
--- a/openssl/doc/man3/BN_rand.pod
+++ b/openssl/doc/man3/BN_rand.pod
@@ -38,7 +38,7 @@ the number will be set to 1, so that the product of two such random
numbers will always have 2*B length.
If B is B, the number will be odd; if it
is B it can be odd or even.
-If B is 1 then B cannot also be B.
+If B is 1 then B cannot also be B.
BN_rand_range() generates a cryptographically strong pseudo-random
number B in the range 0 E= B E B.
@@ -89,7 +89,7 @@ BN_priv_rand() and BN_priv_rand_range() functions were added in OpenSSL 1.1.1.
=head1 COPYRIGHT
-Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
diff --git a/openssl/doc/man3/DEFINE_STACK_OF.pod b/openssl/doc/man3/DEFINE_STACK_OF.pod
index 43a3214d..6f4ac7ec 100644
--- a/openssl/doc/man3/DEFINE_STACK_OF.pod
+++ b/openssl/doc/man3/DEFINE_STACK_OF.pod
@@ -238,7 +238,8 @@ sk_TYPE_pop(), sk_TYPE_shift(), sk_TYPE_delete() and sk_TYPE_delete_ptr()
return a pointer to the deleted element or B on error.
sk_TYPE_insert(), sk_TYPE_push() and sk_TYPE_unshift() return the total
-number of elements in the stack and 0 if an error occurred.
+number of elements in the stack and 0 if an error occurred. sk_TYPE_push()
+further returns -1 if B is B.
sk_TYPE_set() returns a pointer to the replacement element or B on
error.
diff --git a/openssl/doc/man3/ENGINE_add.pod b/openssl/doc/man3/ENGINE_add.pod
index 369900c2..34a640d2 100644
--- a/openssl/doc/man3/ENGINE_add.pod
+++ b/openssl/doc/man3/ENGINE_add.pod
@@ -597,8 +597,7 @@ B implementations.
All ENGINE_register_TYPE() functions return 1 on success or 0 on error.
-ENGINE_register_complete() and ENGINE_register_all_complete() return 1 on success
-or 0 on error.
+ENGINE_register_complete() and ENGINE_register_all_complete() always return 1.
ENGINE_ctrl() returns a positive value on success or others on error.
@@ -609,7 +608,7 @@ ENGINE_ctrl_cmd() and ENGINE_ctrl_cmd_string() return 1 on success or 0 on error
ENGINE_new() returns a valid B structure on success or NULL if an error
occurred.
-ENGINE_free() returns 1 on success or 0 on error.
+ENGINE_free() always returns 1.
ENGINE_up_ref() returns 1 on success or 0 on error.
@@ -657,7 +656,7 @@ and should not be used.
=head1 COPYRIGHT
-Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
diff --git a/openssl/doc/man3/ERR_load_strings.pod b/openssl/doc/man3/ERR_load_strings.pod
index 3167f271..2b21a3bc 100644
--- a/openssl/doc/man3/ERR_load_strings.pod
+++ b/openssl/doc/man3/ERR_load_strings.pod
@@ -9,7 +9,7 @@ arbitrary error strings
#include
- void ERR_load_strings(int lib, ERR_STRING_DATA str[]);
+ int ERR_load_strings(int lib, ERR_STRING_DATA *str);
int ERR_get_next_error_library(void);
@@ -38,7 +38,7 @@ to user libraries at runtime.
=head1 RETURN VALUES
-ERR_load_strings() returns no value. ERR_PACK() return the error code.
+ERR_load_strings() returns 1 for success and 0 for failure. ERR_PACK() returns the error code.
ERR_get_next_error_library() returns zero on failure, otherwise a new
library number.
@@ -48,7 +48,7 @@ L
=head1 COPYRIGHT
-Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
diff --git a/openssl/doc/man3/EVP_EncryptInit.pod b/openssl/doc/man3/EVP_EncryptInit.pod
index 0d8a780b..392ce5db 100644
--- a/openssl/doc/man3/EVP_EncryptInit.pod
+++ b/openssl/doc/man3/EVP_EncryptInit.pod
@@ -380,18 +380,20 @@ B.
=item EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, taglen, tag)
-Sets the expected tag to C bytes from C.
-The tag length can only be set before specifying an IV.
+When decrypting, this call sets the expected tag to C bytes from C.
C must be between 1 and 16 inclusive.
+The tag must be set prior to any call to EVP_DecryptFinal() or
+EVP_DecryptFinal_ex().
For GCM, this call is only valid when decrypting data.
For OCB, this call is valid when decrypting data to set the expected tag,
-and before encryption to set the desired tag length.
+and when encrypting to set the desired tag length.
-In OCB mode, calling this before encryption with C set to C sets the
-tag length. If this is not called prior to encryption, a default tag length is
-used.
+In OCB mode, calling this when encrypting with C set to C sets the
+tag length. The tag length can only be set before specifying an IV. If this is
+not called prior to setting the IV during encryption, then a default tag length
+is used.
For OCB AES, the default tag length is 16 (i.e. 128 bits). It is also the
maximum tag length for OCB.
@@ -659,7 +661,7 @@ EVP_CIPHER_CTX_reset().
=head1 COPYRIGHT
-Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
diff --git a/openssl/doc/man3/OBJ_nid2obj.pod b/openssl/doc/man3/OBJ_nid2obj.pod
index f84d5b1e..b37d9923 100644
--- a/openssl/doc/man3/OBJ_nid2obj.pod
+++ b/openssl/doc/man3/OBJ_nid2obj.pod
@@ -46,50 +46,52 @@ Deprecated:
The ASN1 object utility functions process ASN1_OBJECT structures which are
a representation of the ASN1 OBJECT IDENTIFIER (OID) type.
For convenience, OIDs are usually represented in source code as numeric
-identifiers, or Bs. OpenSSL has an internal table of OIDs that
+identifiers, or Is. OpenSSL has an internal table of OIDs that
are generated when the library is built, and their corresponding NIDs
are available as defined constants. For the functions below, application
code should treat all returned values -- OIDs, NIDs, or names -- as
constants.
-OBJ_nid2obj(), OBJ_nid2ln() and OBJ_nid2sn() convert the NID B to
+OBJ_nid2obj(), OBJ_nid2ln() and OBJ_nid2sn() convert the NID I to
an ASN1_OBJECT structure, its long name and its short name respectively,
or B if an error occurred.
OBJ_obj2nid(), OBJ_ln2nid(), OBJ_sn2nid() return the corresponding NID
-for the object B, the long name or the short name respectively
+for the object I, the long name or the short name respectively
or NID_undef if an error occurred.
-OBJ_txt2nid() returns NID corresponding to text string . B can be
+OBJ_txt2nid() returns NID corresponding to text string I. I can be
a long name, a short name or the numerical representation of an object.
-OBJ_txt2obj() converts the text string B into an ASN1_OBJECT structure.
-If B is 0 then long names and short names will be interpreted
-as well as numerical forms. If B is 1 only the numerical form
+OBJ_txt2obj() converts the text string I into an ASN1_OBJECT structure.
+If I is 0 then long names and short names will be interpreted
+as well as numerical forms. If I is 1 only the numerical form
is acceptable.
-OBJ_obj2txt() converts the B B into a textual representation.
-The representation is written as a null terminated string to B
-at most B bytes are written, truncating the result if necessary.
-The total amount of space required is returned. If B is 0 then
-if the object has a long or short name then that will be used, otherwise
-the numerical form will be used. If B is 1 then the numerical
-form will always be used.
+OBJ_obj2txt() converts the B I into a textual representation.
+Unless I is NULL,
+the representation is written as a NUL-terminated string to I, where
+at most I bytes are written, truncating the result if necessary.
+In any case it returns the total string length, excluding the NUL character,
+required for non-truncated representation, or -1 on error.
+If I is 0 then if the object has a long or short name
+then that will be used, otherwise the numerical form will be used.
+If I is 1 then the numerical form will always be used.
-i2t_ASN1_OBJECT() is the same as OBJ_obj2txt() with the B set to zero.
+i2t_ASN1_OBJECT() is the same as OBJ_obj2txt() with the I set to zero.
-OBJ_cmp() compares B to B. If the two are identical 0 is returned.
+OBJ_cmp() compares I