Skip to content
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

Upgrade bouncycastle version to 1.78.1.wso2v1 #275

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private X509Certificate generateKeyPair(KeyStore keyStore) throws KeyStoreMgtExc
KeyPair keyPair = keyPairGenerator.generateKeyPair();

// Common Name and alias for the generated certificate
String commonName = "CN=" + tenantDomain + ", OU=None, O=None L=None, C=None";
String commonName = "CN=" + tenantDomain + ", OU=None, O=None, L=None, C=None";

Choose a reason for hiding this comment

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

Did you do this change due to any particular error? Trying to understand the relationship with the dependency update and this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The following error was encountered after the upgrade while creating the tenant keystore. The change has been made to resolve it.

Caused by: java.lang.IllegalArgumentException: badly formatted directory string
 	at org.bouncycastle.asn1.x500.style.IETFUtils.nextToken(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.bouncycastle.asn1.x500.style.IETFUtils.addRDN(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.bouncycastle.asn1.x500.style.IETFUtils.addRDNs(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.bouncycastle.asn1.x500.style.IETFUtils.rDNsFromString(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.bouncycastle.asn1.x500.style.BCStyle.fromString(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.bouncycastle.asn1.x500.X500Name.<init>(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.bouncycastle.asn1.x500.X500Name.<init>(Unknown Source) ~[bcprov-jdk18on-1.78.1.jar:?]
 	at org.wso2.carbon.keystore.mgt.KeyStoreGenerator.generateKeyPair(KeyStoreGenerator.java:172) ~[org.wso2.carbon.tenant.keystore.mgt_4.9.10.jar:?]
 	... 67 more


//generate certificates
X500Name distinguishedName = new X500Name(commonName);
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,8 @@

<log4j.version>1.2.13</log4j.version>

<bcprov-jdk18.version>1.74.0.wso2v1</bcprov-jdk18.version>
<bcpkix-jdk18.version>1.74.0.wso2v1</bcpkix-jdk18.version>
<bcprov-jdk18.version>1.78.1.wso2v1</bcprov-jdk18.version>
<bcpkix-jdk18.version>1.78.1.wso2v1</bcpkix-jdk18.version>
<org.bouncycastle.imp.pkg.version.range>[0.0.0,2.0.0)</org.bouncycastle.imp.pkg.version.range>

<!-- Jasper Reports Version -->
Expand Down