aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSansar Choinyambuu <schoinya@hsr.ch>2011-10-24 13:31:05 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-11-28 19:24:40 +0100
commit898c3f995f230b5d225180edd662ddc3d9e8180c (patch)
treea3305b290e2fe7e254cda7a0714c605b71bfa2c8 /src
parent06d3485c46954903b4e3b2c2b149a8484a4f6760 (diff)
downloadstrongswan-898c3f995f230b5d225180edd662ddc3d9e8180c.tar.bz2
strongswan-898c3f995f230b5d225180edd662ddc3d9e8180c.tar.xz
follow strongswan coding rules
Diffstat (limited to 'src')
-rw-r--r--src/libpts/pts/pts.c8
-rw-r--r--src/libpts/pts/pts.h12
-rw-r--r--src/libpts/tcg/tcg_pts_attr_dh_nonce_params_req.h3
-rw-r--r--src/libpts/tcg/tcg_pts_attr_simple_evid_final.c2
4 files changed, 15 insertions, 10 deletions
diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c
index ca60c2f99..1c349d7c2 100644
--- a/src/libpts/pts/pts.c
+++ b/src/libpts/pts/pts.c
@@ -1205,7 +1205,8 @@ METHOD(pts_t, verify_quote_signature, bool,
}
*/
- if (!aik_pub_key->get_encoding(aik_pub_key, PUBKEY_SPKI_ASN1_DER, &key_encoding))
+ if (!aik_pub_key->get_encoding(aik_pub_key,
+ PUBKEY_SPKI_ASN1_DER, &key_encoding))
{
DBG1(DBG_PTS, "failed to get encoding of AIK public key");
goto cleanup;
@@ -1215,7 +1216,7 @@ METHOD(pts_t, verify_quote_signature, bool,
pkey = d2i_PUBKEY(NULL, (const unsigned char**)&p, key_encoding.len);
if (!pkey)
{
- DBG1(DBG_PTS, "failed to get EVP_PKEY object from AIK public key encoding");
+ DBG1(DBG_PTS, "failed to get EVP_PKEY object from AIK public key");
goto cleanup;
}
@@ -1226,7 +1227,8 @@ METHOD(pts_t, verify_quote_signature, bool,
goto cleanup;
}
- if (RSA_verify(NID_sha1, data.ptr, data.len, signature.ptr, signature.len, rsa) != 1)
+ if (RSA_verify(NID_sha1, data.ptr, data.len,
+ signature.ptr, signature.len, rsa) != 1)
{
DBG1(DBG_PTS, "signature verification failed for TPM Quote Info");
goto cleanup;
diff --git a/src/libpts/pts/pts.h b/src/libpts/pts/pts.h
index 0ddcc3fed..b92bbdc20 100644
--- a/src/libpts/pts/pts.h
+++ b/src/libpts/pts/pts.h
@@ -256,7 +256,7 @@ struct pts_t {
* @param error_code Output variable for PTS error code
* @return TRUE if path is valid or file/directory
* doesn't exist or path is invalid
- * FALSE if local error occured within stat function
+ * FALSE if local error occured within stat function
*/
bool (*is_path_valid)(pts_t *this, char *path, pts_error_code_t *error_code);
@@ -372,7 +372,8 @@ struct pts_t {
* @param output Chunk to save PCR value after extension
* @return FALSE in case of TSS error, TRUE otherwise
*/
- bool (*extend_pcr)(pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output);
+ bool (*extend_pcr)(pts_t *this, u_int32_t pcr_num, chunk_t input,
+ chunk_t *output);
/**
* Quote over PCR's
@@ -391,7 +392,7 @@ struct pts_t {
/**
* Add extended PCR with its corresponding value
*
- * @return FALSE in case of any error or non-match, TRUE otherwise
+ * @return FALSE in case of any error or non-match, TRUE otherwise
*/
void (*add_pcr_entry)(pts_t *this, pcr_entry_t *entry);
@@ -402,14 +403,15 @@ struct pts_t {
* @param quote_info Output variable to store TPM Quote Info
* @return FALSE in case of any error, TRUE otherwise
*/
- bool (*get_quote_info)(pts_t *this, chunk_t *pcr_composite, chunk_t *quote_info);
+ bool (*get_quote_info)(pts_t *this, chunk_t *pcr_composite,
+ chunk_t *quote_info);
/**
* 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
+ * @return FALSE in case signature is not verified, TRUE otherwise
*/
bool (*verify_quote_signature)(pts_t *this, chunk_t data, chunk_t signature);
diff --git a/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_req.h b/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_req.h
index bc9cb3fd9..170077156 100644
--- a/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_req.h
+++ b/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_req.h
@@ -21,7 +21,8 @@
#ifndef TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_
#define TCG_PTS_ATTR_DH_NONCE_PARAMS_REQ_H_
-typedef struct tcg_pts_attr_dh_nonce_params_req_t tcg_pts_attr_dh_nonce_params_req_t;
+typedef struct tcg_pts_attr_dh_nonce_params_req_t
+ tcg_pts_attr_dh_nonce_params_req_t;
#include "tcg_attr.h"
#include "pa_tnc/pa_tnc_attr.h"
diff --git a/src/libpts/tcg/tcg_pts_attr_simple_evid_final.c b/src/libpts/tcg/tcg_pts_attr_simple_evid_final.c
index 5f2bd6553..5f2137e92 100644
--- a/src/libpts/tcg/tcg_pts_attr_simple_evid_final.c
+++ b/src/libpts/tcg/tcg_pts_attr_simple_evid_final.c
@@ -197,7 +197,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
bio_reader_t *reader;
u_int8_t flags;
u_int8_t reserved;
- //u_int16_t algorithm;
+ /** u_int16_t algorithm;*/
if (this->value.len < PTS_SIMPLE_EVID_FINAL_SIZE)
{