File 0856-Fix-typos-in-lib-public_key.patch of Package erlang

From f816eeec5b74d54c87d7cab54d55a77adf69c5d4 Mon Sep 17 00:00:00 2001
From: "Kian-Meng, Ang" <kianmeng@cpan.org>
Date: Sun, 26 Dec 2021 15:48:35 +0800
Subject: [PATCH] Fix typos in lib/public_key

---
 lib/public_key/asn1/ECPrivateKey.asn1         |  2 +-
 lib/public_key/doc/src/notes.xml              | 16 +++++++--------
 lib/public_key/doc/src/public_key.xml         |  2 +-
 lib/public_key/doc/src/using_public_key.xml   | 20 +++++++++----------
 lib/public_key/src/pubkey_cert.erl            |  6 +++---
 lib/public_key/src/pubkey_cert_records.erl    |  2 +-
 lib/public_key/src/pubkey_crl.erl             |  2 +-
 lib/public_key/src/pubkey_ssh.erl             |  2 +-
 lib/public_key/src/public_key.erl             |  4 ++--
 lib/public_key/test/erl_make_certs.erl        |  4 ++--
 lib/public_key/test/pkits_SUITE.erl           | 10 +++++-----
 .../ssh_rsa_long_comment_pub                  |  2 +-
 .../ssh_rsa_long_header_pub                   |  2 +-
 lib/public_key/test/public_key_SUITE.erl      | 10 +++++-----
 14 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/lib/public_key/doc/src/notes.xml b/lib/public_key/doc/src/notes.xml
index fed7505aba..8199277e25 100644
--- a/lib/public_key/doc/src/notes.xml
+++ b/lib/public_key/doc/src/notes.xml
@@ -873,7 +873,7 @@
         </item>
         <item>
           <p>
-	    Add different upper bounds for diffrent string types as
+	    Add different upper bounds for different string types as
 	    suggested by comment in PKIX1Explicit88.</p>
           <p>
 	    Own Id: OTP-13132</p>
@@ -1077,7 +1077,7 @@
         <item>
           <p>
 	    Add support for ISO oids 1.3.14.3.2.29 and 1.3.14.3.2.27
-	    that are somtimes used instead of the PKCS defined oids
+	    that are sometimes used instead of the PKCS defined oids
 	    1.2.840.113549.1.1.5 and 1.2.840.10040.4.3. Add function
 	    pkix_sign_types:/1 that translates oids to to algorithm
 	    atoms ex:</p>
@@ -1170,7 +1170,7 @@
         <item>
           <p>
 	    ssh_decode now handles comments, at the end of the line,
-	    containing withe spaces correctly</p>
+	    containing with spaces correctly</p>
           <p>
 	    Own Id: OTP-9361</p>
         </item>
@@ -1188,7 +1188,7 @@
       <list>
         <item>
           <p>
-	    public_key now supports PKCS-10 and includes exprimental
+	    public_key now supports PKCS-10 and includes experimental
 	    support for PKCS-7</p>
           <p>
 	    Own Id: OTP-10509 Aux Id: kunagi-291 [202] </p>
diff --git a/lib/public_key/doc/src/using_public_key.xml b/lib/public_key/doc/src/using_public_key.xml
index b783785347..1261971401 100644
--- a/lib/public_key/doc/src/using_public_key.xml
+++ b/lib/public_key/doc/src/using_public_key.xml
@@ -87,7 +87,7 @@
       <p>An RSA private key encrypted with a password can look as follows:</p>
       
       <code>1> {ok, PemBin} = file:read_file("rsa.pem").
-{ok,&lt;&lt;"Bag Attribut"...&gt;&gt;}</code>
+{ok,&lt;&lt;"Bag Attribute"...&gt;&gt;}</code>
 
     <p>The following PEM file has only one entry, a private RSA key:</p>
     <code>2>[RSAEntry] = public_key:pem_decode(PemBin).
@@ -382,7 +382,7 @@ Msg = public_key:decrypt_public(RsaEncrypted, PublicKey),</code>
 Msg = public_key:decrypt_private(RsaEncrypted, PrivateKey),</code>
 
       <note><p>You normally do only one of the encrypt or decrypt operations, 
-      and the peer does the other. This normaly used in legacy applications
+      and the peer does the other. This normally used in legacy applications
       as a primitive digital signature.
       </p></note>
 
diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl
index 9e3cc52d24..cf2a0cffd2 100644
--- a/lib/public_key/src/pubkey_cert.erl
+++ b/lib/public_key/src/pubkey_cert.erl
@@ -72,7 +72,7 @@ verify_data(DerCert) ->
 -spec init_validation_state(#'OTPCertificate'{}, integer(), list()) ->
 				   #path_validation_state{}.
 %%
-%% Description: Creates inital version of path_validation_state for
+%% Description: Creates initial version of path_validation_state for
 %% basic path validation of x509 certificates.
 %%--------------------------------------------------------------------	 
 init_validation_state(#'OTPCertificate'{} = OtpCert, DefaultPathLen, 
@@ -247,7 +247,7 @@ validate_extensions(OtpCert, ValidationState, UserState, VerifyFun) ->
 -spec normalize_general_name({rdnSequence, term()}) -> {rdnSequence, term()}. 
 %%
 %% Description: Normalizes a general name so that it can be easily
-%%              compared to another genral name. 
+%%              compared to another general name. 
 %%--------------------------------------------------------------------	
 normalize_general_name({rdnSequence, Issuer}) ->
     NormIssuer = do_normalize_general_name(Issuer),
diff --git a/lib/public_key/src/pubkey_cert_records.erl b/lib/public_key/src/pubkey_cert_records.erl
index 592bd4c938..d837d8cf7b 100644
--- a/lib/public_key/src/pubkey_cert_records.erl
+++ b/lib/public_key/src/pubkey_cert_records.erl
@@ -44,7 +44,7 @@ decode_cert(DerCert) ->
 %%--------------------------------------------------------------------
 -spec transform(term(), encode | decode) ->term().
 %%
-%% Description: Transforms between encoded and decode otp formated
+%% Description: Transforms between encoded and decode otp formatted
 %% certificate parts.
 %%-------------------------------------------------------------------- 
 
diff --git a/lib/public_key/src/pubkey_crl.erl b/lib/public_key/src/pubkey_crl.erl
index 7115424863..53c006ff13 100644
--- a/lib/public_key/src/pubkey_crl.erl
+++ b/lib/public_key/src/pubkey_crl.erl
@@ -298,7 +298,7 @@ is_all_reasons(Mask, AllReasonsFun) ->
 	    %% As the "uspecified" reason should not
 	    %% be explicitly used according to RFC 3280
 	    %% and the conformance tests have test cases
-	    %% that should succed, and that does not specify
+	    %% that should succeed, and that does not specify
 	    %% "unspecified", we tolorate that it is not included.
 	    sets:is_subset(sets:del_element(unspecified, AllReasons), Mask)
     end.
diff --git a/lib/public_key/src/pubkey_ssh.erl b/lib/public_key/src/pubkey_ssh.erl
index 9a9505f558..2b802163aa 100644
--- a/lib/public_key/src/pubkey_ssh.erl
+++ b/lib/public_key/src/pubkey_ssh.erl
@@ -614,7 +614,7 @@ split_n(N, Bin, Acc) ->
 	    split_n(0, <<>>, [Last | Acc])
     end.
 %% 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/public_key/test/erl_make_certs.erl b/lib/public_key/test/erl_make_certs.erl
index e2a94dd886..a56c8e3691 100644
--- a/lib/public_key/test/erl_make_certs.erl
+++ b/lib/public_key/test/erl_make_certs.erl
@@ -47,7 +47,7 @@
 %%      {title, Title}
 %%      {dnQualifer, DnQ}
 %%   issuer = {Issuer, IssuerKey}                   true (i.e. a ca cert is created) 
-%%                                                  (obs IssuerKey migth be {Key, Password}
+%%                                                  (obs IssuerKey might be {Key, Password}
 %%   key = KeyFile|KeyBin|rsa|dsa|ec                Subject PublicKey rsa, dsa or ec generates key
 %%   
 %%
diff --git a/lib/public_key/test/pkits_SUITE.erl b/lib/public_key/test/pkits_SUITE.erl
index ba3efdba09..9cd71adce1 100644
--- a/lib/public_key/test/pkits_SUITE.erl
+++ b/lib/public_key/test/pkits_SUITE.erl
@@ -300,24 +300,24 @@ end_per_testcase(_Func, Config) ->
 
 %%--------------------------- signature_verification--------------------------------------------------
 valid_rsa_signature() ->
-    [{doc, "Test rsa signatur verification"}].
+    [{doc, "Test rsa signature verification"}].
 valid_rsa_signature(Config) when is_list(Config) ->
     run([{ "4.1.1", "Valid Certificate Path Test1 EE", ok}]).
 
 invalid_rsa_signature() ->
-    [{doc,"Test rsa signatur verification"}].
+    [{doc,"Test rsa signature verification"}].
 invalid_rsa_signature(Config) when is_list(Config) ->
     run([{ "4.1.2", "Invalid CA Signature Test2 EE", {bad_cert,invalid_signature}},
 	 { "4.1.3", "Invalid EE Signature Test3 EE", {bad_cert,invalid_signature}}]).
 
 valid_dsa_signature() ->
-    [{doc,"Test dsa signatur verification"}].
+    [{doc,"Test dsa signature verification"}].
 valid_dsa_signature(Config) when is_list(Config) ->
     run([{ "4.1.4", "Valid DSA Signatures Test4 EE", ok},
 	 { "4.1.5", "Valid DSA Parameter Inheritance Test5 EE", ok}]).
 
 invalid_dsa_signature() ->
-    [{doc,"Test dsa signatur verification"}].
+    [{doc,"Test dsa signature verification"}].
 invalid_dsa_signature(Config) when is_list(Config) ->
     run([{ "4.1.6", "Invalid DSA Signature Test6 EE",{bad_cert,invalid_signature}}]).
 
@@ -805,7 +805,7 @@ invalid_crl_issuer(Config) when is_list(Config) ->
 	]).
 
 %% Although this test is valid it has a circular dependency. As a result
-%% an attempt is made to reursively checks a CRL path and rejected due to
+%% an attempt is made to recursively checks a CRL path and rejected due to
 %% a CRL path validation error. PKITS notes suggest this test does not
 %% need to be run due to this issue.
 %%	 { "4.14.30", "Valid cRLIssuer Test30", 54 }
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index b176cbef6a..c9ba3e8c7e 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -662,7 +662,7 @@ pkix(Config) when is_list(Config) ->
 
     true = lists:member(IssuerId, CaIds),
 
-    %% Should be normalized allready
+    %% Should be normalized already
     TestStr   = {rdnSequence, 
 		 [[{'AttributeTypeAndValue', {2,5,4,3},{printableString,"ERLANGCA"}}],
 		  [{'AttributeTypeAndValue', {2,5,4,3},{printableString," erlang  ca "}}]]},
-- 
2.31.1

openSUSE Build Service is sponsored by