mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-31 18:46:07 +01:00
add explicit provider setup for bouncy castle (#1500)
When upgrading JGit, the automatic provider declaration was removed. This led to a runtime error where the provider for gpg signatures could not be found. This PR reintegrates the provider setup for the Bouncy Castle GPG Provider.
This commit is contained in:
committed by
GitHub
parent
4b6c4d4eb7
commit
ed6d9a0df0
@@ -41,9 +41,16 @@ import javax.validation.constraints.NotNull;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.security.Security;
|
||||
|
||||
class DefaultPrivateKey implements PrivateKey {
|
||||
|
||||
static {
|
||||
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
}
|
||||
}
|
||||
|
||||
static DefaultPrivateKey parseRaw(String rawPrivateKey) {
|
||||
return new DefaultPrivateKey(KeysExtractor.extractPrivateKey(rawPrivateKey));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user