GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support boringssl SSLCredential API by jmcrawford45 · Pull Request #935 · netty/netty-tcnative

Conversation

@jmcrawford45

@jmcrawford45 jmcrawford45 commented Jun 25, 2025

Copy link
Copy Markdown
Contributor

Motivation:

Historically, BoringSSL lacked a built-in method to select between RSA and ECDSA certificates. The selection process, especially at TLS 1.2, is quite complex, as detailed in this link. TLS 1.3 simplifies this process significantly. Additionally, within ECDSA, there are different curves to consider, and future developments will introduce post-quantum key types. Recently, the SSL Credential API was introduced to BoringSSL to address this and a variety of other certificate negotiation decisions, such as:

Different kinds of credentials (delegate credentials, raw public keys, external PSKs, and more future innovations.
Negotiation for trust anchors to aid in PQ transitions and PKI agility.

Modifications:

Add JNI bindings for all the existing SSL_Credential related functionality in BoringSSL.

Result:

The SSL_CREDENTIAL consolidates everything related to a single "credential" into an object. Credentials can vary in type, such as X.509 certificates or others. Each credential has criteria, based on TLS protocol rules, to determine its applicability to a connection. Users configure an ordered preference list of credentials, and BoringSSL selects the first matching one.

This approach can be used alongside application-specific selection logic, like SNI dispatch. End users would use their criteria to select a list of candidates, such as an ECDSA and RSA certificate for a host, configure them in preference order with BoringSSL, and BoringSSL will evaluate them according to protocol rules.

Implements #918

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jmcrawford45
Support boringssl SSLCredential API
3ade3dd
@jmcrawford45
jmcrawford45 marked this pull request as ready for review June 25, 2025 19:24
@jmcrawford45 jmcrawford45 mentioned this pull request Jun 25, 2025
feature: Support boringssl SSLCredential API #918
Closed
@argha-c

argha-c commented Jun 26, 2025

Copy link
Copy Markdown

@normanmaurer: If you could PTAL. Curious if you have a different design suggestion? This should pave the path for PQC support in netty-tcnative.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer requested a review from chrisvest June 27, 2025 14:34
normanmaurer
normanmaurer requested changes Jun 27, 2025
View reviewed changes

@normanmaurer normanmaurer left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

First round of review...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread openssl-dynamic/src/main/c/ssl.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/ssl.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/ssl.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/ssl.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcontext.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

jmcrawford45 and others added 9 commits June 27, 2025 12:11
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/ssl.c
b7fe5cb
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcontext.c
174813c
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.h
5c8a820
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45
Use TCN_CHECK_NULL
f9ece1b
@jmcrawford45
Remove redundant table, restore ssl.h and sslcontext.h
457b0bb
@jmcrawford45
Internal ifdefs for consistency
d53632c
@jmcrawford45
Standardize macro usage
c8a643a
@jmcrawford45
Drop spake/exdata for now, impl delegated credentials, prefer void re…
e2d09fd
…turn for non-getters
@jmcrawford45
Merge branch 'main' into sslcredential
a6b8178
chrisvest
chrisvest requested changes Jun 27, 2025
View reviewed changes
Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

jmcrawford45 added 4 commits June 27, 2025 18:30
@jmcrawford45
ERR_LEN for zero initialized buffers
a5c02e5
@jmcrawford45
rm bad import
2a6269f
@jmcrawford45
Merge remote-tracking branch 'origin/main' into sslcredential
2063f98
# Conflicts:
#	openssl-dynamic/src/main/c/sslcontext.c
@jmcrawford45
rm bad import
f468a99
normanmaurer
normanmaurer requested changes Jun 28, 2025
View reviewed changes
Comment thread openssl-classes/src/main/java/io/netty/internal/tcnative/SSLCredential.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-classes/src/main/java/io/netty/internal/tcnative/SSLCredential.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-classes/src/main/java/io/netty/internal/tcnative/SSLCredential.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/ssl.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/ssl.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread openssl-dynamic/src/main/c/sslcredential.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

jmcrawford45 and others added 9 commits June 27, 2025 20:32
@jmcrawford45 @normanmaurer
Update openssl-classes/src/main/java/io/netty/internal/tcnative/SSLCr…
4b82f4c
…edential.java

Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-classes/src/main/java/io/netty/internal/tcnative/SSLCr…
f611aed
…edential.java

Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-classes/src/main/java/io/netty/internal/tcnative/SSLCr…
b8eaca7
…edential.java

Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/ssl.c
c1aba34
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/ssl.c
b7284ed
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
4d1b18f
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
efe3dd5
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
9291505
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
3d7275d
Co-authored-by: Norman Maurer <[email protected]>
jmcrawford45 and others added 11 commits June 27, 2025 20:38
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcontext.c
590b67f
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
5e72663
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
384794e
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
7188de7
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
b5da39c
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
0fab0fc
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcredential.c
10f1e35
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcontext.c
71de3db
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45 @normanmaurer
Update openssl-dynamic/src/main/c/sslcontext.c
3442b17
Co-authored-by: Norman Maurer <[email protected]>
@jmcrawford45
Move exception helper to error file
30f3873
@jmcrawford45
validate all arrays have positive length
63285f3
@jmcrawford45

jmcrawford45 commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

@normanmaurer @chrisvest the first rounds of feedback should be addressed; I'm not sure if the centos6 build failure is related to my change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chrisvest
chrisvest approved these changes Jul 18, 2025
View reviewed changes
@chrisvest

chrisvest commented Jul 18, 2025

Copy link
Copy Markdown
Member

I think this looks good. Sorry it took a while to get back to reviewing it again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jmcrawford45

jmcrawford45 commented Jul 18, 2025

Copy link
Copy Markdown
Contributor Author

@chrisvest thank you for the review, I can look into integrating this once it merges. @normanmaurer the requested changes is still showing from the first round review, I'm not sure if that's blocking or not for this repo

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jmcrawford45

jmcrawford45 commented Jul 28, 2025

Copy link
Copy Markdown
Contributor Author

@normanmaurer would you be able to take another look this week?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer

normanmaurer commented Jul 28, 2025

Copy link
Copy Markdown
Member

@jmcrawford45 I am currently on PTO... will check once back

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

normanmaurer
normanmaurer approved these changes Aug 15, 2025
View reviewed changes

@normanmaurer normanmaurer left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM... Thanks a lot!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@normanmaurer
normanmaurer merged commit 2a47a58 into netty:main Aug 15, 2025
@normanmaurer normanmaurer added this to the 2.0.73.Final milestone Aug 15, 2025
This was referenced Nov 20, 2025
Support boringssl SSLCredential API netty/netty#15906
Closed
Support boringssl SSLCredential API #15906 jmcrawford45/netty#1
Closed
Support boringssl SSLCredential API netty/netty#15919
Merged
normanmaurer added a commit to netty/netty that referenced this pull request Feb 18, 2026
@jmcrawford45 @normanmaurer @chrisvest
Support boringssl SSLCredential API (#15919)
a40fb71
Motivation:

Historically, BoringSSL lacked a built-in method to select between RSA
and ECDSA certificates. The selection process, especially at TLS 1.2, is
quite complex, as detailed in [this
link](https://boringssl.googlesource.com/boringssl/+/5a3faaa2d50b2540c6973531841723f633f388cd/ssl/test/runner/runner.go#19669).
TLS 1.3 simplifies this process significantly. Additionally, within
ECDSA, there are different curves to consider, and future developments
will introduce post-quantum key types. The SSL Credential API was
introduced to BoringSSL to address this and a variety of other
certificate negotiation decisions, such as:

Different kinds of credentials ([delegate
credentials](https://www.rfc-editor.org/rfc/rfc9345.html), [raw public
keys](https://www.rfc-editor.org/rfc/rfc7250.html), [external
PSKs](https://www.rfc-editor.org/rfc/rfc9258.html), and more [future
innovations](https://davidben.github.io/merkle-tree-certs/draft-davidben-tls-merkle-tree-certs.html).
[Negotiation for trust
anchors](https://github.com/davidben/tls-trust-expressions/blob/main/explainer.md)
to aid in PQ transitions and PKI agility.

Modification:

Introduce high level APIs leveraging the most useful bindings introduced
in netty/netty-tcnative#935

```java
OpenSslCredential credential = OpenSslCredentialBuilder.newX509(privateKey, chain)
    .trustAnchorId(anchorId)
    .mustMatchIssuer(true)
    .build();
```

Result:

There are two main immediate use cases to this API
First, it is now possible to delegate all the complexity of EC/RSA
serving to BoringSSL.
```java
OpenSslCredential ecdsaCred = buildEcdsaCredential();

SslContext ctx = SslContextBuilder.forServer(rsaKey, rsaCert)
    .sslProvider(SslProvider.OPENSSL_REFCNT)
    .credential(ecdsaCred)
    .build();
```
This mechanism will also be useful to allow clients to negotiate trust
anchors via https://github.com/tlswg/tls-trust-anchor-ids. For example,
a modern client may request for a more efficient or more secure chain
while legacy clients can still receive the less secure / less efficient
fallback cert.


depends on netty/netty-tcnative#949

---------

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
netty-project-bot pushed a commit to netty/netty that referenced this pull request Feb 18, 2026
@jmcrawford45 @normanmaurer
@chrisvest @netty-project-bot
Support boringssl SSLCredential API (#15919)
b9d8de3
Motivation:

Historically, BoringSSL lacked a built-in method to select between RSA
and ECDSA certificates. The selection process, especially at TLS 1.2, is
quite complex, as detailed in [this
link](https://boringssl.googlesource.com/boringssl/+/5a3faaa2d50b2540c6973531841723f633f388cd/ssl/test/runner/runner.go#19669).
TLS 1.3 simplifies this process significantly. Additionally, within
ECDSA, there are different curves to consider, and future developments
will introduce post-quantum key types. The SSL Credential API was
introduced to BoringSSL to address this and a variety of other
certificate negotiation decisions, such as:

Different kinds of credentials ([delegate
credentials](https://www.rfc-editor.org/rfc/rfc9345.html), [raw public
keys](https://www.rfc-editor.org/rfc/rfc7250.html), [external
PSKs](https://www.rfc-editor.org/rfc/rfc9258.html), and more [future
innovations](https://davidben.github.io/merkle-tree-certs/draft-davidben-tls-merkle-tree-certs.html).
[Negotiation for trust
anchors](https://github.com/davidben/tls-trust-expressions/blob/main/explainer.md)
to aid in PQ transitions and PKI agility.

Modification:

Introduce high level APIs leveraging the most useful bindings introduced
in netty/netty-tcnative#935

```java
OpenSslCredential credential = OpenSslCredentialBuilder.newX509(privateKey, chain)
    .trustAnchorId(anchorId)
    .mustMatchIssuer(true)
    .build();
```

Result:

There are two main immediate use cases to this API
First, it is now possible to delegate all the complexity of EC/RSA
serving to BoringSSL.
```java
OpenSslCredential ecdsaCred = buildEcdsaCredential();

SslContext ctx = SslContextBuilder.forServer(rsaKey, rsaCert)
    .sslProvider(SslProvider.OPENSSL_REFCNT)
    .credential(ecdsaCred)
    .build();
```
This mechanism will also be useful to allow clients to negotiate trust
anchors via https://github.com/tlswg/tls-trust-anchor-ids. For example,
a modern client may request for a more efficient or more secure chain
while legacy clients can still receive the less secure / less efficient
fallback cert.

depends on netty/netty-tcnative#949

---------

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
(cherry picked from commit a40fb71)
@netty-project-bot netty-project-bot mentioned this pull request Feb 18, 2026
Forward port 5.0: Support boringssl SSLCredential API netty/netty#16302
Merged
normanmaurer added a commit to netty/netty that referenced this pull request Feb 19, 2026
@netty-project-bot @jmcrawford45
@normanmaurer @chrisvest
Forward port 5.0: Support boringssl SSLCredential API (#16302)
8c67cd1
Forward port of #15919 to 5.0
Cherry-picked commit: a40fb71

---
Motivation:

Historically, BoringSSL lacked a built-in method to select between RSA
and ECDSA certificates. The selection process, especially at TLS 1.2, is
quite complex, as detailed in [this
link](https://boringssl.googlesource.com/boringssl/+/5a3faaa2d50b2540c6973531841723f633f388cd/ssl/test/runner/runner.go#19669).
TLS 1.3 simplifies this process significantly. Additionally, within
ECDSA, there are different curves to consider, and future developments
will introduce post-quantum key types. The SSL Credential API was
introduced to BoringSSL to address this and a variety of other
certificate negotiation decisions, such as:

Different kinds of credentials ([delegate
credentials](https://www.rfc-editor.org/rfc/rfc9345.html), [raw public
keys](https://www.rfc-editor.org/rfc/rfc7250.html), [external
PSKs](https://www.rfc-editor.org/rfc/rfc9258.html), and more [future
innovations](https://davidben.github.io/merkle-tree-certs/draft-davidben-tls-merkle-tree-certs.html).
[Negotiation for trust
anchors](https://github.com/davidben/tls-trust-expressions/blob/main/explainer.md)
to aid in PQ transitions and PKI agility.

Modification:

Introduce high level APIs leveraging the most useful bindings introduced
in netty/netty-tcnative#935

```java
OpenSslCredential credential = OpenSslCredentialBuilder.newX509(privateKey, chain)
    .trustAnchorId(anchorId)
    .mustMatchIssuer(true)
    .build();
```

Result:

There are two main immediate use cases to this API
First, it is now possible to delegate all the complexity of EC/RSA
serving to BoringSSL.
```java
OpenSslCredential ecdsaCred = buildEcdsaCredential();

SslContext ctx = SslContextBuilder.forServer(rsaKey, rsaCert)
    .sslProvider(SslProvider.OPENSSL_REFCNT)
    .credential(ecdsaCred)
    .build();
```
This mechanism will also be useful to allow clients to negotiate trust
anchors via https://github.com/tlswg/tls-trust-anchor-ids. For example,
a modern client may request for a more efficient or more secure chain
while legacy clients can still receive the less secure / less efficient
fallback cert.


depends on netty/netty-tcnative#949

Co-authored-by: Jared Crawford <[email protected]>
Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
@normanmaurer normanmaurer mentioned this pull request Oct 30, 2026
jni util 0.0.12 #1039
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisvest chrisvest chrisvest approved these changes
@normanmaurer normanmaurer normanmaurer approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

2.0.73.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@jmcrawford45 @argha-c @chrisvest @normanmaurer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.