pem: Support encoding of attribute certificates
While there is no widely used PEM header for attribute certificates, at least IAIK-JCE uses BEGIN ATTRIBUTE CERTIFICATE: http://javadoc.iaik.tugraz.at/iaik_jce/current/iaik/utils/Util.html#toPemString(iaik.x509.attr.AttributeCertificate)
This commit is contained in:
parent
8f9e2dbcd5
commit
0226ca886d
|
@ -106,6 +106,12 @@ bool pem_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
|
|||
label = "CERTIFICATE REQUEST";
|
||||
break;
|
||||
}
|
||||
if (cred_encoding_args(args, CRED_PART_X509_AC_ASN1_DER,
|
||||
&asn1, CRED_PART_END))
|
||||
{
|
||||
label = "ATTRIBUTE CERTIFICATE";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -154,4 +160,3 @@ bool pem_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
|
|||
encoding->len = pos - encoding->ptr;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue