[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: new security algorithms
Kaffe CVS
cvs-commits at kaffe.org
Wed Nov 10 14:50:48 PST 2004
PatchSet 5433
Date: 2004/11/10 22:46:17
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: new security algorithms
2004-11-10 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/gnu/java/security/provider/CollectionCertStoreImpl.java,
libraries/javalib/gnu/java/security/provider/EncodedKeyFactory.java,
libraries/javalib/gnu/java/security/provider/GnuDHPublicKey.java,
libraries/javalib/gnu/java/security/provider/GnuRSAPrivateKey.java,
libraries/javalib/gnu/java/security/provider/GnuRSAPublicKey.java,
libraries/javalib/gnu/java/security/provider/MD2withRSA.java,
libraries/javalib/gnu/java/security/provider/MD4withRSA.java,
libraries/javalib/gnu/java/security/provider/MD5withRSA.java,
libraries/javalib/gnu/java/security/provider/PKIXCertPathValidatorImpl.java,
libraries/javalib/gnu/java/security/provider/RSA.java,
libraries/javalib/gnu/java/security/provider/RSAKeyFactory.java,
libraries/javalib/gnu/java/security/provider/SHA1withRSA.java,
libraries/javalib/gnu/java/security/x509/GnuPKIExtension.java,
libraries/javalib/gnu/java/security/x509/PolicyNodeImpl.java,
libraries/javalib/gnu/java/security/x509/Util.java,
libraries/javalib/gnu/java/security/x509/X509CRLSelectorImpl.java,
libraries/javalib/gnu/java/security/x509/X509CertPath.java,
libraries/javalib/gnu/java/security/x509/X509CertSelectorImpl.java,
libraries/javalib/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
libraries/javalib/gnu/java/security/x509/ext/BasicConstraints.java,
libraries/javalib/gnu/java/security/x509/ext/CRLNumber.java,
libraries/javalib/gnu/java/security/x509/ext/CertificatePolicies.java,
libraries/javalib/gnu/java/security/x509/ext/ExtendedKeyUsage.java,
libraries/javalib/gnu/java/security/x509/ext/Extension.java,
libraries/javalib/gnu/java/security/x509/ext/GeneralNames.java,
libraries/javalib/gnu/java/security/x509/ext/IssuerAlternativeNames.java,
libraries/javalib/gnu/java/security/x509/ext/KeyUsage.java,
libraries/javalib/gnu/java/security/x509/ext/PolicyConstraint.java,
libraries/javalib/gnu/java/security/x509/ext/PolicyMappings.java,
libraries/javalib/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java,
libraries/javalib/gnu/java/security/x509/ext/ReasonCode.java,
libraries/javalib/gnu/java/security/x509/ext/SubjectAlternativeNames.java,
libraries/javalib/gnu/java/security/x509/ext/SubjectKeyIdentifier.java:
New files. Taken from GNU Classpath.
* libraries/javalib/Makefile.am,
libraries/javalib/Makefile.in,
libraries/javalib/all.files:
Regenerated.
* libraries/javalib/gnu/java/security/der/BitString.java,
libraries/javalib/gnu/java/security/der/DER.java,
libraries/javalib/gnu/java/security/der/DERReader.java,
libraries/javalib/gnu/java/security/der/DERValue.java,
libraries/javalib/gnu/java/security/der/DERWriter.java,
libraries/javalib/gnu/java/security/provider/Gnu.java,
libraries/javalib/gnu/java/security/provider/X509CertificateFactory.java,
libraries/javalib/gnu/java/security/x509/X500DistinguishedName.java,
libraries/javalib/gnu/java/security/x509/X509CRL.java,
libraries/javalib/gnu/java/security/x509/X509CRLEntry.java,
libraries/javalib/gnu/java/security/x509/X509Certificate.java,
libraries/javalib/java/security/cert/TrustAnchor.java:
Resynced with GNU Classpath.
2004-11-07 Casey Marshall <csm at gnu.org>
* gnu/java/security/x509/X509CertPath.java
(parse): fixed reference to 'X509CertificateImpl' from previous
checkin.
2004-11-07 Casey Marshall <csm at gnu.org>
* gnu/java/security/x509/X509CRL.java
Missed import statements in previous checkin.
2004-11-07 Casey Marshall <csm at gnu.org>
* gnu/java/security/provider/Gnu.java
(<init>): add entries in a priviliged action.
Add new algorithms.
* gnu/java/security/provider/X509CertificateFactory.java
(engineGenerateCertificate): chain exceptions.
(engineGenerateCertificates): likewise.
(engineGenerateCRL): likewise.
(engineGenerateCRLs): likewise.
(engineGenerateCertPath): new methods.
(generateCert): throw exception if 'inStream' is null.
(generateCRL): likewise.
* gnu/java/security/x509/X500DistinguishedName.java: replaced with
version from GNU Crypto CVS.
* gnu/java/security/x509/X509CRL.java: likewise.
* gnu/java/security/x509/X509CRLEntry.java: likewise.
* gnu/java/security/x509/X509Certificate.java: likewise.
* java/security/cert/TrustAnchor.java: call 'toString' and not
toRFC2253.
* gnu/java/security/provider/CollectionCertStoreImpl.java,
* gnu/java/security/provider/EncodedKeyFactory.java,
* gnu/java/security/provider/GnuDHPublicKey.java,
* gnu/java/security/provider/GnuRSAPrivateKey.java,
* gnu/java/security/provider/GnuRSAPublicKey.java,
* gnu/java/security/provider/MD2withRSA.java,
* gnu/java/security/provider/MD4withRSA.java,
* gnu/java/security/provider/MD5withRSA.java,
* gnu/java/security/provider/PKIXCertPathValidatorImpl.java,
* gnu/java/security/provider/RSA.java,
* gnu/java/security/provider/RSAKeyFactory.java,
* gnu/java/security/provider/SHA1withRSA.java,
* gnu/java/security/x509/GnuPKIExtension.java,
* gnu/java/security/x509/PolicyNodeImpl.java,
* gnu/java/security/x509/Util.java,
* gnu/java/security/x509/X509CRLSelectorImpl.java,
* gnu/java/security/x509/X509CertPath.java,
* gnu/java/security/x509/X509CertSelectorImpl.java,
* gnu/java/security/x509/ext/AuthorityKeyIdentifier.java,
* gnu/java/security/x509/ext/BasicConstraints.java,
* gnu/java/security/x509/ext/CRLNumber.java,
* gnu/java/security/x509/ext/CertificatePolicies.java,
* gnu/java/security/x509/ext/ExtendedKeyUsage.java,
* gnu/java/security/x509/ext/Extension.java,
* gnu/java/security/x509/ext/GeneralNames.java,
* gnu/java/security/x509/ext/IssuerAlternativeNames.java,
* gnu/java/security/x509/ext/KeyUsage.java,
* gnu/java/security/x509/ext/PolicyConstraint.java,
* gnu/java/security/x509/ext/PolicyMappings.java,
* gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java,
* gnu/java/security/x509/ext/ReasonCode.java,
* gnu/java/security/x509/ext/SubjectAlternativeNames.java,
* gnu/java/security/x509/ext/SubjectKeyIdentifier.java:
new files.
2004-08-14 Casey Marshall <csm at gnu.org>
Author e-mail updated for all files.
* gnu/java/security/der/BitString.java (equals): test if the
argument is an instance of BitString.
* gnu/java/security/der/DERReader.java: Removed NIO imports. Made
class final. Made fields private.
(<init>): new constructor.
(skip): new method.
(makeString): made static; don't use NIO.
(fromIso88591, fromUtf16Be, fromUtf8): new methods.
* gnu/java/security/der/DERWriter.java: fixed imports.
(writeString): don't use NIO.
(toIso88591, toUtf16Be, toUtf8): new methods.
* gnu/java/security/der/DERValue.java: formatting changes only.
* gnu/java/security/der/DER.java: likewise.
Members:
ChangeLog:1.2982->1.2983
libraries/javalib/Makefile.am:1.260->1.261
libraries/javalib/Makefile.in:1.340->1.341
libraries/javalib/all.files:1.48->1.49
libraries/javalib/gnu/java/security/der/BitString.java:1.1->1.2
libraries/javalib/gnu/java/security/der/DER.java:1.2->1.3
libraries/javalib/gnu/java/security/der/DERReader.java:1.3->1.4
libraries/javalib/gnu/java/security/der/DERValue.java:1.1->1.2
libraries/javalib/gnu/java/security/der/DERWriter.java:1.2->1.3
libraries/javalib/gnu/java/security/provider/Gnu.java:1.1->1.2
libraries/javalib/gnu/java/security/provider/X509CertificateFactory.java:1.1->1.2
libraries/javalib/gnu/java/security/x509/X500DistinguishedName.java:1.4->1.5
libraries/javalib/gnu/java/security/x509/X509CRL.java:1.2->1.3
libraries/javalib/gnu/java/security/x509/X509CRLEntry.java:1.1->1.2
libraries/javalib/gnu/java/security/x509/X509Certificate.java:1.1->1.2
libraries/javalib/java/security/cert/TrustAnchor.java:1.4->1.5
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2982 kaffe/ChangeLog:1.2983
--- kaffe/ChangeLog:1.2982 Wed Nov 10 12:27:14 2004
+++ kaffe/ChangeLog Wed Nov 10 22:46:17 2004
@@ -7,6 +7,145 @@
2004-11-10 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/gnu/java/security/provider/CollectionCertStoreImpl.java,
+ libraries/javalib/gnu/java/security/provider/EncodedKeyFactory.java,
+ libraries/javalib/gnu/java/security/provider/GnuDHPublicKey.java,
+ libraries/javalib/gnu/java/security/provider/GnuRSAPrivateKey.java,
+ libraries/javalib/gnu/java/security/provider/GnuRSAPublicKey.java,
+ libraries/javalib/gnu/java/security/provider/MD2withRSA.java,
+ libraries/javalib/gnu/java/security/provider/MD4withRSA.java,
+ libraries/javalib/gnu/java/security/provider/MD5withRSA.java,
+ libraries/javalib/gnu/java/security/provider/PKIXCertPathValidatorImpl.java,
+ libraries/javalib/gnu/java/security/provider/RSA.java,
+ libraries/javalib/gnu/java/security/provider/RSAKeyFactory.java,
+ libraries/javalib/gnu/java/security/provider/SHA1withRSA.java,
+ libraries/javalib/gnu/java/security/x509/GnuPKIExtension.java,
+ libraries/javalib/gnu/java/security/x509/PolicyNodeImpl.java,
+ libraries/javalib/gnu/java/security/x509/Util.java,
+ libraries/javalib/gnu/java/security/x509/X509CRLSelectorImpl.java,
+ libraries/javalib/gnu/java/security/x509/X509CertPath.java,
+ libraries/javalib/gnu/java/security/x509/X509CertSelectorImpl.java,
+ libraries/javalib/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
+ libraries/javalib/gnu/java/security/x509/ext/BasicConstraints.java,
+ libraries/javalib/gnu/java/security/x509/ext/CRLNumber.java,
+ libraries/javalib/gnu/java/security/x509/ext/CertificatePolicies.java,
+ libraries/javalib/gnu/java/security/x509/ext/ExtendedKeyUsage.java,
+ libraries/javalib/gnu/java/security/x509/ext/Extension.java,
+ libraries/javalib/gnu/java/security/x509/ext/GeneralNames.java,
+ libraries/javalib/gnu/java/security/x509/ext/IssuerAlternativeNames.java,
+ libraries/javalib/gnu/java/security/x509/ext/KeyUsage.java,
+ libraries/javalib/gnu/java/security/x509/ext/PolicyConstraint.java,
+ libraries/javalib/gnu/java/security/x509/ext/PolicyMappings.java,
+ libraries/javalib/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java,
+ libraries/javalib/gnu/java/security/x509/ext/ReasonCode.java,
+ libraries/javalib/gnu/java/security/x509/ext/SubjectAlternativeNames.java,
+ libraries/javalib/gnu/java/security/x509/ext/SubjectKeyIdentifier.java:
+ New files. Taken from GNU Classpath.
+
+ * libraries/javalib/Makefile.am,
+ libraries/javalib/Makefile.in,
+ libraries/javalib/all.files:
+ Regenerated.
+
+ * libraries/javalib/gnu/java/security/der/BitString.java,
+ libraries/javalib/gnu/java/security/der/DER.java,
+ libraries/javalib/gnu/java/security/der/DERReader.java,
+ libraries/javalib/gnu/java/security/der/DERValue.java,
+ libraries/javalib/gnu/java/security/der/DERWriter.java,
+ libraries/javalib/gnu/java/security/provider/Gnu.java,
+ libraries/javalib/gnu/java/security/provider/X509CertificateFactory.java,
+ libraries/javalib/gnu/java/security/x509/X500DistinguishedName.java,
+ libraries/javalib/gnu/java/security/x509/X509CRL.java,
+ libraries/javalib/gnu/java/security/x509/X509CRLEntry.java,
+ libraries/javalib/gnu/java/security/x509/X509Certificate.java,
+ libraries/javalib/java/security/cert/TrustAnchor.java:
+ Resynced with GNU Classpath.
+
+ 2004-11-07 Casey Marshall <csm at gnu.org>
+
+ * gnu/java/security/x509/X509CertPath.java
+ (parse): fixed reference to 'X509CertificateImpl' from previous
+ checkin.
+
+ 2004-11-07 Casey Marshall <csm at gnu.org>
+
+ * gnu/java/security/x509/X509CRL.java
+ Missed import statements in previous checkin.
+
+ 2004-11-07 Casey Marshall <csm at gnu.org>
+
+ * gnu/java/security/provider/Gnu.java
+ (<init>): add entries in a priviliged action.
+ Add new algorithms.
+ * gnu/java/security/provider/X509CertificateFactory.java
+ (engineGenerateCertificate): chain exceptions.
+ (engineGenerateCertificates): likewise.
+ (engineGenerateCRL): likewise.
+ (engineGenerateCRLs): likewise.
+ (engineGenerateCertPath): new methods.
+ (generateCert): throw exception if 'inStream' is null.
+ (generateCRL): likewise.
+ * gnu/java/security/x509/X500DistinguishedName.java: replaced with
+ version from GNU Crypto CVS.
+ * gnu/java/security/x509/X509CRL.java: likewise.
+ * gnu/java/security/x509/X509CRLEntry.java: likewise.
+ * gnu/java/security/x509/X509Certificate.java: likewise.
+ * java/security/cert/TrustAnchor.java: call 'toString' and not
+ toRFC2253.
+ * gnu/java/security/provider/CollectionCertStoreImpl.java,
+ * gnu/java/security/provider/EncodedKeyFactory.java,
+ * gnu/java/security/provider/GnuDHPublicKey.java,
+ * gnu/java/security/provider/GnuRSAPrivateKey.java,
+ * gnu/java/security/provider/GnuRSAPublicKey.java,
+ * gnu/java/security/provider/MD2withRSA.java,
+ * gnu/java/security/provider/MD4withRSA.java,
+ * gnu/java/security/provider/MD5withRSA.java,
+ * gnu/java/security/provider/PKIXCertPathValidatorImpl.java,
+ * gnu/java/security/provider/RSA.java,
+ * gnu/java/security/provider/RSAKeyFactory.java,
+ * gnu/java/security/provider/SHA1withRSA.java,
+ * gnu/java/security/x509/GnuPKIExtension.java,
+ * gnu/java/security/x509/PolicyNodeImpl.java,
+ * gnu/java/security/x509/Util.java,
+ * gnu/java/security/x509/X509CRLSelectorImpl.java,
+ * gnu/java/security/x509/X509CertPath.java,
+ * gnu/java/security/x509/X509CertSelectorImpl.java,
+ * gnu/java/security/x509/ext/AuthorityKeyIdentifier.java,
+ * gnu/java/security/x509/ext/BasicConstraints.java,
+ * gnu/java/security/x509/ext/CRLNumber.java,
+ * gnu/java/security/x509/ext/CertificatePolicies.java,
+ * gnu/java/security/x509/ext/ExtendedKeyUsage.java,
+ * gnu/java/security/x509/ext/Extension.java,
+ * gnu/java/security/x509/ext/GeneralNames.java,
+ * gnu/java/security/x509/ext/IssuerAlternativeNames.java,
+ * gnu/java/security/x509/ext/KeyUsage.java,
+ * gnu/java/security/x509/ext/PolicyConstraint.java,
+ * gnu/java/security/x509/ext/PolicyMappings.java,
+ * gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java,
+ * gnu/java/security/x509/ext/ReasonCode.java,
+ * gnu/java/security/x509/ext/SubjectAlternativeNames.java,
+ * gnu/java/security/x509/ext/SubjectKeyIdentifier.java:
+ new files.
+
+ 2004-08-14 Casey Marshall <csm at gnu.org>
+
+ Author e-mail updated for all files.
+ * gnu/java/security/der/BitString.java (equals): test if the
+ argument is an instance of BitString.
+ * gnu/java/security/der/DERReader.java: Removed NIO imports. Made
+ class final. Made fields private.
+ (<init>): new constructor.
+ (skip): new method.
+ (makeString): made static; don't use NIO.
+ (fromIso88591, fromUtf16Be, fromUtf8): new methods.
+ * gnu/java/security/der/DERWriter.java: fixed imports.
+ (writeString): don't use NIO.
+ (toIso88591, toUtf16Be, toUtf8): new methods.
+ * gnu/java/security/der/DERValue.java: formatting changes only.
+ * gnu/java/security/der/DER.java: likewise.
+
+2004-11-10 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/java/awt/geom/GeneralPath.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.260 kaffe/libraries/javalib/Makefile.am:1.261
--- kaffe/libraries/javalib/Makefile.am:1.260 Sun Nov 7 21:10:16 2004
+++ kaffe/libraries/javalib/Makefile.am Wed Nov 10 22:46:21 2004
@@ -146,6 +146,7 @@
$(gnu_java_security_provider_SRCS) \
$(gnu_java_security_util_SRCS) \
$(gnu_java_security_x509_SRCS) \
+ $(gnu_java_security_x509_ext_SRCS) \
$(gnu_java_text_SRCS) \
$(gnu_java_util_SRCS) \
$(gnu_java_util_prefs_SRCS) \
@@ -1302,26 +1303,60 @@
gnu/java/security/der/DERValue.java \
gnu/java/security/der/DERWriter.java
gnu_java_security_provider_SRCS = \
+ gnu/java/security/provider/CollectionCertStoreImpl.java \
gnu/java/security/provider/DSAKeyFactory.java \
gnu/java/security/provider/DSAKeyPairGenerator.java \
gnu/java/security/provider/DSAParameterGenerator.java \
gnu/java/security/provider/DSAParameters.java \
gnu/java/security/provider/DSASignature.java \
gnu/java/security/provider/DefaultPolicy.java \
+ gnu/java/security/provider/EncodedKeyFactory.java \
gnu/java/security/provider/Gnu.java \
+ gnu/java/security/provider/GnuDHPublicKey.java \
gnu/java/security/provider/GnuDSAPrivateKey.java \
gnu/java/security/provider/GnuDSAPublicKey.java \
+ gnu/java/security/provider/GnuRSAPrivateKey.java \
+ gnu/java/security/provider/GnuRSAPublicKey.java \
+ gnu/java/security/provider/MD2withRSA.java \
+ gnu/java/security/provider/MD4withRSA.java \
gnu/java/security/provider/MD5.java \
+ gnu/java/security/provider/MD5withRSA.java \
+ gnu/java/security/provider/PKIXCertPathValidatorImpl.java \
+ gnu/java/security/provider/RSA.java \
+ gnu/java/security/provider/RSAKeyFactory.java \
gnu/java/security/provider/SHA.java \
gnu/java/security/provider/SHA1PRNG.java \
+ gnu/java/security/provider/SHA1withRSA.java \
gnu/java/security/provider/X509CertificateFactory.java
gnu_java_security_util_SRCS = \
gnu/java/security/util/Prime.java
gnu_java_security_x509_SRCS = \
+ gnu/java/security/x509/GnuPKIExtension.java \
+ gnu/java/security/x509/PolicyNodeImpl.java \
+ gnu/java/security/x509/Util.java \
gnu/java/security/x509/X500DistinguishedName.java \
gnu/java/security/x509/X509CRL.java \
gnu/java/security/x509/X509CRLEntry.java \
+ gnu/java/security/x509/X509CRLSelectorImpl.java \
+ gnu/java/security/x509/X509CertPath.java \
+ gnu/java/security/x509/X509CertSelectorImpl.java \
gnu/java/security/x509/X509Certificate.java
+gnu_java_security_x509_ext_SRCS = \
+ gnu/java/security/x509/ext/AuthorityKeyIdentifier.java \
+ gnu/java/security/x509/ext/BasicConstraints.java \
+ gnu/java/security/x509/ext/CRLNumber.java \
+ gnu/java/security/x509/ext/CertificatePolicies.java \
+ gnu/java/security/x509/ext/ExtendedKeyUsage.java \
+ gnu/java/security/x509/ext/Extension.java \
+ gnu/java/security/x509/ext/GeneralNames.java \
+ gnu/java/security/x509/ext/IssuerAlternativeNames.java \
+ gnu/java/security/x509/ext/KeyUsage.java \
+ gnu/java/security/x509/ext/PolicyConstraint.java \
+ gnu/java/security/x509/ext/PolicyMappings.java \
+ gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java \
+ gnu/java/security/x509/ext/ReasonCode.java \
+ gnu/java/security/x509/ext/SubjectAlternativeNames.java \
+ gnu/java/security/x509/ext/SubjectKeyIdentifier.java
gnu_java_text_SRCS = \
gnu/java/text/AttributedFormatBuffer.java \
gnu/java/text/BaseBreakIterator.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.340 kaffe/libraries/javalib/Makefile.in:1.341
--- kaffe/libraries/javalib/Makefile.in:1.340 Sun Nov 7 21:10:16 2004
+++ kaffe/libraries/javalib/Makefile.in Wed Nov 10 22:46:21 2004
@@ -487,6 +487,7 @@
$(gnu_java_security_provider_SRCS) \
$(gnu_java_security_util_SRCS) \
$(gnu_java_security_x509_SRCS) \
+ $(gnu_java_security_x509_ext_SRCS) \
$(gnu_java_text_SRCS) \
$(gnu_java_util_SRCS) \
$(gnu_java_util_prefs_SRCS) \
@@ -1733,28 +1734,63 @@
gnu/java/security/der/DERWriter.java
gnu_java_security_provider_SRCS = \
+ gnu/java/security/provider/CollectionCertStoreImpl.java \
gnu/java/security/provider/DSAKeyFactory.java \
gnu/java/security/provider/DSAKeyPairGenerator.java \
gnu/java/security/provider/DSAParameterGenerator.java \
gnu/java/security/provider/DSAParameters.java \
gnu/java/security/provider/DSASignature.java \
gnu/java/security/provider/DefaultPolicy.java \
+ gnu/java/security/provider/EncodedKeyFactory.java \
gnu/java/security/provider/Gnu.java \
+ gnu/java/security/provider/GnuDHPublicKey.java \
gnu/java/security/provider/GnuDSAPrivateKey.java \
gnu/java/security/provider/GnuDSAPublicKey.java \
+ gnu/java/security/provider/GnuRSAPrivateKey.java \
+ gnu/java/security/provider/GnuRSAPublicKey.java \
+ gnu/java/security/provider/MD2withRSA.java \
+ gnu/java/security/provider/MD4withRSA.java \
gnu/java/security/provider/MD5.java \
+ gnu/java/security/provider/MD5withRSA.java \
+ gnu/java/security/provider/PKIXCertPathValidatorImpl.java \
+ gnu/java/security/provider/RSA.java \
+ gnu/java/security/provider/RSAKeyFactory.java \
gnu/java/security/provider/SHA.java \
gnu/java/security/provider/SHA1PRNG.java \
+ gnu/java/security/provider/SHA1withRSA.java \
gnu/java/security/provider/X509CertificateFactory.java
gnu_java_security_util_SRCS = \
gnu/java/security/util/Prime.java
gnu_java_security_x509_SRCS = \
+ gnu/java/security/x509/GnuPKIExtension.java \
+ gnu/java/security/x509/PolicyNodeImpl.java \
+ gnu/java/security/x509/Util.java \
gnu/java/security/x509/X500DistinguishedName.java \
gnu/java/security/x509/X509CRL.java \
gnu/java/security/x509/X509CRLEntry.java \
+ gnu/java/security/x509/X509CRLSelectorImpl.java \
+ gnu/java/security/x509/X509CertPath.java \
+ gnu/java/security/x509/X509CertSelectorImpl.java \
gnu/java/security/x509/X509Certificate.java
+
+gnu_java_security_x509_ext_SRCS = \
+ gnu/java/security/x509/ext/AuthorityKeyIdentifier.java \
+ gnu/java/security/x509/ext/BasicConstraints.java \
+ gnu/java/security/x509/ext/CRLNumber.java \
+ gnu/java/security/x509/ext/CertificatePolicies.java \
+ gnu/java/security/x509/ext/ExtendedKeyUsage.java \
+ gnu/java/security/x509/ext/Extension.java \
+ gnu/java/security/x509/ext/GeneralNames.java \
+ gnu/java/security/x509/ext/IssuerAlternativeNames.java \
+ gnu/java/security/x509/ext/KeyUsage.java \
+ gnu/java/security/x509/ext/PolicyConstraint.java \
+ gnu/java/security/x509/ext/PolicyMappings.java \
+ gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java \
+ gnu/java/security/x509/ext/ReasonCode.java \
+ gnu/java/security/x509/ext/SubjectAlternativeNames.java \
+ gnu/java/security/x509/ext/SubjectKeyIdentifier.java
gnu_java_text_SRCS = \
gnu/java/text/AttributedFormatBuffer.java \
Index: kaffe/libraries/javalib/all.files
diff -u kaffe/libraries/javalib/all.files:1.48 kaffe/libraries/javalib/all.files:1.49
--- kaffe/libraries/javalib/all.files:1.48 Sun Nov 7 21:10:17 2004
+++ kaffe/libraries/javalib/all.files Wed Nov 10 22:46:22 2004
@@ -885,24 +885,57 @@
gnu/java/security/der/DERReader.java
gnu/java/security/der/DERValue.java
gnu/java/security/der/DERWriter.java
+gnu/java/security/provider/CollectionCertStoreImpl.java
gnu/java/security/provider/DSAKeyFactory.java
gnu/java/security/provider/DSAKeyPairGenerator.java
gnu/java/security/provider/DSAParameterGenerator.java
gnu/java/security/provider/DSAParameters.java
gnu/java/security/provider/DSASignature.java
gnu/java/security/provider/DefaultPolicy.java
+gnu/java/security/provider/EncodedKeyFactory.java
gnu/java/security/provider/Gnu.java
+gnu/java/security/provider/GnuDHPublicKey.java
gnu/java/security/provider/GnuDSAPrivateKey.java
gnu/java/security/provider/GnuDSAPublicKey.java
+gnu/java/security/provider/GnuRSAPrivateKey.java
+gnu/java/security/provider/GnuRSAPublicKey.java
+gnu/java/security/provider/MD2withRSA.java
+gnu/java/security/provider/MD4withRSA.java
gnu/java/security/provider/MD5.java
+gnu/java/security/provider/MD5withRSA.java
+gnu/java/security/provider/PKIXCertPathValidatorImpl.java
+gnu/java/security/provider/RSA.java
+gnu/java/security/provider/RSAKeyFactory.java
gnu/java/security/provider/SHA.java
gnu/java/security/provider/SHA1PRNG.java
+gnu/java/security/provider/SHA1withRSA.java
gnu/java/security/provider/X509CertificateFactory.java
gnu/java/security/util/Prime.java
+gnu/java/security/x509/GnuPKIExtension.java
+gnu/java/security/x509/PolicyNodeImpl.java
+gnu/java/security/x509/Util.java
gnu/java/security/x509/X500DistinguishedName.java
gnu/java/security/x509/X509CRL.java
gnu/java/security/x509/X509CRLEntry.java
+gnu/java/security/x509/X509CRLSelectorImpl.java
+gnu/java/security/x509/X509CertPath.java
+gnu/java/security/x509/X509CertSelectorImpl.java
gnu/java/security/x509/X509Certificate.java
+gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
+gnu/java/security/x509/ext/BasicConstraints.java
+gnu/java/security/x509/ext/CRLNumber.java
+gnu/java/security/x509/ext/CertificatePolicies.java
+gnu/java/security/x509/ext/ExtendedKeyUsage.java
+gnu/java/security/x509/ext/Extension.java
+gnu/java/security/x509/ext/GeneralNames.java
+gnu/java/security/x509/ext/IssuerAlternativeNames.java
+gnu/java/security/x509/ext/KeyUsage.java
+gnu/java/security/x509/ext/PolicyConstraint.java
+gnu/java/security/x509/ext/PolicyMappings.java
+gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
+gnu/java/security/x509/ext/ReasonCode.java
+gnu/java/security/x509/ext/SubjectAlternativeNames.java
+gnu/java/security/x509/ext/SubjectKeyIdentifier.java
gnu/java/text/AttributedFormatBuffer.java
gnu/java/text/BaseBreakIterator.java
gnu/java/text/CharacterBreakIterator.java
Index: kaffe/libraries/javalib/gnu/java/security/der/BitString.java
diff -u kaffe/libraries/javalib/gnu/java/security/der/BitString.java:1.1 kaffe/libraries/javalib/gnu/java/security/der/BitString.java:1.2
--- kaffe/libraries/javalib/gnu/java/security/der/BitString.java:1.1 Fri Aug 15 16:58:52 2003
+++ kaffe/libraries/javalib/gnu/java/security/der/BitString.java Wed Nov 10 22:46:22 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -51,9 +51,9 @@
* <p>Where the "xxx" represents three bits that should be ignored, and
* can have any value.
*
- * @author Casey Marshall (rsdio at metastatic.org)
+ * @author Casey Marshall (csm at gnu.org)
*/
-public class BitString implements Cloneable, Comparable, java.io.Serializable
+public class BitString implements Cloneable, Comparable
{
// Fields.
@@ -288,8 +288,8 @@
public boolean equals(Object o)
{
- if (this == o)
- return true;
+ if (!(o instanceof BitString))
+ return false;
BitString that = (BitString) o;
// True for cloned instances.
if (this.bytes == that.bytes && this.ignoredBits == that.ignoredBits)
Index: kaffe/libraries/javalib/gnu/java/security/der/DER.java
diff -u kaffe/libraries/javalib/gnu/java/security/der/DER.java:1.2 kaffe/libraries/javalib/gnu/java/security/der/DER.java:1.3
--- kaffe/libraries/javalib/gnu/java/security/der/DER.java:1.2 Wed Oct 22 10:34:48 2003
+++ kaffe/libraries/javalib/gnu/java/security/der/DER.java Wed Nov 10 22:46:22 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -41,7 +41,7 @@
/**
* The set of tags for DER types.
*
- * @author Casey Marshall (rsdio at metastatic.org)
+ * @author Casey Marshall (csm at gnu.org)
*/
public interface DER
{
Index: kaffe/libraries/javalib/gnu/java/security/der/DERReader.java
diff -u kaffe/libraries/javalib/gnu/java/security/der/DERReader.java:1.3 kaffe/libraries/javalib/gnu/java/security/der/DERReader.java:1.4
--- kaffe/libraries/javalib/gnu/java/security/der/DERReader.java:1.3 Tue May 18 16:13:31 2004
+++ kaffe/libraries/javalib/gnu/java/security/der/DERReader.java Wed Nov 10 22:46:22 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -47,11 +47,6 @@
import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
@@ -65,17 +60,17 @@
* to the calling application to determine if the data are structured
* properly by inspecting the {@link DERValue} that is returned.
*
- * @author Casey Marshall (rsdio at metastatic.org)
+ * @author Casey Marshall (csm at gnu.org)
*/
-public class DERReader implements DER
+public final class DERReader implements DER
{
// Fields.
// ------------------------------------------------------------------------
- protected InputStream in;
+ private InputStream in;
- protected final ByteArrayOutputStream encBuf;
+ private final ByteArrayOutputStream encBuf;
// Constructor.
// ------------------------------------------------------------------------
@@ -90,6 +85,11 @@
this(new ByteArrayInputStream(in));
}
+ public DERReader (byte[] in, int off, int len)
+ {
+ this (new ByteArrayInputStream (in, off, len));
+ }
+
/**
* Create a new DER readed from an input stream.
*
@@ -123,6 +123,11 @@
// Instance methods.
// ------------------------------------------------------------------------
+ public void skip (int bytes) throws IOException
+ {
+ in.skip (bytes);
+ }
+
/**
* Decode a single value from the input stream, returning it in a new
* {@link DERValue}. By "single value" we mean any single type in its
@@ -251,10 +256,9 @@
throw new DEREncodingException();
}
- private String makeString(int tag, byte[] value)
+ private static String makeString(int tag, byte[] value)
throws IOException
{
- Charset charset = null;
switch (tag & 0x1F)
{
case NUMERIC_STRING:
@@ -265,28 +269,81 @@
case GRAPHIC_STRING:
case ISO646_STRING:
case GENERAL_STRING:
- charset = Charset.forName("ISO-8859-1");
- break;
+ return fromIso88591(value);
+
case UNIVERSAL_STRING:
// XXX The docs say UniversalString is encoded in four bytes
// per character, but Java has no support (yet) for UTF-32.
//return new String(buf, "UTF-32");
case BMP_STRING:
- charset = Charset.forName("UTF-16BE");
- break;
+ return fromUtf16Be(value);
+
case UTF8_STRING:
- charset = Charset.forName("UTF-8");
- break;
+ return fromUtf8(value);
+
default:
throw new DEREncodingException("unknown string tag");
}
- if (charset == null)
- throw new DEREncodingException("no decoder");
- CharsetDecoder decoder = charset.newDecoder();
- CharBuffer result = decoder.decode(ByteBuffer.wrap(value));
- char[] buf = new char[result.remaining()];
- result.get(buf);
- return new String(buf);
+ }
+
+ private static String fromIso88591(byte[] bytes)
+ {
+ StringBuffer str = new StringBuffer(bytes.length);
+ for (int i = 0; i < bytes.length; i++)
+ str.append((char) (bytes[i] & 0xFF));
+ return str.toString();
+ }
+
+ private static String fromUtf16Be(byte[] bytes) throws IOException
+ {
+ if ((bytes.length & 0x01) != 0)
+ throw new IOException("UTF-16 bytes are odd in length");
+ StringBuffer str = new StringBuffer(bytes.length / 2);
+ for (int i = 0; i < bytes.length; i += 2)
+ {
+ char c = (char) ((bytes[i] << 8) & 0xFF);
+ c |= (char) (bytes[i+1] & 0xFF);
+ str.append(c);
+ }
+ return str.toString();
+ }
+
+ private static String fromUtf8(byte[] bytes) throws IOException
+ {
+ StringBuffer str = new StringBuffer((int)(bytes.length / 1.5));
+ for (int i = 0; i < bytes.length; )
+ {
+ char c = 0;
+ if ((bytes[i] & 0xE0) == 0xE0)
+ {
+ if ((i + 2) >= bytes.length)
+ throw new IOException("short UTF-8 input");
+ c = (char) ((bytes[i++] & 0x0F) << 12);
+ if ((bytes[i] & 0x80) != 0x80)
+ throw new IOException("malformed UTF-8 input");
+ c |= (char) ((bytes[i++] & 0x3F) << 6);
+ if ((bytes[i] & 0x80) != 0x80)
+ throw new IOException("malformed UTF-8 input");
+ c |= (char) (bytes[i++] & 0x3F);
+ }
+ else if ((bytes[i] & 0xC0) == 0xC0)
+ {
+ if ((i + 1) >= bytes.length)
+ throw new IOException("short input");
+ c = (char) ((bytes[i++] & 0x1F) << 6);
+ if ((bytes[i] & 0x80) != 0x80)
+ throw new IOException("malformed UTF-8 input");
+ c |= (char) (bytes[i++] & 0x3F);
+ }
+ else if ((bytes[i] & 0xFF) < 0x80)
+ {
+ c = (char) (bytes[i++] & 0xFF);
+ }
+ else
+ throw new IOException("badly formed UTF-8 sequence");
+ str.append(c);
+ }
+ return str.toString();
}
private Date makeTime(int tag, byte[] value) throws IOException
Index: kaffe/libraries/javalib/gnu/java/security/der/DERValue.java
diff -u kaffe/libraries/javalib/gnu/java/security/der/DERValue.java:1.1 kaffe/libraries/javalib/gnu/java/security/der/DERValue.java:1.2
--- kaffe/libraries/javalib/gnu/java/security/der/DERValue.java:1.1 Fri Aug 15 16:58:53 2003
+++ kaffe/libraries/javalib/gnu/java/security/der/DERValue.java Wed Nov 10 22:46:22 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -48,15 +48,10 @@
// ------------------------------------------------------------------------
private final int tagClass;
-
private final boolean constructed;
-
private final int tag;
-
private int length;
-
private final Object value;
-
private byte[] encoded;
// Constructor.
Index: kaffe/libraries/javalib/gnu/java/security/der/DERWriter.java
diff -u kaffe/libraries/javalib/gnu/java/security/der/DERWriter.java:1.2 kaffe/libraries/javalib/gnu/java/security/der/DERWriter.java:1.3
--- kaffe/libraries/javalib/gnu/java/security/der/DERWriter.java:1.2 Mon Mar 22 11:24:24 2004
+++ kaffe/libraries/javalib/gnu/java/security/der/DERWriter.java Wed Nov 10 22:46:22 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -43,12 +43,12 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
+
import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
+
import java.text.SimpleDateFormat;
+
+import java.util.BitSet;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@@ -66,7 +66,7 @@
* <p>This class only defines static methods; there are no instance
* variables needed.
*
- * @author Casey Marshall (rsdio at metastatic.org)
+ * @author Casey Marshall (csm at gnu.org)
*/
public class DERWriter implements DER
{
@@ -82,7 +82,7 @@
// Class methods.
// ------------------------------------------------------------------------
- public static int write(OutputStream out, DERValue object)
+ public static int write(OutputStream out, DERValue object)
throws IOException
{
out.write(object.getExternalTag());
@@ -226,7 +226,6 @@
private static int writeString(OutputStream out, int tag, String str)
throws IOException
{
- Charset charset = null;
byte[] b = null;
switch (tag & 0x1F)
{
@@ -238,33 +237,65 @@
case GRAPHIC_STRING:
case ISO646_STRING:
case GENERAL_STRING:
- charset = Charset.forName("ISO-8859-1");
+ b = toIso88591(str);
break;
+
case UNIVERSAL_STRING:
case BMP_STRING:
- charset = Charset.forName("UTF-16BE");
+ b = toUtf16Be(str);
break;
+
case UTF8_STRING:
default:
- charset = Charset.forName("UTF-8");
+ b = toUtf8(str);
break;
}
- if (charset == null)
- throw new DEREncodingException("no charset");
- CharsetEncoder encoder = charset.newEncoder();
- ByteBuffer result = encoder.encode(CharBuffer.wrap(str));
- if (result.hasArray())
+ writeLength(out, b.length);
+ out.write(b);
+ return b.length;
+ }
+
+ private static byte[] toIso88591(String string)
+ {
+ byte[] result = new byte[string.length()];
+ for (int i = 0; i < string.length(); i++)
+ result[i] = (byte) string.charAt(i);
+ return result;
+ }
+
+ private static byte[] toUtf16Be(String string)
+ {
+ byte[] result = new byte[string.length() * 2];
+ for (int i = 0; i < string.length(); i++)
{
- b = result.array();
+ result[i*2 ] = (byte) ((string.charAt(i) >>> 8) & 0xFF);
+ result[i*2+1] = (byte) (string.charAt(i) & 0xFF);
}
- else
+ return result;
+ }
+
+ private static byte[] toUtf8(String string)
+ {
+ ByteArrayOutputStream buf =
+ new ByteArrayOutputStream((int)(string.length() * 1.5));
+ for (int i = 0; i < string.length(); i++)
{
- b = new byte[result.remaining()];
- result.get(b);
+ char c = string.charAt(i);
+ if (c < 0x0080)
+ buf.write(c & 0xFF);
+ else if (c < 0x0800)
+ {
+ buf.write(0xC0 | ((c >>> 6) & 0x3F));
+ buf.write(0x80 | (c & 0x3F));
+ }
+ else
+ {
+ buf.write(0xE0 | ((c >>> 12) & 0x0F));
+ buf.write(0x80 | ((c >>> 6) & 0x3F));
+ buf.write(0x80 | (c & 0x3F));
+ }
}
- writeLength(out, b.length);
- out.write(b);
- return b.length;
+ return buf.toByteArray();
}
private static int writeDate(OutputStream out, int tag, Date date)
Index: kaffe/libraries/javalib/gnu/java/security/provider/Gnu.java
diff -u kaffe/libraries/javalib/gnu/java/security/provider/Gnu.java:1.1 kaffe/libraries/javalib/gnu/java/security/provider/Gnu.java:1.2
--- kaffe/libraries/javalib/gnu/java/security/provider/Gnu.java:1.1 Sat Sep 25 16:39:58 2004
+++ kaffe/libraries/javalib/gnu/java/security/provider/Gnu.java Wed Nov 10 22:46:24 2004
@@ -7,7 +7,7 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -37,75 +37,131 @@
package gnu.java.security.provider;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.security.Provider;
public final class Gnu extends Provider
{
public Gnu()
{
- super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates");
-
- // Note that all implementation class names are referenced by using
- // Class.getName(). That way when we staticly link the Gnu provider
- // we automatically get all the implementation classes.
-
- // Signature
- put("Signature.SHA1withDSA",
- gnu.java.security.provider.DSASignature.class.getName());
-
- put("Alg.Alias.Signature.DSS", "SHA1withDSA");
- put("Alg.Alias.Signature.DSA", "SHA1withDSA");
- put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
- put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA");
- put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA");
- put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
- put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
- put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
- put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA");
- put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
- put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
- put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
-
- // Key Pair Generator
- put("KeyPairGenerator.DSA",
- gnu.java.security.provider.DSAKeyPairGenerator.class.getName());
-
- put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
- put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
- put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");
-
- // Key Factory
- put("KeyFactory.DSA",
- gnu.java.security.provider.DSAKeyFactory.class.getName());
-
- put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA");
- put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
- put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
-
- // Message Digests
- put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName());
- put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName());
-
- // Format "Alias", "Actual Name"
- put("Alg.Alias.MessageDigest.SHA1", "SHA");
- put("Alg.Alias.MessageDigest.SHA-1", "SHA");
*** Patch too long, truncated ***
More information about the kaffe
mailing list