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:
Tobias Brunner
2014-12-05 14:35:41 +01:00
parent 0a5b60db20
commit 5743f6df2f
2 changed files with 11 additions and 0 deletions
@@ -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;
}