• B
    GH650: Minor tidying around the ocsp app · 21c6c50f
    Benjamin Kaduk 提交于
    The ocsp utility is something of a jack-of-all-trades; most anything
    related to the OCSP can be done with it.  In particular, the manual
    page calls out that it can be used as either a client or a server
    of the protocol, but there are also a few things that it can do
    which do not quite fit into either role, such as encoding an OCSP
    request but not sending it, printing out a text form of an OCSP
    response (or request) from a file akin to the asn1parse utility,
    or performing a lookup into the server-side revocation database
    without actually sending a request or response.  All three of these
    are documented as examples in the manual page, but the documentation
    prior to this commit is somewhat misleading, in that when printing
    the text form of an OCSP response, the code also attempts to
    verify the response, displaying an error message and returning
    failure if the response does not verify.  (It is possible that
    the response would be able to verify with the given example, since
    the default trust roots are used for that verification, but OCSP
    responses frequently have alternate certification authorities
    that would require passing -CAfile or -CApath for verification.)
    
    Tidy up the documentation by passing -noverify for the case of
    converting from binary to textual representation, and also
    change a few instances of -respin to -reqin as appropriate, note
    that the -url option provides the same functionality as the -host
    and -path options, clarify that the example that saves an OCSP
    response to a file will also perform verification on that response,
    and fix a couple grammar nits in the manual page.
    
    Also remove an always-true conditional for rdb != NULL -- there
    are no codepaths in which it could be initialized at the time of
    this check.
    Signed-off-by: NRich Salz <rsalz@openssl.org>
    Reviewed-by: NKurt Roeckx <kurt@openssl.org>
    21c6c50f
ocsp.c 41.6 KB