Various PKCS#7 fixes to properly (maybe!) handle PKCS#7 enveloped data.

Containts elements of code by Sebastian Akerman <sak@parallelconsulting.com>
and made a bit less "naughty" by Steve.
This commit is contained in:
Dr. Stephen Henson
1999-05-10 00:47:42 +00:00
parent 9d5cceac6f
commit 884e8ec615
9 changed files with 57 additions and 22 deletions

View File

@@ -110,3 +110,29 @@ int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
}
return(i);
}
/* Convert the various cipher NIDs and dummies to a proper OID NID */
int EVP_CIPHER_type(EVP_CIPHER *ctx)
{
int nid;
nid = EVP_CIPHER_nid(ctx);
switch(nid) {
case NID_rc2_cbc:
case NID_rc2_64_cbc:
case NID_rc2_40_cbc:
return NID_rc2_cbc;
case NID_rc4:
case NID_rc4_40:
return NID_rc4;
default:
return nid;
}
}