[java-shib-shared] branch maint-9.1 updated: JSSH-50 Stop including CA:true in generated certificates
Scott Cantor
cantor.2 at osu.edu
Wed Aug 6 13:56:06 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-9.1
in repository java-shib-shared.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=a1abbaaac3c0b16661effa8dfb49240d56a55eba
The following commit(s) were added to refs/heads/maint-9.1 by this push:
new a1abbaaa JSSH-50 Stop including CA:true in generated certificates
a1abbaaa is described below
commit a1abbaaac3c0b16661effa8dfb49240d56a55eba
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Mar 17 14:39:34 2025 +0000
JSSH-50 Stop including CA:true in generated certificates
https://shibboleth.atlassian.net/browse/JSSH-50
We weren't doing aythingto explicitly include CA:true, but now we explicitly say
CA:FALSE
---
.../shared/security/impl/SelfSignedCertificateGenerator.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/shib-security/src/main/java/net/shibboleth/shared/security/impl/SelfSignedCertificateGenerator.java b/shib-security/src/main/java/net/shibboleth/shared/security/impl/SelfSignedCertificateGenerator.java
index c6fb1651..58bdd350 100644
--- a/shib-security/src/main/java/net/shibboleth/shared/security/impl/SelfSignedCertificateGenerator.java
+++ b/shib-security/src/main/java/net/shibboleth/shared/security/impl/SelfSignedCertificateGenerator.java
@@ -37,6 +37,7 @@ import javax.annotation.Nullable;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.x500.X500Name;
+import org.bouncycastle.asn1.x509.BasicConstraints;
import org.bouncycastle.asn1.x509.Extension;
import org.bouncycastle.asn1.x509.GeneralName;
import org.bouncycastle.asn1.x509.GeneralNames;
@@ -317,6 +318,8 @@ public class SelfSignedCertificateGenerator {
builder.addExtension(Extension.subjectAlternativeName, false,
GeneralNames.getInstance(new DERSequence(buildSubjectAltNames())));
+ builder.addExtension(Extension.basicConstraints, false, new BasicConstraints(false));
+
final X509CertificateHolder certHldr = builder.build(
new JcaContentSignerBuilder(args.certAlg).build(keypair.getPrivate()));
final X509Certificate cert = new JcaX509CertificateConverter().getCertificate(certHldr);
@@ -489,4 +492,4 @@ public class SelfSignedCertificateGenerator {
@Nullable private String keystorePassword;
}
-}
\ No newline at end of file
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list