Home / Function/ validateResponse() — netty Function Reference

validateResponse() — netty Function Reference

Architecture documentation for the validateResponse() function in OcspClient.java from the netty codebase.

Function java Buffer Allocators calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  665d2265_ea4a_1a24_17a6_15e9efedc3f9["validateResponse()"]
  b3812cec_6383_4848_72ed_d7aa9ab08546["OcspClient"]
  665d2265_ea4a_1a24_17a6_15e9efedc3f9 -->|defined in| b3812cec_6383_4848_72ed_d7aa9ab08546
  a95f2426_2f96_5a1e_b38a_6852764f680c["query()"]
  a95f2426_2f96_5a1e_b38a_6852764f680c -->|calls| 665d2265_ea4a_1a24_17a6_15e9efedc3f9
  4b22f2c1_501c_bdd1_fafa_7de113198125["validateNonce()"]
  665d2265_ea4a_1a24_17a6_15e9efedc3f9 -->|calls| 4b22f2c1_501c_bdd1_fafa_7de113198125
  af12db0d_0585_7f39_ea00_ea888c0f0445["validateSignature()"]
  665d2265_ea4a_1a24_17a6_15e9efedc3f9 -->|calls| af12db0d_0585_7f39_ea00_ea888c0f0445
  style 665d2265_ea4a_1a24_17a6_15e9efedc3f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspClient.java lines 243–261

    private static void validateResponse(Promise<BasicOCSPResp> responsePromise, BasicOCSPResp basicResponse,
                                         DEROctetString derNonce, X509Certificate issuer, boolean validateNonce) {
        try {
            // Validate number of responses. We only requested for 1 certificate
            // so number of responses must be 1. If not, we will throw an error.
            int responses = basicResponse.getResponses().length;
            if (responses != 1) {
                throw new IllegalArgumentException("Expected number of responses was 1 but got: " + responses);
            }

            if (validateNonce) {
                validateNonce(basicResponse, derNonce);
            }
            validateSignature(basicResponse, issuer);
            responsePromise.trySuccess(basicResponse);
        } catch (Exception ex) {
            responsePromise.tryFailure(ex);
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does validateResponse() do?
validateResponse() is a function in the netty codebase, defined in handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspClient.java.
Where is validateResponse() defined?
validateResponse() is defined in handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspClient.java at line 243.
What does validateResponse() call?
validateResponse() calls 2 function(s): validateNonce, validateSignature.
What calls validateResponse()?
validateResponse() is called by 1 function(s): query.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free