You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2006/12/19 06:22:21 UTC

[jira] Created: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

[classlib][security]PKIXCertPathValidatorResult fails to implement clone.
-------------------------------------------------------------------------

                 Key: HARMONY-2786
                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
             Project: Harmony
          Issue Type: Bug
            Reporter: Leo Li


Here is  a testcase:

ublic final void testPKIXCertPathBuilderResult_clone()
        throws InvalidKeySpecException,
               NoSuchAlgorithmException {
        TrustAnchor ta = TestUtils.getTrustAnchor();
        if (ta == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor)");
        }
        CertPathBuilderResult r =
            new PKIXCertPathBuilderResult(
                    new MyCertPath(testEncoding),
                    ta,
                    TestUtils.getPolicyTree(),
                    testPublicKey);
             
        PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
		assertSame(r1.getCertPath(), r2.getCertPath());
		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
		assertSame(r1.getPublicKey(), r2.getPublicKey());
		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
    }

RI passes.
Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2786?page=comments#action_12459594 ] 
            
Stepan Mishura commented on HARMONY-2786:
-----------------------------------------

Hi Leo,

According to the API spec. PKIXCertPathBuilderResult class doesn't implement clone() method. The method is inherited from PKIXCertPathValidatorResult class. So if there is a difference with RI I would expect a bug in PKIXCertPathValidatorResult.clone(). 

Could you have a look?

Thanks,
Stepan.

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2786?page=all ]

Stepan Mishura updated HARMONY-2786:
------------------------------------

    Component/s: Classlib

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2786?page=all ]

Stepan Mishura resolved HARMONY-2786.
-------------------------------------

    Resolution: Fixed

Thanks Leo - modified patch was applied to SECURITY module at r488923.

Please check that the patch was applied as you expected.

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786-new.diff, patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2786?page=comments#action_12459847 ] 
            
Leo Li commented on HARMONY-2786:
---------------------------------

Thank you, Stepan. Verified.

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786-new.diff, patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2786?page=all ]

Stepan Mishura reassigned HARMONY-2786:
---------------------------------------

    Assignee: Stepan Mishura

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2786?page=all ]

Leo Li updated HARMONY-2786:
----------------------------

    Attachment: patch-2786.diff

Will somebody try the patch?

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Leo Li
>         Attachments: patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2786?page=all ]

Leo Li updated HARMONY-2786:
----------------------------

    Attachment: patch-2786-new.diff

Hi, Stepan:
      Could you help to verify my new patch and apply it if it is all right?
      Thank you.

Leo.

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786-new.diff, patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2786?page=comments#action_12459649 ] 
            
Leo Li commented on HARMONY-2786:
---------------------------------

Hi, Stepan:
      Thank you for your pointing out that. I have really made a mistake.:)
      I will give a patch then.

Leo.

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2786) [classlib][security]PKIXCertPathValidatorResult fails to implement clone.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2786?page=all ]

Stepan Mishura closed HARMONY-2786.
-----------------------------------


Verified by Leo.

> [classlib][security]PKIXCertPathValidatorResult fails to implement clone.
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2786
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2786
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2786-new.diff, patch-2786.diff
>
>
> Here is  a testcase:
> ublic final void testPKIXCertPathBuilderResult_clone()
>         throws InvalidKeySpecException,
>                NoSuchAlgorithmException {
>         TrustAnchor ta = TestUtils.getTrustAnchor();
>         if (ta == null) {
>             fail(getName() + ": not performed (could not create test TrustAnchor)");
>         }
>         CertPathBuilderResult r =
>             new PKIXCertPathBuilderResult(
>                     new MyCertPath(testEncoding),
>                     ta,
>                     TestUtils.getPolicyTree(),
>                     testPublicKey);
>              
>         PKIXCertPathBuilderResult r1 = (PKIXCertPathBuilderResult) r;
> 		PKIXCertPathBuilderResult r2 = (PKIXCertPathBuilderResult) r1.clone();
> 		assertSame(r1.getCertPath(), r2.getCertPath());
> 		assertSame(r1.getPolicyTree(), r2.getPolicyTree());
> 		assertSame(r1.getPublicKey(), r2.getPublicKey());
> 		assertSame(r1.getTrustAnchor(), r2.getTrustAnchor());    
>     }
> RI passes.
> Harmony fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira