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 2007/04/03 09:13:32 UTC

[jira] Created: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

[classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
--------------------------------------------------------------------------------------------------

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


Here is a testcase:
         public void test_load_null{
             MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
             myKeyStore.load(null);
         }

        private static class MyKeyStore extends KeyStore {

        public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
                String type) {
            super(keyStoreSpi, provider, type);
        }
    }

    private static class MyKeyStoreSpi extends KeyStoreSpi {

        public Enumeration<String> engineAliases() {
            return null;
        }

        public boolean engineContainsAlias(String arg0) {
            return false;
        }

        public void engineDeleteEntry(String arg0) throws KeyStoreException {
        }

        public Certificate engineGetCertificate(String arg0) {
            return null;
        }

        public String engineGetCertificateAlias(Certificate arg0) {
            return null;
        }

        public Certificate[] engineGetCertificateChain(String arg0) {
            return null;
        }

        public Date engineGetCreationDate(String arg0) {
            return null;
        }

        public Key engineGetKey(String arg0, char[] arg1)
                throws NoSuchAlgorithmException, UnrecoverableKeyException {
            return null;
        }

        public boolean engineIsCertificateEntry(String arg0) {
            return false;
        }

        public boolean engineIsKeyEntry(String arg0) {
            return false;
        }

        public void engineLoad(InputStream arg0, char[] arg1)
                throws IOException, NoSuchAlgorithmException,
                CertificateException {
            return;
        }

        public void engineSetCertificateEntry(String arg0, Certificate arg1)
                throws KeyStoreException {
            return;
        }

        public void engineSetKeyEntry(String arg0, byte[] arg1,
                Certificate[] arg2) throws KeyStoreException {
            return;
        }

        public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
                Certificate[] arg3) throws KeyStoreException {
            return;
        }

        public int engineSize() {
            return 0;
        }

        public void engineStore(KeyStore.LoadStoreParameter param){
            return;
        }

        public void engineStore(OutputStream arg0, char[] arg1)
                throws IOException, NoSuchAlgorithmException,
                CertificateException {
            return;
        }        
    }

RI passes.
Harmony fails with IOException thrown out.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leo Li updated HARMONY-3549:
----------------------------

    Attachment: patch-3549.zip

Hi,
    In the patch, some modifications to KeyStore implementation tests have been made to accomodate the change.
    Will somebody try the patch?

Thanks,
Leo.

> [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3549
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Leo Li
>         Attachments: patch-3549.zip
>
>
> Here is a testcase:
>          public void test_load_null{
>              MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
>              myKeyStore.load(null);
>          }
>         private static class MyKeyStore extends KeyStore {
>         public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
>                 String type) {
>             super(keyStoreSpi, provider, type);
>         }
>     }
>     private static class MyKeyStoreSpi extends KeyStoreSpi {
>         public Enumeration<String> engineAliases() {
>             return null;
>         }
>         public boolean engineContainsAlias(String arg0) {
>             return false;
>         }
>         public void engineDeleteEntry(String arg0) throws KeyStoreException {
>         }
>         public Certificate engineGetCertificate(String arg0) {
>             return null;
>         }
>         public String engineGetCertificateAlias(Certificate arg0) {
>             return null;
>         }
>         public Certificate[] engineGetCertificateChain(String arg0) {
>             return null;
>         }
>         public Date engineGetCreationDate(String arg0) {
>             return null;
>         }
>         public Key engineGetKey(String arg0, char[] arg1)
>                 throws NoSuchAlgorithmException, UnrecoverableKeyException {
>             return null;
>         }
>         public boolean engineIsCertificateEntry(String arg0) {
>             return false;
>         }
>         public boolean engineIsKeyEntry(String arg0) {
>             return false;
>         }
>         public void engineLoad(InputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }
>         public void engineSetCertificateEntry(String arg0, Certificate arg1)
>                 throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, byte[] arg1,
>                 Certificate[] arg2) throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
>                 Certificate[] arg3) throws KeyStoreException {
>             return;
>         }
>         public int engineSize() {
>             return 0;
>         }
>         public void engineStore(KeyStore.LoadStoreParameter param){
>             return;
>         }
>         public void engineStore(OutputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }        
>     }
> RI passes.
> Harmony fails with IOException thrown out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leo Li closed HARMONY-3549.
---------------------------


> [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3549
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Paulex Yang
>         Attachments: patch-3549.zip
>
>
> Here is a testcase:
>          public void test_load_null{
>              MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
>              myKeyStore.load(null);
>          }
>         private static class MyKeyStore extends KeyStore {
>         public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
>                 String type) {
>             super(keyStoreSpi, provider, type);
>         }
>     }
>     private static class MyKeyStoreSpi extends KeyStoreSpi {
>         public Enumeration<String> engineAliases() {
>             return null;
>         }
>         public boolean engineContainsAlias(String arg0) {
>             return false;
>         }
>         public void engineDeleteEntry(String arg0) throws KeyStoreException {
>         }
>         public Certificate engineGetCertificate(String arg0) {
>             return null;
>         }
>         public String engineGetCertificateAlias(Certificate arg0) {
>             return null;
>         }
>         public Certificate[] engineGetCertificateChain(String arg0) {
>             return null;
>         }
>         public Date engineGetCreationDate(String arg0) {
>             return null;
>         }
>         public Key engineGetKey(String arg0, char[] arg1)
>                 throws NoSuchAlgorithmException, UnrecoverableKeyException {
>             return null;
>         }
>         public boolean engineIsCertificateEntry(String arg0) {
>             return false;
>         }
>         public boolean engineIsKeyEntry(String arg0) {
>             return false;
>         }
>         public void engineLoad(InputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }
>         public void engineSetCertificateEntry(String arg0, Certificate arg1)
>                 throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, byte[] arg1,
>                 Certificate[] arg2) throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
>                 Certificate[] arg3) throws KeyStoreException {
>             return;
>         }
>         public int engineSize() {
>             return 0;
>         }
>         public void engineStore(KeyStore.LoadStoreParameter param){
>             return;
>         }
>         public void engineStore(OutputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }        
>     }
> RI passes.
> Harmony fails with IOException thrown out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-3549:
-------------------------------------

    Component/s: Classlib
     Patch Info: [Patch Available]

> [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3549
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Attachments: patch-3549.zip
>
>
> Here is a testcase:
>          public void test_load_null{
>              MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
>              myKeyStore.load(null);
>          }
>         private static class MyKeyStore extends KeyStore {
>         public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
>                 String type) {
>             super(keyStoreSpi, provider, type);
>         }
>     }
>     private static class MyKeyStoreSpi extends KeyStoreSpi {
>         public Enumeration<String> engineAliases() {
>             return null;
>         }
>         public boolean engineContainsAlias(String arg0) {
>             return false;
>         }
>         public void engineDeleteEntry(String arg0) throws KeyStoreException {
>         }
>         public Certificate engineGetCertificate(String arg0) {
>             return null;
>         }
>         public String engineGetCertificateAlias(Certificate arg0) {
>             return null;
>         }
>         public Certificate[] engineGetCertificateChain(String arg0) {
>             return null;
>         }
>         public Date engineGetCreationDate(String arg0) {
>             return null;
>         }
>         public Key engineGetKey(String arg0, char[] arg1)
>                 throws NoSuchAlgorithmException, UnrecoverableKeyException {
>             return null;
>         }
>         public boolean engineIsCertificateEntry(String arg0) {
>             return false;
>         }
>         public boolean engineIsKeyEntry(String arg0) {
>             return false;
>         }
>         public void engineLoad(InputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }
>         public void engineSetCertificateEntry(String arg0, Certificate arg1)
>                 throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, byte[] arg1,
>                 Certificate[] arg2) throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
>                 Certificate[] arg3) throws KeyStoreException {
>             return;
>         }
>         public int engineSize() {
>             return 0;
>         }
>         public void engineStore(KeyStore.LoadStoreParameter param){
>             return;
>         }
>         public void engineStore(OutputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }        
>     }
> RI passes.
> Harmony fails with IOException thrown out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang resolved HARMONY-3549.
----------------------------------

    Resolution: Fixed

Leo, patch applied at r526041, thanks a lot for this enhancement, please verify.

> [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3549
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Paulex Yang
>         Attachments: patch-3549.zip
>
>
> Here is a testcase:
>          public void test_load_null{
>              MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
>              myKeyStore.load(null);
>          }
>         private static class MyKeyStore extends KeyStore {
>         public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
>                 String type) {
>             super(keyStoreSpi, provider, type);
>         }
>     }
>     private static class MyKeyStoreSpi extends KeyStoreSpi {
>         public Enumeration<String> engineAliases() {
>             return null;
>         }
>         public boolean engineContainsAlias(String arg0) {
>             return false;
>         }
>         public void engineDeleteEntry(String arg0) throws KeyStoreException {
>         }
>         public Certificate engineGetCertificate(String arg0) {
>             return null;
>         }
>         public String engineGetCertificateAlias(Certificate arg0) {
>             return null;
>         }
>         public Certificate[] engineGetCertificateChain(String arg0) {
>             return null;
>         }
>         public Date engineGetCreationDate(String arg0) {
>             return null;
>         }
>         public Key engineGetKey(String arg0, char[] arg1)
>                 throws NoSuchAlgorithmException, UnrecoverableKeyException {
>             return null;
>         }
>         public boolean engineIsCertificateEntry(String arg0) {
>             return false;
>         }
>         public boolean engineIsKeyEntry(String arg0) {
>             return false;
>         }
>         public void engineLoad(InputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }
>         public void engineSetCertificateEntry(String arg0, Certificate arg1)
>                 throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, byte[] arg1,
>                 Certificate[] arg2) throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
>                 Certificate[] arg3) throws KeyStoreException {
>             return;
>         }
>         public int engineSize() {
>             return 0;
>         }
>         public void engineStore(KeyStore.LoadStoreParameter param){
>             return;
>         }
>         public void engineStore(OutputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }        
>     }
> RI passes.
> Harmony fails with IOException thrown out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulex Yang reassigned HARMONY-3549:
------------------------------------

    Assignee: Paulex Yang

