aboutsummaryrefslogtreecommitdiffstats
path: root/src/scepclient
diff options
context:
space:
mode:
Diffstat (limited to 'src/scepclient')
-rw-r--r--src/scepclient/loglite.c4
-rw-r--r--src/scepclient/pkcs10.c18
-rw-r--r--src/scepclient/pkcs10.h8
-rw-r--r--src/scepclient/scep.c20
-rw-r--r--src/scepclient/scep.h2
-rw-r--r--src/scepclient/scepclient.c16
6 files changed, 34 insertions, 34 deletions
diff --git a/src/scepclient/loglite.c b/src/scepclient/loglite.c
index 87041f114..539bb5f72 100644
--- a/src/scepclient/loglite.c
+++ b/src/scepclient/loglite.c
@@ -56,12 +56,12 @@ static void scepclient_dbg(int level, char *fmt, ...)
else if (cur_debugging & DBG_RAW)
{
debug_level = 3;
- }
+ }
else if (cur_debugging & DBG_PARSING)
{
debug_level = 2;
}
- else
+ else
{
debug_level = 1;
}
diff --git a/src/scepclient/pkcs10.c b/src/scepclient/pkcs10.c
index ca0e808fa..654626d15 100644
--- a/src/scepclient/pkcs10.c
+++ b/src/scepclient/pkcs10.c
@@ -50,16 +50,16 @@ static u_char ASN1_extensionRequest_oid_str[] = {
static const chunk_t ASN1_extensionRequest_oid = chunk_from_buf(ASN1_extensionRequest_oid_str);
-/**
+/**
* @brief Adds a subjectAltName in DER-coded form to a linked list
- *
+ *
* @param[in,out] subjectAltNames head of the linked list of subjectAltNames
* @param[in] kind type of the subjectAltName (which is a generalName)
* @param[in] value value of the subjectAltName as an ASCII string
*/
void
pkcs10_add_subjectAltName(generalName_t **subjectAltNames, generalNames_t kind
-, char *value)
+, char *value)
{
generalName_t *gn;
asn1_t asn1_type = ASN1_EOC;
@@ -102,8 +102,8 @@ pkcs10_add_subjectAltName(generalName_t **subjectAltNames, generalNames_t kind
}
/**
- * @brief Builds the requestInfoAttributes of the certificationRequestInfo-field
- *
+ * @brief Builds the requestInfoAttributes of the certificationRequestInfo-field
+ *
* challenge password ans subjectAltNames are only included,
* when avaiable in given #pkcs10_t structure
*
@@ -117,7 +117,7 @@ build_req_info_attributes(pkcs10_t* pkcs10)
chunk_t subjectAltNames = chunk_empty;
chunk_t challengePassword = chunk_empty;
- if (pkcs10->subjectAltNames != NULL)
+ if (pkcs10->subjectAltNames != NULL)
{
subjectAltNames = asn1_wrap(ASN1_SEQUENCE, "cm"
@@ -158,11 +158,11 @@ static chunk_t
pkcs10_build_request(pkcs10_t *pkcs10, int signature_alg)
{
chunk_t key = chunk_empty;
-
+
pkcs10->public_key->get_encoding(pkcs10->public_key, KEY_PUB_ASN1_DER, &key);
-
+
chunk_t keyInfo = asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_algorithmIdentifier(OID_RSA_ENCRYPTION),
+ asn1_algorithmIdentifier(OID_RSA_ENCRYPTION),
asn1_bitstring("m", key));
chunk_t cert_req_info = asn1_wrap(ASN1_SEQUENCE, "ccmm",
diff --git a/src/scepclient/pkcs10.h b/src/scepclient/pkcs10.h
index 3f29f019a..e10a3ef59 100644
--- a/src/scepclient/pkcs10.h
+++ b/src/scepclient/pkcs10.h
@@ -1,14 +1,14 @@
/**
* @file pkcs10.h
* @brief Functions to build PKCS#10 Request's
- *
+ *
* Contains functions to build DER encoded pkcs#10 certificate requests
*/
/*
* Copyright (C) 2005 Jan Hutter, Martin Willi
* Hochschule fuer Technik Rapperswil
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
@@ -34,9 +34,9 @@ typedef struct pkcs10_struct pkcs10_t;
/**
* @brief type representating a pkcs#10 request.
*
- * A pkcs#10 request contains a distinguished name, an optional
+ * A pkcs#10 request contains a distinguished name, an optional
* challenge password, a public key and optional subjectAltNames.
- *
+ *
* The RSA private key is needed to compute the signature of the given request
*/
struct pkcs10_struct {
diff --git a/src/scepclient/scep.c b/src/scepclient/scep.c
index bf2532c80..f496ece33 100644
--- a/src/scepclient/scep.c
+++ b/src/scepclient/scep.c
@@ -1,7 +1,7 @@
/**
* @file scep.c
* @brief SCEP specific functions
- *
+ *
* Contains functions to build SCEP request's and to parse SCEP reply's.
*/
@@ -239,7 +239,7 @@ bool parse_attributes(chunk_t blob, scep_attributes_t *attrs)
DBG(DBG_CONTROL | DBG_PARSING,
DBG_log("parsing attributes")
)
-
+
while (parser->iterate(parser, &objectID, &object))
{
switch (objectID)
@@ -255,14 +255,14 @@ bool parse_attributes(chunk_t blob, scep_attributes_t *attrs)
}
}
success = parser->success(parser);
-
+
end:
parser->destroy(parser);
return success;
}
/**
- * Generates a unique fingerprint of the pkcs10 request
+ * Generates a unique fingerprint of the pkcs10 request
* by computing an MD5 hash over it
*/
chunk_t scep_generate_pkcs10_fingerprint(chunk_t pkcs10)
@@ -291,11 +291,11 @@ void scep_generate_transaction_id(public_key_t *key, chunk_t *transID,
hasher_t *hasher;
bool msb_set;
u_char *pos;
-
+
key->get_encoding(key, KEY_PUB_ASN1_DER, &keyEncoding);
-
+
keyInfo = asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_algorithmIdentifier(OID_RSA_ENCRYPTION),
+ asn1_algorithmIdentifier(OID_RSA_ENCRYPTION),
asn1_bitstring("m", keyEncoding));
hasher = lib->crypto->create_hasher(lib->crypto, HASH_MD5);
@@ -497,7 +497,7 @@ bool scep_http_request(const char *url, chunk_t pkcs7, scep_op_t op,
free(escaped_req);
status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
- FETCH_HTTP_VERSION_1_0,
+ FETCH_HTTP_VERSION_1_0,
FETCH_REQUEST_HEADER, "Pragma:",
FETCH_REQUEST_HEADER, "Host:",
FETCH_REQUEST_HEADER, "Accept:",
@@ -510,7 +510,7 @@ bool scep_http_request(const char *url, chunk_t pkcs7, scep_op_t op,
complete_url = malloc(len);
snprintf(complete_url, len, "%s?operation=%s", url, operation);
- status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
+ status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
FETCH_REQUEST_DATA, pkcs7,
FETCH_REQUEST_TYPE, "",
FETCH_REQUEST_HEADER, "Expect:",
@@ -527,7 +527,7 @@ bool scep_http_request(const char *url, chunk_t pkcs7, scep_op_t op,
snprintf(complete_url, len, "%s?operation=%s&message=CAIdentifier"
, url, operation);
- status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
+ status = lib->fetcher->fetch(lib->fetcher, complete_url, response,
FETCH_END);
}
diff --git a/src/scepclient/scep.h b/src/scepclient/scep.h
index e8dc87591..e044f0b1c 100644
--- a/src/scepclient/scep.h
+++ b/src/scepclient/scep.h
@@ -1,7 +1,7 @@
/**
* @file scep.h
* @brief SCEP specific functions
- *
+ *
* Contains functions to build and parse SCEP requests and replies
*/
diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c
index f2b49f256..e325f3f84 100644
--- a/src/scepclient/scepclient.c
+++ b/src/scepclient/scepclient.c
@@ -279,7 +279,7 @@ static void print_plugins()
char buf[BUF_LEN], *plugin;
int len = 0;
enumerator_t *enumerator;
-
+
enumerator = lib->plugins->create_plugin_enumerator(lib->plugins);
while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin))
{
@@ -544,7 +544,7 @@ int main(int argc, char **argv)
}
continue;
}
-
+
case 'f': /* --force */
force = TRUE;
continue;
@@ -626,7 +626,7 @@ int main(int argc, char **argv)
}
if (strcaseeq("email", optarg))
- {
+ {
kind = GN_RFC822_NAME;
}
else if (strcaseeq("dns", optarg))
@@ -748,7 +748,7 @@ int main(int argc, char **argv)
base_debugging |= DBG_PRIVATE;
continue;
#endif
- default:
+ default:
usage("unknown option");
}
/* break from loop */
@@ -759,7 +759,7 @@ int main(int argc, char **argv)
init_log("scepclient");
/* load plugins, further infrastructure may need it */
- if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
+ if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
lib->settings->get_str(lib->settings, "scepclient.load", PLUGINS)))
{
exit_scepclient("plugin loading failed");
@@ -790,7 +790,7 @@ int main(int argc, char **argv)
/*
* input of PKCS#1 file
*/
- if (filetype_in & PKCS1) /* load an RSA key pair from file */
+ if (filetype_in & PKCS1) /* load an RSA key pair from file */
{
prompt_pass_t pass = { "", FALSE, STDIN_FILENO };
char *path = concatenate_paths(PRIVATE_KEY_PATH, file_in_pkcs1);
@@ -871,7 +871,7 @@ int main(int argc, char **argv)
plog(" fingerprint: %s", fingerprint.ptr);
}
- /*
+ /*
* output of PKCS#10 file
*/
if (filetype_out & PKCS10)
@@ -960,7 +960,7 @@ int main(int argc, char **argv)
x509_ca_enc = cert.u.x509;
}
- /*
+ /*
* input of PKCS#7 file
*/
if (filetype_in & PKCS7)