Home / Function/ URI() — netty Function Reference

URI() — netty Function Reference

Architecture documentation for the URI() function in OcspUtils.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cfe00cbf_c65a_202f_ab58_0578a3b22402["URI()"]
  08ffedd7_4191_0abc_ea5f_a0e3ce4ff56b["OcspUtils"]
  cfe00cbf_c65a_202f_ab58_0578a3b22402 -->|defined in| 08ffedd7_4191_0abc_ea5f_a0e3ce4ff56b
  style cfe00cbf_c65a_202f_ab58_0578a3b22402 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/ocsp/OcspUtils.java lines 63–88

    public static URI ocspUri(X509Certificate certificate) throws IOException {
        byte[] value = certificate.getExtensionValue(Extension.authorityInfoAccess.getId());
        if (value == null) {
            return null;
        }

        ASN1Primitive authorityInfoAccess = X509ExtensionUtil.fromExtensionValue(value);
        if (!(authorityInfoAccess instanceof DLSequence)) {
            return null;
        }

        DLSequence aiaSequence = (DLSequence) authorityInfoAccess;
        DLTaggedObject taggedObject = findObject(aiaSequence, OCSP_RESPONDER_OID, DLTaggedObject.class);
        if (taggedObject == null) {
            return null;
        }

        if (taggedObject.getTagNo() != BERTags.OBJECT_IDENTIFIER) {
            return null;
        }

        byte[] encoded = taggedObject.getEncoded();
        int length = encoded[1] & 0xFF;
        String uri = new String(encoded, 2, length, CharsetUtil.UTF_8);
        return URI.create(uri);
    }

Domain

Subdomains

Frequently Asked Questions

What does URI() do?
URI() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/ocsp/OcspUtils.java.
Where is URI() defined?
URI() is defined in example/src/main/java/io/netty/example/ocsp/OcspUtils.java at line 63.

Analyze Your Own Codebase

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

Try Supermodel Free