> [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3549
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Paulex Yang
>         Attachments: patch-3549.zip
>
>
> Here is a testcase:
>          public void test_load_null{
>              MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
>              myKeyStore.load(null);
>          }
>         private static class MyKeyStore extends KeyStore {
>         public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
>                 String type) {
>             super(keyStoreSpi, provider, type);
>         }
>     }
>     private static class MyKeyStoreSpi extends KeyStoreSpi {
>         public Enumeration<String> engineAliases() {
>             return null;
>         }
>         public boolean engineContainsAlias(String arg0) {
>             return false;
>         }
>         public void engineDeleteEntry(String arg0) throws KeyStoreException {
>         }
>         public Certificate engineGetCertificate(String arg0) {
>             return null;
>         }
>         public String engineGetCertificateAlias(Certificate arg0) {
>             return null;
>         }
>         public Certificate[] engineGetCertificateChain(String arg0) {
>             return null;
>         }
>         public Date engineGetCreationDate(String arg0) {
>             return null;
>         }
>         public Key engineGetKey(String arg0, char[] arg1)
>                 throws NoSuchAlgorithmException, UnrecoverableKeyException {
>             return null;
>         }
>         public boolean engineIsCertificateEntry(String arg0) {
>             return false;
>         }
>         public boolean engineIsKeyEntry(String arg0) {
>             return false;
>         }
>         public void engineLoad(InputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }
>         public void engineSetCertificateEntry(String arg0, Certificate arg1)
>                 throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, byte[] arg1,
>                 Certificate[] arg2) throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
>                 Certificate[] arg3) throws KeyStoreException {
>             return;
>         }
>         public int engineSize() {
>             return 0;
>         }
>         public void engineStore(KeyStore.LoadStoreParameter param){
>             return;
>         }
>         public void engineStore(OutputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }        
>     }
> RI passes.
> Harmony fails with IOException thrown out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3549) [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488043 ] 

Leo Li commented on HARMONY-3549:
---------------------------------

Verified, Thanks
Leo.

> [classlib][security]KeyStore.load(null) should not throw exception on the level of KeyStore class.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3549
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3549
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Paulex Yang
>         Attachments: patch-3549.zip
>
>
> Here is a testcase:
>          public void test_load_null{
>              MyKeyStore myKeyStore = new MyKeyStore(new MyKeyStoreSpi(), null ,"MyKeyStore");
>              myKeyStore.load(null);
>          }
>         private static class MyKeyStore extends KeyStore {
>         public MyKeyStore(KeyStoreSpi keyStoreSpi, Provider provider,
>                 String type) {
>             super(keyStoreSpi, provider, type);
>         }
>     }
>     private static class MyKeyStoreSpi extends KeyStoreSpi {
>         public Enumeration<String> engineAliases() {
>             return null;
>         }
>         public boolean engineContainsAlias(String arg0) {
>             return false;
>         }
>         public void engineDeleteEntry(String arg0) throws KeyStoreException {
>         }
>         public Certificate engineGetCertificate(String arg0) {
>             return null;
>         }
>         public String engineGetCertificateAlias(Certificate arg0) {
>             return null;
>         }
>         public Certificate[] engineGetCertificateChain(String arg0) {
>             return null;
>         }
>         public Date engineGetCreationDate(String arg0) {
>             return null;
>         }
>         public Key engineGetKey(String arg0, char[] arg1)
>                 throws NoSuchAlgorithmException, UnrecoverableKeyException {
>             return null;
>         }
>         public boolean engineIsCertificateEntry(String arg0) {
>             return false;
>         }
>         public boolean engineIsKeyEntry(String arg0) {
>             return false;
>         }
>         public void engineLoad(InputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }
>         public void engineSetCertificateEntry(String arg0, Certificate arg1)
>                 throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, byte[] arg1,
>                 Certificate[] arg2) throws KeyStoreException {
>             return;
>         }
>         public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
>                 Certificate[] arg3) throws KeyStoreException {
>             return;
>         }
>         public int engineSize() {
>             return 0;
>         }
>         public void engineStore(KeyStore.LoadStoreParameter param){
>             return;
>         }
>         public void engineStore(OutputStream arg0, char[] arg1)
>                 throws IOException, NoSuchAlgorithmException,
>                 CertificateException {
>             return;
>         }        
>     }
> RI passes.
> Harmony fails with IOException thrown out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.