diff options
author | Kian-Meng, Ang <kianmeng@cpan.org> | 2021-12-17 17:24:59 +0800 |
---|---|---|
committer | Kian-Meng, Ang <kianmeng@cpan.org> | 2021-12-17 17:24:59 +0800 |
commit | 2fbcc5a82a7b742e41fdaef3cdcb1bea18566b3d (patch) | |
tree | ad6fabc53fdde5637864b555dcf74fd65ba585e6 /lib/crypto | |
parent | c8158461b6554d1a404c79ef633d77f9b6385c14 (diff) | |
download | erlang-2fbcc5a82a7b742e41fdaef3cdcb1bea18566b3d.tar.gz |
Fix typos in lib/crypto
Diffstat (limited to 'lib/crypto')
-rw-r--r-- | lib/crypto/c_src/Makefile.in | 2 | ||||
-rw-r--r-- | lib/crypto/c_src/api_ng.c | 4 | ||||
-rw-r--r-- | lib/crypto/c_src/dh.c | 2 | ||||
-rw-r--r-- | lib/crypto/c_src/mac.c | 4 | ||||
-rw-r--r-- | lib/crypto/c_src/openssl_config.h | 2 | ||||
-rwxr-xr-x | lib/crypto/configure | 4 | ||||
-rw-r--r-- | lib/crypto/configure.in | 2 | ||||
-rw-r--r-- | lib/crypto/doc/src/algorithm_details.xml | 4 | ||||
-rw-r--r-- | lib/crypto/doc/src/crypto.xml | 18 | ||||
-rw-r--r-- | lib/crypto/doc/src/licenses.xml | 6 | ||||
-rw-r--r-- | lib/crypto/doc/src/new_api.xml | 4 | ||||
-rw-r--r-- | lib/crypto/doc/src/notes.xml | 16 | ||||
-rw-r--r-- | lib/crypto/src/crypto.erl | 4 | ||||
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/crypto/test/engine_SUITE.erl | 12 | ||||
-rw-r--r-- | lib/crypto/test/property_test/crypto_prop_generators.erl | 4 |
16 files changed, 45 insertions, 45 deletions
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in index 8ad5c7889e..417a5ee865 100644 --- a/lib/crypto/c_src/Makefile.in +++ b/lib/crypto/c_src/Makefile.in @@ -126,7 +126,7 @@ CALLBACK_LIB = $(LIBDIR)/crypto_callback$(TYPEMARKER).@DED_EXT@ TEST_ENGINE_LIB = $(LIBDIR)/otp_test_engine$(TYPEMARKER).@DED_EXT@ DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@ -# Wierd that we compile as if dynamically linking when statically +# Weird that we compile as if dynamically linking when statically # linking on windows... ifeq ($(DYNAMIC_CRYPTO_LIB),yes) DYNAMIC_OR_WIN_CRYPTO_LIB=yes diff --git a/lib/crypto/c_src/api_ng.c b/lib/crypto/c_src/api_ng.c index b745974d14..15da0e7bd1 100644 --- a/lib/crypto/c_src/api_ng.c +++ b/lib/crypto/c_src/api_ng.c @@ -116,7 +116,7 @@ static ERL_NIF_TERM get_opts(ErlNifEnv* env, const ERL_NIF_TERM opts, int opts_a } if (!enif_is_list(env, opts) || !enif_get_list_length(env, opts, &list_len)) - /* Not a boolean() and not a list, definitly an error */ + /* Not a boolean() and not a list, definitely an error */ return EXCP_BADARG_N(env, opts_arg_num, "Options are not a boolean or a proper list"); /* A list, might be a property list, as it should */ @@ -211,7 +211,7 @@ static int get_init_args(ErlNifEnv* env, ctx_res->padded_size = -1; ctx_res->size = 0; - /* Two initializations to make CodeChecker happy: it gets a bit desoriented + /* Two initializations to make CodeChecker happy: it gets a bit disoriented by the NIF Exception model */ ctx_res->encflag = 0; ctx_res->padding = atom_error; diff --git a/lib/crypto/c_src/dh.c b/lib/crypto/c_src/dh.c index 52d1023e8c..b226e8dfb4 100644 --- a/lib/crypto/c_src/dh.c +++ b/lib/crypto/c_src/dh.c @@ -71,7 +71,7 @@ ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar goto bad_arg; /* 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 */ if ((dh_params = DH_new()) == NULL) goto bad_arg; if (priv_key_in) { diff --git a/lib/crypto/c_src/mac.c b/lib/crypto/c_src/mac.c index 8ce54c1b9e..bd76fa209a 100644 --- a/lib/crypto/c_src/mac.c +++ b/lib/crypto/c_src/mac.c @@ -269,7 +269,7 @@ ERL_NIF_TERM mac_one_time(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) #if defined(HAS_EVP_PKEY_CTX) && (! DISABLE_EVP_HMAC) # ifdef HAVE_PKEY_new_raw_private_key - /* Prefered for new applications according to EVP_PKEY_new_mac_key(3) */ + /* Preferred for new applications according to EVP_PKEY_new_mac_key(3) */ pkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, /*engine*/ NULL, key_bin.data, key_bin.size); # else /* Available in older versions */ @@ -555,7 +555,7 @@ ERL_NIF_TERM mac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) md = digp->md.p; # ifdef HAVE_PKEY_new_raw_private_key - /* Prefered for new applications according to EVP_PKEY_new_mac_key(3) */ + /* Preferred for new applications according to EVP_PKEY_new_mac_key(3) */ pkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, /*engine*/ NULL, key_bin.data, key_bin.size); # else /* Available in older versions */ diff --git a/lib/crypto/c_src/openssl_config.h b/lib/crypto/c_src/openssl_config.h index 49627f17e7..94a7a8d963 100644 --- a/lib/crypto/c_src/openssl_config.h +++ b/lib/crypto/c_src/openssl_config.h @@ -58,7 +58,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") 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 @@ -6071,7 +6071,7 @@ $as_echo "" >&6; } test $dir_lib32 = yes && libdirs="/lib32 $libdirs" # - # We try the follwing runtime paths in the + # We try the following runtime paths in the # following order: # 1. Standard ssl locations with all variations # of lib subdirectories that we know of diff --git a/lib/crypto/configure.in b/lib/crypto/configure.in index 16bdecda73..0e20b75ff3 100644 --- a/lib/crypto/configure.in +++ b/lib/crypto/configure.in @@ -660,7 +660,7 @@ yes | default) # Use standard lib locations for ssl runtime library path test $dir_lib32 = yes && libdirs="/lib32 $libdirs" # - # We try the follwing runtime paths in the + # We try the following runtime paths in the # following order: # 1. Standard ssl locations with all variations # of lib subdirectories that we know of diff --git a/lib/crypto/doc/src/algorithm_details.xml b/lib/crypto/doc/src/algorithm_details.xml index f8b88a4e2e..dce04a1409 100644 --- a/lib/crypto/doc/src/algorithm_details.xml +++ b/lib/crypto/doc/src/algorithm_details.xml @@ -44,10 +44,10 @@ <seetype marker="crypto#cipher_iv">cipher_iv()</seetype> or <seetype marker="crypto#cipher_aead">cipher_aead()</seetype>. The letters IV are short for <i>Initialization Vector</i> and - AEAD is an abreviation of <i>Authenticated Encryption with Associated Data</i>. + AEAD is an abbreviation of <i>Authenticated Encryption with Associated Data</i>. </p> <p>Due to irregular naming conventions, some cipher names in the old api are - substitued by new names in the new api. For a list of retired names, see + substituted by new names in the new api. For a list of retired names, see <seeguide marker="crypto:new_api#retired-cipher-names">Retired cipher names</seeguide>. </p> <p>To dynamically check availability, check that the name in the <i>Cipher and Mode</i> column is present in the 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 @@ -143,7 +143,7 @@ <p></p> </item> - <tag>Asymetric Ciphers - Public Key Techniques</tag> + <tag>Asymmetric Ciphers - Public Key Techniques</tag> <item> <p></p> <taglist> @@ -662,7 +662,7 @@ The <seetype marker="#otp_padding">otp_padding</seetype> is not removed - it has to be done elsewhere. </p> - <p>If padding is <c>{padding,none}</c> or not specifed and the total data from all subsequent + <p>If padding is <c>{padding,none}</c> or not specified and the total data from all subsequent <seemfa marker="crypto#crypto_update/2">crypto_updates</seemfa> does not fill the last block fully, that last data is lost. In case of <c>{padding,none}</c> there will be an error in this case. If padding is not specified, the bytes of the unfilled block is silently @@ -744,7 +744,7 @@ the number of bytes padded. Otherwise 0. </item> <tag><c>padding_type</c></tag> - <item>The type of the padding as provided in the call ot + <item>The type of the padding as provided in the call to <seemfa marker="#crypto_init/3">crypto_init/3,4</seemfa>. </item> <tag><c>encrypt</c></tag> @@ -1144,7 +1144,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 <seemfa marker="#info_fips/0">info_fips/0</seemfa>. @@ -1217,7 +1217,7 @@ <p>The ciphers <c>aes_cbc</c>, <c>aes_cfb8</c>, <c>aes_cfb128</c>, <c>aes_ctr</c>, <c>aes_ecb</c>, <c>aes_gcm</c> and <c>aes_ccm</c> has no keylength in the <c>Type</c> as opposed to for example <c>aes_128_ctr</c>. They adapt to the length of - the key provided in the encrypt and decrypt function. Therefor it is impossible to return a valid keylength + the key provided in the encrypt and decrypt function. Therefore it is impossible to return a valid keylength in the map.</p> <p>Always use a <c>Type</c> with an explicit key length, </p> @@ -1392,11 +1392,11 @@ _FloatValue = rand:uniform(). % [0.0; 1.0[</pre> <note> <p> The state returned from this function cannot be used - to get a reproducable random sequence as from + to get a reproducible random sequence as from the other <seeerl marker="stdlib:rand">rand</seeerl> 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 @@ -1511,11 +1511,11 @@ FloatValue = rand:uniform(). % again <note> <p> The state returned from this function cannot be used - to get a reproducable random sequence as from + to get a reproducible random sequence as from the other <seeerl marker="stdlib:rand">rand</seeerl> 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/new_api.xml b/lib/crypto/doc/src/new_api.xml index ccd80eca8b..520c259ebb 100644 --- a/lib/crypto/doc/src/new_api.xml +++ b/lib/crypto/doc/src/new_api.xml @@ -49,7 +49,7 @@ <section> <title>The old API</title> - <p>The old functions - deprecated from 23.0 and removed from OTP 24.0 - are for chipers:</p> + <p>The old functions - deprecated from 23.0 and removed from OTP 24.0 - are for ciphers:</p> <list> <item><c>block_encrypt/3</c></item> <item><c>block_encrypt/4</c></item> @@ -111,7 +111,7 @@ <item><seemfa marker="crypto#crypto_final/1">crypto_final/1</seemfa></item> </list> <p>The <c>crypto_init</c> initialies an internal cipher state, and one or more calls of - <c>crypto_update</c> does the acual encryption or decryption. Note that AEAD ciphers + <c>crypto_update</c> does the actual encryption or decryption. Note that AEAD ciphers can't be handled this way due to their nature. </p> <p>For repeated encryption or decryption of a text divided in parts where the 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 @@ -735,7 +735,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> @@ -743,7 +743,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> @@ -852,7 +852,7 @@ <list> <item> <p> - The cipher aes-ctr was disabled by misstake in + The cipher aes-ctr was disabled by mistake in crypto:supports for cryptolibs before 1.0.1. It worked however in the encrypt and decrypt functions.</p> <p> @@ -1030,7 +1030,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> @@ -1038,7 +1038,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> @@ -1359,7 +1359,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> @@ -2494,7 +2494,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> @@ -2777,7 +2777,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/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 3f6ec81794..2bd75a59ca 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1276,7 +1276,7 @@ info(_Config) -> ok; Other -> ct:log("Ver = ~p~ncrypto:info() -> ~p", [Ver,Other]), - ct:fail("Version missmatch", []) + ct:fail("Version mismatch", []) catch C:E -> ct:log("Exception ~p:~p", [C,E]), 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()). 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()), |