harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r409547 - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security: provider/cert/X509CRLImpl.java provider/cert/X509CertImpl.java x501/Name.java x509/Extension.java
Date Fri, 26 May 2006 03:38:18 GMT
Author: smishura
Date: Thu May 25 20:38:17 2006
New Revision: 409547

URL: http://svn.apache.org/viewvc?rev=409547&view=rev
Log:
Adding utility method Name.getX500Principal()

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLImpl.java
  (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CertImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/Name.java
  (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Extension.java
  (contents, props changed)

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?rev=409547&r1=409546&r2=409547&view=diff
==============================================================================
--- 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
Thu May 25 20:38:17 2006
@@ -119,8 +119,7 @@
      */
     public Principal getIssuerDN() {
         if (issuer == null) {
-            issuer = new X500Principal(
-                    tbsCertList.getIssuer().getName(X500Principal.RFC2253));
+            issuer = tbsCertList.getIssuer().getX500Principal();
         }
         return issuer;
     }
@@ -130,8 +129,7 @@
      */
     public X500Principal getIssuerX500Principal() {
         if (issuer == null) {
-            issuer = new X500Principal(
-                    tbsCertList.getIssuer().getName(X500Principal.RFC2253));
+            issuer = tbsCertList.getIssuer().getX500Principal();
         }
         return issuer;
     }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/provider/cert/X509CRLImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

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?rev=409547&r1=409546&r2=409547&view=diff
==============================================================================
--- 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
Thu May 25 20:38:17 2006
@@ -152,32 +152,28 @@
 
     public Principal getIssuerDN() {
         if (issuer == null) {
-            issuer = new X500Principal(
-                    tbsCert.getIssuer().getName(X500Principal.RFC2253));
+            issuer = tbsCert.getIssuer().getX500Principal();
         }
         return issuer;
     }
 
     public X500Principal getIssuerX500Principal() {
         if (issuer == null) {
-            issuer = new X500Principal(
-                    tbsCert.getIssuer().getName(X500Principal.RFC2253));
+            issuer = tbsCert.getIssuer().getX500Principal();
         }
         return issuer;
     }
         
     public Principal getSubjectDN() {
         if (subject == null) {
-            subject = new X500Principal(
-                    tbsCert.getSubject().getName(X500Principal.RFC2253));
+            subject = tbsCert.getSubject().getX500Principal();
         }
         return subject;
     }
 
     public X500Principal getSubjectX500Principal() {
         if (subject == null) {
-            subject = new X500Principal(
-                    tbsCert.getSubject().getName(X500Principal.RFC2253));
+            subject = tbsCert.getSubject().getX500Principal();
         }
         return subject;
     }

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?rev=409547&r1=409546&r2=409547&view=diff
==============================================================================
--- 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
Thu May 25 20:38:17 2006
@@ -113,6 +113,16 @@
     }
 
     /**
+     * Returns <code>X500Principal</code> instance corresponding to this
+     * <code>Name</code> instance
+     * 
+     * @return equivalent X500Principal object
+     */
+    public X500Principal getX500Principal(){
+        return new X500Principal(getName0(X500Principal.RFC2253));
+    }
+    
+    /**
      * Returns Relative Distinguished Name as <code>String</code> according
      * the format requested
      * 

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/Name.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Extension.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Extension.java?rev=409547&r1=409546&r2=409547&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Extension.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Extension.java
Thu May 25 20:38:17 2006
@@ -491,10 +491,8 @@
             GeneralName.ASN1
         }) {
             public Object getDecodedObject(BerInputStream in) {
-                return new X500Principal(
-                    ((Name) ((GeneralName)((Object[]) in.content)[0])
-                     .getName()).getName(X500Principal.RFC2253)
-                    );
+                return ((Name) ((GeneralName) ((Object[]) in.content)[0])
+                        .getName()).getX500Principal();
             }
 
             protected void getValues(Object object, Object[] values) {

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/Extension.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message