harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r450032 [5/6] - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java: common/java/security/ common/java/security/cert/ common/java/security/spec/ common/javax/security/cert/ common/org/apache/harmony/security/ common...
Date Tue, 26 Sep 2006 12:46:21 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/internal/nls/messages.properties?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/internal/nls/messages.properties (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/internal/nls/messages.properties Tue Sep 26 05:46:11 2006
@@ -14,3 +14,317 @@
 # 
 
 # messages for EN locale
+security.01=Algorithm is null
+security.02=Provider is null or empty string
+security.03=Provider {0} is not available
+security.04=Provider is null
+security.05=Incorrect offset/len parameters
+security.06=Null input parameter
+security.07=the type parameter is null
+security.08=the algorithm parameter is null
+security.09=the format parameter is null
+security.0A=the encoded parameter is null
+security.0B=Could not create SecretKeySpec: {0}
+security.0C=unrecognized type/format combination: {0}/{1}
+security.0D=Could not resolute key: {0}
+security.0E=unrecognized key type: {0}
+security.0F=timestamp cannot be null
+security.10=signerCertPath cannot be null
+security.100=ASN.1 implicitly tagged type is expected at [{0}]. Expected tag: {1}, but encountered tag {2}
+security.101=ASN.1 type:{0} is not designed to be encoded
+security.102=Negative tag number
+security.103=Wrong tag class
+security.104=Tag long form is not implemented
+security.105=DER: only definite length encoding MUST be used
+security.106=ASN.1 bitstring: constructed identifier at [{0}]. Not valid for DER.
+security.107=ASN.1 bitstring: wrong content at [{0}]. DER requires zero unused bits in final octet.
+security.108=ASN.1 boolean: wrong content at [{0}]. DER allows only 0x00 or 0xFF values
+security.109=ASN.1 octetstring: constructed identifier at [{0}]. Not valid for DER.
+security.10A=ASN.1 string: constructed identifier at [{0}]. Not valid for DER.
+security.10B=ASN.1 UTCTime: constructed identifier at [{0}]. Not valid for DER.
+security.10C=ASN.1 UTCTime: wrong format for DER, identifier at [{0}]
+security.10D=ASN.1 GeneralizedTime: constructed identifier at [{0}]. Not valid for DER.
+security.10E=ASN.1 choice type: {0} MUST have at least one alternative
+security.10F=ASN.1 choice type: {0} MUST have alternatives with distinct tags
+security.11={0} {1} implementation not found: {2}
+security.110=Failed to decode ASN.1 choice type.  No alternatives were found for {0}
+security.111=Wrong content length
+security.112=Decoding indefined length encoding is not provided
+security.113=Too long encoding at [{0}]
+security.114=ASN.1 Bitstring: wrong length. Tag at [{0}]
+security.115=ASN.1 Bitstring: wrong content at [{0}]. A number of unused bits MUST be in range 0 to 7
+security.116=ASN.1 Bitstring: wrong content at [{0}]. For empty string unused bits MUST be 0
+security.117=Decoding constructed ASN.1 bitstring  type is not provided
+security.118=ASN.1 bitstring identifier is expected at [{0}], but encountered: {1}
+security.119=ASN.1 enumerated identifier is expected at [{0}], but encountered: {1}
+security.11A=ASN.1 enumerated: wrong length for identifier at [{0}]
+security.11B=ASN.1 enumerated: wrong content at [{0}]. An integer MUST be encoded in minimum number of octets
+security.11C=ASN.1 boolean identifier is expected at [{0}], but encountered:{1} 
+security.11D=Wrong length for ASN.1 boolean at [{0}]
+security.11E=ASN.1 GeneralizedTime: encoded format is not implemented
+security.11F=ASN.1 GeneralizedTime wrongly encoded at [{0}]
+security.12={0}: service cannot use the parameter
+security.120=Decoding constructed ASN.1 GeneralizedTime type is not provided
+security.121=ASN.1 GeneralizedTime identifier is expected at [{0}], but encountered: {1}
+security.122=ASN.1 UTCTime: local time format is not supported.
+security.123=ASN.1 UTCTime: wrong length, identifier at [{0}]
+security.124=Decoding constructed ASN.1 UTCTime type is not provided
+security.125=ASN.1 UTCTime identifier is expected at [{0}], but encountered: {1}
+security.126=Time encoding has invalid char
+security.127=ASN.1 integer identifier is expected at [{0}], but encountered: {1}
+security.128=Wrong length for ASN.1 integer at [{0}]
+security.129=Wrong content for ASN.1 integer at [{0}]. An integer MUST be encoded in minimum number of octets
+security.12A=Decoding constructed ASN.1 octet string  type is not provided
+security.12B=ASN.1 octetstring identifier is expected at [{0}], but encountered: {1}
+security.12C=ASN.1 OID identifier is expected at [{0}], but encountered: {1}
+security.12D=Wrong length for ASN.1 object identifier at [{0}]
+security.12E=Wrong encoding at [{0}]
+security.12F=ASN.1 sequence identifier is expected at [{0}], but encountered: {1}
+security.13=Cert's public key does not match Identity's public key
+security.130=ASN.1 Sequence: mandatory value is missing at [{0}]
+security.131=Mandatory value is missing at [{0}]
+security.132=ASN.1 Sequence: mandatory value is missing at [{0}]
+security.133=Mandatory value is missing at [{0}]
+security.134=Wrong encoding at [{0}]. Content's length and encoded length are not the same
+security.135=ASN.1 sequenceOf identifier is expected at [{0}], but encountered: {1}
+security.136=ASN.1 set identifier is expected at [{0}], but encountered: {1}
+security.137=Decoding ASN.1 Set type is not provided
+security.138=ASN.1 setOf identifier is expected at [{0}], but encountered: {1}
+security.139=Decoding constructed ASN.1 string type is not provided
+security.13A=ASN.1 string type identifier is expected at [{0}], but encountered: {1}
+security.13B=Unexpected end of encoding
+security.13C=Failed to read encoded content
+security.13D=Number of unused bits MUST be in range 0-7
+security.13E=For empty bit string unused bits MUST be 0
+security.13F=ASN.1 explicitly tagged type is expected at [{0}]. Expected tag: {1}, but encountered tag {2}
+security.14=key already used in scope
+security.140=thread can not be null
+security.141=You can not modify this map.
+security.142=null context may be stored only once.
+security.143=Error expanding alias : {0}
+security.144=Self protocol is valid only in context of Principal-based grant entries
+security.145=Unknown expansion protocol : {0}
+security.146=No KeyStore to resolve signers : "{0}"
+security.147=No KeyStore to resolve principal by alias : "{0}"
+security.148=Invalid certificate for alias "{0}" : {1}. Only X509Certificate should be aliased to principals.
+security.149=Null algorithm name
+security.14A={0} {1} implementation not found
+security.14B={0} , algorithm is null
+security.14C=Provider implementation should be specified via "{0}" security property
+security.14D=Provided class {0} does not implement {1}
+security.14E=Unable to instantiate provider : {0}
+security.14F=Unknown key: {0}
+security.15=collection is read-only
+security.150=No suitable constructors found in permission class : {0}. Zero, one or two-argument constructor is expected
+security.151=Certificate Factory supports CRLs and Certificates in (PEM) ASN.1 DER encoded form, and Certification Paths in PkiPath and PKCS7 formats.
+security.152=Input Stream contains not enought data.
+security.153=Input stream should not be null.
+security.154=Invalid PKCS7 data provided
+security.155=Input Stream contains not enought data.
+security.156=Null input stream provided.
+security.157=Incorrect Base64 encoding: unexpected EOF.
+security.158=Incorrect Base64 encoding: boundary delimiter expected '{0}'
+security.159=Incorrect Base64 encoding.
+security.15A=Could not reset the stream: position became invalid or stream has not been marked.
+security.15B=Input stream should not be null.
+security.15C=Signature was not verified.
+security.15D=One of provided certificates is not X509 certificate
+security.15E=Incorrect encoded form: {0}
+security.15F=Unsupported encoding: {0}
+security.16=invalid permission: {0}
+security.160=Incorrect PKCS7 encoded form: missing signed data
+security.161=Encoding Error occurred
+security.162=null is passed to 'buf' parameter
+security.163=buf.lendth doesn't fit supplied offset and len
+security.164=\ len < digest's length (which is 20 bytes) 
+security.165=negative offset: {0}
+security.166=no byte[] passed to 'input' parameter
+security.167=input.lendth doesn't fit supplied offset and len
+security.168='privateKey' is not instanceof DSAPrivateKey
+security.169=bad p
+security.16A=bad q
+security.16B=x is not positive or >= q
+security.16C='publicKey' is not instanceof DSAPublicKey
+security.16D=y is not positive
+security.16E=invalid parameter for this engine
+security.16F=signature bytes have invalid encoding
+security.17=no more elements
+security.170=bad argument: byte[] is too small
+security.171=numBytes={0}
+security.172=OID's group is null
+security.173=No SignedData found
+security.174=Can not recognize a critical extension
+security.175=Incorrect MD
+security.176=Incorrect signature
+security.177=Illegal format: 
+security.178=Unrecognizable attribute name: {0}
+security.179=AttributeValue getDecodedObject MUST not be invoked
+security.17A=AttributeValue encodeContent MUST not be invoked
+security.17B=ObjectIdentifier: invalid static initialization - duplicate OIDs:{0}, {1}
+security.17C=ObjectIdentifier: invalid static initialization - small OID pool capacity
+security.17D=permittedSubtrees are empty
+security.17E=excludedSubtrees are empty
+security.17F=DistributionPoint MUST NOT consist of only the reasons field
+security.18=Could not store certificate
+security.180=Unknown string representation for type [{0}]
+security.181=Unknown type: [{0}]
+security.182=Specified iPAddress is not correct.
+security.183=GeneralName: unknown tag: {0}
+security.184=DNS name must start with a letter:'{0}' {1} 
+security.185=Incorrect DNS name: {0}
+security.186=Incorrect DNS name: label ends with '-': {0}
+security.187=Bad representation of uniformResourceIdentifier. It must include the scheme and a scheme-specific-part: {0}
+security.188=Bad representation of uniformResourceIdentifier. It should not be relative: {0}
+security.189=Bad representation of uniformResourceIdentifier.{0}
+security.18A=OID should consist of no less than 2 components:{0}
+security.18B=Component of IPv4 address should consist of no more than 3 decimal numbers: {0}
+security.18C=Incorrect IP representation: {0}
+security.18D=IPv4 address should consist of 4 decimal numbers: {0}
+security.18E=Incorrect IPv6 representation: '{0}'
+security.18F=IPv6 address should consist of 8 hexadecimal numbers: {0}
+security.19=Could not find CertificateFactory of type {0}
+security.190=GeneralName: scheme is missing in URI: {0}
+security.191=GeneralName: unknown tag: {0}
+security.192=Invalid distinguished name string
+security.193=ATTENTION: 'bytesRead == -1' in getLinuxRandomBits()
+security.194=ATTENTION: IOException in RandomBitsSupplier.getLinuxRandomBits()\n
+security.195=numBytes <= 0  : {0}
+security.196=ATTENTION: service is not available : no random devices
+security.197=ATTENTION: service is not available : native library is not linked
+security.198=ATTENTION: getWindowsRandom(myBytes, numBytes) returned false
+security.199={0} {1} implementation not found: 
+security.1A=Could not generate certificate
+security.1B=The value of len parameter is less than the actual digest length.
+security.1C=Invalid negative offset
+security.1D=Incorrect offset or len value
+security.1E=Parameter has already been initialized
+security.1F=Parameter has not been initialized
+security.20=invalid null permission
+security.21=Null permission
+security.22=collection is corrupted
+security.23=all-enabled flag is corrupted
+security.24=Inconsistent types of contained permissions
+security.25=Invalid state of wildcard flag
+security.26=The public key in the certificate cannot be used for digital signature purposes
+security.27=Signature object is not initialized properly.
+security.28=name must not be null
+security.29=name must not be empty
+security.2D=The value of len parameter is less than the actual signature length
+security.2E=Method initialize(AlgorithmParameterSpec params, SecureRandom random)is not supported
+security.2F=type cannot be null
+security.2A=The filter is null
+security.2B=The fillter is not in the required format
+security.2C=The key is null
+security.30=Cannot encode certificate {0}
+security.31=target type field is corrupted
+security.32=Error decoding certificate
+security.33=Not Supported operation
+security.34=ProtectionParameter is not defined
+security.35=protectionParameter is neither PasswordProtection nor CallbackHandlerProtection instance
+security.36=Password was destroyed
+security.37=ProtectionParameter object is not PasswordProtection: {0}
+security.38=Unknown KeyStore.Entry object
+security.39=entry is null
+security.3A=protParam should be PasswordProtection or CallbackHandlerProtection
+security.3B=Entry object is neither PrivateKeyObject nor SecretKeyEntrynor TrustedCertificateEntry:  {0}
+security.3C=Incorrect ProtectionParameter
+security.3D=Default CallbackHandler was not defined
+security.3E=LoadSroreParameter is null
+security.3F=alias is null
+security.40=entryClass is null
+security.41=keystore is null
+security.41=the keyStore parameter is null
+security.42=protectionParameter is null
+security.43=file is null
+security.44=File: {0} does not exist
+security.45={0} does not refer to a normal file
+security.46=getKeyStore() was not invoked
+security.47=handler is null
+security.48=privateKey is null
+security.49=chain is null
+security.4A=chain length equals 0
+security.4B=Algorithm of private key does not match algorithm of public key in end certificate of entry (with index number: 0)
+security.4C=Certificates from the given chain have different types
+security.4D=secretKey is null
+security.4E=trustCertificate is null
+security.4F=KeyStore was not initialized
+security.50=password is null
+security.51=stream is null
+security.52=Certificate chain is not defined for Private key 
+security.53=Index should be -1 when CertPath is null
+security.54=Invalid index
+security.55=the certPath parameter is null
+security.56=The OID: "{0}" is incorrect.
+security.57=The name component is not a Stirng or a byte array.
+security.58=pathLen criteria should be >= -2
+security.59=Failed to get X500Principal issuer
+security.5A=Failed to get X500Principal subject
+security.5B=the maxPathLength parameter is less than -1
+security.5C=the trustedCert parameter is null
+security.5D=the caName parameter is null
+security.5E=the caPublicKey parameter is null
+security.5F=the caName parameter is empty string
+security.60=the caPrincipal parameter is null
+security.62=The name is not a String or byte array
+security.61=issuer
+security.63=Provided parameter is null
+security.64=the trustAnchor parameter is null
+security.65=the subjectPublicKey parameter is null
+security.66=Could not create serialization object:{0}
+security.67=Could not resolve cert path: {0}
+security.68=Could not resolve certificate: {0}
+security.69=the encoded length is 0
+security.6A=the keystore is empty
+security.6B=all list elements must be of type java.security.cert.CertStore
+security.6C=all set elements must be of type java.lang.String
+security.6D=the trust anchors set is empty
+security.6E=all set elements must be of type java.security.cert.TrustAnchor
+security.6F=the trustAnchors parameter is null
+security.70=Method engineGenerateCertPath(InputStream inStream) is not supported
+security.71=Method engineGenerateCertPath(InputStream inStream, String encoding) is not supported
+security.72=Method engineGenerateCertPath(List certificates) is not supported
+security.73=Method engineGetCertPathEncodings() is not supported
+security.74=There are no CertPath encodings
+security.75=the m is not positive
+security.76=the rp is null
+security.77=the rp is invalid
+security.78=the length of ks is invalid
+security.79=the ks is invalid
+security.7A=the field parameter is null
+security.7B=the a parameter is null
+security.7C=the b parameter is null
+security.7D=the a is not in the field
+security.7E=the b is not in the field
+security.7F=invalid saltLen
+security.80=the mdName parameter is null
+security.81=mgfName is null
+security.82=invalid trailerField
+security.83=the {0} parameter is null
+security.84=the w parameter is point at infinity
+security.85=the otherPrimeInfo length is 0
+security.86=the {0} parameter is not positive
+security.87=The stream should not be null
+security.88=The data should not be null
+security.89=Expected entries are : "grant" or "keystore"
+security.8A=Expected syntax is : keystore "url"[, "type"]
+security.8B=Expected syntax is : signedby "name1,...,nameN"
+security.8C=Expected syntax is : codebase "url"
+security.8D=Expected syntax is : principal [class_name] "principal_name"
+security.8E=Expected syntax is : permission permission_class_name ["target_name"] [, "action_list"] [, signedby "name1,...,nameN"]
+security.8F=Unexpected token encountered: {0}. {1}
+security.90=Unexpected token encountered: {0}
+security.91=Class cannot be null or empty
+security.92=identity is null
+security.93=name '{0}' is already used
+security.94=key '{0}' is already used
+security.95=invalid identity's name
+security.96=identity is not found
+security.97=ASN.1 Named Bitstring: size contstrains
+security.98=OID's array is null
+security.99=OID MUST have at least 2 subidentifiers
+security.9A=Valid values for first subidentifier are 0, 1 and 2
+security.9B=If the first subidentifier has 0 or 1 value the second subidentifier value MUST be less then 40. 
+security.9C=Subidentifier MUST have positive value.
+security.9D=ObjectIdentifier string is null
+security.9E=Incorrect syntax
+security.9F=Implicit tagging can not be used for ASN.1 ANY or CHOICE type

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java Tue Sep 26 05:46:11 2006
@@ -115,22 +115,22 @@
 
     public String toString() {
         StringBuffer res = new StringBuffer();
-        res.append("-- CertificationRequestInfo:");
-        res.append("\n version: ");
+        res.append("-- CertificationRequestInfo:"); //$NON-NLS-1$
+        res.append("\n version: "); //$NON-NLS-1$
         res.append(version);
-        res.append("\n subject: ");
+        res.append("\n subject: "); //$NON-NLS-1$
         res.append(subject.getName(X500Principal.CANONICAL));
-        res.append("\n subjectPublicKeyInfo: ");
-        res.append("\n\t algorithm: "
+        res.append("\n subjectPublicKeyInfo: "); //$NON-NLS-1$
+        res.append("\n\t algorithm: " //$NON-NLS-1$
                 + subjectPublicKeyInfo.getAlgorithmIdentifier().getAlgorithm());
-        res.append("\n\t public key: " + subjectPublicKeyInfo.getPublicKey());
-        res.append("\n attributes: ");
+        res.append("\n\t public key: " + subjectPublicKeyInfo.getPublicKey()); //$NON-NLS-1$
+        res.append("\n attributes: "); //$NON-NLS-1$
         if (attributes != null) {
             res.append(attributes.toString());
         } else {
-            res.append("none");
+            res.append("none"); //$NON-NLS-1$
         }
-        res.append("\n-- CertificationRequestInfo End\n");
+        res.append("\n-- CertificationRequestInfo End\n"); //$NON-NLS-1$
         return res.toString();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/ContentInfo.java Tue Sep 26 05:46:11 2006
@@ -85,19 +85,19 @@
     
     public String toString() {
         StringBuffer res = new StringBuffer();
-        res.append("==== ContentInfo:");
-        res.append("\n== ContentType (OID): ");
+        res.append("==== ContentInfo:"); //$NON-NLS-1$
+        res.append("\n== ContentType (OID): "); //$NON-NLS-1$
         for (int i = 0; i< oid.length; i++) {
             res.append(oid[i]);
             res.append(' ');
         }
-        res.append("\n== Content: ");       
+        res.append("\n== Content: ");        //$NON-NLS-1$
         if (content != null) {
-            res.append("\n");
+            res.append("\n"); //$NON-NLS-1$
             res.append(content.toString()); 
         }    
-        res.append("\n== Content End");
-        res.append("\n==== ContentInfo End\n");
+        res.append("\n== Content End"); //$NON-NLS-1$
+        res.append("\n==== ContentInfo End\n"); //$NON-NLS-1$
         return res.toString();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignedData.java Tue Sep 26 05:46:11 2006
@@ -84,24 +84,24 @@
 
     public String toString() {
         StringBuffer res = new StringBuffer();
-        res.append("---- SignedData:");
-        res.append("\nversion: ");
+        res.append("---- SignedData:"); //$NON-NLS-1$
+        res.append("\nversion: "); //$NON-NLS-1$
         res.append(version);
-        res.append("\ndigestAlgorithms: ");
+        res.append("\ndigestAlgorithms: "); //$NON-NLS-1$
         res.append(digestAlgorithms.toString());
-        res.append("\ncontentInfo: ");
+        res.append("\ncontentInfo: "); //$NON-NLS-1$
         res.append(contentInfo.toString());
-        res.append("\ncertificates: ");
+        res.append("\ncertificates: "); //$NON-NLS-1$
         if (certificates != null) {
             res.append(certificates.toString());
         }
-        res.append("\ncrls: ");
+        res.append("\ncrls: "); //$NON-NLS-1$
         if (crls != null) {
             res.append(crls.toString());
         }
-        res.append("\nsignerInfos:\n");
+        res.append("\nsignerInfos:\n"); //$NON-NLS-1$
         res.append(signerInfos.toString());
-        res.append("\n---- SignedData End\n]");
+        res.append("\n---- SignedData End\n]"); //$NON-NLS-1$
         return res.toString();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/pkcs7/SignerInfo.java Tue Sep 26 05:46:11 2006
@@ -126,26 +126,26 @@
     
     public String toString() {
         StringBuffer res = new StringBuffer();
-        res.append("-- SignerInfo:");
-        res.append("\n version : ");
+        res.append("-- SignerInfo:"); //$NON-NLS-1$
+        res.append("\n version : "); //$NON-NLS-1$
         res.append(version);
-        res.append("\nissuerAndSerialNumber:  ");
+        res.append("\nissuerAndSerialNumber:  "); //$NON-NLS-1$
         res.append(issuer);
-        res.append("   ");
+        res.append("   "); //$NON-NLS-1$
         res.append(serialNumber);
-        res.append("\ndigestAlgorithm:  ");
+        res.append("\ndigestAlgorithm:  "); //$NON-NLS-1$
         res.append(digestAlgorithm.toString());
-        res.append("\nauthenticatedAttributes:  ");
+        res.append("\nauthenticatedAttributes:  "); //$NON-NLS-1$
         if (authenticatedAttributes != null) {
             res.append(authenticatedAttributes.toString());
         }
-        res.append("\ndigestEncryptionAlgorithm: ");
+        res.append("\ndigestEncryptionAlgorithm: "); //$NON-NLS-1$
         res.append(digestEncryptionAlgorithm.toString());
-        res.append("\nunauthenticatedAttributes: ");
+        res.append("\nunauthenticatedAttributes: "); //$NON-NLS-1$
         if (unauthenticatedAttributes != null) {
             res.append(unauthenticatedAttributes.toString());
         }
-        res.append("\n-- SignerInfo End\n");
+        res.append("\n-- SignerInfo End\n"); //$NON-NLS-1$
         return res.toString();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/Cache.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/Cache.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/Cache.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/Cache.java Tue Sep 26 05:46:11 2006
@@ -253,7 +253,7 @@
             if (idx < 0) {
                 // it will never happen because we use saved hash value
                 // (hashes[index])
-                System.out.println("WARNING! "+idx);
+                System.out.println("WARNING! "+idx); //$NON-NLS-1$
                 idx = -(idx + 1);
             }
             long new_hash_idx = (hash | (index + 1));
@@ -263,8 +263,8 @@
                 if (idx != new_idx) {
                     // it will never happen because we use the same
                     // hash and the same index in hash table
-                    System.out.println("WARNING: ");
-                    System.out.println(">> idx: "+idx+" new_idx: "+new_idx);
+                    System.out.println("WARNING: "); //$NON-NLS-1$
+                    System.out.println(">> idx: "+idx+" new_idx: "+new_idx); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             } else {
                 new_idx = -(new_idx + 1);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/DRLCertFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/DRLCertFactory.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/DRLCertFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/DRLCertFactory.java Tue Sep 26 05:46:11 2006
@@ -24,6 +24,8 @@
 import java.security.AccessController;
 import java.security.Provider;
 
+import org.apache.harmony.security.internal.nls.Messages;
+
 
 /**
  * Master class (provider) for X509 Certificate Factory
@@ -41,17 +43,16 @@
      */
     public DRLCertFactory() {
         // specification of the provider name, version, and description.
-        super("DRLCertFactory", 1.0,
-                "Certificate Factory supports CRLs and Certificates "
-                + "in (PEM) ASN.1 DER encoded form, and Certification Paths "
-                + "in PkiPath and PKCS7 formats.");
+        // security.151=Certificate Factory supports CRLs and Certificates in (PEM) ASN.1 DER encoded form, and Certification Paths in PkiPath and PKCS7 formats.
+        super("DRLCertFactory", 1.0, Messages.getString("security.151")); //$NON-NLS-1$ //$NON-NLS-2$
+                
         AccessController.doPrivileged(new java.security.PrivilegedAction() {
             public Object run() {
                 // register the service
-                put("CertificateFactory.X509",
-                    "org.apache.harmony.security.provider.cert.X509CertFactoryImpl");
+                put("CertificateFactory.X509", //$NON-NLS-1$
+                    "org.apache.harmony.security.provider.cert.X509CertFactoryImpl"); //$NON-NLS-1$
                 // mapping the alias
-                put("Alg.Alias.CertificateFactory.X.509", "X509");
+                put("Alg.Alias.CertificateFactory.X.509", "X509"); //$NON-NLS-1$ //$NON-NLS-2$
                     return null;
             }
         });

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java Tue Sep 26 05:46:11 2006
@@ -125,7 +125,7 @@
      * method documentation for more info
      */
     public String toString() {
-        return "X509CRLEntryImpl: "+rcert.toString();
+        return "X509CRLEntryImpl: "+rcert.toString(); //$NON-NLS-1$
     }
 
     // ---------------------------------------------------------------------

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLImpl.java Tue Sep 26 05:46:11 2006
@@ -45,6 +45,7 @@
 import javax.security.auth.x500.X500Principal;
 
 import org.apache.harmony.crypto.utils.AlgNameMapper;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.x509.CertificateList;
 import org.apache.harmony.security.x509.Extension;
 import org.apache.harmony.security.x509.Extensions;
@@ -409,7 +410,7 @@
         byte[] tbsEncoding = tbsCertList.getEncoded();
         signature.update(tbsEncoding, 0, tbsEncoding.length);
         if (!signature.verify(crl.getSignatureValue())) {
-            throw new SignatureException("Signature was not verified.");
+            throw new SignatureException(Messages.getString("security.15C")); //$NON-NLS-1$
         }
     }
 
@@ -427,7 +428,7 @@
         byte[] tbsEncoding = tbsCertList.getEncoded();
         signature.update(tbsEncoding, 0, tbsEncoding.length);
         if (!signature.verify(crl.getSignatureValue())) {
-            throw new SignatureException("Signature was not verified.");
+            throw new SignatureException(Messages.getString("security.15C")); //$NON-NLS-1$
         }
     }
 
@@ -451,7 +452,7 @@
      * method documentation for more info
      */
     public String toString() {
-        return "X509CRLImpl: " + crl.toString();
+        return "X509CRLImpl: " + crl.toString(); //$NON-NLS-1$
     }
 
     // ---------------------------------------------------------------------

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java Tue Sep 26 05:46:11 2006
@@ -39,6 +39,7 @@
 import org.apache.harmony.luni.util.Base64;
 import org.apache.harmony.security.asn1.ASN1Constants;
 import org.apache.harmony.security.asn1.BerInputStream;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.pkcs7.ContentInfo;
 import org.apache.harmony.security.pkcs7.SignedData;
 import org.apache.harmony.security.x509.CertificateList;
@@ -84,7 +85,7 @@
     public Certificate engineGenerateCertificate(InputStream inStream)
             throws CertificateException {
         if (inStream == null) {
-            throw new CertificateException("Input stream should not be null.");
+            throw new CertificateException(Messages.getString("security.15B")); //$NON-NLS-1$
         }
         try {
             if (!inStream.markSupported()) {
@@ -98,11 +99,11 @@
             // read the prefix of the encoding
             if (inStream.read(buff) < 28) {
                 throw new CertificateException(
-                        "Input Stream contains not enought data.");
+                        Messages.getString("security.152")); //$NON-NLS-1$
             }
             // check whether the provided certificate is in PEM encoded form
-            if ("-----BEGIN CERTIFICATE-----".equals(new String(buff, 0, 27))) {
-                byte[] encoding = decodePEM(inStream, "CERTIFICATE");
+            if ("-----BEGIN CERTIFICATE-----".equals(new String(buff, 0, 27))) { //$NON-NLS-1$
+                byte[] encoding = decodePEM(inStream, "CERTIFICATE"); //$NON-NLS-1$
                 
                 long hash = CERT_CASHE.getHash(encoding);
                 if (CERT_CASHE.contains(hash)) {
@@ -163,7 +164,7 @@
             engineGenerateCertificates(InputStream inStream)
                 throws CertificateException {
         if (inStream == null) {
-            throw new CertificateException("Input stream should not be null.");
+            throw new CertificateException(Messages.getString("security.153")); //$NON-NLS-1$
         }
         ArrayList result = new ArrayList();
         try {
@@ -179,7 +180,7 @@
                 // check the boundary delimiter
                 byte[] delimiter = new byte[20];
                 inStream.read(delimiter);
-                if (new String(delimiter).startsWith("----BEGIN PKCS7-----")) {
+                if (new String(delimiter).startsWith("----BEGIN PKCS7-----")) { //$NON-NLS-1$
                     // this is PEM encoded PKCS7 structure
                     isPKCS7 = true;
                     isPEM = true;
@@ -201,13 +202,13 @@
                 ContentInfo info;
                 if (isPEM) {
                     info = (ContentInfo) 
-                        ContentInfo.ASN1.decode(decodePEM(inStream, "PKCS7"));
+                        ContentInfo.ASN1.decode(decodePEM(inStream, "PKCS7")); //$NON-NLS-1$
                 } else {
                     info = (ContentInfo) ContentInfo.ASN1.decode(inStream);
                 }
                 SignedData data = info.getSignedData();
                 if (data == null) {
-                    throw new CertificateException("Invalid PKCS7 data provided");
+                    throw new CertificateException(Messages.getString("security.154")); //$NON-NLS-1$
                 }
                 List certificates = data.getCertificates();
                 if (certificates != null) {
@@ -239,7 +240,7 @@
     public CRL engineGenerateCRL(InputStream inStream)
             throws CRLException {
         if (inStream == null) {
-            throw new CRLException("Input stream should not be null.");
+            throw new CRLException(Messages.getString("security.153")); //$NON-NLS-1$
         }
         try {
             if (!inStream.markSupported()) {
@@ -253,11 +254,11 @@
             // read the prefix of the encoding
             if (inStream.read(buff) < 25) {
                 throw new CRLException(
-                        "Input Stream contains not enought data.");
+                        Messages.getString("security.155")); //$NON-NLS-1$
             }
             // check whether the provided crl is in PEM encoded form
-            if ("-----BEGIN X509 CRL-----".equals(new String(buff, 0, 24))) {
-                byte[] encoding = decodePEM(inStream, "X509 CRL");
+            if ("-----BEGIN X509 CRL-----".equals(new String(buff, 0, 24))) { //$NON-NLS-1$
+                byte[] encoding = decodePEM(inStream, "X509 CRL"); //$NON-NLS-1$
                 long hash = CRL_CASHE.getHash(encoding);
                 if (CRL_CASHE.contains(hash)) {
                     X509CRL res = (X509CRL) CRL_CASHE.get(hash, encoding);
@@ -300,7 +301,7 @@
     public Collection<? extends CRL> engineGenerateCRLs(InputStream inStream)
             throws CRLException {
         if (inStream == null) {
-            throw new CRLException("Null input stream provided.");
+            throw new CRLException(Messages.getString("security.156")); //$NON-NLS-1$
         }
         ArrayList result = new ArrayList();
         try {
@@ -315,7 +316,7 @@
                 // check the boundary delimiter
                 byte[] delimiter = new byte[20];
                 inStream.read(delimiter);
-                if (new String(delimiter).startsWith("----BEGIN PKCS7-----")) {
+                if (new String(delimiter).startsWith("----BEGIN PKCS7-----")) { //$NON-NLS-1$
                     // this is PEM encoded PKCS7 structure
                     isPKCS7 = true;
                     isPEM = true;
@@ -338,14 +339,14 @@
                 ContentInfo info;
                 if (isPEM) {
                     info = (ContentInfo) 
-                        ContentInfo.ASN1.decode(decodePEM(inStream, "PKCS7"));
+                        ContentInfo.ASN1.decode(decodePEM(inStream, "PKCS7")); //$NON-NLS-1$
                 } else {
                     info = (ContentInfo) ContentInfo.ASN1.decode(inStream);
                 }
                 // retrieve SignedData
                 SignedData data = info.getSignedData();
                 if (data == null) {
-                    throw new CRLException("Invalid PKCS7 data provided");
+                    throw new CRLException(Messages.getString("security.154")); //$NON-NLS-1$
                 }
                 List crls = data.getCRLs();
                 if (crls != null) {
@@ -417,7 +418,7 @@
         while ((ch = inStream.read()) != '-') {
             if (ch == -1) {
                 throw new IOException(
-                        "Incorrect Base64 encoding: unexpected EOF.");
+                        Messages.getString("security.157")); //$NON-NLS-1$
             }
             buff[index++] = (byte) ch;
             if (index == size) {
@@ -430,13 +431,12 @@
         }
         // Check the boundary delimiter 
         // one '-' has been already read
-        String boundary_delimiter = "----END " + boundary_mark + "-----";
+        String boundary_delimiter = "----END " + boundary_mark + "-----"; //$NON-NLS-1$ //$NON-NLS-2$
         byte[] tmp = new byte[boundary_delimiter.length()];
         inStream.read(tmp);
         if (!new String(tmp).startsWith(boundary_delimiter)) {
             throw new IOException(
-                "Incorrect Base64 encoding: boundary delimiter expected '"
-                + boundary_delimiter + "'");
+                Messages.getString("security.158", boundary_delimiter));//$NON-NLS-1$
         }
         // skip trailing line breaks
         inStream.mark(1);
@@ -446,7 +446,7 @@
         inStream.reset();
         buff = Base64.decode(buff, index);
         if (buff == null) {
-            throw new IOException("Incorrect Base64 encoding.");
+            throw new IOException(Messages.getString("security.159")); //$NON-NLS-1$
         }
         return buff;
     };
@@ -596,8 +596,7 @@
             if (pos >= 0) {
                 pos = (end + 1) % BUFF_SIZE;
             } else {
-                throw new IOException("Could not reset the stream: "
-                    + "position became invalid or stream has not been marked.");
+                throw new IOException(Messages.getString("security.15A")); //$NON-NLS-1$
             }
         }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertImpl.java Tue Sep 26 05:46:11 2006
@@ -45,6 +45,7 @@
 import javax.security.auth.x500.X500Principal;
 
 import org.apache.harmony.crypto.utils.AlgNameMapper;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.x509.Certificate;
 import org.apache.harmony.security.x509.Extension;
 import org.apache.harmony.security.x509.Extensions;
@@ -502,7 +503,7 @@
         // compute and verify the signature
         signature.update(tbsCertificate, 0, tbsCertificate.length);
         if (!signature.verify(certificate.getSignatureValue())) {
-            throw new SignatureException("Signature was not verified.");
+            throw new SignatureException(Messages.getString("security.15C")); //$NON-NLS-1$
         }
     }
 
@@ -525,7 +526,7 @@
         // compute and verify the signature
         signature.update(tbsCertificate, 0, tbsCertificate.length);
         if (!signature.verify(certificate.getSignatureValue())) {
-            throw new SignatureException("Signature was not verified.");
+            throw new SignatureException(Messages.getString("security.15C")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertPathImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertPathImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertPathImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertPathImpl.java Tue Sep 26 05:46:11 2006
@@ -37,6 +37,7 @@
 import org.apache.harmony.security.asn1.ASN1Any;
 import org.apache.harmony.security.asn1.ASN1SequenceOf;
 import org.apache.harmony.security.asn1.BerInputStream;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.pkcs7.ContentInfo;
 import org.apache.harmony.security.pkcs7.SignedData;
 import org.apache.harmony.security.x509.Certificate;
@@ -79,7 +80,7 @@
 
     // supported encoding names
     private static final String[] encodingsArr =
-                                        new String[] {"PkiPath", "PKCS7"};
+                                        new String[] {"PkiPath", "PKCS7"}; //$NON-NLS-1$ //$NON-NLS-2$
     static final List encodings = Collections.unmodifiableList(
                                             Arrays.asList(encodingsArr));
     // the list of certificates representing this certification path
@@ -96,14 +97,14 @@
      * is not an instance of subclass of X509Certificate.
      */
     public X509CertPathImpl(List certs) throws CertificateException {
-        super("X.509");
+        super("X.509"); //$NON-NLS-1$
         int size = certs.size();
         certificates = new ArrayList(size);
         for (int i=0; i<size; i++) {
             Object cert = certs.get(i);
             if (!(cert instanceof X509Certificate) ) {
                 throw new CertificateException(
-                        "One of provided certificates is not X509 certificate");
+                        Messages.getString("security.15D")); //$NON-NLS-1$
             }
             certificates.add(cert);
         }
@@ -119,7 +120,7 @@
      * @param encoding - encoded form of certification path.
      */
     private X509CertPathImpl(List certs, int type, byte[] encoding) {
-        super("X.509");
+        super("X.509"); //$NON-NLS-1$
         if (type == PKI_PATH) {
             this.pkiPathEncoding = encoding;
         } else { // PKCS7
@@ -141,8 +142,8 @@
         try {
             return (X509CertPathImpl) ASN1.decode(in);
         } catch (IOException e) {
-            throw new CertificateException("Incorrect encoded form: "
-                    + e.getMessage());
+            throw new CertificateException(Messages.getString("security.15E", //$NON-NLS-1$
+                    e.getMessage()));
         }
     }
 
@@ -157,7 +158,7 @@
         throws CertificateException {
         if (!encodings.contains(encoding)) {
             throw new CertificateException(
-                    "Unsupported encoding: "+encoding);
+                    Messages.getString("security.15F", encoding)); //$NON-NLS-1$
         }
         try {
             if (encodingsArr[0].equals(encoding)) {
@@ -169,7 +170,7 @@
                 SignedData sd = ci.getSignedData();
                 if (sd == null) {
                     throw new CertificateException(
-                        "Incorrect PKCS7 encoded form: missing signed data");
+                        Messages.getString("security.160")); //$NON-NLS-1$
                 }
                 List certs = sd.getCertificates();
                 if (certs == null) {
@@ -183,8 +184,8 @@
                 return new X509CertPathImpl(result, PKCS7, ci.getEncoded());
             }
         } catch (IOException e) {
-            throw new CertificateException("Incorrect encoded form: "
-                    + e.getMessage());
+            throw new CertificateException(Messages.getString("security.15E", //$NON-NLS-1$
+                    e.getMessage()));
         }
     }
 
@@ -199,8 +200,8 @@
         try {
             return (X509CertPathImpl) ASN1.decode(in);
         } catch (IOException e) {
-            throw new CertificateException("Incorrect encoded form: "
-                    + e.getMessage());
+            throw new CertificateException(Messages.getString("security.15E", //$NON-NLS-1$
+                    e.getMessage()));
         }
     }
 
@@ -215,7 +216,7 @@
         throws CertificateException {
         if (!encodings.contains(encoding)) {
             throw new CertificateException(
-                    "Unsupported encoding: "+encoding);
+                    Messages.getString("security.15F", encoding)); //$NON-NLS-1$
         }
         try {
             if (encodingsArr[0].equals(encoding)) {
@@ -227,7 +228,7 @@
                 SignedData sd = ci.getSignedData();
                 if (sd == null) {
                     throw new CertificateException(
-                        "Incorrect PKCS7 encoded form: missing signed data");
+                        Messages.getString("security.160")); //$NON-NLS-1$
                 }
                 List certs = sd.getCertificates();
                 if (certs == null) {
@@ -240,8 +241,8 @@
                 return new X509CertPathImpl(result, PKCS7, ci.getEncoded());
             }
         } catch (IOException e) {
-            throw new CertificateException("Incorrect encoded form: "
-                    + e.getMessage());
+            throw new CertificateException(Messages.getString("security.15E", //$NON-NLS-1$
+                    e.getMessage()));
         }
     }
 
@@ -278,7 +279,7 @@
         throws CertificateEncodingException {
         if (!encodings.contains(encoding)) {
             throw new CertificateEncodingException(
-                    "Unsupported encoding: "+encoding);
+                    Messages.getString("security.15F", encoding)); //$NON-NLS-1$
         }
         if (encodingsArr[0].equals(encoding)) {
             // PkiPath encoded form
@@ -358,7 +359,7 @@
                                 cp.certificates.get(i)).getEncoded());
                 }
             } catch (CertificateEncodingException e) {
-                throw new IllegalArgumentException("Encoding Error occurred");
+                throw new IllegalArgumentException(Messages.getString("security.161")); //$NON-NLS-1$
             }
             return encodings;
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/CryptoProvider.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/CryptoProvider.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/CryptoProvider.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/CryptoProvider.java Tue Sep 26 05:46:11 2006
@@ -37,45 +37,45 @@
      */
     public CryptoProvider() {
 
-        super("Crypto", 1.0,
-                "HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)");
+        super("Crypto", 1.0, //$NON-NLS-1$
+                "HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)"); //$NON-NLS-1$
 
         //  names of classes implementing services
-        final String MD_NAME = "org.apache.harmony.security.provider.crypto.SHA1_MessageDigestImpl";
-        final String SR_NAME = "org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl";
+        final String MD_NAME = "org.apache.harmony.security.provider.crypto.SHA1_MessageDigestImpl"; //$NON-NLS-1$
+        final String SR_NAME = "org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl"; //$NON-NLS-1$
 
-        final String SIGN_NAME = "org.apache.harmony.security.provider.crypto.SHA1withDSA_SignatureImpl";
+        final String SIGN_NAME = "org.apache.harmony.security.provider.crypto.SHA1withDSA_SignatureImpl"; //$NON-NLS-1$
 
-        final String SIGN_ALIAS = "SHA1withDSA";
+        final String SIGN_ALIAS = "SHA1withDSA"; //$NON-NLS-1$
 
         AccessController.doPrivileged(new java.security.PrivilegedAction() {
 
             public Object run() {
 
-                put("MessageDigest.SHA-1", MD_NAME);
-                put("MessageDigest.SHA-1 ImplementedIn", "Software");
-                put("Alg.Alias.MessageDigest.SHA1", "SHA-1");
-                put("Alg.Alias.MessageDigest.SHA", "SHA-1");
+                put("MessageDigest.SHA-1", MD_NAME); //$NON-NLS-1$
+                put("MessageDigest.SHA-1 ImplementedIn", "Software"); //$NON-NLS-1$ //$NON-NLS-2$
+                put("Alg.Alias.MessageDigest.SHA1", "SHA-1"); //$NON-NLS-1$ //$NON-NLS-2$
+                put("Alg.Alias.MessageDigest.SHA", "SHA-1"); //$NON-NLS-1$ //$NON-NLS-2$
 
                 if (RandomBitsSupplier.isServiceAvailable()) {
-                    put("SecureRandom.SHA1PRNG", SR_NAME);
-                    put("SecureRandom.SHA1PRNG ImplementedIn", "Software");
+                    put("SecureRandom.SHA1PRNG", SR_NAME); //$NON-NLS-1$
+                    put("SecureRandom.SHA1PRNG ImplementedIn", "Software"); //$NON-NLS-1$ //$NON-NLS-2$
                 }
 
-                put("Signature.SHA1withDSA", SIGN_NAME);
-                put("Signature.SHA1withDSA ImplementedIn", "Software");
-                put("Alg.Alias.Signature.SHAwithDSA", SIGN_ALIAS);
-                put("Alg.Alias.Signature.DSAwithSHA1", SIGN_ALIAS);
-                put("Alg.Alias.Signature.SHA1/DSA", SIGN_ALIAS);
-                put("Alg.Alias.Signature.SHA/DSA", SIGN_ALIAS);
-                put("Alg.Alias.Signature.SHA-1/DSA", SIGN_ALIAS);
-                put("Alg.Alias.Signature.DSA", SIGN_ALIAS);
-                put("Alg.Alias.Signature.DSS", SIGN_ALIAS);
-
-                put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", SIGN_ALIAS);
-                put("Alg.Alias.Signature.1.2.840.10040.4.3", SIGN_ALIAS);
-                put("Alg.Alias.Signature.1.3.14.3.2.13", SIGN_ALIAS);
-                put("Alg.Alias.Signature.1.3.14.3.2.27", SIGN_ALIAS);
+                put("Signature.SHA1withDSA", SIGN_NAME); //$NON-NLS-1$
+                put("Signature.SHA1withDSA ImplementedIn", "Software"); //$NON-NLS-1$ //$NON-NLS-2$
+                put("Alg.Alias.Signature.SHAwithDSA", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.DSAwithSHA1", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.SHA1/DSA", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.SHA/DSA", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.SHA-1/DSA", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.DSA", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.DSS", SIGN_ALIAS); //$NON-NLS-1$
+
+                put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.1.2.840.10040.4.3", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.1.3.14.3.2.13", SIGN_ALIAS); //$NON-NLS-1$
+                put("Alg.Alias.Signature.1.3.14.3.2.27", SIGN_ALIAS); //$NON-NLS-1$
 
                 return null;
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java Tue Sep 26 05:46:11 2006
@@ -20,6 +20,7 @@
 import java.security.InvalidParameterException;
 import java.security.SecureRandomSpi;
 
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.provider.crypto.RandomBitsSupplier;
 import org.apache.harmony.security.provider.crypto.SHA1Impl;
 
@@ -205,7 +206,7 @@
 
         if (seed == null) {
             throw new NullPointerException(
-                    "null is passed to the 'seed' argument");
+                    Messages.getString("security.83", "seed")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         if (state == NEXT_BYTES) { // first setSeed after NextBytes; restoring hash
@@ -236,7 +237,7 @@
         byte[] myBytes; // byte[] for bytes returned by "nextBytes()"
 
         if (numBytes < 0) {
-            throw new NegativeArraySizeException("numBytes=" + numBytes);
+            throw new NegativeArraySizeException(Messages.getString("security.171", numBytes)); //$NON-NLS-1$
         }
         if (numBytes == 0) {
             return new byte[0];
@@ -281,7 +282,7 @@
 
         if (bytes == null) {
             throw new NullPointerException(
-                    "null is passed to the 'bytes' argument");
+                    Messages.getString("security.83", "bytes")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         lastWord = seed[BYTES_OFFSET] == 0 ? 0

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_Data.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_Data.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_Data.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_Data.java Tue Sep 26 05:46:11 2006
@@ -84,11 +84,11 @@
     /**
      *  name of native library to use on Windows platform
      */
-    static final String LIBRARY_NAME = "hysecurity"; 
+    static final String LIBRARY_NAME = "hysecurity";  //$NON-NLS-1$
 
 
     /**
      *  names of random devices on Linux platform
      */
-    static final String DEVICE_NAMES[] = { "/dev/urandom", "/dev/random"};
+    static final String DEVICE_NAMES[] = { "/dev/urandom", "/dev/random"}; //$NON-NLS-1$ //$NON-NLS-2$
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java Tue Sep 26 05:46:11 2006
@@ -23,6 +23,7 @@
 
 import java.util.Arrays;
 
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.provider.crypto.SHA1_Data;
 import org.apache.harmony.security.provider.crypto.SHA1Impl;
 
@@ -211,17 +212,17 @@
     protected int engineDigest(byte[] buf, int offset, int len) throws DigestException { 
 
         if ( buf == null ) {
-            throw new IllegalArgumentException("null is passed to 'buf' parameter"); 
+            throw new IllegalArgumentException(Messages.getString("security.162"));  //$NON-NLS-1$
         }
         if ( offset > buf.length || len > buf.length || (len + offset) > buf.length ) {
             throw new IllegalArgumentException(
-               "buf.lendth doesn't fit supplied offset and len");
+               Messages.getString("security.163")); //$NON-NLS-1$
         }
         if ( len < DIGEST_LENGTH ) {
-            throw new DigestException(" len < digest's length (which is 20 bytes) ");
+            throw new DigestException(Messages.getString("security.164")); //$NON-NLS-1$
         }
         if ( offset < 0 ) {
-            throw new ArrayIndexOutOfBoundsException("negative offset: " + offset);
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("security.165", offset)); //$NON-NLS-1$
         }
 
         processDigest(buf, offset);
@@ -303,17 +304,17 @@
     protected void engineUpdate(byte[] input, int offset, int len) {
 
         if ( input == null ) {
-            throw new IllegalArgumentException("no byte[] passed to 'input' parameter"); 
+            throw new IllegalArgumentException(Messages.getString("security.166"));  //$NON-NLS-1$
         }
         if ( len <= 0 ) {
             return;
         }
         if ( offset < 0 ) {
-            throw new ArrayIndexOutOfBoundsException("offset < 0 : " + offset);
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("security.165", offset)); //$NON-NLS-1$
         }
         if ( offset > input.length || len > input.length || (len + offset) > input.length ) {
             throw new IllegalArgumentException(
-               "input.lendth doesn't fit supplied offset and len");
+               Messages.getString("security.167")); //$NON-NLS-1$
         }
 
         SHA1Impl.updateHash(buffer, input, offset, offset + len -1 );

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java Tue Sep 26 05:46:11 2006
@@ -35,6 +35,8 @@
 
 import java.security.MessageDigest;
 
+import org.apache.harmony.security.internal.nls.Messages;
+
 public class SHA1withDSA_SignatureImpl extends Signature {
 
     private MessageDigest msgDigest;
@@ -46,9 +48,9 @@
      */
     public SHA1withDSA_SignatureImpl() throws NoSuchAlgorithmException {
 
-        super("SHA1withDSA");
+        super("SHA1withDSA"); //$NON-NLS-1$
 
-        msgDigest = MessageDigest.getInstance("SHA1");
+        msgDigest = MessageDigest.getInstance("SHA1"); //$NON-NLS-1$
     }
 
     /**
@@ -60,7 +62,7 @@
     protected Object engineGetParameter(String param)
             throws InvalidParameterException {
         if (param == null) {
-            throw new NullPointerException("null argument");
+            throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$
         }
         return null;
     }
@@ -86,7 +88,7 @@
 
         if (privateKey == null || !(privateKey instanceof DSAPrivateKey)) {
             throw new InvalidKeyException(
-                    "'privateKey' is not instanceof DSAPrivateKey");
+                    Messages.getString("security.168")); //$NON-NLS-1$
         }
 
         params = ((DSAPrivateKey) privateKey).getParams();
@@ -99,13 +101,13 @@
         n = p.bitLength();
         if (p.compareTo(BigInteger.valueOf(1)) != 1 || n < 512 || n > 1024
                 || (n & 077) != 0) {
-            throw new InvalidKeyException("bad p");
+            throw new InvalidKeyException(Messages.getString("security.169")); //$NON-NLS-1$
         }
         if (q.signum() != 1 && q.bitLength() != 160) {
-            throw new InvalidKeyException("bad q");
+            throw new InvalidKeyException(Messages.getString("security.16A")); //$NON-NLS-1$
         }
         if (x.signum() != 1 || x.compareTo(q) != -1) {
-            throw new InvalidKeyException("x is not positive or >= q");
+            throw new InvalidKeyException(Messages.getString("security.16B")); //$NON-NLS-1$
         }
 
         dsaKey = (DSAKey) privateKey;
@@ -132,7 +134,7 @@
 
         if (publicKey == null || !(publicKey instanceof DSAPublicKey)) {
             throw new InvalidKeyException(
-                    "'publicKey' is not instanceof DSAPublicKey");
+                    Messages.getString("security.16C")); //$NON-NLS-1$
         }
 
         DSAParams params = ((DSAPublicKey) publicKey).getParams();
@@ -145,13 +147,13 @@
         n1 = p.bitLength();
         if (p.compareTo(BigInteger.valueOf(1)) != 1 || n1 < 512 || n1 > 1024
                 || (n1 & 077) != 0) {
-            throw new InvalidKeyException("bad p");
+            throw new InvalidKeyException(Messages.getString("security.169")); //$NON-NLS-1$
         }
         if (q.signum() != 1 || q.bitLength() != 160) {
-            throw new InvalidKeyException("bad q");
+            throw new InvalidKeyException(Messages.getString("security.16A")); //$NON-NLS-1$
         }
         if (y.signum() != 1) {
-            throw new InvalidKeyException("y is not positive");
+            throw new InvalidKeyException(Messages.getString("security.16D")); //$NON-NLS-1$
         }
 
         dsaKey = (DSAKey) publicKey;
@@ -168,9 +170,9 @@
     protected void engineSetParameter(String param, Object value)
             throws InvalidParameterException {
         if (param == null) {
-            throw new NullPointerException("null is passed for 'param'");
+            throw new NullPointerException(Messages.getString("security.83", "param")); //$NON-NLS-1$ //$NON-NLS-2$
         }
-        throw new InvalidParameterException("invalid parameter for this engine");
+        throw new InvalidParameterException(Messages.getString("security.16E")); //$NON-NLS-1$
     }
 
     /**
@@ -345,13 +347,12 @@
                     || sigBytes[offset + 1] != (n1 + n2 + 4) || n1 > 21
                     || n2 > 21
                     || (length != 0 && (sigBytes[offset + 1] + 2) > length)) {
-                throw new SignatureException(
-                        "signature bytes have invalid encoding");
+                throw new SignatureException(Messages.getString("security.16F")); //$NON-NLS-1$
             }
 
             dummy = sigBytes[5 + n1 + n2]; // to check length of sigBytes
         } catch (ArrayIndexOutOfBoundsException e) {
-            throw new SignatureException("bad argument: byte[] is too small");
+            throw new SignatureException(Messages.getString("security.170")); //$NON-NLS-1$
         }
 
         digest = msgDigest.digest();
@@ -405,7 +406,7 @@
     protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
 
         if (sigBytes == null) {
-            throw new NullPointerException("null passed for 'sigBytes'");
+            throw new NullPointerException(Messages.getString("security.83", "sigBytes")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         return checkSignature(sigBytes, 0, 0);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/Array.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/Array.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/Array.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/Array.java Tue Sep 26 05:46:11 2006
@@ -44,11 +44,11 @@
         // Prefixes to be added to the offset values
         // in <code>String toString(byte[], String)</code> method
         final String[] offsetPrefix = {
-                "",
-                "000",
-                "00",
-                "0",
-                ""
+                "", //$NON-NLS-1$
+                "000", //$NON-NLS-1$
+                "00", //$NON-NLS-1$
+                "0", //$NON-NLS-1$
+                "" //$NON-NLS-1$
         };
         StringBuilder sb = new StringBuilder();
         StringBuilder charForm = new StringBuilder();
@@ -92,12 +92,12 @@
         if (i%16 != 0) {
             int ws2add = 16 - i%16;
             for (int j=0; j<ws2add; j++) {
-                sb.append("   ");
+                sb.append("   "); //$NON-NLS-1$
             }
             if (ws2add > 8) {
                 sb.append(' ');
             }
-            sb.append("  ");
+            sb.append("  "); //$NON-NLS-1$
             sb.append(charForm.toString());
             sb.append('\n');
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/JarUtils.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/JarUtils.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/JarUtils.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/JarUtils.java Tue Sep 26 05:46:11 2006
@@ -39,6 +39,7 @@
 import javax.security.auth.x500.X500Principal;
 
 import org.apache.harmony.security.asn1.BerInputStream;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.pkcs7.ContentInfo;
 import org.apache.harmony.security.pkcs7.SignedData;
 import org.apache.harmony.security.pkcs7.SignerInfo;
@@ -71,7 +72,7 @@
         ContentInfo info = (ContentInfo)ContentInfo.ASN1.decode(bis);      
         SignedData signedData = info.getSignedData();
         if (signedData == null) {
-            throw new IOException("No SignedData found");
+            throw new IOException(Messages.getString("security.173")); //$NON-NLS-1$
         }
         Collection encCerts = signedData.getCertificates();
         if (encCerts.isEmpty()) {
@@ -111,7 +112,7 @@
         }
 
         if (certs[issuerSertIndex].hasUnsupportedCriticalExtension()) {
-            throw new SecurityException("Can not recognize a critical extension");
+            throw new SecurityException(Messages.getString("security.174")); //$NON-NLS-1$
         }
 
         // Get Signature instance
@@ -120,7 +121,7 @@
         String dea = sigInfo.getDigestEncryptionAlgorithm();
         String alg = null;
         if (da != null && dea != null) {
-            alg = da + "with" +  dea;
+            alg = da + "with" +  dea; //$NON-NLS-1$
             try{ 
                 sig = Signature.getInstance(alg);
             } catch (NoSuchAlgorithmException e) {}
@@ -164,13 +165,13 @@
                 MessageDigest md = MessageDigest.getInstance(sigInfo.getDigestAlgorithm());
                 byte[] computedDigest = md.digest(sfBytes);
                 if (!Arrays.equals(existingDigest, computedDigest)) {
-                    throw new SecurityException("Incorrect MD");
+                    throw new SecurityException(Messages.getString("security.175")); //$NON-NLS-1$
                 }
             }
         }
 
         if (!sig.verify(sigInfo.getEncryptedDigest())) {
-            throw new SecurityException("Incorrect signature");
+            throw new SecurityException(Messages.getString("security.176")); //$NON-NLS-1$
         }
 
         return createChain(certs[issuerSertIndex], certs);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/utils/ObjectIdentifier.java Tue Sep 26 05:46:11 2006
@@ -22,6 +22,8 @@
 
 import java.util.Arrays;
 
+import org.apache.harmony.security.internal.nls.Messages;
+
 /**
  * Instance of this class represents ObjectIdentifier (OID).
  * 
@@ -85,7 +87,7 @@
         this(oid);
 
         if (oidGroup == null) {
-            throw new NullPointerException("OID's group is null");
+            throw new NullPointerException(Messages.getString("security.172")); //$NON-NLS-1$
         }
         this.group = oidGroup;
 
@@ -143,7 +145,7 @@
      */
     public String toOIDString() {
         if (sOID == null) {
-            sOID = "OID." + toString();
+            sOID = "OID." + toString(); //$NON-NLS-1$
         }
         return sOID;
     }
@@ -187,21 +189,20 @@
     public static void validateOid(int[] oid) {
 
         if (oid == null) {
-            throw new NullPointerException("OID's array is null");
+            throw new NullPointerException(Messages.getString("security.98")); //$NON-NLS-1$
         }
 
         if (oid.length < 2) {
             throw new IllegalArgumentException(
-                    "OID MUST have at least 2 subidentifiers");
+                    Messages.getString("security.99")); //$NON-NLS-1$
         }
 
         if (oid[0] > 2) {
             throw new IllegalArgumentException(
-                    "Valid values for first subidentifier are 0, 1 and 2");
+                    Messages.getString("security.9A")); //$NON-NLS-1$
         } else if (oid[0] != 2 && oid[1] > 39) {
             throw new IllegalArgumentException(
-                    "If the first subidentifier has 0 or 1 value the second "
-                            + "subidentifier MUST be less then 40.");
+                    Messages.getString("security.9B")); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java Tue Sep 26 05:46:11 2006
@@ -35,6 +35,7 @@
 import org.apache.harmony.security.asn1.ASN1Type;
 import org.apache.harmony.security.asn1.BerInputStream;
 import org.apache.harmony.security.asn1.BerOutputStream;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.utils.ObjectIdentifier;
 
 
@@ -135,47 +136,47 @@
         KNOWN_OIDS = new ObjectIdentifier[SIZE][CAPACITY];
 
         // init known attribute type keywords
-        C = new ObjectIdentifier(new int[] { 2, 5, 4, 6 }, "C", RFC1779_NAMES);
-        CN = new ObjectIdentifier(new int[] { 2, 5, 4, 3 }, "CN", RFC1779_NAMES);
+        C = new ObjectIdentifier(new int[] { 2, 5, 4, 6 }, "C", RFC1779_NAMES); //$NON-NLS-1$
+        CN = new ObjectIdentifier(new int[] { 2, 5, 4, 3 }, "CN", RFC1779_NAMES); //$NON-NLS-1$
 
         DC = new ObjectIdentifier(
-                new int[] { 0, 9, 2342, 19200300, 100, 1, 25 }, "DC",
+                new int[] { 0, 9, 2342, 19200300, 100, 1, 25 }, "DC", //$NON-NLS-1$
                 RFC2253_NAMES);
         // DN qualifier aliases
-        DNQ = new ObjectIdentifier(new int[] { 2, 5, 4, 46 }, "DNQ",
+        DNQ = new ObjectIdentifier(new int[] { 2, 5, 4, 46 }, "DNQ", //$NON-NLS-1$
                 RFC2459_NAMES);
         DNQUALIFIER = new ObjectIdentifier(new int[] { 2, 5, 4, 46 },
-                "DNQUALIFIER", RFC2459_NAMES);
+                "DNQUALIFIER", RFC2459_NAMES); //$NON-NLS-1$
 
         EMAILADDRESS = new ObjectIdentifier(new int[] { 1, 2, 840, 113549, 1,
-                9, 1 }, "EMAILADDRESS", RFC2459_NAMES);
+                9, 1 }, "EMAILADDRESS", RFC2459_NAMES); //$NON-NLS-1$
 
         GENERATION = new ObjectIdentifier(new int[] { 2, 5, 4, 44 },
-                "GENERATION", RFC2459_NAMES);
+                "GENERATION", RFC2459_NAMES); //$NON-NLS-1$
         GIVENNAME = new ObjectIdentifier(new int[] { 2, 5, 4, 42 },
-                "GIVENNAME", RFC2459_NAMES);
+                "GIVENNAME", RFC2459_NAMES); //$NON-NLS-1$
 
-        INITIALS = new ObjectIdentifier(new int[] { 2, 5, 4, 43 }, "INITIALS",
+        INITIALS = new ObjectIdentifier(new int[] { 2, 5, 4, 43 }, "INITIALS", //$NON-NLS-1$
                 RFC2459_NAMES);
 
-        L = new ObjectIdentifier(new int[] { 2, 5, 4, 7 }, "L", RFC1779_NAMES);
+        L = new ObjectIdentifier(new int[] { 2, 5, 4, 7 }, "L", RFC1779_NAMES); //$NON-NLS-1$
 
-        O = new ObjectIdentifier(new int[] { 2, 5, 4, 10 }, "O", RFC1779_NAMES);
-        OU = new ObjectIdentifier(new int[] { 2, 5, 4, 11 }, "OU",
+        O = new ObjectIdentifier(new int[] { 2, 5, 4, 10 }, "O", RFC1779_NAMES); //$NON-NLS-1$
+        OU = new ObjectIdentifier(new int[] { 2, 5, 4, 11 }, "OU", //$NON-NLS-1$
                 RFC1779_NAMES);
 
         SERIALNUMBER = new ObjectIdentifier(new int[] { 2, 5, 4, 5 },
-                "SERIALNUMBER", RFC2459_NAMES);
-        ST = new ObjectIdentifier(new int[] { 2, 5, 4, 8 }, "ST", RFC1779_NAMES);
-        STREET = new ObjectIdentifier(new int[] { 2, 5, 4, 9 }, "STREET",
+                "SERIALNUMBER", RFC2459_NAMES); //$NON-NLS-1$
+        ST = new ObjectIdentifier(new int[] { 2, 5, 4, 8 }, "ST", RFC1779_NAMES); //$NON-NLS-1$
+        STREET = new ObjectIdentifier(new int[] { 2, 5, 4, 9 }, "STREET", //$NON-NLS-1$
                 RFC1779_NAMES);
-        SURNAME = new ObjectIdentifier(new int[] { 2, 5, 4, 4 }, "SURNAME",
+        SURNAME = new ObjectIdentifier(new int[] { 2, 5, 4, 4 }, "SURNAME", //$NON-NLS-1$
                 RFC2459_NAMES);
 
-        T = new ObjectIdentifier(new int[] { 2, 5, 4, 12 }, "T", RFC2459_NAMES);
+        T = new ObjectIdentifier(new int[] { 2, 5, 4, 12 }, "T", RFC2459_NAMES); //$NON-NLS-1$
 
         UID = new ObjectIdentifier(
-                new int[] { 0, 9, 2342, 19200300, 100, 1, 1 }, "UID",
+                new int[] { 0, 9, 2342, 19200300, 100, 1, 1 }, "UID", //$NON-NLS-1$
                 RFC2253_NAMES);
 
         //
@@ -284,7 +285,7 @@
         } else {
             this.oid = (ObjectIdentifier) KNOWN_NAMES.get(sOid.toUpperCase());
             if (this.oid == null) {
-                throw new IOException("Unrecognizable attribute name: " + sOid);
+                throw new IOException(Messages.getString("security.178", sOid)); //$NON-NLS-1$
             }
         }
         this.value = value;
@@ -409,8 +410,7 @@
 
         public Object getDecodedObject(BerInputStream in) throws IOException {
             // stub to avoid wrong decoder usage
-            throw new RuntimeException(
-                    "AttributeValue getDecodedObject MUST not be invoked");
+            throw new RuntimeException(Messages.getString("security.179")); //$NON-NLS-1$
         }
 
         //
@@ -455,8 +455,7 @@
 
         public void encodeContent(BerOutputStream out) {
             // stub to avoid wrong encoder usage
-            throw new RuntimeException(
-                    "AttributeValue encodeContent MUST not be invoked");
+            throw new RuntimeException(Messages.getString("security.17A")); //$NON-NLS-1$
         }
 
         public int getEncodedLength(BerOutputStream out) { //FIXME name
@@ -517,17 +516,14 @@
 
             // check wrong static initialization: no duplicate OIDs
             if (Arrays.equals(newOid, list[i].getOid())) {
-                throw new Error(
-                        "ObjectIdentifier: invalid static initialization"
-                                + " - duplicate OIDs:" + oid.getName() + ", "
-                                + list[i].getName());
+                throw new Error(Messages.getString("security.17B", //$NON-NLS-1$
+                                oid.getName(), list[i].getName()));
             }
         }
 
         // check : to avoid NPE
         if (i == (CAPACITY - 1)) {
-            throw new Error("ObjectIdentifier: invalid static initialization"
-                    + " - small OID pool capacity");
+            throw new Error(Messages.getString("security.17C")); //$NON-NLS-1$
         }
         list[i] = oid;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/Name.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/Name.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/Name.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/Name.java Tue Sep 26 05:46:11 2006
@@ -35,6 +35,7 @@
 import org.apache.harmony.security.asn1.ASN1SetOf;
 import org.apache.harmony.security.asn1.BerInputStream;
 import org.apache.harmony.security.asn1.DerInputStream;
+import org.apache.harmony.security.internal.nls.Messages;
 import org.apache.harmony.security.x509.DNParser;
 
 
@@ -69,7 +70,7 @@
         DerInputStream in = new DerInputStream(encoding);
 
         if (in.getEndOffset() != encoding.length) {
-            throw new IOException("Wrong content length");
+            throw new IOException(Messages.getString("security.111")); //$NON-NLS-1$
         }
 
         ASN1.decode(in);
@@ -163,7 +164,7 @@
             return canonicalString;
 
         } else {
-            throw new IllegalArgumentException("Illegal format: " + format);
+            throw new IllegalArgumentException(Messages.getString("security.177", format)); //$NON-NLS-1$
         }
     }
 
@@ -199,7 +200,7 @@
                 if (it.hasNext()) {
                     // multi-valued RDN
                     if (X500Principal.RFC1779 == format) {
-                        name.append(" + ");
+                        name.append(" + "); //$NON-NLS-1$
                     } else {
                         name.append('+');
                     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/CRLDistributionPoints.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/CRLDistributionPoints.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/CRLDistributionPoints.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/CRLDistributionPoints.java Tue Sep 26 05:46:11 2006
@@ -28,6 +28,7 @@
 import org.apache.harmony.security.asn1.ASN1SequenceOf;
 import org.apache.harmony.security.asn1.ASN1Type;
 import org.apache.harmony.security.asn1.BerInputStream;
+import org.apache.harmony.security.internal.nls.Messages;
 
 /**
  * The class incapsulates the ASN.1 DER encoding/decoding work 
@@ -72,7 +73,7 @@
     public CRLDistributionPoints(List distributionPoints) {
         if ((distributionPoints == null) 
                 || (distributionPoints.size() == 0)) {
-            throw new IllegalArgumentException("permittedSubtrees are empty");
+            throw new IllegalArgumentException(Messages.getString("security.17D")); //$NON-NLS-1$
         }
         this.distributionPoints = distributionPoints;
     }
@@ -80,7 +81,7 @@
     public CRLDistributionPoints(List distributionPoints, byte[] encoding) {
         if ((distributionPoints == null) 
                 || (distributionPoints.size() == 0)) {
-            throw new IllegalArgumentException("permittedSubtrees are empty");
+            throw new IllegalArgumentException(Messages.getString("security.17D")); //$NON-NLS-1$
         }
         this.distributionPoints = distributionPoints;
         this.encoding = encoding;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Certificate.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Certificate.java?view=diff&rev=450032&r1=450031&r2=450032
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Certificate.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Certificate.java Tue Sep 26 05:46:11 2006
@@ -112,17 +112,17 @@
 
     public String toString() {
         StringBuffer res = new StringBuffer();
-        res.append("X509 Certificate: \n[");
-        res.append("\n  tbsCertificate:\n  [");
+        res.append("X509 Certificate: \n["); //$NON-NLS-1$
+        res.append("\n  tbsCertificate:\n  ["); //$NON-NLS-1$
         res.append(tbsCertificate.toString());
-        res.append("\n  ]");
-        res.append("\n  signatureAlgorithm:\n  [");
+        res.append("\n  ]"); //$NON-NLS-1$
+        res.append("\n  signatureAlgorithm:\n  ["); //$NON-NLS-1$
         res.append(signatureAlgorithm.toString());
-        res.append("\n  ]");
-        res.append("\n  signatureValue:\n  [");
+        res.append("\n  ]"); //$NON-NLS-1$
+        res.append("\n  signatureValue:\n  ["); //$NON-NLS-1$
         //res.append(Arrays.toString(signatureValue));
-        res.append("\n  ]");
-        res.append("\n]");
+        res.append("\n  ]"); //$NON-NLS-1$
+        res.append("\n]"); //$NON-NLS-1$
         return res.toString();
     }
     



Mime
View raw message