MCPcopy Create free account
hub / github.com/apache/tomcat / SSLConf

Class SSLConf

java/org/apache/tomcat/jni/SSLConf.java:22–132  ·  view source on GitHub ↗

JNI bindings for OpenSSL SSL_CONF operations.

Source from the content-addressed store, hash-verified

20 * JNI bindings for OpenSSL SSL_CONF operations.
21 */
22public final class SSLConf {
23
24 /**
25 * Default constructor. This class provides only static methods.
26 */
27 public SSLConf() {
28 super();
29 }
30
31 /**
32 * Create a new SSL_CONF context.
33 *
34 * @param pool The pool to use.
35 * @param flags The SSL_CONF flags to use. It can be any combination of the following:
36 *
37 * <PRE>
38 * {@link SSL#SSL_CONF_FLAG_CMDLINE}
39 * {@link SSL#SSL_CONF_FLAG_FILE}
40 * {@link SSL#SSL_CONF_FLAG_CLIENT}
41 * {@link SSL#SSL_CONF_FLAG_SERVER}
42 * {@link SSL#SSL_CONF_FLAG_SHOW_ERRORS}
43 * {@link SSL#SSL_CONF_FLAG_CERTIFICATE}
44 * </PRE>
45 *
46 * @return The Java representation of a pointer to the newly created SSL_CONF Context
47 *
48 * @throws Exception If the SSL_CONF context could not be created
49 *
50 * @see <a href="https://www.openssl.org/docs/man1.0.2/ssl/SSL_CONF_CTX_new.html">OpenSSL SSL_CONF_CTX_new</a>
51 * @see <a href="https://www.openssl.org/docs/man1.0.2/ssl/SSL_CONF_CTX_set_flags.html">OpenSSL
52 * SSL_CONF_CTX_set_flags</a>
53 */
54 public static native long make(long pool, int flags) throws Exception;
55
56 /**
57 * Free the resources used by the context
58 *
59 * @param cctx SSL_CONF context to free.
60 *
61 * @see <a href="https://www.openssl.org/docs/man1.0.2/ssl/SSL_CONF_CTX_new.html">OpenSSL SSL_CONF_CTX_free</a>
62 */
63 public static native void free(long cctx);
64
65 /**
66 * Optionally used to check a command with an SSL_CONF context.
67 * <p>
68 * This call is also used to pass Tomcat specific settings to Tomcat Native. It must be called for for each Tomcat
69 * specific setting (e.g. {@link org.apache.tomcat.util.net.openssl.OpenSSLConfCmd#NO_OCSP_CHECK}) before {@link
70 * #assign(long, long)} is called.
71 *
72 * @param cctx SSL_CONF context to use.
73 * @param name command name.
74 * @param value command value.
75 *
76 * @return The result of the check based on the {@code SSL_CONF_cmd_value_type} call. Unknown types will result in
77 * an exception, as well as file and directory types with invalid file or directory names.
78 *
79 * @throws Exception If the check fails.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected