diff options
| author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-14 23:12:35 +0000 |
|---|---|---|
| committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-14 23:12:35 +0000 |
| commit | ffde862e033a0825e1e9972a89c0f1f80b261a8e (patch) | |
| tree | 97037d2c09c8384d80531f67ec36a01205df6bdb /libjava/classpath/gnu/javax/crypto/jce/sig | |
| parent | b415ff10527e977c3758234fd930e2c027bfa17d (diff) | |
| download | ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.tar.gz ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.zip | |
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/javax/crypto/jce/sig')
| -rw-r--r-- | libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyFactory.java | 29 | ||||
| -rw-r--r-- | libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyPairGeneratorSpi.java | 6 |
2 files changed, 11 insertions, 24 deletions
diff --git a/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyFactory.java b/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyFactory.java index 701191adc34..98b265dd36c 100644 --- a/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyFactory.java +++ b/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyFactory.java @@ -79,7 +79,6 @@ public class DHKeyFactory BigInteger y = spec.getY(); return new GnuDHPublicKey(Registry.X509_ENCODING_ID, null, p, g, y); } - if (keySpec instanceof X509EncodedKeySpec) { X509EncodedKeySpec spec = (X509EncodedKeySpec) keySpec; @@ -97,7 +96,6 @@ public class DHKeyFactory throw y; } } - throw new InvalidKeySpecException("Unsupported (public) key specification"); } @@ -112,7 +110,6 @@ public class DHKeyFactory BigInteger x = spec.getX(); return new GnuDHPrivateKey(Registry.PKCS8_ENCODING_ID, null, p, g, x); } - if (keySpec instanceof PKCS8EncodedKeySpec) { PKCS8EncodedKeySpec spec = (PKCS8EncodedKeySpec) keySpec; @@ -130,7 +127,6 @@ public class DHKeyFactory throw y; } } - throw new InvalidKeySpecException("Unsupported (private) key specification"); } @@ -147,7 +143,6 @@ public class DHKeyFactory BigInteger y = dssKey.getY(); return new DHPublicKeySpec(y, p, g); } - if (keySpec.isAssignableFrom(X509EncodedKeySpec.class)) { if (key instanceof GnuDHPublicKey) @@ -156,19 +151,16 @@ public class DHKeyFactory byte[] encoded = dhKey.getEncoded(Registry.X509_ENCODING_ID); return new X509EncodedKeySpec(encoded); } - if (Registry.X509_ENCODING_SORT_NAME.equalsIgnoreCase(key.getFormat())) { byte[] encoded = key.getEncoded(); return new X509EncodedKeySpec(encoded); } - - throw new InvalidKeySpecException("Wrong key type or unsupported (public) key specification"); + throw new InvalidKeySpecException( + "Wrong key type or unsupported (public) key specification"); } - throw new InvalidKeySpecException("Unsupported (public) key specification"); } - if (key instanceof DHPrivateKey) { if (keySpec.isAssignableFrom(DHPrivateKeySpec.class)) @@ -179,7 +171,6 @@ public class DHKeyFactory BigInteger x = dhKey.getX(); return new DHPrivateKeySpec(x, p, g); } - if (keySpec.isAssignableFrom(PKCS8EncodedKeySpec.class)) { if (key instanceof GnuDHPrivateKey) @@ -188,27 +179,25 @@ public class DHKeyFactory byte[] encoded = dhKey.getEncoded(Registry.PKCS8_ENCODING_ID); return new PKCS8EncodedKeySpec(encoded); } - if (Registry.PKCS8_ENCODING_SHORT_NAME.equalsIgnoreCase(key.getFormat())) { byte[] encoded = key.getEncoded(); return new PKCS8EncodedKeySpec(encoded); } - - throw new InvalidKeySpecException("Wrong key type or unsupported (private) key specification"); + throw new InvalidKeySpecException( + "Wrong key type or unsupported (private) key specification"); } - - throw new InvalidKeySpecException("Unsupported (private) key specification"); + throw new InvalidKeySpecException( + "Unsupported (private) key specification"); } - - throw new InvalidKeySpecException("Wrong key type or unsupported key specification"); + throw new InvalidKeySpecException( + "Wrong key type or unsupported key specification"); } protected Key engineTranslateKey(Key key) throws InvalidKeyException { if ((key instanceof GnuDHPublicKey) || (key instanceof GnuDHPrivateKey)) return key; - if (key instanceof DHPublicKey) { DHPublicKey dsaKey = (DHPublicKey) key; @@ -217,7 +206,6 @@ public class DHKeyFactory BigInteger y = dsaKey.getY(); return new GnuDHPublicKey(Registry.X509_ENCODING_ID, null, p, g, y); } - if (key instanceof DHPrivateKey) { DHPrivateKey dsaKey = (DHPrivateKey) key; @@ -226,7 +214,6 @@ public class DHKeyFactory BigInteger x = dsaKey.getX(); return new GnuDHPrivateKey(Registry.PKCS8_ENCODING_ID, null, p, g, x); } - throw new InvalidKeyException("Wrong key type"); } } diff --git a/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyPairGeneratorSpi.java b/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyPairGeneratorSpi.java index 0d09d5cef2c..e26f0712479 100644 --- a/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyPairGeneratorSpi.java +++ b/libjava/classpath/gnu/javax/crypto/jce/sig/DHKeyPairGeneratorSpi.java @@ -61,12 +61,12 @@ public class DHKeyPairGeneratorSpi public void initialize(int keysize, SecureRandom random) { HashMap attributes = new HashMap(); - attributes.put(GnuDHKeyPairGenerator.PRIME_SIZE, new Integer(keysize)); + attributes.put(GnuDHKeyPairGenerator.PRIME_SIZE, Integer.valueOf(keysize)); if (random != null) attributes.put(GnuDHKeyPairGenerator.SOURCE_OF_RANDOMNESS, random); attributes.put(GnuDHKeyPairGenerator.PREFERRED_ENCODING_FORMAT, - new Integer(Registry.ASN1_ENCODING_ID)); + Integer.valueOf(Registry.ASN1_ENCODING_ID)); adaptee.setup(attributes); } @@ -87,7 +87,7 @@ public class DHKeyPairGeneratorSpi attributes.put(GnuDHKeyPairGenerator.SOURCE_OF_RANDOMNESS, random); attributes.put(GnuDHKeyPairGenerator.PREFERRED_ENCODING_FORMAT, - new Integer(Registry.ASN1_ENCODING_ID)); + Integer.valueOf(Registry.ASN1_ENCODING_ID)); adaptee.setup(attributes); } } |

