asn1: Add OID for Blowfish CBC
authorTobias Brunner <tobias@strongswan.org>
Fri, 17 Oct 2014 10:33:14 +0000 (12:33 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 5 Dec 2014 13:35:41 +0000 (14:35 +0100)
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.

src/libstrongswan/asn1/oid.txt
src/libstrongswan/crypto/crypters/crypter.c

index 61c4968..39bc552 100644 (file)
                   0x02       ""
                     0x02     ""
                       0x4B   "TCGID"                                   OID_TCGID
+          0x97               ""
+            0x55             ""
+              0x01           ""
+                0x02         "blowfish-cbc"                            OID_BLOWFISH_CBC
           0xC1               ""
             0x16             "ntruCryptosystems"
               0x01           "eess"
index 8123add..1e73baa 100644 (file)
@@ -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;
        }