Skip to content

Commit

Permalink
fix(BaseKeystoreService): Add missing key generator provider [backpor…
Browse files Browse the repository at this point in the history
…t release-5.4.0] (#5070)

* fix(BaseKeystoreService): Add missing key generator provider (#4862)

Add bouncycastle provider for the class

(cherry picked from commit 5684ef2)

* chore: distrib version update

Signed-off-by: MMaiero <[email protected]>

---------

Signed-off-by: MMaiero <[email protected]>
Co-authored-by: gnunzi <[email protected]>
Co-authored-by: MMaiero <[email protected]>
  • Loading branch information
3 people authored Dec 15, 2023
1 parent 9348921 commit e2123f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kura/distrib/config/kura.build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.eclipse.kura.broker.artemis.xml.version=1.4.0
org.eclipse.kura.core.version=1.4.0
org.eclipse.kura.core.system.version=1.4.0
org.eclipse.kura.core.certificates.version=1.4.0
org.eclipse.kura.core.keystore.version=1.4.0
org.eclipse.kura.core.keystore.version=1.4.1-SNAPSHOT
org.eclipse.kura.core.cloud.version=1.5.0
org.eclipse.kura.core.cloud.factory.version=1.4.0
org.eclipse.kura.core.comm.version=1.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ public abstract class BaseKeystoreService implements KeystoreService, Configurab

private CRLManagerOptions crlManagerOptions;

static {
Security.addProvider(new BouncyCastleProvider());
}

public void setEventAdmin(EventAdmin eventAdmin) {
this.eventAdmin = eventAdmin;
}
Expand Down Expand Up @@ -275,6 +279,7 @@ public void createKeyPair(String alias, String algorithm, int keySize, String si
setEntry(alias, new PrivateKeyEntry(keyPair.getPrivate(),
generateCertificateChain(keyPair, signatureAlgorithm, attributes)));
} catch (GeneralSecurityException | OperatorCreationException e) {
logger.error("Error occured. Exception: {}.", e.getClass());
throw new KuraException(KuraErrorCode.BAD_REQUEST);
}
}
Expand Down

0 comments on commit e2123f3

Please sign in to comment.