Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0151-Fix-typos-in-lib-public_key.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0151-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/asn1/ECPrivateKey.asn1 b/lib/public_key/asn1/ECPrivateKey.asn1 index e0f4c3a011..926afe5b29 100644 --- a/lib/public_key/asn1/ECPrivateKey.asn1 +++ b/lib/public_key/asn1/ECPrivateKey.asn1 @@ -19,7 +19,7 @@ ECPrivateKey ::= SEQUENCE { privateKey CurvePrivateKey, parameters [0] EcpkParameters OPTIONAL, publicKey [1] CurvePublicKey OPTIONAL, - -- Should be PKCS-8 Attributes but problem at the moment with PKCS-8 beeing part + -- Should be PKCS-8 Attributes but problem at the moment with PKCS-8 being part -- of PCKS-FRAME and PKIX1Algorithms88 is part of OTP-PUB-KEY. Procrastinate -- the solution as it mostly not used anyway attributes ANY OPTIONAL 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 @@ -410,7 +410,7 @@ <list> <item> <p> - Support Pasword based encryption with AES</p> + Support Password based encryption with AES</p> <p> Own Id: OTP-15870 Aux Id: ERL-952 </p> </item> @@ -581,7 +581,7 @@ </item> <item> <p> - Compleate PKCS-8 encoding support and enhance the + Complete PKCS-8 encoding support and enhance the decoding of 'PrivateKeyInfo' to conform to the rest of Erlang public_key API.</p> <p> @@ -678,7 +678,7 @@ saltlength setting<br/> * X9.31 RSA padding.<br/> * sha, sha224, sha256, sha384, and sha512 for dss signatures as mentioned in NIST SP 800-57 Part 1.<br/> * ripemd160 to - be used for rsa signatures.</p> + be used for RSA signatures.</p> <p> This is a manual merge of half of the pull request 838 by potatosalad from Sept 2015.</p> @@ -689,7 +689,7 @@ <p> Add API function pkix_test_data/1 for facilitating automated testing. This is useful for applications that - preform X509-certifcate path validation of so called + perform X509-certifcate path validation of so called certificate chains, such as TLS.</p> <p> Own Id: OTP-14181</p> @@ -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/public_key.xml b/lib/public_key/doc/src/public_key.xml index 4c674333b2..756e311e91 100644 --- a/lib/public_key/doc/src/public_key.xml +++ b/lib/public_key/doc/src/public_key.xml @@ -800,7 +800,7 @@ fun(#'DistributionPoint'{}, #'CertificateList'{}, critical = false}] </code> <p>Hostname is the result of calling net_adm:localhost() in the Erlang node - where this funcion is called. + where this function is called. </p></item> </taglist> 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,<<"Bag Attribut"...>>}</code> +{ok,<<"Bag Attribute"...>>}</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> @@ -426,12 +426,12 @@ true = public_key:verify(Digest, none, Signature, PublicKey),</code> checks that the certificate is not revoked, not forged or not out-of-date. </p> <p>There are however attacks that are not detected by those checks. Suppose a bad guy has - succeded with a DNS infection. Then the client could belive it is connecting to one host but + succeeded with a DNS infection. Then the client could believe it is connecting to one host but ends up at another but evil one. Though it is evil, it could have a perfectly legal certificate! The certificate has a valid signature, it is not revoked, the certificate chain is not faked and has a trusted root and so on. </p> - <p>To detect that the server is not the intended one, the client must additionaly perform + <p>To detect that the server is not the intended one, the client must additionally perform a <i>hostname verification</i>. This procedure is described in <url href="https://tools.ietf.org/html/rfc6125">RFC 6125</url>. The idea is that the certificate lists the hostnames it could be fetched from. This is checked by the certificate issuer when @@ -447,13 +447,13 @@ true = public_key:verify(Digest, none, Signature, PublicKey),</code> It is possible for a client to hook in modified rules using the options list. </p> <p>Some terminology is needed: the certificate presents hostname(s) on which it is valid. - Those are called <i>Presented IDs</i>. The hostname(s) the client belives it connects to + Those are called <i>Presented IDs</i>. The hostname(s) the client believes it connects to are called <i>Reference IDs</i>. The matching rules aims to verify that there is at least one of the Reference IDs that matches one of the Presented IDs. If not, the verification fails. </p> <p>The IDs contains normal fully qualified domain names like e.g <c>foo.example.com</c>, but IP addresses are not recommended. The rfc describes why this is not recommended as well - as security considerations about how to aquire the Reference IDs. + as security considerations about how to acquire the Reference IDs. </p> <p>Internationalized domain names are not supported. </p> @@ -525,7 +525,7 @@ true = public_key:verify(Digest, none, Signature, PublicKey),</code> field, the <c>Subject</c> field MUST NOT be used for host name checking, even if it contains valid CN names. Therefore only <c>kb.example.org</c> and <c>https://www.example.org</c> matches. The match fails - both for <c>example.com</c> and <c>foo.example.com</c> becuase they are in the <c>Subject</c> + both for <c>example.com</c> and <c>foo.example.com</c> because they are in the <c>Subject</c> field which is not checked because the <c>Subject Alternate Name</c> field is present. </p> </section> @@ -599,7 +599,7 @@ true = public_key:verify(Digest, none, Signature, PublicKey),</code> <marker id="redefining_match_op"></marker> <title>Re-defining the match operation</title> <p>The default matching handles dns_id and uri_id. In an uri_id the value is tested for - equality with a value from the <c>Subject Alternate Name</c>. If som other kind of matching + equality with a value from the <c>Subject Alternate Name</c>. If some other kind of matching is needed, use the <c>match_fun</c> option. </p> <p>The <c>match_fun</c> takes two arguments and returns either <c>true</c>, @@ -626,8 +626,8 @@ true = public_key:verify(Digest, none, Signature, PublicKey),</code> field and from the <c>Subject Alternate Name</c> field. </p> <p>The default matching transformes the ascii values in strings to lowercase before comparing. - The <c>match_fun</c> is however called without any transfomation applied to the strings. The - reason is to enable the user to do unforseen handling of the strings where the original format + The <c>match_fun</c> is however called without any transformation applied to the strings. The + reason is to enable the user to do unforeseen handling of the strings where the original format is needed. </p> </section> 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()}| binary()) -> {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), @@ -1301,7 +1301,7 @@ cert_chain(Role, IssuerCert, IssuerKey, [PeerOpts], _, Acc) -> cert_chain(Role, IssuerCert, IssuerKey, [CAOpts | Rest], N, Acc) -> Key = gen_key(proplists:get_value(key, CAOpts, default_key_gen())), Cert = cert(Role, public_key:pkix_decode_cert(IssuerCert, otp), IssuerKey, Key, "webadmin", - " Intermidiate CA " ++ integer_to_list(N), CAOpts, ca), + " Intermediate CA " ++ integer_to_list(N), CAOpts, ca), cert_chain(Role, Cert, Key, Rest, N+1, [{IssuerCert, encode_key(IssuerKey)} | Acc]). cert(Role, #'OTPCertificate'{tbsCertificate = #'OTPTBSCertificate'{subject = 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/src/public_key.erl b/lib/public_key/src/public_key.erl index 0b5061f695..8352bc3802 100644 --- a/lib/public_key/src/public_key.erl +++ b/lib/public_key/src/public_key.erl @@ -2043,8 +2043,8 @@ match_wild(_, _) -> false. %% Match the parts after the only wildcard by comparing them from the end match_wild_suffixes(A, B) -> match_wild_sfx(lists:reverse(A), lists:reverse(B)). -match_wild_sfx([$*|_], _) -> false; % Bad name (no wildcards alowed) -match_wild_sfx(_, [$*|_]) -> false; % Bad pattern (no more wildcards alowed) +match_wild_sfx([$*|_], _) -> false; % Bad name (no wildcards allowed) +match_wild_sfx(_, [$*|_]) -> false; % Bad pattern (no more wildcards allowed) match_wild_sfx([A|Ar], [A|Br]) -> match_wild_sfx(Ar, Br); match_wild_sfx(Ar, []) -> not lists:member($*, Ar); % Chk for bad name (= wildcards) match_wild_sfx(_, _) -> false. 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 %% %% @@ -368,7 +368,7 @@ make_key(ec, _Opts) -> gen_rsa2(Size) -> try - %% The numbers 2048,17 is choosen to not cause the cryptolib on + %% The numbers 2048,17 is chosen to not cause the cryptolib on %% FIPS-enabled test machines be mad at us. public_key:generate_key({rsa, 2048, 17}) catch 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/pubkey_ssh_SUITE_data/ssh_rsa_long_comment_pub b/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_comment_pub index 7b42ced93e..bca5a375ca 100644 --- a/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_comment_pub +++ b/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_comment_pub @@ -1,7 +1,7 @@ ---- BEGIN SSH2 PUBLIC KEY ---- Comment: This is an example of a very very very very looooooooooooo\ ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong\ -commment +comment x-command: /home/me/bin/lock-in-guest.sh AAAAB3NzaC1yc2EAAAABIwAAAIEA1on8gxCGJJWSRT4uOrR13mUaUk0hRf4RzxSZ1zRb YYFw8pfGesIFoEuVth4HKyF8k1y4mRUnYHP1XNMNMJl1JcEArC2asV8sHf6zSPVffozZ diff --git a/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_header_pub b/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_header_pub index 7b42ced93e..bca5a375ca 100644 --- a/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_header_pub +++ b/lib/public_key/test/pubkey_ssh_SUITE_data/ssh_rsa_long_header_pub @@ -1,7 +1,7 @@ ---- BEGIN SSH2 PUBLIC KEY ---- Comment: This is an example of a very very very very looooooooooooo\ ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong\ -commment +comment x-command: /home/me/bin/lock-in-guest.sh AAAAB3NzaC1yc2EAAAABIwAAAIEA1on8gxCGJJWSRT4uOrR13mUaUk0hRf4RzxSZ1zRb YYFw8pfGesIFoEuVth4HKyF8k1y4mRUnYHP1XNMNMJl1JcEArC2asV8sHf6zSPVffozZ 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 "}}]]}, @@ -876,19 +876,19 @@ pkix_verify_hostname_subjAltName(Config) -> true = public_key:pkix_verify_hostname(Cert, [{dns_id,"kb.example.org"}]), true = public_key:pkix_verify_hostname(Cert, [{dns_id,"KB.EXAMPLE.ORG"}]), - %% Check that a dns_id does not match a DNS subjAltName wiht wildcard + %% Check that a dns_id does not match a DNS subjAltName with wildcard false = public_key:pkix_verify_hostname(Cert, [{dns_id,"other.example.org"}]), - %% Check that a dns_id does match a DNS subjAltName wiht wildcard with matchfun + %% Check that a dns_id does match a DNS subjAltName with wildcard with matchfun MatchFun = {match_fun, public_key:pkix_verify_hostname_match_fun(https)}, true = public_key:pkix_verify_hostname(Cert, [{dns_id,"other.example.org"}], [MatchFun]), true = public_key:pkix_verify_hostname(Cert, [{dns_id,"OTHER.EXAMPLE.ORG"}], [MatchFun]), - %% Check that a uri_id does not match a DNS subjAltName wiht wildcard + %% Check that a uri_id does not match a DNS subjAltName with wildcard false = public_key:pkix_verify_hostname(Cert, [{uri_id,"https://other.example.org"}]), false = public_key:pkix_verify_hostname(Cert, [{uri_id,"https://OTHER.EXAMPLE.ORG"}]), - %% Check that a dns_id does match a DNS subjAltName wiht wildcard with matchfun + %% Check that a dns_id does match a DNS subjAltName with wildcard with matchfun true = public_key:pkix_verify_hostname(Cert, [{uri_id,"https://other.example.org"}], [MatchFun]), true = public_key:pkix_verify_hostname(Cert, [{uri_id,"https://OTHER.EXAMPLE.ORG"}], [MatchFun]), true = public_key:pkix_verify_hostname(Cert, [{uri_id,"https://OTHER.example.org"}], [MatchFun]), -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor