-
Notifications
You must be signed in to change notification settings - Fork 39
Add WolfSSLAltName class for extended SAN parsing and MS AD UPN support #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds comprehensive Subject Alternative Name (SAN) parsing support to wolfSSL JNI, including a new WolfSSLAltName class for type-safe access to all RFC 5280 GeneralName types and special support for Microsoft Active Directory User Principal Names (UPNs).
Key Changes:
- Introduces
WolfSSLAltNameclass with type-safe API for all SAN types (otherName, DNS, IP, email, URI, directoryName, registeredID) - Adds
getSubjectAltNamesArray(),getSubjectAltNamesExtended()methods toWolfSSLCertificate - Implements native JNI method
X509_get_subject_alt_names_full()with complete SAN parsing including otherName OID/value extraction
Reviewed changes
Copilot reviewed 21 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
WolfSSLAltName.java |
New class providing type-safe SAN access with MS UPN detection and ASN.1 parsing |
WolfSSLCertificate.java |
Added three new SAN methods with caching and backward compatibility |
com_wolfssl_WolfSSLCertificate.c |
Native implementation parsing all SAN types with proper JNI object creation |
com_wolfssl_WolfSSLCertificate.h |
JNI header for new native method |
WolfSSLCertificateTest.java |
1700+ lines of comprehensive tests covering all SAN types and edge cases |
WolfSSLX509Test.java |
Updated test to compare SANs order-independently per RFC 5280 |
generate-san-test-certs.sh |
Script generating test certificates with various SAN combinations |
san-test/*.pem/*.der |
Test certificates for validation |
update-certs.sh |
Integrated SAN cert generation into build process |
infer.sh |
Added WolfSSLAltName to static analysis |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 21 out of 26 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR add a
WolfSSLAltNameclass for access to Subject Alternative Name entries and addsgetSubjectAltNamesArray()andgetSubjectAltNamesExtended()methods toWolfSSLCertificate.These changes support all RFC 5280 GeneralName types including
otherName(MS AD UPN),iPAddress, anddirectoryName.Includes JUnit tests for testing and regression prevention.