Changed encoding type to ASN.1 DER
authorSansar Choinyambuu <schoinya@hsr.ch>
Fri, 7 Oct 2011 13:40:29 +0000 (15:40 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 13:34:21 +0000 (14:34 +0100)
src/libpts/pts/pts.c

index d661308..98d5d27 100644 (file)
@@ -782,7 +782,7 @@ METHOD(pts_t, quote_tpm, bool,
        /* Create from AIK public key a HKEY object to sign Quote operation output*/
        if (this->aik->get_type(this->aik) == CERT_TRUSTED_PUBKEY)
        {
-               if (!this->aik->get_encoding(this->aik, CERT_PEM, &aik_key_encoding))
+               if (!this->aik->get_encoding(this->aik, CERT_ASN1_DER, &aik_key_encoding))
                {
                        DBG1(DBG_PTS, "encoding AIK certificate for quote operation failed");
                        goto err1;
@@ -797,7 +797,7 @@ METHOD(pts_t, quote_tpm, bool,
                        DBG1(DBG_PTS, "unable to retrieve public key from AIK certificate");
                        goto err1;
                }
-               if (!key->get_encoding(key, PUBKEY_PEM, &aik_key_encoding))
+               if (!key->get_encoding(key, PUBKEY_ASN1_DER, &aik_key_encoding))
                {
                        DBG1(DBG_PTS, "encoding AIK Public Key for quote operation failed");
                        goto err1;