add setting key wrap OID to example

pull/379/head
JacobBarthelmeh 2024-02-21 17:17:04 +07:00
parent e310409d0e
commit e73bc9578d
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ static int Create(byte* smime, int* smimeSz, byte* key, int keySz,
pkcs7->privateKeySz = keySz;
pkcs7->contentOID = DATA; /* inner content default is DATA */
pkcs7->hashOID = SHA256h; /* default to SHA-256 hash type */
pkcs7->signedAttribs = NULL;
pkcs7->signedAttribsSz = 0;
#ifndef NO_AES
pkcs7->keyWrapOID = AES256_WRAP;
pkcs7->keyAgreeOID = dhSinglePass_stdDH_sha256kdf_scheme;
#endif
/* type of SMIME */
pkcs7Compat->type = SIGNED_DATA;