From eb292aaa795e28e325d1e439e88f2ad526cb4e7e Mon Sep 17 00:00:00 2001 From: "Raif S. Naffah" Date: Thu, 23 Feb 2006 12:54:46 +0000 Subject: 2006-02-23 Raif S. Naffah * gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java (DEFAULT_PRIME_SIZE): Made public. (DEFAULT_EXPONENT_SIZE): Likewise. (setup): Handle DHParameterSpec as well. * gnu/javax/crypto/key/dh/GnuDHKey.java (getEncoded): Return defaultFormat instead of Raw. * gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodePublicKey): Use DerUtil. * gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodePrivateKey): Use DerUtil. * gnu/javax/crypto/jce/GnuCrypto.java (run): Updated mapping of KeyAgreement.DH. Added mappings for AlgorithmParameters.DH and AlgorithmParameterGenerator.DH. * gnu/javax/crypto/jce/DiffieHellmanImpl.java: New file. * gnu/javax/crypto/jce/sig/DHParametersGenerator.java: Likewise. * gnu/javax/crypto/jce/sig/DHParameters.java: Likewise. * gnu/javax/crypto/jce/sig/DHKeyFactory.java (engineGeneratePrivate): Return result. (engineGeneratePublic): Likewise. * gnu/java/security/util/DerUtil.java: New file. * gnu/java/security/sig/rsa/RSASignatureFactory.java (getNames): Include only valid RSA PKCS1 (v1.5) signature names. * gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java (RSAPKCS1V1_5SignatureX509Codec): Removed. (checkIsConstructed): Likewise. * gnu/java/security/sig/dss/DSSSignatureX509Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodeSignature): Use DerUtil. * gnu/java/security/key/rsa/RSAKeyPairX509Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodePublicKey): Use DerUtil. * gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodePrivateKey): Use DerUtil. * gnu/java/security/key/dss/DSSKeyPairX509Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodePublicKey): Use DerUtil. * gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java (checkIsConstructed): Removed. (checkIsBigInteger): Likewise. (decodePrivateKey): Use DerUtil. * gnu/java/security/key/dss/DSSKeyPairGenerator.java (DEFAULT_MODULUS_LENGTH): Made it public. * gnu/java/security/key/dss/DSSKey.java (getEncoded): Return defaultFormat instead of Raw. * gnu/java/security/jce/sig/DSSParametersGenerator.java: New file. * gnu/java/security/jce/sig/DSSParameters.java: Likewise.. * gnu/java/security/jce/sig/DSSKeyFactory.java (engineGeneratePrivate): Return result. (engineGeneratePublic): Likewise. * gnu/javax/crypto/DiffieHellmanImpl: Removed. --- gnu/java/security/jce/sig/DSSKeyFactory.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gnu/java/security/jce/sig/DSSKeyFactory.java') diff --git a/gnu/java/security/jce/sig/DSSKeyFactory.java b/gnu/java/security/jce/sig/DSSKeyFactory.java index 818d0513d..bb4d85c89 100644 --- a/gnu/java/security/jce/sig/DSSKeyFactory.java +++ b/gnu/java/security/jce/sig/DSSKeyFactory.java @@ -89,6 +89,7 @@ public class DSSKeyFactory extends KeyFactorySpi try { result = new DSSKeyPairX509Codec().decodePublicKey(encoded); + return result; } catch (RuntimeException x) { @@ -122,6 +123,7 @@ public class DSSKeyFactory extends KeyFactorySpi try { result = new DSSKeyPairPKCS8Codec().decodePrivateKey(encoded); + return result; } catch (RuntimeException x) { -- cgit v1.2.1