diff options
Diffstat (limited to 'src/libstrongswan/credentials/keys/signature_params.c')
-rw-r--r-- | src/libstrongswan/credentials/keys/signature_params.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstrongswan/credentials/keys/signature_params.c b/src/libstrongswan/credentials/keys/signature_params.c index d89bd2c96..837de8443 100644 --- a/src/libstrongswan/credentials/keys/signature_params.c +++ b/src/libstrongswan/credentials/keys/signature_params.c @@ -322,7 +322,11 @@ bool rsa_pss_params_parse(chunk_t asn1, int level0, rsa_pss_params_t *params) case RSASSA_PSS_PARAMS_SALT_LEN: if (object.len) { - params->salt_len = (size_t)asn1_parse_integer_uint64(object); + params->salt_len = (ssize_t)asn1_parse_integer_uint64(object); + if (params->salt_len < 0) + { + goto end; + } } break; case RSASSA_PSS_PARAMS_TRAILER: |