A local copy of OpenSSL from GitHub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

263 lines
13 KiB

  1. /*
  2. * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the OpenSSL license (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. /*
  10. * NOTE: this file was auto generated by the mkerr.pl script: any changes
  11. * made to it will be overwritten when the script next updates this file,
  12. * only reason strings will be preserved.
  13. */
  14. #include <stdio.h>
  15. #include <openssl/err.h>
  16. #include <openssl/cms.h>
  17. /* BEGIN ERROR CODES */
  18. #ifndef OPENSSL_NO_ERR
  19. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_CMS,func,0)
  20. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_CMS,0,reason)
  21. static ERR_STRING_DATA CMS_str_functs[] = {
  22. {ERR_FUNC(CMS_F_CHECK_CONTENT), "check_content"},
  23. {ERR_FUNC(CMS_F_CMS_ADD0_CERT), "CMS_add0_cert"},
  24. {ERR_FUNC(CMS_F_CMS_ADD0_RECIPIENT_KEY), "CMS_add0_recipient_key"},
  25. {ERR_FUNC(CMS_F_CMS_ADD0_RECIPIENT_PASSWORD),
  26. "CMS_add0_recipient_password"},
  27. {ERR_FUNC(CMS_F_CMS_ADD1_RECEIPTREQUEST), "CMS_add1_ReceiptRequest"},
  28. {ERR_FUNC(CMS_F_CMS_ADD1_RECIPIENT_CERT), "CMS_add1_recipient_cert"},
  29. {ERR_FUNC(CMS_F_CMS_ADD1_SIGNER), "CMS_add1_signer"},
  30. {ERR_FUNC(CMS_F_CMS_ADD1_SIGNINGTIME), "cms_add1_signingTime"},
  31. {ERR_FUNC(CMS_F_CMS_COMPRESS), "CMS_compress"},
  32. {ERR_FUNC(CMS_F_CMS_COMPRESSEDDATA_CREATE), "cms_CompressedData_create"},
  33. {ERR_FUNC(CMS_F_CMS_COMPRESSEDDATA_INIT_BIO),
  34. "cms_CompressedData_init_bio"},
  35. {ERR_FUNC(CMS_F_CMS_COPY_CONTENT), "cms_copy_content"},
  36. {ERR_FUNC(CMS_F_CMS_COPY_MESSAGEDIGEST), "cms_copy_messageDigest"},
  37. {ERR_FUNC(CMS_F_CMS_DATA), "CMS_data"},
  38. {ERR_FUNC(CMS_F_CMS_DATAFINAL), "CMS_dataFinal"},
  39. {ERR_FUNC(CMS_F_CMS_DATAINIT), "CMS_dataInit"},
  40. {ERR_FUNC(CMS_F_CMS_DECRYPT), "CMS_decrypt"},
  41. {ERR_FUNC(CMS_F_CMS_DECRYPT_SET1_KEY), "CMS_decrypt_set1_key"},
  42. {ERR_FUNC(CMS_F_CMS_DECRYPT_SET1_PASSWORD), "CMS_decrypt_set1_password"},
  43. {ERR_FUNC(CMS_F_CMS_DECRYPT_SET1_PKEY), "CMS_decrypt_set1_pkey"},
  44. {ERR_FUNC(CMS_F_CMS_DIGESTALGORITHM_FIND_CTX),
  45. "cms_DigestAlgorithm_find_ctx"},
  46. {ERR_FUNC(CMS_F_CMS_DIGESTALGORITHM_INIT_BIO),
  47. "cms_DigestAlgorithm_init_bio"},
  48. {ERR_FUNC(CMS_F_CMS_DIGESTEDDATA_DO_FINAL), "cms_DigestedData_do_final"},
  49. {ERR_FUNC(CMS_F_CMS_DIGEST_VERIFY), "CMS_digest_verify"},
  50. {ERR_FUNC(CMS_F_CMS_ENCODE_RECEIPT), "cms_encode_Receipt"},
  51. {ERR_FUNC(CMS_F_CMS_ENCRYPT), "CMS_encrypt"},
  52. {ERR_FUNC(CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO),
  53. "cms_EncryptedContent_init_bio"},
  54. {ERR_FUNC(CMS_F_CMS_ENCRYPTEDDATA_DECRYPT), "CMS_EncryptedData_decrypt"},
  55. {ERR_FUNC(CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT), "CMS_EncryptedData_encrypt"},
  56. {ERR_FUNC(CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY),
  57. "CMS_EncryptedData_set1_key"},
  58. {ERR_FUNC(CMS_F_CMS_ENVELOPEDDATA_CREATE), "CMS_EnvelopedData_create"},
  59. {ERR_FUNC(CMS_F_CMS_ENVELOPEDDATA_INIT_BIO),
  60. "cms_EnvelopedData_init_bio"},
  61. {ERR_FUNC(CMS_F_CMS_ENVELOPED_DATA_INIT), "cms_enveloped_data_init"},
  62. {ERR_FUNC(CMS_F_CMS_ENV_ASN1_CTRL), "cms_env_asn1_ctrl"},
  63. {ERR_FUNC(CMS_F_CMS_FINAL), "CMS_final"},
  64. {ERR_FUNC(CMS_F_CMS_GET0_CERTIFICATE_CHOICES),
  65. "cms_get0_certificate_choices"},
  66. {ERR_FUNC(CMS_F_CMS_GET0_CONTENT), "CMS_get0_content"},
  67. {ERR_FUNC(CMS_F_CMS_GET0_ECONTENT_TYPE), "cms_get0_econtent_type"},
  68. {ERR_FUNC(CMS_F_CMS_GET0_ENVELOPED), "cms_get0_enveloped"},
  69. {ERR_FUNC(CMS_F_CMS_GET0_REVOCATION_CHOICES),
  70. "cms_get0_revocation_choices"},
  71. {ERR_FUNC(CMS_F_CMS_GET0_SIGNED), "cms_get0_signed"},
  72. {ERR_FUNC(CMS_F_CMS_MSGSIGDIGEST_ADD1), "cms_msgSigDigest_add1"},
  73. {ERR_FUNC(CMS_F_CMS_RECEIPTREQUEST_CREATE0),
  74. "CMS_ReceiptRequest_create0"},
  75. {ERR_FUNC(CMS_F_CMS_RECEIPT_VERIFY), "cms_Receipt_verify"},
  76. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_DECRYPT), "CMS_RecipientInfo_decrypt"},
  77. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_ENCRYPT), "CMS_RecipientInfo_encrypt"},
  78. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT),
  79. "cms_RecipientInfo_kari_encrypt"},
  80. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG),
  81. "CMS_RecipientInfo_kari_get0_alg"},
  82. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID),
  83. "CMS_RecipientInfo_kari_get0_orig_id"},
  84. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS),
  85. "CMS_RecipientInfo_kari_get0_reks"},
  86. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP),
  87. "CMS_RecipientInfo_kari_orig_id_cmp"},
  88. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT),
  89. "cms_RecipientInfo_kekri_decrypt"},
  90. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT),
  91. "cms_RecipientInfo_kekri_encrypt"},
  92. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID),
  93. "CMS_RecipientInfo_kekri_get0_id"},
  94. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP),
  95. "CMS_RecipientInfo_kekri_id_cmp"},
  96. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP),
  97. "CMS_RecipientInfo_ktri_cert_cmp"},
  98. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT),
  99. "cms_RecipientInfo_ktri_decrypt"},
  100. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT),
  101. "cms_RecipientInfo_ktri_encrypt"},
  102. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS),
  103. "CMS_RecipientInfo_ktri_get0_algs"},
  104. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID),
  105. "CMS_RecipientInfo_ktri_get0_signer_id"},
  106. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT),
  107. "cms_RecipientInfo_pwri_crypt"},
  108. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_SET0_KEY),
  109. "CMS_RecipientInfo_set0_key"},
  110. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD),
  111. "CMS_RecipientInfo_set0_password"},
  112. {ERR_FUNC(CMS_F_CMS_RECIPIENTINFO_SET0_PKEY),
  113. "CMS_RecipientInfo_set0_pkey"},
  114. {ERR_FUNC(CMS_F_CMS_SD_ASN1_CTRL), "cms_sd_asn1_ctrl"},
  115. {ERR_FUNC(CMS_F_CMS_SET1_IAS), "cms_set1_ias"},
  116. {ERR_FUNC(CMS_F_CMS_SET1_KEYID), "cms_set1_keyid"},
  117. {ERR_FUNC(CMS_F_CMS_SET1_SIGNERIDENTIFIER), "cms_set1_SignerIdentifier"},
  118. {ERR_FUNC(CMS_F_CMS_SET_DETACHED), "CMS_set_detached"},
  119. {ERR_FUNC(CMS_F_CMS_SIGN), "CMS_sign"},
  120. {ERR_FUNC(CMS_F_CMS_SIGNED_DATA_INIT), "cms_signed_data_init"},
  121. {ERR_FUNC(CMS_F_CMS_SIGNERINFO_CONTENT_SIGN),
  122. "cms_SignerInfo_content_sign"},
  123. {ERR_FUNC(CMS_F_CMS_SIGNERINFO_SIGN), "CMS_SignerInfo_sign"},
  124. {ERR_FUNC(CMS_F_CMS_SIGNERINFO_VERIFY), "CMS_SignerInfo_verify"},
  125. {ERR_FUNC(CMS_F_CMS_SIGNERINFO_VERIFY_CERT),
  126. "cms_signerinfo_verify_cert"},
  127. {ERR_FUNC(CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT),
  128. "CMS_SignerInfo_verify_content"},
  129. {ERR_FUNC(CMS_F_CMS_SIGN_RECEIPT), "CMS_sign_receipt"},
  130. {ERR_FUNC(CMS_F_CMS_STREAM), "CMS_stream"},
  131. {ERR_FUNC(CMS_F_CMS_UNCOMPRESS), "CMS_uncompress"},
  132. {ERR_FUNC(CMS_F_CMS_VERIFY), "CMS_verify"},
  133. {0, NULL}
  134. };
  135. static ERR_STRING_DATA CMS_str_reasons[] = {
  136. {ERR_REASON(CMS_R_ADD_SIGNER_ERROR), "add signer error"},
  137. {ERR_REASON(CMS_R_CERTIFICATE_ALREADY_PRESENT),
  138. "certificate already present"},
  139. {ERR_REASON(CMS_R_CERTIFICATE_HAS_NO_KEYID), "certificate has no keyid"},
  140. {ERR_REASON(CMS_R_CERTIFICATE_VERIFY_ERROR), "certificate verify error"},
  141. {ERR_REASON(CMS_R_CIPHER_INITIALISATION_ERROR),
  142. "cipher initialisation error"},
  143. {ERR_REASON(CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR),
  144. "cipher parameter initialisation error"},
  145. {ERR_REASON(CMS_R_CMS_DATAFINAL_ERROR), "cms datafinal error"},
  146. {ERR_REASON(CMS_R_CMS_LIB), "cms lib"},
  147. {ERR_REASON(CMS_R_CONTENTIDENTIFIER_MISMATCH),
  148. "contentidentifier mismatch"},
  149. {ERR_REASON(CMS_R_CONTENT_NOT_FOUND), "content not found"},
  150. {ERR_REASON(CMS_R_CONTENT_TYPE_MISMATCH), "content type mismatch"},
  151. {ERR_REASON(CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA),
  152. "content type not compressed data"},
  153. {ERR_REASON(CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA),
  154. "content type not enveloped data"},
  155. {ERR_REASON(CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA),
  156. "content type not signed data"},
  157. {ERR_REASON(CMS_R_CONTENT_VERIFY_ERROR), "content verify error"},
  158. {ERR_REASON(CMS_R_CTRL_ERROR), "ctrl error"},
  159. {ERR_REASON(CMS_R_CTRL_FAILURE), "ctrl failure"},
  160. {ERR_REASON(CMS_R_DECRYPT_ERROR), "decrypt error"},
  161. {ERR_REASON(CMS_R_DIGEST_ERROR), "digest error"},
  162. {ERR_REASON(CMS_R_ERROR_GETTING_PUBLIC_KEY), "error getting public key"},
  163. {ERR_REASON(CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE),
  164. "error reading messagedigest attribute"},
  165. {ERR_REASON(CMS_R_ERROR_SETTING_KEY), "error setting key"},
  166. {ERR_REASON(CMS_R_ERROR_SETTING_RECIPIENTINFO),
  167. "error setting recipientinfo"},
  168. {ERR_REASON(CMS_R_INVALID_ENCRYPTED_KEY_LENGTH),
  169. "invalid encrypted key length"},
  170. {ERR_REASON(CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER),
  171. "invalid key encryption parameter"},
  172. {ERR_REASON(CMS_R_INVALID_KEY_LENGTH), "invalid key length"},
  173. {ERR_REASON(CMS_R_MD_BIO_INIT_ERROR), "md bio init error"},
  174. {ERR_REASON(CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH),
  175. "messagedigest attribute wrong length"},
  176. {ERR_REASON(CMS_R_MESSAGEDIGEST_WRONG_LENGTH),
  177. "messagedigest wrong length"},
  178. {ERR_REASON(CMS_R_MSGSIGDIGEST_ERROR), "msgsigdigest error"},
  179. {ERR_REASON(CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE),
  180. "msgsigdigest verification failure"},
  181. {ERR_REASON(CMS_R_MSGSIGDIGEST_WRONG_LENGTH),
  182. "msgsigdigest wrong length"},
  183. {ERR_REASON(CMS_R_NEED_ONE_SIGNER), "need one signer"},
  184. {ERR_REASON(CMS_R_NOT_A_SIGNED_RECEIPT), "not a signed receipt"},
  185. {ERR_REASON(CMS_R_NOT_ENCRYPTED_DATA), "not encrypted data"},
  186. {ERR_REASON(CMS_R_NOT_KEK), "not kek"},
  187. {ERR_REASON(CMS_R_NOT_KEY_AGREEMENT), "not key agreement"},
  188. {ERR_REASON(CMS_R_NOT_KEY_TRANSPORT), "not key transport"},
  189. {ERR_REASON(CMS_R_NOT_PWRI), "not pwri"},
  190. {ERR_REASON(CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE),
  191. "not supported for this key type"},
  192. {ERR_REASON(CMS_R_NO_CIPHER), "no cipher"},
  193. {ERR_REASON(CMS_R_NO_CONTENT), "no content"},
  194. {ERR_REASON(CMS_R_NO_CONTENT_TYPE), "no content type"},
  195. {ERR_REASON(CMS_R_NO_DEFAULT_DIGEST), "no default digest"},
  196. {ERR_REASON(CMS_R_NO_DIGEST_SET), "no digest set"},
  197. {ERR_REASON(CMS_R_NO_KEY), "no key"},
  198. {ERR_REASON(CMS_R_NO_KEY_OR_CERT), "no key or cert"},
  199. {ERR_REASON(CMS_R_NO_MATCHING_DIGEST), "no matching digest"},
  200. {ERR_REASON(CMS_R_NO_MATCHING_RECIPIENT), "no matching recipient"},
  201. {ERR_REASON(CMS_R_NO_MATCHING_SIGNATURE), "no matching signature"},
  202. {ERR_REASON(CMS_R_NO_MSGSIGDIGEST), "no msgsigdigest"},
  203. {ERR_REASON(CMS_R_NO_PASSWORD), "no password"},
  204. {ERR_REASON(CMS_R_NO_PRIVATE_KEY), "no private key"},
  205. {ERR_REASON(CMS_R_NO_PUBLIC_KEY), "no public key"},
  206. {ERR_REASON(CMS_R_NO_RECEIPT_REQUEST), "no receipt request"},
  207. {ERR_REASON(CMS_R_NO_SIGNERS), "no signers"},
  208. {ERR_REASON(CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),
  209. "private key does not match certificate"},
  210. {ERR_REASON(CMS_R_RECEIPT_DECODE_ERROR), "receipt decode error"},
  211. {ERR_REASON(CMS_R_RECIPIENT_ERROR), "recipient error"},
  212. {ERR_REASON(CMS_R_SIGNER_CERTIFICATE_NOT_FOUND),
  213. "signer certificate not found"},
  214. {ERR_REASON(CMS_R_SIGNFINAL_ERROR), "signfinal error"},
  215. {ERR_REASON(CMS_R_SMIME_TEXT_ERROR), "smime text error"},
  216. {ERR_REASON(CMS_R_STORE_INIT_ERROR), "store init error"},
  217. {ERR_REASON(CMS_R_TYPE_NOT_COMPRESSED_DATA), "type not compressed data"},
  218. {ERR_REASON(CMS_R_TYPE_NOT_DATA), "type not data"},
  219. {ERR_REASON(CMS_R_TYPE_NOT_DIGESTED_DATA), "type not digested data"},
  220. {ERR_REASON(CMS_R_TYPE_NOT_ENCRYPTED_DATA), "type not encrypted data"},
  221. {ERR_REASON(CMS_R_TYPE_NOT_ENVELOPED_DATA), "type not enveloped data"},
  222. {ERR_REASON(CMS_R_UNABLE_TO_FINALIZE_CONTEXT),
  223. "unable to finalize context"},
  224. {ERR_REASON(CMS_R_UNKNOWN_CIPHER), "unknown cipher"},
  225. {ERR_REASON(CMS_R_UNKNOWN_DIGEST_ALGORIHM), "unknown digest algorihm"},
  226. {ERR_REASON(CMS_R_UNKNOWN_ID), "unknown id"},
  227. {ERR_REASON(CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM),
  228. "unsupported compression algorithm"},
  229. {ERR_REASON(CMS_R_UNSUPPORTED_CONTENT_TYPE), "unsupported content type"},
  230. {ERR_REASON(CMS_R_UNSUPPORTED_KEK_ALGORITHM),
  231. "unsupported kek algorithm"},
  232. {ERR_REASON(CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM),
  233. "unsupported key encryption algorithm"},
  234. {ERR_REASON(CMS_R_UNSUPPORTED_RECIPIENT_TYPE),
  235. "unsupported recipient type"},
  236. {ERR_REASON(CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE),
  237. "unsupported recpientinfo type"},
  238. {ERR_REASON(CMS_R_UNSUPPORTED_TYPE), "unsupported type"},
  239. {ERR_REASON(CMS_R_UNWRAP_ERROR), "unwrap error"},
  240. {ERR_REASON(CMS_R_UNWRAP_FAILURE), "unwrap failure"},
  241. {ERR_REASON(CMS_R_VERIFICATION_FAILURE), "verification failure"},
  242. {ERR_REASON(CMS_R_WRAP_ERROR), "wrap error"},
  243. {0, NULL}
  244. };
  245. #endif
  246. void ERR_load_CMS_strings(void)
  247. {
  248. #ifndef OPENSSL_NO_ERR
  249. if (ERR_func_error_string(CMS_str_functs[0].error) == NULL) {
  250. ERR_load_strings(0, CMS_str_functs);
  251. ERR_load_strings(0, CMS_str_reasons);
  252. }
  253. #endif
  254. }