Fix spelling errors in CMS.
authorJosh Soref <jsoref@users.noreply.github.com>
Fri, 19 May 2017 00:16:30 +0000 (00:16 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 27 May 2017 12:15:24 +0000 (14:15 +0200)
Unfortunately it affects error code macros in public cms.h header, for
which reason misspelled names are preserved for backward compatibility.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3463)

crypto/cms/cms_env.c
crypto/cms/cms_err.c
crypto/cms/cms_lib.c
doc/man3/CMS_decrypt.pod
doc/man3/CMS_get0_RecipientInfos.pod
include/openssl/cms.h

index 8d4594353084882dd6f0f0c86c66ff10fd1ec1b7..6ca3be71adcf5e342fc851a864d414e4c0773a26 100644 (file)
@@ -749,7 +749,7 @@ int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri)
 
     default:
         CMSerr(CMS_F_CMS_RECIPIENTINFO_DECRYPT,
-               CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE);
+               CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE);
         return 0;
     }
 }
index c6df1b5afefe7f3014edb330b7a5b421ed9f8e7b..59afbbb58d035484a524ec7cc8bbe14c45e7622e 100644 (file)
@@ -222,7 +222,7 @@ static ERR_STRING_DATA CMS_str_reasons[] = {
     {ERR_REASON(CMS_R_UNABLE_TO_FINALIZE_CONTEXT),
      "unable to finalize context"},
     {ERR_REASON(CMS_R_UNKNOWN_CIPHER), "unknown cipher"},
-    {ERR_REASON(CMS_R_UNKNOWN_DIGEST_ALGORIHM), "unknown digest algorihm"},
+    {ERR_REASON(CMS_R_UNKNOWN_DIGEST_ALGORITHM), "unknown digest algorithm"},
     {ERR_REASON(CMS_R_UNKNOWN_ID), "unknown id"},
     {ERR_REASON(CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM),
      "unsupported compression algorithm"},
@@ -233,8 +233,8 @@ static ERR_STRING_DATA CMS_str_reasons[] = {
      "unsupported key encryption algorithm"},
     {ERR_REASON(CMS_R_UNSUPPORTED_RECIPIENT_TYPE),
      "unsupported recipient type"},
-    {ERR_REASON(CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE),
-     "unsupported recpientinfo type"},
+    {ERR_REASON(CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE),
+     "unsupported recipientinfo type"},
     {ERR_REASON(CMS_R_UNSUPPORTED_TYPE), "unsupported type"},
     {ERR_REASON(CMS_R_UNWRAP_ERROR), "unwrap error"},
     {ERR_REASON(CMS_R_UNWRAP_FAILURE), "unwrap failure"},
index 7395684b616915eb7b67dfc714d892a022e8ad7a..c2cac260109d1f6dd3f6eb2fcdc53fa5fdbc5a60 100644 (file)
@@ -292,7 +292,7 @@ BIO *cms_DigestAlgorithm_init_bio(X509_ALGOR *digestAlgorithm)
     digest = EVP_get_digestbyobj(digestoid);
     if (!digest) {
         CMSerr(CMS_F_CMS_DIGESTALGORITHM_INIT_BIO,
-               CMS_R_UNKNOWN_DIGEST_ALGORIHM);
+               CMS_R_UNKNOWN_DIGEST_ALGORITHM);
         goto err;
     }
     mdbio = BIO_new(BIO_f_md());
index b3b196c390620bd4a9c35db3367b70d258bed179..11747340228521eb1b41ab5b1fe3e3f023678d55 100644 (file)
@@ -46,7 +46,7 @@ in advance using the CMS utility functions such as CMS_set1_pkey(). In this
 case both B<cert> and B<pkey> should be set to NULL.
 
 To process KEKRecipientInfo types CMS_set1_key() or CMS_RecipientInfo_set0_key()
-and CMS_ReceipientInfo_decrypt() should be called before CMS_decrypt() and
+and CMS_RecipientInfo_decrypt() should be called before CMS_decrypt() and
 B<cert> and B<pkey> set to NULL.
 
 The following flags can be passed in the B<flags> parameter.
index 6c33c224e9b062d8e7167dfb0d7cdd9478fd5f67..80370d67364d4c96fccef1734b316b1f745ac1e2 100644 (file)
@@ -85,11 +85,11 @@ of CMS_decrypt() is not appropriate.
 
 In typical usage and application will retrieve all CMS_RecipientInfo structures
 using CMS_get0_RecipientInfos() and check the type of each using
-CMS_RecpientInfo_type(). Depending on the type the CMS_RecipientInfo structure
+CMS_RecipientInfo_type(). Depending on the type the CMS_RecipientInfo structure
 can be ignored or its key identifier data retrieved using an appropriate
 function. Then if the corresponding secret or private key can be obtained by
 any appropriate means it can then associated with the structure and
-CMS_RecpientInfo_decrypt() called. If successful CMS_decrypt() can be called
+CMS_RecipientInfo_decrypt() called. If successful CMS_decrypt() can be called
 with a NULL key to decrypt the enveloped content.
 
 The CMS_RecipientInfo_encrypt() can be used to add a new recipient to an
index 7e534e0dd6dd1669080aa5f3c2e27514bf3832ca..a04206977005c9519a6f2bcc9ba7e91b2a25a880 100644 (file)
@@ -329,6 +329,11 @@ int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
 int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
                           ASN1_OCTET_STRING *ukm, int keylen);
 
+/* Compat for: CMS_R_UNKNOWN_DIGEST_ALGORITHM */
+# define CMS_R_UNKNOWN_DIGEST_ALGORITM                    149
+/* Compat for: CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE */
+# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE              155
+
 /* BEGIN ERROR CODES */
 /*
  * The following lines are auto generated by the script mkerr.pl. Any changes
@@ -491,14 +496,14 @@ int ERR_load_CMS_strings(void);
 # define CMS_R_TYPE_NOT_ENVELOPED_DATA                    146
 # define CMS_R_UNABLE_TO_FINALIZE_CONTEXT                 147
 # define CMS_R_UNKNOWN_CIPHER                             148
-# define CMS_R_UNKNOWN_DIGEST_ALGORIHM                    149
+# define CMS_R_UNKNOWN_DIGEST_ALGORITHM                   149
 # define CMS_R_UNKNOWN_ID                                 150
 # define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM          151
 # define CMS_R_UNSUPPORTED_CONTENT_TYPE                   152
 # define CMS_R_UNSUPPORTED_KEK_ALGORITHM                  153
 # define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM       179
 # define CMS_R_UNSUPPORTED_RECIPIENT_TYPE                 154
-# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE              155
+# define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE             155
 # define CMS_R_UNSUPPORTED_TYPE                           156
 # define CMS_R_UNWRAP_ERROR                               157
 # define CMS_R_UNWRAP_FAILURE                             180