ikev2: Don't use SHA-1 for RFC 7427 signature authentication

RFC 8247 demoted it to MUST NOT.

References #2427.
This commit is contained in:
Tobias Brunner
2017-11-08 16:47:24 +01:00
parent 76c58498ef
commit 43b59d1323
3 changed files with 5 additions and 7 deletions
@@ -156,14 +156,12 @@ static array_t *select_signature_schemes(keymat_v2_t *keymat,
} }
enumerator->destroy(enumerator); enumerator->destroy(enumerator);
/* for RSA we tried at least SHA-512, also try other schemes down to /* for RSA we tried at least SHA-512, also try other schemes */
* what we'd use with classic authentication */
if (key_type == KEY_RSA) if (key_type == KEY_RSA)
{ {
signature_scheme_t schemes[] = { signature_scheme_t schemes[] = {
SIGN_RSA_EMSA_PKCS1_SHA2_384, SIGN_RSA_EMSA_PKCS1_SHA2_384,
SIGN_RSA_EMSA_PKCS1_SHA2_256, SIGN_RSA_EMSA_PKCS1_SHA2_256,
SIGN_RSA_EMSA_PKCS1_SHA1,
}, contained; }, contained;
bool found; bool found;
int i, j; int i, j;
+1 -1
View File
@@ -287,7 +287,6 @@ bool hasher_algorithm_for_ikev2(hash_algorithm_t alg)
switch (alg) switch (alg)
{ {
case HASH_IDENTITY: case HASH_IDENTITY:
case HASH_SHA1:
case HASH_SHA256: case HASH_SHA256:
case HASH_SHA384: case HASH_SHA384:
case HASH_SHA512: case HASH_SHA512:
@@ -296,6 +295,7 @@ bool hasher_algorithm_for_ikev2(hash_algorithm_t alg)
case HASH_MD2: case HASH_MD2:
case HASH_MD4: case HASH_MD4:
case HASH_MD5: case HASH_MD5:
case HASH_SHA1:
case HASH_SHA224: case HASH_SHA224:
case HASH_SHA3_224: case HASH_SHA3_224:
case HASH_SHA3_256: case HASH_SHA3_256:
+1 -1
View File
@@ -226,7 +226,7 @@ typedef struct {
static hasher_ikev2_t ikev2[] = { static hasher_ikev2_t ikev2[] = {
{ HASH_IDENTITY, TRUE }, { HASH_IDENTITY, TRUE },
{ HASH_SHA1, TRUE }, { HASH_SHA1, FALSE },
{ HASH_SHA256, TRUE }, { HASH_SHA256, TRUE },
{ HASH_SHA384, TRUE }, { HASH_SHA384, TRUE },
{ HASH_SHA512, TRUE }, { HASH_SHA512, TRUE },