aboutsummaryrefslogtreecommitdiffstats
path: root/src/scepclient/scep.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2009-05-07 10:10:42 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2009-05-07 10:10:42 +0200
commitc08ae816a2cb82400f04202803c3558e1db3900f (patch)
treeb6a646acd5466b21e69e52b5d27b89fe29325e8f /src/scepclient/scep.c
parent38a7792d8a7797abe945f4ff938afefa1af5bc5e (diff)
downloadstrongswan-c08ae816a2cb82400f04202803c3558e1db3900f.tar.bz2
strongswan-c08ae816a2cb82400f04202803c3558e1db3900f.tar.xz
use hash size constants from hasher.h
Diffstat (limited to 'src/scepclient/scep.c')
-rw-r--r--src/scepclient/scep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scepclient/scep.c b/src/scepclient/scep.c
index 5fb763169..dd16dff1b 100644
--- a/src/scepclient/scep.c
+++ b/src/scepclient/scep.c
@@ -30,6 +30,7 @@
#include <asn1/asn1_parser.h>
#include <asn1/oid.h>
#include <crypto/rngs/rng.h>
+#include <crypto/hashers/hasher.h>
#include "../pluto/constants.h"
#include "../pluto/defs.h"
@@ -267,7 +268,7 @@ end:
*/
void scep_generate_pkcs10_fingerprint(chunk_t pkcs10, chunk_t *fingerprint)
{
- char buf[MD5_DIGEST_SIZE];
+ char buf[HASH_SIZE_MD5];
chunk_t digest = { buf, sizeof(buf) };
/* the fingerprint is the MD5 hash in hexadecimal format */
@@ -284,7 +285,7 @@ void scep_generate_pkcs10_fingerprint(chunk_t pkcs10, chunk_t *fingerprint)
void scep_generate_transaction_id(const RSA_public_key_t *rsak,
chunk_t *transID, chunk_t *serialNumber)
{
- char buf[MD5_DIGEST_SIZE];
+ char buf[HASH_SIZE_MD5];
chunk_t digest = { buf, sizeof(buf) };
chunk_t public_key = pkcs1_build_publicKeyInfo(rsak);