summaryrefslogtreecommitdiff
path: root/java/security/AlgorithmParameters.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/security/AlgorithmParameters.java')
-rw-r--r--java/security/AlgorithmParameters.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/security/AlgorithmParameters.java b/java/security/AlgorithmParameters.java
index 36bb3ee0..864866ef 100644
--- a/java/security/AlgorithmParameters.java
+++ b/java/security/AlgorithmParameters.java
@@ -29,6 +29,8 @@ import java.io.*;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.InvalidParameterSpecException;
+import sun.security.jca.Providers;
+
/**
* This class is used as an opaque representation of cryptographic parameters.
*
@@ -285,6 +287,8 @@ public class AlgorithmParameters {
{
if (provider == null || provider.length() == 0)
throw new IllegalArgumentException("missing provider");
+ // Android-added: Check for Bouncy Castle deprecation
+ Providers.checkBouncyCastleDeprecation(provider, "AlgorithmParameters", algorithm);
Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters",
provider);
return new AlgorithmParameters((AlgorithmParametersSpi)objs[0],
@@ -330,6 +334,8 @@ public class AlgorithmParameters {
{
if (provider == null)
throw new IllegalArgumentException("missing provider");
+ // Android-added: Check for Bouncy Castle deprecation
+ Providers.checkBouncyCastleDeprecation(provider, "AlgorithmParameters", algorithm);
Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters",
provider);
return new AlgorithmParameters((AlgorithmParametersSpi)objs[0],