diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-09-05 12:43:18 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-09-08 12:08:16 +0200 |
commit | f1b54894f8e6a10f78e37c1d8b4aa98a38337017 (patch) | |
tree | 0deaab574154dc8cca0e24b814a00d5a84b61aa9 /src/libimcv | |
parent | 07b60afdd87cc0d3ceedd8d031e415a17fbceca4 (diff) | |
download | strongswan-f1b54894f8e6a10f78e37c1d8b4aa98a38337017.tar.bz2 strongswan-f1b54894f8e6a10f78e37c1d8b4aa98a38337017.tar.xz |
fixed encoding of AIK certificates and public keys
Diffstat (limited to 'src/libimcv')
-rw-r--r-- | src/libimcv/tcg/tcg_pts_attr_aik.c | 4 |
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; |