aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/crypto
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-05-10 13:16:27 +0000
committerMartin Willi <martin@strongswan.org>2006-05-10 13:16:27 +0000
commit9cf5f29027969d5477fe190a8bf85f1aef457179 (patch)
tree120bd8cc9fc8dc1fdc3b2378c94b1df79ada0d9b /src/libstrongswan/crypto
parent4e98759d32841d3f4f67feba9f7aaa842fdf3acf (diff)
downloadstrongswan-9cf5f29027969d5477fe190a8bf85f1aef457179.tar.bz2
strongswan-9cf5f29027969d5477fe190a8bf85f1aef457179.tar.xz
Diffstat (limited to 'src/libstrongswan/crypto')
-rw-r--r--src/libstrongswan/crypto/diffie_hellman.c1
-rw-r--r--src/libstrongswan/crypto/rsa/rsa_private_key.c2
-rw-r--r--src/libstrongswan/crypto/rsa/rsa_public_key.c2
-rwxr-xr-xsrc/libstrongswan/crypto/x509.c19
4 files changed, 7 insertions, 17 deletions
diff --git a/src/libstrongswan/crypto/diffie_hellman.c b/src/libstrongswan/crypto/diffie_hellman.c
index e458fb80f..1e3dcc79c 100644
--- a/src/libstrongswan/crypto/diffie_hellman.c
+++ b/src/libstrongswan/crypto/diffie_hellman.c
@@ -27,7 +27,6 @@
#include "diffie_hellman.h"
-#include <daemon.h>
#include <utils/randomizer.h>
diff --git a/src/libstrongswan/crypto/rsa/rsa_private_key.c b/src/libstrongswan/crypto/rsa/rsa_private_key.c
index f8798bbfd..9399fbb3b 100644
--- a/src/libstrongswan/crypto/rsa/rsa_private_key.c
+++ b/src/libstrongswan/crypto/rsa/rsa_private_key.c
@@ -27,9 +27,9 @@
#include "rsa_private_key.h"
-#include <daemon.h>
#include <asn1/asn1.h>
#include <asn1/pem.h>
+#include <utils/randomizer.h>
/*
* Oids for hash algorithms are defined in
diff --git a/src/libstrongswan/crypto/rsa/rsa_public_key.c b/src/libstrongswan/crypto/rsa/rsa_public_key.c
index 74d9b4db9..2f8c6fd8f 100644
--- a/src/libstrongswan/crypto/rsa/rsa_public_key.c
+++ b/src/libstrongswan/crypto/rsa/rsa_public_key.c
@@ -23,11 +23,11 @@
#include <gmp.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <stdio.h>
#include <string.h>
#include "rsa_public_key.h"
-#include <daemon.h>
#include <crypto/hashers/hasher.h>
#include <asn1/asn1.h>
diff --git a/src/libstrongswan/crypto/x509.c b/src/libstrongswan/crypto/x509.c
index 6a9afcea5..b65327b5d 100755
--- a/src/libstrongswan/crypto/x509.c
+++ b/src/libstrongswan/crypto/x509.c
@@ -27,11 +27,11 @@
#include "x509.h"
-#include <daemon.h>
#include <asn1/oid.h>
#include <asn1/asn1.h>
#include <asn1/pem.h>
#include <utils/logger_manager.h>
+#include <utils/linked_list.h>
#define BUF_LEN 512
#define RSA_MIN_OCTETS (512 / 8)
@@ -110,16 +110,11 @@ struct private_x509_t {
*/
linked_list_t *crlDistributionPoints;
+
/**
- * Type of the subjects Key (currently RSA only)
+ * Subjects RSA public key, if subjectPublicKeyAlgorithm == RSA
*/
- auth_method_t subjectPublicKeyAlgorithm;
-
-
- /**
- * Subjects RSA public key, if subjectPublicKeyAlgorithm == RSA
- */
- rsa_public_key_t *public_key;
+ rsa_public_key_t *public_key;
@@ -682,11 +677,7 @@ bool parse_x509cert(chunk_t blob, u_int level0, private_x509_t *cert)
cert->subject = identification_create_from_encoding(ID_DER_ASN1_DN, object);
break;
case X509_OBJ_SUBJECT_PUBLIC_KEY_ALGORITHM:
- if (parse_algorithmIdentifier(object, level, NULL) == OID_RSA_ENCRYPTION)
- {
- cert->subjectPublicKeyAlgorithm = RSA_DIGITAL_SIGNATURE;
- }
- else
+ if (parse_algorithmIdentifier(object, level, NULL) != OID_RSA_ENCRYPTION)
{
logger->log(logger, ERROR|LEVEL1, " unsupported public key algorithm");
return FALSE;