diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-05-19 00:31:41 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-05-19 00:31:41 +0800 |
commit | 5acee497bf3e44d86bdecf5bfa35042c363ab753 (patch) | |
tree | 8576a44683dda3c007bfec6b48831f2c31268044 /fuzzer-verify.c | |
parent | 972d723484d89c71e73ed63cc17bb2a6ce8cca5a (diff) |
ext-info handling for server-sig-algs
only client side is handled
Diffstat (limited to 'fuzzer-verify.c')
-rw-r--r-- | fuzzer-verify.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fuzzer-verify.c b/fuzzer-verify.c index cda7723..cdf7804 100644 --- a/fuzzer-verify.c +++ b/fuzzer-verify.c @@ -29,7 +29,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { sign_key *key = new_sign_key(); enum signkey_type keytype = DROPBEAR_SIGNKEY_ANY; if (buf_get_pub_key(fuzz.input, key, &keytype) == DROPBEAR_SUCCESS) { - enum signature_type sigtype = (enum signature_type)keytype; + enum signature_type sigtype; if (keytype == DROPBEAR_SIGNKEY_RSA) { /* Flip a coin to decide rsa signature type */ int flag = buf_getbyte(fuzz_input); @@ -38,6 +38,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { } else { sigtype = DROPBEAR_SIGNATURE_RSA_SHA1; } + } else { + sigtype = signature_type_from_signkey(keytype); } if (buf_verify(fuzz.input, key, sigtype, verifydata) == DROPBEAR_SUCCESS) { /* The fuzzer is capable of generating keys with a signature to match. |