Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2013-11-26 09:37:15 +0400
committerDavid Hook <dgh@cryptoworkshop.com>2013-11-26 09:37:15 +0400
commitfe8f2e9a80cbd4074270024559fd0792c432d4bc (patch)
tree3fd8fcbe175824de31fc1212a3aa0d529f4b56b1 /pkix/src/main
parente20aca3b5bd62cb705f1c778b0a3db39b26d987c (diff)
compatibility updates.
Diffstat (limited to 'pkix/src/main')
-rw-r--r--pkix/src/main/java/org/bouncycastle/cert/path/CertPath.java5
-rw-r--r--pkix/src/main/java/org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.java8
2 files changed, 13 insertions, 0 deletions
diff --git a/pkix/src/main/java/org/bouncycastle/cert/path/CertPath.java b/pkix/src/main/java/org/bouncycastle/cert/path/CertPath.java
index 91f26546..f91b3a81 100644
--- a/pkix/src/main/java/org/bouncycastle/cert/path/CertPath.java
+++ b/pkix/src/main/java/org/bouncycastle/cert/path/CertPath.java
@@ -72,4 +72,9 @@ public class CertPath
return rv;
}
+
+ public int length()
+ {
+ return certificates.length;
+ }
}
diff --git a/pkix/src/main/java/org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.java b/pkix/src/main/java/org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.java
index 949ecd6c..d19dbcf9 100644
--- a/pkix/src/main/java/org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.java
+++ b/pkix/src/main/java/org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.java
@@ -2,6 +2,7 @@ package org.bouncycastle.operator.jcajce;
import java.security.AlgorithmParameters;
import java.security.GeneralSecurityException;
+import java.security.InvalidKeyException;
import java.security.Provider;
import java.security.ProviderException;
import java.security.PublicKey;
@@ -117,6 +118,9 @@ public class JceAsymmetricKeyWrapper
}
encryptedKeyBytes = keyEncryptionCipher.wrap(OperatorUtils.getJceKey(encryptionKey));
}
+ catch (InvalidKeyException e)
+ {
+ }
catch (GeneralSecurityException e)
{
}
@@ -138,6 +142,10 @@ public class JceAsymmetricKeyWrapper
keyEncryptionCipher.init(Cipher.ENCRYPT_MODE, publicKey, random);
encryptedKeyBytes = keyEncryptionCipher.doFinal(OperatorUtils.getJceKey(encryptionKey).getEncoded());
}
+ catch (InvalidKeyException e)
+ {
+ throw new OperatorException("unable to encrypt contents key", e);
+ }
catch (GeneralSecurityException e)
{
throw new OperatorException("unable to encrypt contents key", e);