Skip to content

OCSP support for netty-tcnative#215

Closed
rkapsi wants to merge 1 commit intonetty:masterfrom
Squarespace:rkapsi/netty-ocsp-stapling-2
Closed

OCSP support for netty-tcnative#215
rkapsi wants to merge 1 commit intonetty:masterfrom
Squarespace:rkapsi/netty-ocsp-stapling-2

Conversation

@rkapsi
Copy link
Copy Markdown
Member

@rkapsi rkapsi commented Dec 27, 2016

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:

  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

@rkapsi
Copy link
Copy Markdown
Member Author

rkapsi commented Dec 27, 2016

@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.

netty/netty#6158

// are being outputted to STDERR because the calling Thread is not
// attached to the JVM yet.

if (OCSP_CALLBACK_CLAZZ == NULL) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#201 (comment)

is this check necessary? the CALLBACK_METHOD check should be sufficient right and CALLBACK_CLAZZ is not directly used in this method.

return error;
}

if ((*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL) != JNI_OK) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment as to why this is necessary?

* Returns true is OCSP stapling is available.
*/
TCN_IMPLEMENT_CALL(jboolean, SSLContext, isOcspSupported)(TCN_STDARGS) {
return JNI_TRUE;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should depend upon what options are supported by the dynamically linked OpenSSL library, and potentially the compile version and related flags, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current return true is dependent on the outer #ifdef which says OpenSSL >= 1.0.2 and !defined(OPENSSL_NO_OCSP).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we build against 1.0.2 but the user links a 1.0.1? See OpenSsl#isAlpnSupported for a tip

/**
* Installs the OCSP stapling callback.
*/
TCN_IMPLEMENT_CALL(jobject, SSLContext, newOcspCallback)(TCN_STDARGS, jlong ctx, jboolean client, jobject callback) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#201 (comment)

can we just group the code into ssl.c and sslcontext.c instead of introducing new modules? That would be more consistent and helps orient you as to what the scope the methods apply to.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly. Don't know if it's easier to follow. :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if it's easier to follow

debatable for sure ... but it is at least consistent with the current approach. @normanmaurer - thoughts?


if (client) {
error = SSL_CTX_set_tlsext_status_cb(c->ctx, netty_ocsp_client_callback);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove line? also consider making this a tertiary statement error = client ? ... : ... ;


OCSP_CALLBACK_METHOD = (*env)->GetMethodID(env, OCSP_CALLBACK_CLAZZ, "callback", "(J)I");
if (OCSP_CALLBACK_METHOD == NULL) {
return JNI_ERR;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually result in a NoSuchMethodError in Java land.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo, on my end we don't need to support "old" versions and we'll use whatever latest SNAPSHOT of Netty is using.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we can just target this at the master branch. @normanmaurer - WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to get -> will get

*
* NOTE: The user must call {@link SSL#setOcspStaple(long, byte[])} prior to returning this value.
*/
public static final int SSL_TLSEXT_ERR_OK = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if these are server only ... should we include SERVER in the variable name? Same thing for the client only status codes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method name is relatively generic. can we include Ocsp in the name?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't care about the exact details of SSL_set_tlsext_status_type() we can make it setOcspEnabled(long ssl, boolean enabled)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

Copy link
Copy Markdown
Member

@Scottmitch Scottmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to "Request Changes" on the GitHub review instead of "Approve" :)

@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from f6e46c8 to 6821fe5 Compare February 8, 2017 22:44
@rkapsi rkapsi changed the base branch from 1.1.33 to master February 8, 2017 22:45
@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 6821fe5 to 22fc317 Compare February 8, 2017 22:48
@rkapsi
Copy link
Copy Markdown
Member Author

rkapsi commented Feb 8, 2017

@Scottmitch please take a new look.

@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 22fc317 to 242c40d Compare February 9, 2017 13:17
@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 242c40d to 61a44c9 Compare February 23, 2017 18:39
@rkapsi
Copy link
Copy Markdown
Member Author

rkapsi commented Feb 23, 2017

@Scottmitch @normanmaurer friendly poke :)

@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 61a44c9 to 7be704f Compare February 24, 2017 13:58
Copy link
Copy Markdown
Member

@Scottmitch Scottmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments but general approach lgtm

#include <stdio.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why this is necessary and add a comment? Is it possible just to fix the warning?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@Scottmitch Scottmitch Mar 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm ... I would prefer to not have this, and just fix the warnings (if any) caused by ssl_private.h

{
return openssl_netty_tcnative_ocsp_callback(TCN_SERVER_CALLBACK_ERROR, ssl, arg);
}
#endif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) */


#if !defined(TCN_NO_OCSP) && !defined(OPENSSL_IS_BORINGSSL)

#ifndef TCN_CLIENT_CALLBACK_ERROR
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

int response = 0;
jobject callback = (*env)->NewLocalRef(env, (jweak)arg);

if ((*env)->IsSameObject(env, callback, NULL) == JNI_FALSE) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is designed to be a boolean lets treat it as one -> if (!(*env)->IsSameObject(env, callback, NULL)) { .. }

return error;
}

if (OCSP_CALLBACK_CLAZZ == NULL) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hyper link

*
* SSL_TLSEXT_ERR_OK
*/
int OCSP_SERVER_ACK = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should derive these values from JNI to ensure they remain consistent. See NativeStaticallyReferencedJniMethods

@Scottmitch
Copy link
Copy Markdown
Member

also sorry for the delay 😢

@Scottmitch
Copy link
Copy Markdown
Member

Scottmitch commented Mar 2, 2017

@Scottmitch Scottmitch self-assigned this Mar 2, 2017
@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch 3 times, most recently from d1188b7 to 5886b84 Compare March 6, 2017 14:29
#ifndef TCN_NO_OCSP
#ifndef OPENSSL_IS_BORINGSSL

#ifndef TCN_OCSP_CLIENT_CALLBACK_ERROR
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, not used outside of this scope and and the only intention is to have two named constants.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is the #ifdef protection necessary can we do one of the following:

  • remove the ifdefs
  • define these values as static const to get type safety

The second approach is preferred if this still satisfies your needs.


#include <stdio.h>

#ifndef TCN_NO_OCSP
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see PR #245

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll move 'em back into the interface as soon as you merge #245

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#245 has been merged

public static final int OCSP_SERVER_NACK = sslTlsExtErrAlertWarning();

/**
* SERVER ONLY: Some error occurred. Throwing an {@link Exception} from the {@link #callback(long)}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a <p> in here?

@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 77cffe9 to d67b985 Compare March 9, 2017 14:37
@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from fa14107 to 3420550 Compare March 9, 2017 16:57

#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);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This faux pas went unnoticed because BoringSSL compiles with OPENSSL_NO_OCSP.

Copy link
Copy Markdown
Member

@Scottmitch Scottmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like we need to adjust the defines to accommodate for boringssl?

return;
}

#if defined(OPENSSL_NO_OCSP)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based upon netty/netty#6158 (comment) ... should we only check OPENSSL_NO_OCSP if !defined(OPENSSL_IS_BORINGSSL)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

@Scottmitch Scottmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can revert this change bcz the changes we need have been released

@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 14dcf65 to 5e055e5 Compare March 13, 2017 14:24
…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
@rkapsi rkapsi force-pushed the rkapsi/netty-ocsp-stapling-2 branch from 5e055e5 to 7c3cab6 Compare March 16, 2017 17:19
@rkapsi
Copy link
Copy Markdown
Member Author

rkapsi commented Mar 23, 2017

@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.

Copy link
Copy Markdown
Member

@Scottmitch Scottmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm ... sorry for the delay 😢

@Scottmitch
Copy link
Copy Markdown
Member

master (1e77375)

@Scottmitch Scottmitch closed this Mar 28, 2017
@normanmaurer
Copy link
Copy Markdown
Member

+1 ... Thanks @Scottmitch for taking care and @rkapsi for the work !

rkapsi pushed a commit to Squarespace/netty that referenced this pull request Apr 3, 2017
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
Scottmitch pushed a commit to netty/netty that referenced this pull request Apr 3, 2017
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
Scottmitch pushed a commit to netty/netty that referenced this pull request Apr 3, 2017
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
liuzhengyang pushed a commit to liuzhengyang/netty that referenced this pull request Sep 10, 2017
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
kiril-me pushed a commit to kiril-me/netty that referenced this pull request Feb 28, 2018
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
@rkapsi rkapsi deleted the rkapsi/netty-ocsp-stapling-2 branch August 24, 2018 15:53
pulllock pushed a commit to pulllock/netty that referenced this pull request Oct 19, 2023
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
AlohaWorld pushed a commit to AlohaWorld/Netty.Official.Examples that referenced this pull request Mar 1, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants