Skip to content

Commit a9e6a03

Browse files
committed
Just use normal getInstance to get KeyFactory
We have the provider in hand, so just use it to get the algorithm using the available getInstance. Fixes #197
1 parent 6f91360 commit a9e6a03

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/org/jruby/ext/openssl/SecurityHelper.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,7 @@ static KeyFactory getKeyFactory(final String algorithm, final Provider provider)
286286
throws NoSuchAlgorithmException {
287287
KeyFactorySpi spi = (KeyFactorySpi) getImplEngine("KeyFactory", algorithm);
288288
if ( spi == null ) throw new NoSuchAlgorithmException(algorithm + " not found");
289-
return newInstance(KeyFactory.class,
290-
new Class[] { KeyFactorySpi.class, Provider.class, String.class },
291-
new Object[] { spi, provider, algorithm }
292-
);
289+
return KeyFactory.getInstance(algorithm, provider);
293290
}
294291

295292
/**

0 commit comments

Comments
 (0)