/* Return BIO based on EncryptedContentInfo and key */
-BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec,
- const CMS_CTX *cms_ctx)
+BIO *ossl_cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec,
+ const CMS_CTX *cms_ctx)
{
BIO *b;
EVP_CIPHER_CTX *ctx;
size_t tkeylen = 0;
int ok = 0;
int enc, keep_key = 0;
- OSSL_LIB_CTX *libctx = cms_ctx_get0_libctx(cms_ctx);
- const char *propq = cms_ctx_get0_propq(cms_ctx);
+ OSSL_LIB_CTX *libctx = ossl_cms_ctx_get0_libctx(cms_ctx);
+ const char *propq = ossl_cms_ctx_get0_propq(cms_ctx);
enc = ec->cipher ? 1 : 0;
return NULL;
}
-int cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec,
- const EVP_CIPHER *cipher,
- const unsigned char *key, size_t keylen,
- const CMS_CTX *cms_ctx)
+int ossl_cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec,
+ const EVP_CIPHER *cipher,
+ const unsigned char *key, size_t keylen,
+ const CMS_CTX *cms_ctx)
{
ec->cipher = cipher;
if (key) {
return 0;
}
ec = cms->d.encryptedData->encryptedContentInfo;
- return cms_EncryptedContent_init(ec, ciph, key, keylen, cms_get0_cmsctx(cms));
+ return ossl_cms_EncryptedContent_init(ec, ciph, key, keylen,
+ ossl_cms_get0_cmsctx(cms));
}
-BIO *cms_EncryptedData_init_bio(const CMS_ContentInfo *cms)
+BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms)
{
CMS_EncryptedData *enc = cms->d.encryptedData;
if (enc->encryptedContentInfo->cipher && enc->unprotectedAttrs)
enc->version = 2;
- return cms_EncryptedContent_init_bio(enc->encryptedContentInfo,
- cms_get0_cmsctx(cms));
+ return ossl_cms_EncryptedContent_init_bio(enc->encryptedContentInfo,
+ ossl_cms_get0_cmsctx(cms));
}