]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Implemented Quote Digest constructing function for IMV
authorSansar Choinyambuu <schoinya@hsr.ch>
Fri, 14 Oct 2011 16:19:49 +0000 (18:19 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 17:51:08 +0000 (18:51 +0100)
Implemented Signature verification function to check TPM Quote Signature
Implemented Handling of Simple Evidence Final attribute
Fixed bug within tpm_quote function

src/libpts/pts/pts.c
src/libpts/pts/pts.h

index d928d18917d56b125a312792c38c90b7d25af4f3..0f850f292f494befd4702c1c283bdd3779e3c926 100644 (file)
 #include <sys/utsname.h>
 #include <errno.h>
 
-#include <openssl/asn1t.h>
-#include <openssl/x509.h>
-#include <openssl/rsa.h>
-
 #define PTS_BUF_SIZE   4096
 
 typedef struct private_pts_t private_pts_t;
index 40543ba1a6e75fa9aaa71c55519b8d5f3b6757d9..5b8d8986f829d5faf7593bb6763799bfc3f631b6 100644 (file)
@@ -388,6 +388,23 @@ struct pts_t {
         bool (*quote_tpm)(pts_t *this, u_int32_t *pcrs, u_int32_t num_of_pcrs,
                                           chunk_t *pcr_composite, chunk_t *quote_signature);
 
+        /**
+        * Constructs and returns PCR Quote Digest structure expected from IMC
+        * 
+        * @param digest                        Output variable to store quote digest
+        * @return                                      FALSE in case of any error, TRUE otherwise
+        */
+        bool (*get_quote_digest)(pts_t *this, chunk_t *digest);
+
+        /**
+        * Constructs and returns PCR Quote Digest structure expected from IMC
+        *
+        * @param data                          Calculated TPM Quote Digest
+        * @param signature                     TPM Quote Signature received from IMC
+        * @return                                      FALSE in case signature is not verified, TRUE otherwise
+        */
+        bool (*verify_quote_signature)(pts_t *this, chunk_t data, chunk_t signature);
+
        /**
         * Destroys a pts_t object.
         */