Home / Function/ sign() — netty Function Reference

sign() — netty Function Reference

Architecture documentation for the sign() function in OpenSslPrivateKeyMethodTest.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  1558c9b0_1905_5fc4_ab74_483e05181c96["sign()"]
  b64a66d0_62e7_ce9c_e091_5e0a556ec80a["OpenSslPrivateKeyMethodAdapter"]
  1558c9b0_1905_5fc4_ab74_483e05181c96 -->|defined in| b64a66d0_62e7_ce9c_e091_5e0a556ec80a
  90ad078f_18cd_88ab_2be6_3ed8d8a318ea["testPrivateKeyMethod()"]
  90ad078f_18cd_88ab_2be6_3ed8d8a318ea -->|calls| 1558c9b0_1905_5fc4_ab74_483e05181c96
  b15a5bb7_43a2_d1ed_9d3b_43d37b8d6f4b["testPrivateKeyMethodFails()"]
  b15a5bb7_43a2_d1ed_9d3b_43d37b8d6f4b -->|calls| 1558c9b0_1905_5fc4_ab74_483e05181c96
  03ee458c_000c_e7e6_4f78_d0c6d04acb35["DelegateThread()"]
  1558c9b0_1905_5fc4_ab74_483e05181c96 -->|calls| 03ee458c_000c_e7e6_4f78_d0c6d04acb35
  style 1558c9b0_1905_5fc4_ab74_483e05181c96 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/OpenSslPrivateKeyMethodTest.java lines 427–453

        @Override
        public Future<byte[]> sign(final SSLEngine engine, final int signatureAlgorithm, final byte[] input) {
            final Promise<byte[]> promise = ImmediateEventExecutor.INSTANCE.newPromise();
            try {
                if (newThread) {
                    // Let's run these in an extra thread to ensure that this would also work if the promise is
                    // notified later.
                    new DelegateThread(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                // Let's sleep for some time to ensure we would notify in an async fashion
                                Thread.sleep(ThreadLocalRandom.current().nextLong(100, 500));
                                promise.setSuccess(keyMethod.sign(engine, signatureAlgorithm, input));
                            } catch (Throwable cause) {
                                promise.setFailure(cause);
                            }
                        }
                    }).start();
                } else {
                    promise.setSuccess(keyMethod.sign(engine, signatureAlgorithm, input));
                }
            } catch (Throwable cause) {
                promise.setFailure(cause);
            }
            return promise;
        }

Domain

Subdomains

Frequently Asked Questions

What does sign() do?
sign() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/OpenSslPrivateKeyMethodTest.java.
Where is sign() defined?
sign() is defined in handler/src/test/java/io/netty/handler/ssl/OpenSslPrivateKeyMethodTest.java at line 427.
What does sign() call?
sign() calls 1 function(s): DelegateThread.
What calls sign()?
sign() is called by 2 function(s): testPrivateKeyMethod, testPrivateKeyMethodFails.

Analyze Your Own Codebase

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

Try Supermodel Free