Conversation
|
@normanmaurer @Scottmitch - please take a new look. I hope all requested changes got incorporated in this new PR and I've just pushed a PR for the other side. |
openssl-dynamic/src/main/c/ocsp.c
Outdated
| // are being outputted to STDERR because the calling Thread is not | ||
| // attached to the JVM yet. | ||
|
|
||
| if (OCSP_CALLBACK_CLAZZ == NULL) { |
There was a problem hiding this comment.
is this check necessary? the
CALLBACK_METHODcheck should be sufficient right andCALLBACK_CLAZZis not directly used in this method.
openssl-dynamic/src/main/c/ocsp.c
Outdated
| return error; | ||
| } | ||
|
|
||
| if ((*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL) != JNI_OK) { |
There was a problem hiding this comment.
can you add a comment as to why this is necessary?
openssl-dynamic/src/main/c/ocsp.c
Outdated
| * Returns true is OCSP stapling is available. | ||
| */ | ||
| TCN_IMPLEMENT_CALL(jboolean, SSLContext, isOcspSupported)(TCN_STDARGS) { | ||
| return JNI_TRUE; |
There was a problem hiding this comment.
this should depend upon what options are supported by the dynamically linked OpenSSL library, and potentially the compile version and related flags, right?
There was a problem hiding this comment.
The current return true is dependent on the outer #ifdef which says OpenSSL >= 1.0.2 and !defined(OPENSSL_NO_OCSP).
There was a problem hiding this comment.
What if we build against 1.0.2 but the user links a 1.0.1? See OpenSsl#isAlpnSupported for a tip
openssl-dynamic/src/main/c/ocsp.c
Outdated
| /** | ||
| * Installs the OCSP stapling callback. | ||
| */ | ||
| TCN_IMPLEMENT_CALL(jobject, SSLContext, newOcspCallback)(TCN_STDARGS, jlong ctx, jboolean client, jobject callback) { |
There was a problem hiding this comment.
can we just group the code into
ssl.candsslcontext.cinstead of introducing new modules? That would be more consistent and helps orient you as to what the scope the methods apply to.
There was a problem hiding this comment.
Certainly. Don't know if it's easier to follow. :)
There was a problem hiding this comment.
Don't know if it's easier to follow
debatable for sure ... but it is at least consistent with the current approach. @normanmaurer - thoughts?
openssl-dynamic/src/main/c/ocsp.c
Outdated
|
|
||
| if (client) { | ||
| error = SSL_CTX_set_tlsext_status_cb(c->ctx, netty_ocsp_client_callback); | ||
|
|
There was a problem hiding this comment.
nit: remove line? also consider making this a tertiary statement error = client ? ... : ... ;
openssl-dynamic/src/main/c/ocsp.c
Outdated
|
|
||
| OCSP_CALLBACK_METHOD = (*env)->GetMethodID(env, OCSP_CALLBACK_CLAZZ, "callback", "(J)I"); | ||
| if (OCSP_CALLBACK_METHOD == NULL) { | ||
| return JNI_ERR; |
There was a problem hiding this comment.
consider adding a fprintf here. It is not expected to occur frequently, but if it does the additional context should help narrow in on the root cause faster.
There was a problem hiding this comment.
This should actually result in a NoSuchMethodError in Java land.
There was a problem hiding this comment.
thanks for clarifying ... we rely upon an exception pending and being popped off when we transition from JNI to java.
| * License for the specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| package io.netty.tcnative.jni.ocsp; |
There was a problem hiding this comment.
we are using the new package which the master branch uses. can we open another PR against the master branch, or do we need this in the 1.1.33 branch too? The next release of Netty should move to the master branch of netty-tcnative.
There was a problem hiding this comment.
Sooo, on my end we don't need to support "old" versions and we'll use whatever latest SNAPSHOT of Netty is using.
There was a problem hiding this comment.
IMO we can just target this at the master branch. @normanmaurer - WDYT?
There was a problem hiding this comment.
Went ahead and rebased with master and targeting only master.
| * indicates to OpenSSL what the user did. | ||
| * | ||
| * Client: OpenSSL will call the {@link OcspCallback} during/after the handshake and it's expecting the | ||
| * user to get the OCSP staple using {@link SSL#getOcspStaple(long)} and tell OpenSSL via the return value |
| * | ||
| * NOTE: The user must call {@link SSL#setOcspStaple(long, byte[])} prior to returning this value. | ||
| */ | ||
| public static final int SSL_TLSEXT_ERR_OK = 0; |
There was a problem hiding this comment.
if these are server only ... should we include SERVER in the variable name? Same thing for the client only status codes.
There was a problem hiding this comment.
Sure, if there are no objections I'd like to name them slightly better altogether. The current names are coming from OpenSSL's own documentation and tls1.h. I don't find them particularly good (at all) but there's maybe value in being able align the Java/C code.
https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html
There was a problem hiding this comment.
I see. I don't think it is necessary to have the Java API be 1 to 1 with the OpenSSL API. However if the values do directly correlate to an OpenSSL value it would be helpful to indicate the relationship somehow (e.g. javadoc, etc..).
| * @see #TLSEXT_STATUSTYPE_host_name | ||
| * @see #TLSEXT_STATUSTYPE_ocsp | ||
| */ | ||
| public static native boolean setStatusType(long ssl, int type); |
There was a problem hiding this comment.
this method name is relatively generic. can we include Ocsp in the name?
There was a problem hiding this comment.
If we don't care about the exact details of SSL_set_tlsext_status_type() we can make it setOcspEnabled(long ssl, boolean enabled)
Scottmitch
left a comment
There was a problem hiding this comment.
I meant to "Request Changes" on the GitHub review instead of "Approve" :)
f6e46c8 to
6821fe5
Compare
6821fe5 to
22fc317
Compare
|
@Scottmitch please take a new look. |
22fc317 to
242c40d
Compare
242c40d to
61a44c9
Compare
|
@Scottmitch @normanmaurer friendly poke :) |
61a44c9 to
7be704f
Compare
Scottmitch
left a comment
There was a problem hiding this comment.
few comments but general approach lgtm
openssl-dynamic/src/main/c/ocsp.c
Outdated
| #include <stdio.h> | ||
|
|
||
| #pragma GCC diagnostic push | ||
| #pragma GCC diagnostic ignored "-Wunused-variable" |
There was a problem hiding this comment.
can you explain why this is necessary and add a comment? Is it possible just to fix the warning?
There was a problem hiding this comment.
The story goes like this: We're currently using a separate JNI library to implement OCSP and we link it against tcnative. Our security team asked to built it with strict validation and we asked them to set it up. I assume ssl_private.h didn't pass strict validation and that's why they added it.
Now, I just copy & pasted it here without putting much thought into it. It's not needed in this context and we can remove it and do a separate PR for changing compiler flags.
There was a problem hiding this comment.
sgtm ... I would prefer to not have this, and just fix the warnings (if any) caused by ssl_private.h
openssl-dynamic/src/main/c/ocsp.c
Outdated
| { | ||
| return openssl_netty_tcnative_ocsp_callback(TCN_SERVER_CALLBACK_ERROR, ssl, arg); | ||
| } | ||
| #endif |
There was a problem hiding this comment.
I think this is the end of the !defined(TCN_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL) block ... if so can you modify this to #endif /* !defined(TCN_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL) */
openssl-dynamic/src/main/c/ocsp.c
Outdated
|
|
||
| #if !defined(TCN_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL) | ||
|
|
||
| #ifndef TCN_CLIENT_CALLBACK_ERROR |
There was a problem hiding this comment.
is it expected that these defines will be defined outside this scope? Should we more fully qualify these names (e.g. TCN_OCSP_..) and just treat this as an error if there is a duplicate name?
openssl-dynamic/src/main/c/ocsp.c
Outdated
| int response = 0; | ||
| jobject callback = (*env)->NewLocalRef(env, (jweak)arg); | ||
|
|
||
| if ((*env)->IsSameObject(env, callback, NULL) == JNI_FALSE) { |
There was a problem hiding this comment.
since this is designed to be a boolean lets treat it as one -> if (!(*env)->IsSameObject(env, callback, NULL)) { .. }
openssl-dynamic/src/main/c/ocsp.c
Outdated
| return error; | ||
| } | ||
|
|
||
| if (OCSP_CALLBACK_CLAZZ == NULL) { |
There was a problem hiding this comment.
is it necessary to check this here ... can we just fail in the init method if we can't load the class?
| /** | ||
| * Removes and frees the {@link OcspCallback} | ||
| * | ||
| * https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html |
There was a problem hiding this comment.
make this a hyper link <a href=""></a>
| /** | ||
| * Enables OCSP stapling on a {@link SSLEngine}. | ||
| * | ||
| * https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html |
There was a problem hiding this comment.
make this a hyper link <a href=""></a> (general comment)
|
|
||
| /** | ||
| * Implementations of this interface are being called from JNI for each {@link SSLEngine} instance that | ||
| * has OCSP stapling enabled. Please notice that it's the same interface for client and server SSL engines |
There was a problem hiding this comment.
nit: SSL engines -> {@link SSLEngine}s ... or just for client and server mode
| * user to get the OCSP staple using {@link SSL#getOcspStaple(long)} and tell OpenSSL via the return value | ||
| * if it's any good. | ||
| * | ||
| * https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html |
| * | ||
| * SSL_TLSEXT_ERR_OK | ||
| */ | ||
| int OCSP_SERVER_ACK = 0; |
There was a problem hiding this comment.
we should derive these values from JNI to ensure they remain consistent. See NativeStaticallyReferencedJniMethods
|
also sorry for the delay 😢 |
|
@rkapsi - Also don't forget to add the new [1] https://github.com/netty/netty-tcnative/blob/master/vs2010.vcxproj.static.template |
d1188b7 to
5886b84
Compare
openssl-dynamic/src/main/c/ocsp.c
Outdated
| #ifndef TCN_NO_OCSP | ||
| #ifndef OPENSSL_IS_BORINGSSL | ||
|
|
||
| #ifndef TCN_OCSP_CLIENT_CALLBACK_ERROR |
There was a problem hiding this comment.
it doesn't look like these defines are used outside this scope ... if these are already defined wouldn't this be a programming error we want to investigate? Is the intention to allow overriding this as part of the build environment?
There was a problem hiding this comment.
Correct, not used outside of this scope and and the only intention is to have two named constants.
There was a problem hiding this comment.
so is the #ifdef protection necessary can we do one of the following:
- remove the
ifdefs - define these values as
static constto get type safety
The second approach is preferred if this still satisfies your needs.
openssl-dynamic/src/main/c/ocsp.c
Outdated
|
|
||
| #include <stdio.h> | ||
|
|
||
| #ifndef TCN_NO_OCSP |
There was a problem hiding this comment.
consider refactoring to avoid nesting ifdef macros:
#if !defined(TCN_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)
| private OcspCallbackStatus() {} | ||
|
|
||
| // ATTENTION: This class is purposely separate from the OcspCallback interface | ||
| // as JNI will otherwise fail to initialize due to a circular dependencies that |
There was a problem hiding this comment.
can you explain this comment? The purpose of NativeStaticallyReferencedJniMethods is to avoid circular class loader issues. If this is not the case is something broken?
There was a problem hiding this comment.
Sure, these constants lived previously in the OcspCallback interface and the values were hardcoded. It created a circular dependency as soon as I started using NativeStaticallyReferencedJniMethods for pulling the values from JNI.
JNI_OnLoad calls ocsp/init which touches the OcspCallback interface which would call back into JNI before JNI_OnLoad had returned. The JVM failed to load tcnative with a UnsatisfiedLinkError saying something about JVM version 0xFFFFFFFF not being supported.
There was a problem hiding this comment.
It created a circular dependency as soon as I started using NativeStaticallyReferencedJniMethods for pulling the values from JNI.
I see. We manually control the class load sequencing in transport-native-epoll [1] to avoid this issue. We should be doing the same in tcnative too ... thx for pointing this out I will add a PR to correct this.
[1] https://github.com/netty/netty/blob/4.1/transport-native-epoll/src/main/c/netty_epoll_native.c#L849
There was a problem hiding this comment.
I'll move 'em back into the interface as soon as you merge #245
| public static final int OCSP_SERVER_NACK = sslTlsExtErrAlertWarning(); | ||
|
|
||
| /** | ||
| * SERVER ONLY: Some error occurred. Throwing an {@link Exception} from the {@link #callback(long)} |
There was a problem hiding this comment.
the callback(long) links in this file are no longer valid.
| * on success. The {@code byte[]} is assumed to be a valid OCSP staple as provided | ||
| * to you by the CA's OCSP responder. No further validation will be applied and | ||
| * incorrect data will likely result in a drop of the underlying connection. | ||
| * |
77cffe9 to
d67b985
Compare
fa14107 to
3420550
Compare
openssl-dynamic/src/main/c/ocsp.c
Outdated
|
|
||
| #elif defined(OPENSSL_IS_BORINGSSL) | ||
| const *uint8_t value = OPENSSL_malloc(sizeof(uint8_t) * length); | ||
| const uint8_t *value = OPENSSL_malloc(sizeof(uint8_t) * length); |
There was a problem hiding this comment.
This faux pas went unnoticed because BoringSSL compiles with OPENSSL_NO_OCSP.
Scottmitch
left a comment
There was a problem hiding this comment.
sounds like we need to adjust the defines to accommodate for boringssl?
openssl-dynamic/src/main/c/ocsp.c
Outdated
| return; | ||
| } | ||
|
|
||
| #if defined(OPENSSL_NO_OCSP) |
There was a problem hiding this comment.
based upon netty/netty#6158 (comment) ... should we only check OPENSSL_NO_OCSP if !defined(OPENSSL_IS_BORINGSSL)?
There was a problem hiding this comment.
so the simplistic approach I had in mind is:
#if defined(OPENSSL_NO_OCSP) -> #if defined(OPENSSL_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)
We may be able to refactor the macros a bit but basically if OPENSSL_IS_BORINGSSL == true we should just ignore OPENSSL_NO_OCSP and use the BoringSSL APIs.
diff --git a/openssl-dynamic/src/main/c/ocsp.c b/openssl-dynamic/src/main/c/ocsp.c
index 317490e..f625817 100644
--- a/openssl-dynamic/src/main/c/ocsp.c
+++ b/openssl-dynamic/src/main/c/ocsp.c
@@ -54,7 +54,7 @@ TCN_IMPLEMENT_CALL(void, SSLContext, enableOcsp)(TCN_STDARGS, jlong ctx, jboolea
return;
}
-#if defined(OPENSSL_NO_OCSP)
+#if defined(OPENSSL_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)
tcn_ThrowException(e, "netty-tcnative was built without OCSP support");
#elif defined(TCN_OCSP_NOT_SUPPORTED)
@@ -107,7 +107,7 @@ TCN_IMPLEMENT_CALL(void, SSL, enableOcsp)(TCN_STDARGS, jlong ssl) {
return;
}
-#if defined(OPENSSL_NO_OCSP)
+#if defined(OPENSSL_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)
tcn_ThrowException(e, "netty-tcnative was built without OCSP support");
#elif defined(TCN_OCSP_NOT_SUPPORTED)
@@ -139,14 +139,14 @@ TCN_IMPLEMENT_CALL(void, SSL, setOcspResponse)(TCN_STDARGS, jlong ssl, jbyteArra
return;
}
-#if defined(OPENSSL_NO_OCSP)
+#if defined(OPENSSL_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)
tcn_ThrowException(e, "netty-tcnative was built without OCSP support");
#elif defined(TCN_OCSP_NOT_SUPPORTED)
tcn_ThrowException(e, "OCSP stapling is not supported");
#elif defined(OPENSSL_IS_BORINGSSL)
- const uint8_t *value = OPENSSL_malloc(sizeof(uint8_t) * length);
+ uint8_t *value = OPENSSL_malloc(sizeof(uint8_t) * length);
if (value == NULL) {
tcn_ThrowException(e, "OPENSSL_malloc() returned null");
return;
@@ -192,7 +192,7 @@ TCN_IMPLEMENT_CALL(jbyteArray, SSL, getOcspResponse)(TCN_STDARGS, jlong ssl) {
return NULL;
}
-#if defined(OPENSSL_NO_OCSP)
+#if defined(OPENSSL_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)
tcn_ThrowException(e, "netty-tcnative was built without OCSP support");
#elif defined(TCN_OCSP_NOT_SUPPORTED)
Scottmitch
left a comment
There was a problem hiding this comment.
1 more comment ... and the c89 compatibility question for @normanmaurer then lgtm
pom.xml
Outdated
| <aprVersion>1.5.2</aprVersion> | ||
| <aprMd5>98492e965963f852ab29f9e61b2ad700</aprMd5> | ||
| <boringsslBranch>chromium-stable</boringsslBranch> | ||
| <boringsslBranch>master</boringsslBranch> |
There was a problem hiding this comment.
you can revert this change bcz the changes we need have been released
14dcf65 to
5e055e5
Compare
…s API. This is a low-level API and not meant to be used directly. There will be a saparate PR for Netty. Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result Low-level API to enable OCSP stapling
5e055e5 to
7c3cab6
Compare
|
@Scottmitch poke - both PRs are ready in case you missed the Github emails. Commits are squashed and ocsp.c has has been folded into ssl.c and sslcontext.c. |
Scottmitch
left a comment
There was a problem hiding this comment.
lgtm ... sorry for the delay 😢
|
master (1e77375) |
|
+1 ... Thanks @Scottmitch for taking care and @rkapsi for the work ! |
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
netty/netty-tcnative#215 Motivation OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are: 1) Speed. The client doesn't have to crosscheck the certificate. 2) Efficiency. The Internet is no longer DDoS'ing the CA's OCSP responder servers. 3) Safety. Less operational dependence on the CA. Certificate owners can sustain short CA outages. 4) Privacy. The CA can lo longer track the users of a certificate. https://en.wikipedia.org/wiki/OCSP_stapling https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html Modifications https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html Result High-level API to enable OCSP stapling
OCSP stapling support for netty-tcnative using OpenSSL's tlsext_status API. This is a low-level API and not meant to be used directly. There will be a saparate PR for Netty.
Motivation
OCSP stapling (formally known as TLS Certificate Status Request extension) is alternative approach for checking the revocation status of X.509 Certificates. Servers can preemptively fetch the OCSP response from the CA's responder, cache it for some period of time, and pass it along during (a.k.a. staple) the TLS handshake. The client no longer has to reach out on its own to the CA to check the validity of a cetitficate. Some of the key benefits are:
https://en.wikipedia.org/wiki/OCSP_stapling
https://letsencrypt.org/2016/10/24/squarespace-ocsp-impl.html
Modifications
https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_tlsext_status_type.html
Result
Low-level API to enable OCSP stapling