Re: PKCS7_decrypt vs RSA OAEP padding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



VICTORY!

After replacing the PEM_write_bio_PKCS7/PEM_read_bio_CMS methods for i2d_PKCS7_bio/d2i_CMS_bio https://github.com/EtneteraLogicworks/libscep/commit/b16cd6a97c979abd6ca0ab7af7a944ef553cf17d
PCKS7 (In this case CMS) decryption now works!

Code now looks like:

handle_encrypted_content(SCEP *handle, SCEP_DATA *data, PKCS7 *p7env, X509 *dec_cert, EVP_PKEY *dec_key) {
...
CMS_ContentInfo *cmsMessage = NULL;
BIO *convert = NULL;
conversion = BIO_new(BIO_s_mem());
i2d_PKCS7_bio(conversion, p7env);
cmsEnv = d2i_CMS_bio(conversion, NULL);
CMS_decrypt(cmsEnv, dec_key, dec_cert, NULL, decData, 0);

MM


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux