Removing BouncyCastle dependency and using JCE standard library
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
This commit is contained in:
parent
5a8662563e
commit
66414f0eb9
|
|
@ -68,8 +68,5 @@ dependencies {
|
||||||
compile "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64"
|
compile "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64"
|
||||||
compile "io.netty:netty-transport-native-kqueue:${nettyVersion}:osx-x86_64"
|
compile "io.netty:netty-transport-native-kqueue:${nettyVersion}:osx-x86_64"
|
||||||
compile "org.apache.commons:commons-lang3:3.7"
|
compile "org.apache.commons:commons-lang3:3.7"
|
||||||
|
|
||||||
compile "org.bouncycastle:bcprov-jdk15on:1.59"
|
|
||||||
compile "org.bouncycastle:bcpkix-jdk15on:1.59"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
package spiffe.provider;
|
package spiffe.provider;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.security.*;
|
import java.security.*;
|
||||||
import java.security.cert.*;
|
import java.security.cert.*;
|
||||||
|
|
@ -68,7 +65,7 @@ class CertificateUtils {
|
||||||
* @throws InvalidKeySpecException
|
* @throws InvalidKeySpecException
|
||||||
*/
|
*/
|
||||||
static PrivateKey generatePrivateKey(byte[] input) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
static PrivateKey generatePrivateKey(byte[] input) throws NoSuchAlgorithmException, InvalidKeySpecException {
|
||||||
KeyFactory keyFactory = KeyFactory.getInstance(PRIVATE_KEY_ALGORITHM, new BouncyCastleProvider());
|
KeyFactory keyFactory = KeyFactory.getInstance(PRIVATE_KEY_ALGORITHM);
|
||||||
return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(input));
|
return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue