]> git.ipfire.org Git - thirdparty/openssl.git/commit
test/evp_test.c: distinguish parsing errors from processing errors
authorRichard Levitte <levitte@openssl.org>
Fri, 23 Aug 2019 15:41:23 +0000 (17:41 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 23 Aug 2019 16:25:12 +0000 (18:25 +0200)
commitf42c225d7f9a0bce0bf46103343402d3f0ad742f
tree3efb66d8808dfe966c4ce3a327df0d16a2a268be
parent00372d7551ccf41ddb4fe8f00d62923e4dc65574
test/evp_test.c: distinguish parsing errors from processing errors

Parsing functions are at liberty to return:

1:  when parsing on processing of the parsed value succeeded
0:  when the parsed keyword is unknown
-1: when the parsed value processing failed

Some parsing functions didn't do this quite right, they returned 0
when they should have returned -1, causing a message like this:

    Line 123: unknown keyword PeerKey

When this message (which is displayed when the parsing function
returns -1) would have been more appropriate:

    Line 123: error processing keyword PeerKey = ffdhe2048-2-pub

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/9682)
test/evp_test.c