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.
This commit is contained in:
@@ -227,6 +227,10 @@
|
||||
0x02 ""
|
||||
0x02 ""
|
||||
0x4B "TCGID" OID_TCGID
|
||||
0x97 ""
|
||||
0x55 ""
|
||||
0x01 ""
|
||||
0x02 "blowfish-cbc" OID_BLOWFISH_CBC
|
||||
0xC1 ""
|
||||
0x16 "ntruCryptosystems"
|
||||
0x01 "eess"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user