aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/tcg/tcg_pts_attr_aik.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/tcg/tcg_pts_attr_aik.c')
-rw-r--r--src/libimcv/tcg/tcg_pts_attr_aik.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libimcv/tcg/tcg_pts_attr_aik.c b/src/libimcv/tcg/tcg_pts_attr_aik.c
index c442f3131..ffef15f29 100644
--- a/src/libimcv/tcg/tcg_pts_attr_aik.c
+++ b/src/libimcv/tcg/tcg_pts_attr_aik.c
@@ -109,13 +109,15 @@ METHOD(pa_tnc_attr_t, build, void,
{
bio_writer_t *writer;
u_int8_t flags = PTS_AIK_FLAGS_NONE;
+ cred_encoding_type_t encoding_type = CERT_ASN1_DER;
chunk_t aik_blob;
if (this->aik->get_type(this->aik) == CERT_TRUSTED_PUBKEY)
{
flags |= PTS_AIK_FLAGS_NAKED_KEY;
+ encoding_type = PUBKEY_SPKI_ASN1_DER;
}
- if (!this->aik->get_encoding(this->aik, CERT_ASN1_DER, &aik_blob))
+ if (!this->aik->get_encoding(this->aik, encoding_type, &aik_blob))
{
DBG1(DBG_TNC, "encoding of Attestation Identity Key failed");
aik_blob = chunk_empty;