ikev2: Fall back to SHA-1 signatures for RSA

This is really just a fallback to "classic" IKEv2 authentication if the other
peer supports no stronger hash algorithms.
This commit is contained in:
Tobias Brunner 2015-02-26 17:36:41 +01:00
parent 0bdc79b5f9
commit cc048f0c50

View File

@ -153,6 +153,13 @@ static signature_scheme_t select_signature_scheme(keymat_v2_t *keymat,
}
}
enumerator->destroy(enumerator);
/* default to the scheme we'd use with classic authentication */
if (selected == SIGN_UNKNOWN && key_type == KEY_RSA &&
keymat->hash_algorithm_supported(keymat, HASH_SHA1))
{
selected = SIGN_RSA_EMSA_PKCS1_SHA1;
}
}
return selected;
}