diff options
Diffstat (limited to 'crypto/cms/cms_env.c')
-rw-r--r-- | crypto/cms/cms_env.c | 116 |
1 files changed, 52 insertions, 64 deletions
diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index 83826beb51..cedabe1f3c 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -37,7 +37,7 @@ static int cms_get_enveloped_type(const CMS_ContentInfo *cms) return CMS_ENVELOPED_AUTH; default: - CMSerr(0, CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA); + ERR_raise(ERR_LIB_CMS, CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA); return 0; } } @@ -45,8 +45,7 @@ static int cms_get_enveloped_type(const CMS_ContentInfo *cms) CMS_EnvelopedData *cms_get0_enveloped(CMS_ContentInfo *cms) { if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_enveloped) { - CMSerr(CMS_F_CMS_GET0_ENVELOPED, - CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA); + ERR_raise(ERR_LIB_CMS, CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA); return NULL; } return cms->d.envelopedData; @@ -55,7 +54,7 @@ CMS_EnvelopedData *cms_get0_enveloped(CMS_ContentInfo *cms) CMS_AuthEnvelopedData *cms_get0_auth_enveloped(CMS_ContentInfo *cms) { if (OBJ_obj2nid(cms->contentType) != NID_id_smime_ct_authEnvelopedData) { - CMSerr(0, CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA); + ERR_raise(ERR_LIB_CMS, CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA); return NULL; } return cms->d.authEnvelopedData; @@ -66,7 +65,7 @@ static CMS_EnvelopedData *cms_enveloped_data_init(CMS_ContentInfo *cms) if (cms->d.other == NULL) { cms->d.envelopedData = M_ASN1_new_of(CMS_EnvelopedData); if (cms->d.envelopedData == NULL) { - CMSerr(CMS_F_CMS_ENVELOPED_DATA_INIT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); return NULL; } cms->d.envelopedData->version = 0; @@ -85,7 +84,7 @@ cms_auth_enveloped_data_init(CMS_ContentInfo *cms) if (cms->d.other == NULL) { cms->d.authEnvelopedData = M_ASN1_new_of(CMS_AuthEnvelopedData); if (cms->d.authEnvelopedData == NULL) { - CMSerr(0, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); return NULL; } /* Defined in RFC 5083 - Section 2.1. "AuthEnvelopedData Type" */ @@ -134,12 +133,11 @@ int cms_env_asn1_ctrl(CMS_RecipientInfo *ri, int cmd) return 1; i = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_CMS_ENVELOPE, cmd, ri); if (i == -2) { - CMSerr(CMS_F_CMS_ENV_ASN1_CTRL, - CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE); return 0; } if (i <= 0) { - CMSerr(CMS_F_CMS_ENV_ASN1_CTRL, CMS_R_CTRL_FAILURE); + ERR_raise(ERR_LIB_CMS, CMS_R_CTRL_FAILURE); return 0; } return 1; @@ -238,7 +236,7 @@ CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher, return cms; merr: CMS_ContentInfo_free(cms); - CMSerr(0, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); return NULL; } @@ -266,7 +264,7 @@ CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx, return cms; merr: CMS_ContentInfo_free(cms); - CMSerr(0, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); return NULL; } @@ -353,7 +351,7 @@ CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip, pk = X509_get0_pubkey(recip); if (pk == NULL) { - CMSerr(CMS_F_CMS_ADD1_RECIPIENT, CMS_R_ERROR_GETTING_PUBLIC_KEY); + ERR_raise(ERR_LIB_CMS, CMS_R_ERROR_GETTING_PUBLIC_KEY); goto err; } @@ -371,8 +369,7 @@ CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip, break; default: - CMSerr(CMS_F_CMS_ADD1_RECIPIENT, - CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE); goto err; } @@ -383,7 +380,7 @@ CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip, return ri; merr: - CMSerr(CMS_F_CMS_ADD1_RECIPIENT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); err: M_ASN1_free_of(ri, CMS_RecipientInfo); return NULL; @@ -402,8 +399,7 @@ int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, { CMS_KeyTransRecipientInfo *ktri; if (ri->type != CMS_RECIPINFO_TRANS) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS, - CMS_R_NOT_KEY_TRANSPORT); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEY_TRANSPORT); return 0; } @@ -425,8 +421,7 @@ int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, { CMS_KeyTransRecipientInfo *ktri; if (ri->type != CMS_RECIPINFO_TRANS) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID, - CMS_R_NOT_KEY_TRANSPORT); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEY_TRANSPORT); return 0; } ktri = ri->d.ktri; @@ -437,8 +432,7 @@ int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert) { if (ri->type != CMS_RECIPINFO_TRANS) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP, - CMS_R_NOT_KEY_TRANSPORT); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEY_TRANSPORT); return -2; } return cms_SignerIdentifier_cert_cmp(ri->d.ktri->rid, cert); @@ -447,7 +441,7 @@ int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert) int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey) { if (ri->type != CMS_RECIPINFO_TRANS) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_SET0_PKEY, CMS_R_NOT_KEY_TRANSPORT); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEY_TRANSPORT); return 0; } EVP_PKEY_free(ri->d.ktri->pkey); @@ -470,7 +464,7 @@ static int cms_RecipientInfo_ktri_encrypt(const CMS_ContentInfo *cms, int ret = 0; if (ri->type != CMS_RECIPINFO_TRANS) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT, CMS_R_NOT_KEY_TRANSPORT); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEY_TRANSPORT); return 0; } ktri = ri->d.ktri; @@ -492,7 +486,7 @@ static int cms_RecipientInfo_ktri_encrypt(const CMS_ContentInfo *cms, if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_ENCRYPT, EVP_PKEY_CTRL_CMS_ENCRYPT, 0, ri) <= 0) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT, CMS_R_CTRL_ERROR); + ERR_raise(ERR_LIB_CMS, CMS_R_CTRL_ERROR); goto err; } @@ -502,7 +496,7 @@ static int cms_RecipientInfo_ktri_encrypt(const CMS_ContentInfo *cms, ek = OPENSSL_malloc(eklen); if (ek == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); goto err; } @@ -540,7 +534,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, ec = cms_get0_env_enc_content(cms); if (ktri->pkey == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT, CMS_R_NO_PRIVATE_KEY); + ERR_raise(ERR_LIB_CMS, CMS_R_NO_PRIVATE_KEY); return 0; } @@ -558,7 +552,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, cipher = EVP_get_cipherbyobj(calg->algorithm); if (cipher == NULL) { (void)ERR_clear_last_mark(); - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT, CMS_R_UNKNOWN_CIPHER); + ERR_raise(ERR_LIB_CMS, CMS_R_UNKNOWN_CIPHER); return 0; } (void)ERR_pop_to_mark(); @@ -579,7 +573,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, if (EVP_PKEY_CTX_ctrl(ktri->pctx, -1, EVP_PKEY_OP_DECRYPT, EVP_PKEY_CTRL_CMS_DECRYPT, 0, ri) <= 0) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT, CMS_R_CTRL_ERROR); + ERR_raise(ERR_LIB_CMS, CMS_R_CTRL_ERROR); goto err; } @@ -590,7 +584,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, ek = OPENSSL_malloc(eklen); if (ek == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); goto err; } @@ -599,7 +593,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, ktri->encryptedKey->length) <= 0 || eklen == 0 || (fixlen != 0 && eklen != fixlen)) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT, CMS_R_CMS_LIB); + ERR_raise(ERR_LIB_CMS, CMS_R_CMS_LIB); goto err; } @@ -626,7 +620,7 @@ int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, ASN1_OCTET_STRING tmp_os; CMS_KEKRecipientInfo *kekri; if (ri->type != CMS_RECIPINFO_KEK) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP, CMS_R_NOT_KEK); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEK); return -2; } kekri = ri->d.kekri; @@ -685,7 +679,7 @@ CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, break; default: - CMSerr(CMS_F_CMS_ADD0_RECIPIENT_KEY, CMS_R_INVALID_KEY_LENGTH); + ERR_raise(ERR_LIB_CMS, CMS_R_INVALID_KEY_LENGTH); goto err; } @@ -694,13 +688,12 @@ CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, size_t exp_keylen = aes_wrap_keylen(nid); if (!exp_keylen) { - CMSerr(CMS_F_CMS_ADD0_RECIPIENT_KEY, - CMS_R_UNSUPPORTED_KEK_ALGORITHM); + ERR_raise(ERR_LIB_CMS, CMS_R_UNSUPPORTED_KEK_ALGORITHM); goto err; } if (keylen != exp_keylen) { - CMSerr(CMS_F_CMS_ADD0_RECIPIENT_KEY, CMS_R_INVALID_KEY_LENGTH); + ERR_raise(ERR_LIB_CMS, CMS_R_INVALID_KEY_LENGTH); goto err; } @@ -749,7 +742,7 @@ CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, return ri; merr: - CMSerr(CMS_F_CMS_ADD0_RECIPIENT_KEY, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); err: M_ASN1_free_of(ri, CMS_RecipientInfo); return NULL; @@ -764,7 +757,7 @@ int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, { CMS_KEKIdentifier *rkid; if (ri->type != CMS_RECIPINFO_KEK) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID, CMS_R_NOT_KEK); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEK); return 0; } rkid = ri->d.kekri->kekid; @@ -794,7 +787,7 @@ int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, { CMS_KEKRecipientInfo *kekri; if (ri->type != CMS_RECIPINFO_KEK) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_SET0_KEY, CMS_R_NOT_KEK); + ERR_raise(ERR_LIB_CMS, CMS_R_NOT_KEK); return 0; } @@ -847,26 +840,26 @@ static int cms_RecipientInfo_kekri_encrypt(const CMS_ContentInfo *cms, kekri = ri->d.kekri; if (kekri->key == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT, CMS_R_NO_KEY); + ERR_raise(ERR_LIB_CMS, CMS_R_NO_KEY); return 0; } cipher = cms_get_key_wrap_cipher(kekri->keylen, cms_ctx); if (cipher == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT, CMS_R_INVALID_KEY_LENGTH); + ERR_raise(ERR_LIB_CMS, CMS_R_INVALID_KEY_LENGTH); goto err; } /* 8 byte prefix for AES wrap ciphers */ wkey = OPENSSL_malloc(ec->keylen + 8); if (wkey == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); goto err; } ctx = EVP_CIPHER_CTX_new(); if (ctx == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); goto err; } @@ -874,12 +867,12 @@ static int cms_RecipientInfo_kekri_encrypt(const CMS_ContentInfo *cms, if (!EVP_EncryptInit_ex(ctx, cipher, NULL, kekri->key, NULL) || !EVP_EncryptUpdate(ctx, wkey, &wkeylen, ec->key, ec->keylen) || !EVP_EncryptFinal_ex(ctx, wkey + wkeylen, &outlen)) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT, CMS_R_WRAP_ERROR); + ERR_raise(ERR_LIB_CMS, CMS_R_WRAP_ERROR); goto err; } wkeylen += outlen; if (!ossl_assert((size_t)wkeylen == ec->keylen + 8)) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT, CMS_R_WRAP_ERROR); + ERR_raise(ERR_LIB_CMS, CMS_R_WRAP_ERROR); goto err; } @@ -918,40 +911,38 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms, kekri = ri->d.kekri; if (!kekri->key) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, CMS_R_NO_KEY); + ERR_raise(ERR_LIB_CMS, CMS_R_NO_KEY); return 0; } wrap_nid = OBJ_obj2nid(kekri->keyEncryptionAlgorithm->algorithm); if (aes_wrap_keylen(wrap_nid) != kekri->keylen) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, - CMS_R_INVALID_KEY_LENGTH); + ERR_raise(ERR_LIB_CMS, CMS_R_INVALID_KEY_LENGTH); return 0; } /* If encrypted key length is invalid don't bother */ if (kekri->encryptedKey->length < 16) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, - CMS_R_INVALID_ENCRYPTED_KEY_LENGTH); + ERR_raise(ERR_LIB_CMS, CMS_R_INVALID_ENCRYPTED_KEY_LENGTH); goto err; } cipher = cms_get_key_wrap_cipher(kekri->keylen, cms_ctx); if (cipher == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, CMS_R_INVALID_KEY_LENGTH); + ERR_raise(ERR_LIB_CMS, CMS_R_INVALID_KEY_LENGTH); goto err; } ukey = OPENSSL_malloc(kekri->encryptedKey->length - 8); if (ukey == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); goto err; } ctx = EVP_CIPHER_CTX_new(); if (ctx == NULL) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); goto err; } @@ -960,7 +951,7 @@ static int cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms, kekri->encryptedKey->data, kekri->encryptedKey->length) || !EVP_DecryptFinal_ex(ctx, ukey + ukeylen, &outlen)) { - CMSerr(CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT, CMS_R_UNWRAP_ERROR); + ERR_raise(ERR_LIB_CMS, CMS_R_UNWRAP_ERROR); goto err; } ukeylen += outlen; @@ -992,8 +983,7 @@ int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) return cms_RecipientInfo_pwri_crypt(cms, ri, 0); default: - CMSerr(CMS_F_CMS_RECIPIENTINFO_DECRYPT, - CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE); + ERR_raise(ERR_LIB_CMS, CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE); return 0; } } @@ -1014,8 +1004,7 @@ int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri) return cms_RecipientInfo_pwri_crypt(cms, ri, 1); default: - CMSerr(CMS_F_CMS_RECIPIENTINFO_ENCRYPT, - CMS_R_UNSUPPORTED_RECIPIENT_TYPE); + ERR_raise(ERR_LIB_CMS, CMS_R_UNSUPPORTED_RECIPIENT_TYPE); return 0; } } @@ -1152,8 +1141,7 @@ static BIO *cms_EnvelopedData_Encryption_init_bio(CMS_ContentInfo *cms) /* Now encrypt content key according to each RecipientInfo type */ rinfos = env->recipientInfos; if (cms_env_encrypt_content_key(cms, rinfos) < 0) { - CMSerr(CMS_F_CMS_ENVELOPEDDATA_ENCRYPTION_INIT_BIO, - CMS_R_ERROR_SETTING_RECIPIENTINFO); + ERR_raise(ERR_LIB_CMS, CMS_R_ERROR_SETTING_RECIPIENTINFO); goto err; } @@ -1205,7 +1193,7 @@ BIO *cms_AuthEnvelopedData_init_bio(CMS_ContentInfo *cms) /* Now encrypt content key according to each RecipientInfo type */ rinfos = aenv->recipientInfos; if (cms_env_encrypt_content_key(cms, rinfos) < 0) { - CMSerr(0, CMS_R_ERROR_SETTING_RECIPIENTINFO); + ERR_raise(ERR_LIB_CMS, CMS_R_ERROR_SETTING_RECIPIENTINFO); goto err; } @@ -1233,7 +1221,7 @@ int cms_EnvelopedData_final(CMS_ContentInfo *cms, BIO *chain) return 0; if (mbio == NULL) { - CMSerr(CMS_F_CMS_ENVELOPEDDATA_FINAL, CMS_R_CONTENT_NOT_FOUND); + ERR_raise(ERR_LIB_CMS, CMS_R_CONTENT_NOT_FOUND); return 0; } @@ -1248,13 +1236,13 @@ int cms_EnvelopedData_final(CMS_ContentInfo *cms, BIO *chain) env->unprotectedAttrs = sk_X509_ATTRIBUTE_new_null(); if (env->unprotectedAttrs == NULL) { - CMSerr(CMS_F_CMS_ENVELOPEDDATA_FINAL, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CMS, ERR_R_MALLOC_FAILURE); return 0; } if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_PROCESS_UNPROTECTED, 1, env->unprotectedAttrs) <= 0) { - CMSerr(CMS_F_CMS_ENVELOPEDDATA_FINAL, CMS_R_CTRL_FAILURE); + ERR_raise(ERR_LIB_CMS, CMS_R_CTRL_FAILURE); return 0; } } @@ -1283,7 +1271,7 @@ int cms_AuthEnvelopedData_final(CMS_ContentInfo *cms, BIO *cmsbio) || (tag = OPENSSL_malloc(taglen)) == NULL || EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, taglen, tag) <= 0) { - CMSerr(0, CMS_R_CIPHER_GET_TAG); + ERR_raise(ERR_LIB_CMS, CMS_R_CIPHER_GET_TAG); goto err; } |