aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-10-17 12:33:14 +0200
committerTobias Brunner <tobias@strongswan.org>2014-12-05 14:35:41 +0100
commit5743f6df2f5a4b6104632bfbb5fcb2cc4a7132d4 (patch)
tree6e1d07623fea36d4090abca813db03c993ad764b /src
parent0a5b60db2066e4e62d2e9da387080c80201a08b4 (diff)
downloadstrongswan-5743f6df2f5a4b6104632bfbb5fcb2cc4a7132d4.tar.bz2
strongswan-5743f6df2f5a4b6104632bfbb5fcb2cc4a7132d4.tar.xz
asn1: Add OID for Blowfish CBC
The OID (1.3.6.1.4.1.3029.1.2) is technically not correct, the correct one is (1.3.6.1.4.1.3029.1.1.2). Every other library or tool (like OpenSSL) uses the incorrect one so we do the same. References #740.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/asn1/oid.txt4
-rw-r--r--src/libstrongswan/crypto/crypters/crypter.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/src/libstrongswan/asn1/oid.txt b/src/libstrongswan/asn1/oid.txt
index 61c4968e3..39bc552d4 100644
--- a/src/libstrongswan/asn1/oid.txt
+++ b/src/libstrongswan/asn1/oid.txt
@@ -227,6 +227,10 @@
0x02 ""
0x02 ""
0x4B "TCGID" OID_TCGID
+ 0x97 ""
+ 0x55 ""
+ 0x01 ""
+ 0x02 "blowfish-cbc" OID_BLOWFISH_CBC
0xC1 ""
0x16 "ntruCryptosystems"
0x01 "eess"
diff --git a/src/libstrongswan/crypto/crypters/crypter.c b/src/libstrongswan/crypto/crypters/crypter.c
index 8123adde5..1e73baa4e 100644
--- a/src/libstrongswan/crypto/crypters/crypter.c
+++ b/src/libstrongswan/crypto/crypters/crypter.c
@@ -96,6 +96,10 @@ encryption_algorithm_t encryption_algorithm_from_oid(int oid, size_t *key_size)
alg = ENCR_CAMELLIA_CBC;
alg_key_size = 256;
break;
+ case OID_BLOWFISH_CBC:
+ alg = ENCR_BLOWFISH;
+ alg_key_size = 0;
+ break;
default:
alg = ENCR_UNDEFINED;
alg_key_size = 0;
@@ -154,6 +158,9 @@ int encryption_algorithm_to_oid(encryption_algorithm_t alg, size_t key_size)
oid = OID_UNKNOWN;
}
break;
+ case ENCR_BLOWFISH:
+ oid = OID_BLOWFISH_CBC;
+ break;
default:
oid = OID_UNKNOWN;
}