File 1499-Fix-typos-in-lib-crypto.patch of Package erlang
From 2fbcc5a82a7b742e41fdaef3cdcb1bea18566b3d Mon Sep 17 00:00:00 2001
From: "Kian-Meng, Ang" <kianmeng@cpan.org>
Date: Fri, 17 Dec 2021 17:24:59 +0800
Subject: [PATCH] Fix typos in lib/crypto
---
lib/crypto/c_src/Makefile.in | 2 +-
lib/crypto/c_src/api_ng.c | 4 ++--
lib/crypto/c_src/dh.c | 2 +-
lib/crypto/c_src/mac.c | 4 ++--
lib/crypto/c_src/openssl_config.h | 2 +-
lib/crypto/configure | 4 ++--
lib/crypto/configure.in | 2 +-
lib/crypto/doc/src/algorithm_details.xml | 4 ++--
lib/crypto/doc/src/crypto.xml | 18 +++++++++---------
lib/crypto/doc/src/licenses.xml | 6 +++---
lib/crypto/doc/src/new_api.xml | 4 ++--
lib/crypto/doc/src/notes.xml | 16 ++++++++--------
lib/crypto/src/crypto.erl | 4 ++--
lib/crypto/test/crypto_SUITE.erl | 2 +-
lib/crypto/test/engine_SUITE.erl | 12 ++++++------
.../property_test/crypto_prop_generators.erl | 4 ++--
16 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index fdeba8fc08..6b7bb6327e 100755
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -78,7 +78,7 @@
* LibreSSL has the same names on include files and symbols as OpenSSL, but defines
* the OPENSSL_VERSION_NUMBER to be >= 2.0.0
*
- * Therefor works tests like this as intendend:
+ * Therefore works tests like this as intendend:
* OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
* (The test is for example "2.4.2" >= "1.0.0" although the test
* with the cloned OpenSSL test would be "1.0.1" >= "1.0.0")
@@ -3403,7 +3403,7 @@ static ERL_NIF_TERM dh_generate_key_nif(
|| !enif_get_ulong(env, argv[3], &len)
/* Load dh_params with values to use by the generator.
- Mem mgmnt transfered from dh_p etc to dh_params */
+ Mem mgmnt transferred from dh_p etc to dh_params */
|| !(dh_params = DH_new())
|| (priv_key_in && !DH_set0_key(dh_params, NULL, priv_key_in))
|| !DH_set0_pqg(dh_params, dh_p, NULL, dh_g)
diff --git a/lib/crypto/configure b/lib/crypto/configure
index fdeba8fc08..6b7bb6327e 100755
--- a/lib/crypto/configure
+++ b/lib/crypto/configure
@@ -1462,7 +1462,7 @@ Some influential environment variables:
CXX C++ compiler
CXXFLAGS C++ compiler flags
LD linker (is often overridden by configure)
- LDFLAGS linker flags (can be risky to set since LD may be overriden by
+ LDFLAGS linker flags (can be risky to set since LD may be overridden by
configure)
LIBS libraries
DED_LD linker for Dynamic Erlang Drivers (set all DED_LD* variables or
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 3155f94e46..3c85bbdbea 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -140,7 +140,7 @@
<p></p>
</item>
- <tag>Asymetric Ciphers - Public Key Techniques</tag>
+ <tag>Asymmetric Ciphers - Public Key Techniques</tag>
<item>
<p></p>
<taglist>
@@ -797,7 +797,7 @@
<p>Enables (<c>Enable = true</c>) or disables (<c>Enable = false</c>) FIPS mode. Returns <c>true</c> if
the operation was successful or <c>false</c> otherwise.
</p>
- <p>Note that to enable FIPS mode succesfully, OTP must be built with the configure option <c>--enable-fips</c>,
+ <p>Note that to enable FIPS mode successfully, OTP must be built with the configure option <c>--enable-fips</c>,
and the underlying libcrypto must also support FIPS.
</p>
<p>See also <seealso marker="#info_fips-0">info_fips/0</seealso>.
@@ -1013,11 +1013,11 @@ _FloatValue = rand:uniform(). % [0.0
<note>
<p>
The state returned from this function can not be used
- to get a reproducable random sequence as from
+ to get a reproducible random sequence as from
the other
<seealso marker="stdlib:rand">rand</seealso>
functions,
- since reproducability does not match cryptographically safe.
+ since reproducibility does not match cryptographically safe.
</p>
<p>
The only supported usage is to generate one distinct
@@ -1103,11 +1103,11 @@ _FloatValue = rand:uniform(). % [0.0
<note>
<p>
The state returned from this function can not be used
- to get a reproducable random sequence as from
+ to get a reproducible random sequence as from
the other
<seealso marker="stdlib:rand">rand</seealso>
functions,
- since reproducability does not match cryptographically safe.
+ since reproducibility does not match cryptographically safe.
</p>
<p>
In fact since random data is cached some numbers may
diff --git a/lib/crypto/doc/src/licenses.xml b/lib/crypto/doc/src/licenses.xml
index e5c06cf7ce..e0e1bf629f 100644
--- a/lib/crypto/doc/src/licenses.xml
+++ b/lib/crypto/doc/src/licenses.xml
@@ -103,7 +103,7 @@ This chapter contains in extenso versions
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
+ * the following conditions are adhered to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
@@ -128,7 +128,7 @@ This chapter contains in extenso versions
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
+ * The word 'cryptographic' can be left out if the routines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
@@ -146,7 +146,7 @@ This chapter contains in extenso versions
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * The licence and distribution terms for any publically available version or
+ * The licence and distribution terms for any publicly available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml
index 66d9477f35..e503129511 100644
--- a/lib/crypto/doc/src/notes.xml
+++ b/lib/crypto/doc/src/notes.xml
@@ -67,7 +67,7 @@
<list>
<item>
<p>
- The chipers aes_cfb8 and aes_cfb128 are now using the EVP
+ The ciphers aes_cfb8 and aes_cfb128 are now using the EVP
interface. The supported key lengths are 128, 192 and 256
bits.</p>
<p>
@@ -75,7 +75,7 @@
</item>
<item>
<p>
- The chipers aes_cfb8 and aes_cfb128 are now available in
+ The ciphers aes_cfb8 and aes_cfb128 are now available in
FIPS enabled mode.</p>
<p>
Own Id: OTP-16134 Aux Id: PR-2407 </p>
@@ -1499,7 +1499,7 @@
Own Id: OTP-8551</p>
</item>
<item>
- <p>The undocumented, unsupport, and deprecated function
+ <p>The undocumented, unsupported, and deprecated function
<c>lists:flat_length/1</c> has been removed.</p>
<p>
Own Id: OTP-8584</p>
@@ -1782,7 +1782,7 @@
<list>
<item>
<p>
- crypto and zlib drivers improved to allow concurent smp
+ crypto and zlib drivers improved to allow concurrent smp
access.</p>
<p>
Own Id: OTP-7262</p>
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index b291f7a420..07f33d18f8 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -1745,7 +1745,7 @@ mod_pow(Base, Exponent, Prime) ->
%%%
%%%======================================================================
-%%%---- Refering to keys stored in an engine:
+%%%---- Referring to keys stored in an engine:
-type key_id() :: string() | binary() .
-type password() :: string() | binary() .
@@ -2407,7 +2407,7 @@ format_pwd(M) -> M.
%%
%% large integer in a binary with 32bit length
-%% MP representaion (SSH2)
+%% MP representation (SSH2)
mpint(X) when X < 0 -> mpint_neg(X);
mpint(X) -> mpint_pos(X).
diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl
index 2f6017e1bf..cab519fdb9 100644
--- a/lib/crypto/test/engine_SUITE.erl
+++ b/lib/crypto/test/engine_SUITE.erl
@@ -552,7 +552,7 @@ bad_arguments(Config) when is_list(Config) ->
<<"LOAD">>],
[])
of
- {error,bad_engine_id} -> % should have happend in the previous try...catch end!
+ {error,bad_engine_id} -> % should have happened in the previous try...catch end!
throw(dynamic_engine_unsupported);
X3 ->
ct:fail("3 Got ~p",[X3])
@@ -655,7 +655,7 @@ failed_engine_init(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
%% Test the optional flag in ctrl comands
ctrl_cmd_string()->
- [{doc, "Test that a not known optional ctrl comand do not fail"}].
+ [{doc, "Test that a not known optional ctrl command do not fail"}].
ctrl_cmd_string(Config) when is_list(Config) ->
try
case crypto:get_test_engine() of
@@ -685,7 +685,7 @@ ctrl_cmd_string(Config) when is_list(Config) ->
end.
ctrl_cmd_string_optional()->
- [{doc, "Test that a not known optional ctrl comand do not fail"}].
+ [{doc, "Test that a not known optional ctrl command do not fail"}].
ctrl_cmd_string_optional(Config) when is_list(Config) ->
try
case crypto:get_test_engine() of
@@ -831,7 +831,7 @@ sign_verify_rsa_pwd_bad_pwd(Config) ->
Pub = #{engine => engine_ref(Config),
key_id => key_id(Config, "rsa_public_key_pwd.pem")},
try sign_verify(rsa, sha, Priv, Pub) of
- _ -> {fail, "PWD prot pubkey sign succeded with no pwd!"}
+ _ -> {fail, "PWD prot pubkey sign succeeded with no pwd!"}
catch
error:badarg -> ok
end.
@@ -909,7 +909,7 @@ get_pub_from_priv_key_rsa_pwd_no_pwd(Config) ->
{fail, {wrong_error,Error}};
Pub ->
ct:log("rsa Pub = ~p",[Pub]),
- {fail, "PWD prot pubkey fetch succeded although no pwd!"}
+ {fail, "PWD prot pubkey fetch succeeded although no pwd!"}
end.
get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) ->
@@ -925,7 +925,7 @@ get_pub_from_priv_key_rsa_pwd_bad_pwd(Config) ->
{fail, {wrong_error,Error}};
Pub ->
ct:log("rsa Pub = ~p",[Pub]),
- {fail, "PWD prot pubkey fetch succeded with bad pwd!"}
+ {fail, "PWD prot pubkey fetch succeeded with bad pwd!"}
end.
get_pub_from_priv_key_dsa(Config) ->
diff --git a/lib/crypto/test/property_test/crypto_prop_generators.erl b/lib/crypto/test/property_test/crypto_prop_generators.erl
index 094d7360f9..2dd69cff4c 100644
--- a/lib/crypto/test/property_test/crypto_prop_generators.erl
+++ b/lib/crypto/test/property_test/crypto_prop_generators.erl
@@ -44,11 +44,11 @@ text_plain() -> iolist().
cipher() -> oneof( non_aead_ciphers() -- [aes_ige256] ).
key(Cipher) ->
- %% Can't be shrinked
+ %% Can't be shrunk
crypto:strong_rand_bytes( key_length(Cipher) ).
iv(Cipher) ->
- %% Can't be shrinked
+ %% Can't be shrunk
crypto:strong_rand_bytes( iv_length(Cipher) ).
iolist() -> frequency([{5, list( oneof([list(byte()),
--
2.31.1