Also removed some declarations for undefined functions.
#include <utils/debug.h>
#include <credentials/keys/private_key.h>
-void start_timing(struct timespec *start)
+static void start_timing(struct timespec *start)
{
clock_gettime(CLOCK_THREAD_CPUTIME_ID, start);
}
-double end_timing(struct timespec *start)
+static double end_timing(struct timespec *start)
{
struct timespec end;
/**
* Clean up interim data
*/
-void destroy_interim_data(interim_data_t *this)
+static void destroy_interim_data(interim_data_t *this)
{
this->id->destroy(this->id);
free(this);
};
-char* print_cfn(pts_comp_func_name_t *cfn)
+static char* print_cfn(pts_comp_func_name_t *cfn)
{
static char buf[BUF_LEN];
char flags[8];
/**
* Convert time_t to Simple Component Evidence UTS string format
*/
-void measurement_time_to_utc(time_t measurement_time, chunk_t *utc_time)
+static void measurement_time_to_utc(time_t measurement_time, chunk_t *utc_time)
{
struct tm t;
/**
* Convert Simple Component Evidence UTS string format to time_t
*/
-bool measurement_time_from_utc(time_t *measurement_time, chunk_t utc_time)
+static bool measurement_time_from_utc(time_t *measurement_time, chunk_t utc_time)
{
int tm_year, tm_mon, tm_day, tm_hour, tm_min, tm_sec;
int tm_leap_4, tm_leap_100, tm_leap_400, tm_leap;
/**
* Creates an empty linked list object.
*/
-element_t *element_create(void *value)
+static element_t *element_create(void *value)
{
element_t *this;
INIT(this,
free_align(this);
}
-/*
- * Described in header
+/**
+ * Create a generic mac_t object using AESNI CMAC
*/
-mac_t *aesni_cmac_create(encryption_algorithm_t algo, size_t key_size)
+static mac_t *aesni_cmac_create(encryption_algorithm_t algo, size_t key_size)
{
private_mac_t *this;
#include <crypto/prfs/prf.h>
#include <crypto/signers/signer.h>
-/**
- * Create a generic mac_t object using AESNI CMAC.
- *
- * @param algo underlying encryption algorithm
- * @param key_size size of encryption key, in bytes
- */
-mac_t *aesni_cmac_create(encryption_algorithm_t algo, size_t key_size);
-
/**
* Creates a new prf_t object based AESNI CMAC.
*
free_align(this);
}
-/*
- * Described in header
+/**
+ * Create a generic mac_t object using AESNI XCBC
*/
-mac_t *aesni_xcbc_create(encryption_algorithm_t algo, size_t key_size)
+static mac_t *aesni_xcbc_create(encryption_algorithm_t algo, size_t key_size)
{
private_aesni_mac_t *this;
#include <crypto/prfs/prf.h>
#include <crypto/signers/signer.h>
-/**
- * Create a generic mac_t object using AESNI XCBC
- *
- * @param algo underlying encryption algorithm
- * @param key_size size of encryption key, in bytes
- */
-mac_t *aesni_xcbc_create(encryption_algorithm_t algo, size_t key_size);
-
/**
* Creates a new prf_t object based AESNI XCBC.
*
/**
* Load a DH private key
*/
-bool load_private_key(private_botan_diffie_hellman_t *this, chunk_t value)
+static bool load_private_key(private_botan_diffie_hellman_t *this, chunk_t value)
{
botan_mp_t xa;
free(this);
}
-/*
- * Described in header
+/**
+ * Create a generic mac_t object
*/
-mac_t *cmac_create(encryption_algorithm_t algo, size_t key_size)
+static mac_t *cmac_create(encryption_algorithm_t algo, size_t key_size)
{
private_mac_t *this;
crypter_t *crypter;
PERM_OP(l,r,tt, 4,0x0f0f0f0fL); \
}
-#ifndef NOPROTO
-void fcrypt_body(DES_LONG *out,des_key_schedule ks,
- DES_LONG Eswap0, DES_LONG Eswap1);
-#else
-void fcrypt_body();
-#endif
-
static const DES_LONG des_skb[8][64]={
{ /* for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 */
0x00000000L,0x00000010L,0x20000000L,0x20000010L,
*/
private_key_t *openssl_rsa_private_key_create(EVP_PKEY *key, bool engine);
-/**
- * Connect to a RSA private key on a smartcard.
- *
- * Accepts the BUILD_SMARTCARD_KEYID and the BUILD_SMARTCARD_PIN
- * arguments.
- *
- * @param type type of the key, must be KEY_RSA
- * @param args builder_part_t argument list
- * @return loaded key, NULL on failure
- */
-openssl_rsa_private_key_t *openssl_rsa_private_key_connect(key_type_t type,
- va_list args);
-
#endif /** OPENSSL_RSA_PRIVATE_KEY_H_ @}*/
/**
* Destroy a signerinfo_t entry
*/
-void signerinfo_destroy(signerinfo_t *this)
+static void signerinfo_destroy(signerinfo_t *this)
{
DESTROY_IF(this->attributes);
DESTROY_IF(this->serial);
/**
* Build a generalName from an id
*/
-chunk_t build_generalName(identification_t *id)
+static chunk_t build_generalName(identification_t *id)
{
int context;
*/
err_t extract_value(chunk_t *value, chunk_t *line);
-/**
- * extracts a name: value pair from a text line
- */
-err_t extract_name_value(chunk_t *name, chunk_t *value, chunk_t *line);
-
/**
* extracts a parameter: value from a text line
*/
* defined by section 3.5 "Interoperability with older IF-TNCCS versions" of
* the TCG TNC IF-TNCCS TLV Bindings Version 2.0 standard.
*/
-tnccs_type_t determine_tnccs_protocol(char version)
+static tnccs_type_t determine_tnccs_protocol(char version)
{
switch (version)
{
/**
* Convert TPM2_ALG_ID to PRF algorithm
*/
-pseudo_random_function_t prf_alg_from_tpm_alg_id(TPM2_ALG_ID alg)
+static pseudo_random_function_t prf_alg_from_tpm_alg_id(TPM2_ALG_ID alg)
{
switch (alg)
{
/**
* read the public key portion of a TSS 2.0 key from NVRAM
*/
-bool read_public(private_tpm_tss_tss2_t *this, TPMI_DH_OBJECT handle,
- TPM2B_PUBLIC *public)
+static bool read_public(private_tpm_tss_tss2_t *this, TPMI_DH_OBJECT handle,
+ TPM2B_PUBLIC *public)
{
uint32_t rval;
/**
* pem encode a public key into an allocated string
*/
-char* pem_encode(chunk_t der)
+static char* pem_encode(chunk_t der)
{
static const char *begin = "-----BEGIN PUBLIC KEY-----\n";
static const char *end = "-----END PUBLIC KEY-----";
/**
* Extract X.501 attributes
*/
-void extract_attributes(pkcs7_t *pkcs7, enumerator_t *enumerator,
- scep_attributes_t *attrs)
+static void extract_attributes(pkcs7_t *pkcs7, enumerator_t *enumerator,
+ scep_attributes_t *attrs)
{
chunk_t attr;
char *value;
} setting_t;
-int setting_find(const void *a, const void *b)
+static int setting_find(const void *a, const void *b)
{
const char *key = a;
const setting_t *setting = b;
return strcmp(key, setting->key);
}
-int setting_sort(const void *a, const void *b, void *user)
+static int setting_sort(const void *a, const void *b, void *user)
{
const setting_t *sa = a, *sb = b;
return strcmp(sa->key, sb->key);
/**
* Determine file creation data and convert it into RFC 3339 format
*/
-bool get_file_creation_date(char *pathname, char *timestamp)
+static bool get_file_creation_date(char *pathname, char *timestamp)
{
struct stat st;
struct tm ct;