Allow alternate eContentType oids to be set in cms utility.

Add id-ct-asciiTextWithCRLF OID.

Give more meaninful error message is attempt to use key ID from a certificate
without a key ID.
This commit is contained in:
Dr. Stephen Henson
2008-03-19 19:34:30 +00:00
parent 8cd358bef8
commit 054307e7ed
8 changed files with 43 additions and 5 deletions

View File

@@ -226,6 +226,12 @@ int cms_set1_SignerIdentifier(CMS_SignerIdentifier *sid, X509 *cert, int type)
break;
case CMS_SIGNERINFO_KEYIDENTIFIER:
if (!cert->skid)
{
CMSerr(CMS_F_CMS_SET1_SIGNERIDENTIFIER,
CMS_R_CERTIFICATE_HAS_NO_KEYID);
return 0;
}
sid->d.subjectKeyIdentifier = ASN1_STRING_dup(cert->skid);
if (!sid->d.subjectKeyIdentifier)
goto merr;