Index: src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java =================================================================== --- src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java (revision 494820) +++ src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java (working copy) @@ -30,9 +30,6 @@ /** * This class represents ASN.1 GeneralizedTime type. * - * According to X.680 specification this type is defined as follows: - * GeneralizedTime ::= [UNIVERSAL 24] IMPLICIT VisibleString - * * @see http://asn1.elibel.tm.fr/en/standards/index.htm */ Index: src/main/java/common/org/apache/harmony/security/asn1/ASN1UTCTime.java =================================================================== --- src/main/java/common/org/apache/harmony/security/asn1/ASN1UTCTime.java (revision 494820) +++ src/main/java/common/org/apache/harmony/security/asn1/ASN1UTCTime.java (working copy) @@ -30,9 +30,6 @@ /** * This class represents ASN.1 UTCTime type * - * According to X.680 specification this type is defined as follows: - * UTCTime ::= [UNIVERSAL 23] IMPLICIT VisibleString - * * @see http://asn1.elibel.tm.fr/en/standards/index.htm */ public class ASN1UTCTime extends ASN1Time { Index: src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequest.java =================================================================== --- src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequest.java (revision 494820) +++ src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequest.java (working copy) @@ -26,17 +26,7 @@ /** * The class implements the ASN.1 DER encoding and decoding of the PKCS#10 - * Certificate Signing Request (CSR). Its ASN notation is as follows: - * - * CertificationRequest ::= SEQUENCE { - * certificationRequestInfo CertificationRequestInfo, - * signatureAlgorithm SignatureAlgorithmIdentifier, - * signature Signature - * } - * - * SignatureAlgorithmIdentifier ::= AlgorithmIdentifier - * - * Signature ::= BIT STRING + * Certificate Signing Request (CSR). */ public class CertificationRequest { @@ -126,4 +116,3 @@ } }; } - Index: src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java =================================================================== --- src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java (revision 494820) +++ src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java (working copy) @@ -32,17 +32,8 @@ import org.apache.harmony.security.x509.SubjectPublicKeyInfo; /** - CertificationRequestInfo ::= SEQUENCE { - version Version, - subject Name, - subjectPublicKeyInfo SubjectPublicKeyInfo, - attributes [0] IMPLICIT Attributes } - - Version ::= INTEGER - - Attributes ::= SET OF Attribute -*/ - + * This class implements the PKCS#10 ASN.1 type CertificationRequestInfo + */ public class CertificationRequestInfo { // version private int version; Index: src/main/java/common/org/apache/harmony/security/pkcs8/PrivateKeyInfo.java =================================================================== --- src/main/java/common/org/apache/harmony/security/pkcs8/PrivateKeyInfo.java (revision 494820) +++ src/main/java/common/org/apache/harmony/security/pkcs8/PrivateKeyInfo.java (working copy) @@ -33,24 +33,9 @@ import java.util.List; /** - * The class implements the ASN.1 DER encoding and decoding of the PKCS#8 - * PrivateKeyInfo having the following ASN.1 notation: - * - * PrivateKeyInfo ::= SEQUENCE { - * version Version, - * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, - * privateKey PrivateKey, - * attributes [0] IMPLICIT Attributes OPTIONAL } - * - * Version ::= INTEGER - * - * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier - * - * PrivateKey ::= OCTET STRING - * - * Attributes ::= SET OF Attribute + * This class implements the ASN.1 DER encoding and decoding of the PKCS#8 + * PrivateKeyInfo. */ - public class PrivateKeyInfo { private int version; Index: src/main/java/common/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java =================================================================== --- src/main/java/common/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java (revision 542786) +++ src/main/java/common/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java (working copy) @@ -38,7 +38,7 @@ public class DSAKeyFactoryImpl extends KeyFactorySpi { /** - * The method generates a DSAPrivateKey object from the provided key specification. + * This method generates a DSAPrivateKey object from the provided key specification. * * @param * keySpec - the specification (key material) for the DSAPrivateKey. @@ -66,7 +66,7 @@ } /** - * The method generates a DSAPublicKey object from the provided key specification. + * This method generates a DSAPublicKey object from the provided key specification. * * @param * keySpec - the specification (key material) for the DSAPublicKey. @@ -92,28 +92,23 @@ } throw new InvalidKeySpecException(Messages.getString("security.19D")); //$NON-NLS-1$ } - + /** - * The method returns a specification (key material) of the given key object. - * 'keySpec' identifies the specification class - * in which the key material should be returned. - * - * If it is DSAPublicKeySpec.class, the key material should be returned - * in an instance of the DSAPublicKeySpec class; - * if it is DSAPrivateKeySpec.class, the key material should be returned - * in an instance of the DSAPrivateKeySpec class. - * - * @param - * key - either DSAPrivateKey or DSAPublicKey - * @param - * keySpec - either DSAPublicKeySpec.class or DSAPublicKeySpec.class - * - * @return - * either DSAPublicKeySpec object or DSAPublicKeySpec object - * + * This method returns a specification for the supplied key. + * + * The specification will be returned in the form of an object of the type + * specified by keySpec. + * + * @param key - + * either DSAPrivateKey or DSAPublicKey + * @param keySpec - + * either DSAPrivateKeySpec.class or DSAPublicKeySpec.class + * + * @return either a DSAPrivateKeySpec or a DSAPublicKeySpec + * * @throws InvalidKeySpecException - * if "keySpec" is not s specification for DSAPublicKey or DSAPrivateKey - * + * if "keySpec" is not a specification for DSAPublicKey or + * DSAPrivateKey */ protected T engineGetKeySpec(Key key, Class keySpec) throws InvalidKeySpecException { Index: src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java =================================================================== --- src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java (revision 494820) +++ src/main/java/common/org/apache/harmony/security/utils/AlgNameMapper.java (working copy) @@ -32,40 +32,9 @@ import org.apache.harmony.security.asn1.ObjectIdentifier; /** - * Provides Algorithm Name to OID - * and OID to Algorithm Name mappings. - * Some known mappings are hardcoded. - * Tries to obtain additional mappings - * from installed providers during initialization. - * - * Hardcoded mappings - * (source: http://asn1.elibel.tm.fr): - * - * 1.2.840.10040.4.1 -> DSA - * - * 1.2.840.113549.1.1.1 -> RSA - * - * 1.2.840.113549.1.3.1 -> DiffieHellman - * - * 1.2.840.113549.1.5.3 -> PBEWithMD5AndDES - * - * 1.2.840.113549.1.12.1.3 -> pbeWithSHAAnd3-KeyTripleDES-CBC - * 1.2.840.113549.1.12.1.3 -> PBEWithSHA1AndDESede - * 1.2.840.113549.1.12.1.3 -> PBEWithSHA1AndTripleDES - * - * 1.2.840.113549.1.12.1.6 -> pbeWithSHAAnd40BitRC2-CBC - * 1.2.840.113549.1.12.1.6 -> PBEWithSHA1AndRC2_40 - * - * 1.2.840.113549.3.2 -> RC2-CBC - * 1.2.840.113549.3.3 -> RC2-EBC - * 1.2.840.113549.3.4 -> RC4 - * 1.2.840.113549.3.5 -> RC4WithMAC - * 1.2.840.113549.3.6 -> DESx-CBC - * 1.2.840.113549.3.7 -> TripleDES-CBC - * 1.2.840.113549.3.8 -> rc5CBC - * 1.2.840.113549.3.9 -> RC5-CBC - * 1.2.840.113549.3.10 -> DESCDMF (CDMFCBCPad) - * + * Provides Algorithm Name to OID and OID to Algorithm Name mappings. Some known + * mappings are hardcoded. Tries to obtain additional mappings from installed + * providers during initialization. */ public class AlgNameMapper { Index: src/main/java/common/org/apache/harmony/security/x509/tsp/MessageImprint.java =================================================================== --- src/main/java/common/org/apache/harmony/security/x509/tsp/MessageImprint.java (revision 542787) +++ src/main/java/common/org/apache/harmony/security/x509/tsp/MessageImprint.java (working copy) @@ -26,14 +26,8 @@ import org.apache.harmony.security.x509.AlgorithmIdentifier; /** - * As defined in Time-Stamp Protocol (TSP) + * Implementation of MessageImprint, as defined in Time-Stamp Protocol (TSP) * (http://www.ietf.org/rfc/rfc3161.txt) - * - * MessageImprint ::= SEQUENCE { - * hashAlgorithm AlgorithmIdentifier, - * hashedMessage OCTET STRING - * } - * */ public class MessageImprint { private final AlgorithmIdentifier algId; Index: src/main/java/common/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java =================================================================== --- src/main/java/common/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java (revision 542787) +++ src/main/java/common/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java (working copy) @@ -22,33 +22,11 @@ import java.security.InvalidParameterException; /** - Corresponds to PKIFailureInfo structure. - See RFC 3161 - - Internet X.509 Public Key Infrastructure - Time-Stamp Protocol (TSP) - http://www.ietf.org/rfc/rfc3161.txt) - - PKIFailureInfo ::= BIT STRING { - badAlg (0), - -- unrecognized or unsupported Algorithm Identifier - badRequest (2), - -- transaction not permitted or supported - badDataFormat (5), - -- the data submitted has the wrong format - timeNotAvailable (14), - -- the TSA's time source is not available - unacceptedPolicy (15), - -- the requested TSA policy is not supported by the TSA - unacceptedExtension (16), - -- the requested extension is not supported by the TSA - addInfoNotAvailable (17) - -- the additional information requested could not be understood - -- or is not available - systemFailure (25) - -- the request cannot be handled due to system failure } - - The value of PKIFailureInfo can take only one of the values, - so it is represented by an integer here. + * Corresponds to PKIFailureInfo structure. + * See RFC 3161 - + * Internet X.509 Public Key Infrastructure + * Time-Stamp Protocol (TSP) + * http://www.ietf.org/rfc/rfc3161.txt) */ public enum PKIFailureInfo { /** Index: src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatus.java =================================================================== --- src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatus.java (revision 542787) +++ src/main/java/common/org/apache/harmony/security/x509/tsp/PKIStatus.java (working copy) @@ -27,21 +27,6 @@ Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP) http://www.ietf.org/rfc/rfc3161.txt) - - PKIStatus ::= INTEGER { - granted (0), - -- when the PKIStatus contains the value zero a TimeStampToken, as - requested, is present. - grantedWithMods (1), - -- when the PKIStatus contains the value one a TimeStampToken, - with modifications, is present. - rejection (2), - waiting (3), - revocationWarning (4), - -- this message contains a warning that a revocation is - -- imminent - revocationNotification (5) - -- notification that a revocation has occurred } */ public enum PKIStatus { /** Index: src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java =================================================================== --- src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java (revision 542787) +++ src/main/java/common/org/apache/harmony/security/x509/tsp/TSTInfo.java (working copy) @@ -37,31 +37,8 @@ import org.apache.harmony.security.x509.GeneralName; /** - * As defined in Time-Stamp Protocol (TSP) + * Implementation of TSTInfo, as defined in Time-Stamp Protocol (TSP) * (http://www.ietf.org/rfc/rfc3161.txt) - * - * TSTInfo ::= SEQUENCE { - * version INTEGER { v1(1) }, - * policy TSAPolicyId, - * messageImprint MessageImprint, - * -- MUST have the same value as the similar field in - * -- TimeStampReq - * serialNumber INTEGER, - * -- Time-Stamping users MUST be ready to accommodate integers - * -- up to 160 bits. - * genTime GeneralizedTime, - * accuracy Accuracy OPTIONAL, - * ordering BOOLEAN DEFAULT FALSE, - * nonce INTEGER OPTIONAL, - * -- MUST be present if the similar field was present - * -- in TimeStampReq. In that case it MUST have the same value. - * tsa [0] GeneralName OPTIONAL, - * extensions [1] IMPLICIT Extensions OPTIONAL - * } - * - * TSAPolicyId ::= OBJECT IDENTIFIER - * - * "tsa [0] GeneralName OPTIONAL" is EXPLICIT and the word EXPLICIT is omitted. */ public class TSTInfo { Index: src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java =================================================================== --- src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java (revision 542787) +++ src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampReq.java (working copy) @@ -32,21 +32,8 @@ import org.apache.harmony.security.x509.Extensions; /** - * As defined in Time-Stamp Protocol (TSP) + * Implementation of TimeStampReq, as defined in Time-Stamp Protocol (TSP) * (http://www.ietf.org/rfc/rfc3161.txt) - * - * TimeStampReq ::= SEQUENCE { - * version INTEGER { v1(1) }, - * messageImprint MessageImprint, - * --a hash algorithm OID and the hash value of the data to be - * --time-stamped - * reqPolicy TSAPolicyId OPTIONAL, - * nonce INTEGER OPTIONAL, - * certReq BOOLEAN DEFAULT FALSE, - * extensions [0] IMPLICIT Extensions OPTIONAL - * } - * - * TSAPolicyId ::= OBJECT IDENTIFIER */ public class TimeStampReq { private final int version; Index: src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java =================================================================== --- src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java (revision 542787) +++ src/main/java/common/org/apache/harmony/security/x509/tsp/TimeStampResp.java (working copy) @@ -25,14 +25,8 @@ import org.apache.harmony.security.pkcs7.ContentInfo; /** - * As defined in Time-Stamp Protocol (TSP) + * Implementation of TimeStampResp, as defined in Time-Stamp Protocol (TSP) * (http://www.ietf.org/rfc/rfc3161.txt) - * - * TimeStampResp ::= SEQUENCE { - * status PKIStatusInfo, - * timeStampToken TimeStampToken OPTIONAL - * } - * */ public class TimeStampResp {