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/15 06:26:21 UTC
[jira] Created: (HARMONY-2724)
[classlib][security]AlgorithmParameters.init(byte[] params, String spec)
throws NullPointerException while spec is Null on Harmony while not on RI.
[classlib][security]AlgorithmParameters.init(byte[] params, String spec) throws NullPointerException while spec is Null on Harmony while not on RI.
---------------------------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-2724
URL: http://issues.apache.org/jira/browse/HARMONY-2724
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Leo Li
Here is a testcase:
public void test_algorithmParameters_init() throws Exception
{
AlgorithmParameters params = AlgorithmParameters.getInstance("DSA");
params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
BigInteger.ONE));
byte[] encoded = params.getEncoded();
AlgorithmParameters params2 = AlgorithmParameters.getInstance("DSA");
params2.init(encoded, "ASN.1");
byte[] encodedAfter2 = params2.getEncoded();
//Regression Test
AlgorithmParameters params3 = AlgorithmParameters.getInstance("DSA");
params3.init(encoded, null);
byte[] encodedAfter3 = params3.getEncoded();
assertTrue("param encoded is different", Arrays.equals(encodedAfter2,
encodedAfter3));
}
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-2724)
[classlib][security]AlgorithmParameters.init(byte[] params, String spec)
throws NullPointerException while spec is Null on Harmony while not on RI.
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2724?page=comments#action_12458983 ]
Leo Li commented on HARMONY-2724:
---------------------------------
Hi, Stepan:
I think from spec, there shows no difference between algorithmParameters.init(byte []) and algorithmParameters(byte[],. null).
What is your opinion?:)
> [classlib][security]AlgorithmParameters.init(byte[] params, String spec) throws NullPointerException while spec is Null on Harmony while not on RI.
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2724
> URL: http://issues.apache.org/jira/browse/HARMONY-2724
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Leo Li
> Assigned To: Stepan Mishura
>
> Here is a testcase:
> public void test_algorithmParameters_init() throws Exception
> {
> AlgorithmParameters params = AlgorithmParameters.getInstance("DSA");
> params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
> BigInteger.ONE));
> byte[] encoded = params.getEncoded();
> AlgorithmParameters params2 = AlgorithmParameters.getInstance("DSA");
> params2.init(encoded, "ASN.1");
> byte[] encodedAfter2 = params2.getEncoded();
>
> //Regression Test
> AlgorithmParameters params3 = AlgorithmParameters.getInstance("DSA");
> params3.init(encoded, null);
> byte[] encodedAfter3 = params3.getEncoded();
> assertTrue("param encoded is different", Arrays.equals(encodedAfter2,
> encodedAfter3));
> }
> 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-2724)
[classlib][security]AlgorithmParameters.init(byte[] params, String spec)
throws NullPointerException while spec is Null on Harmony while not on RI.
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2724?page=comments#action_12459666 ]
Leo Li commented on HARMONY-2724:
---------------------------------
Hi, Stepan:
Maybe we shall ask bouncy castle guys how to deal with it.
Leo
> [classlib][security]AlgorithmParameters.init(byte[] params, String spec) throws NullPointerException while spec is Null on Harmony while not on RI.
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2724
> URL: http://issues.apache.org/jira/browse/HARMONY-2724
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Leo Li
> Assigned To: Stepan Mishura
>
> Here is a testcase:
> public void test_algorithmParameters_init() throws Exception
> {
> AlgorithmParameters params = AlgorithmParameters.getInstance("DSA");
> params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
> BigInteger.ONE));
> byte[] encoded = params.getEncoded();
> AlgorithmParameters params2 = AlgorithmParameters.getInstance("DSA");
> params2.init(encoded, "ASN.1");
> byte[] encodedAfter2 = params2.getEncoded();
>
> //Regression Test
> AlgorithmParameters params3 = AlgorithmParameters.getInstance("DSA");
> params3.init(encoded, null);
> byte[] encodedAfter3 = params3.getEncoded();
> assertTrue("param encoded is different", Arrays.equals(encodedAfter2,
> encodedAfter3));
> }
> 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-2724)
[classlib][security]AlgorithmParameters.init(byte[] params, String spec)
throws NullPointerException while spec is Null on Harmony while not on RI.
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li closed HARMONY-2724.
---------------------------
Resolution: Won't Fix
Hi, all:
The bouncy castle guys said that they would deal with it in the future.
Good luck!
Leo.
> [classlib][security]AlgorithmParameters.init(byte[] params, String spec) throws NullPointerException while spec is Null on Harmony while not on RI.
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2724
> URL: https://issues.apache.org/jira/browse/HARMONY-2724
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Leo Li
> Assigned To: Stepan Mishura
>
> Here is a testcase:
> public void test_algorithmParameters_init() throws Exception
> {
> AlgorithmParameters params = AlgorithmParameters.getInstance("DSA");
> params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
> BigInteger.ONE));
> byte[] encoded = params.getEncoded();
> AlgorithmParameters params2 = AlgorithmParameters.getInstance("DSA");
> params2.init(encoded, "ASN.1");
> byte[] encodedAfter2 = params2.getEncoded();
>
> //Regression Test
> AlgorithmParameters params3 = AlgorithmParameters.getInstance("DSA");
> params3.init(encoded, null);
> byte[] encodedAfter3 = params3.getEncoded();
> assertTrue("param encoded is different", Arrays.equals(encodedAfter2,
> encodedAfter3));
> }
> RI passes.
> Harmony fails.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-2724)
[classlib][security]AlgorithmParameters.init(byte[] params, String spec)
throws NullPointerException while spec is Null on Harmony while not on RI.
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2724?page=all ]
Stepan Mishura reassigned HARMONY-2724:
---------------------------------------
Assignee: Stepan Mishura
> [classlib][security]AlgorithmParameters.init(byte[] params, String spec) throws NullPointerException while spec is Null on Harmony while not on RI.
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2724
> URL: http://issues.apache.org/jira/browse/HARMONY-2724
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Leo Li
> Assigned To: Stepan Mishura
>
> Here is a testcase:
> public void test_algorithmParameters_init() throws Exception
> {
> AlgorithmParameters params = AlgorithmParameters.getInstance("DSA");
> params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
> BigInteger.ONE));
> byte[] encoded = params.getEncoded();
> AlgorithmParameters params2 = AlgorithmParameters.getInstance("DSA");
> params2.init(encoded, "ASN.1");
> byte[] encodedAfter2 = params2.getEncoded();
>
> //Regression Test
> AlgorithmParameters params3 = AlgorithmParameters.getInstance("DSA");
> params3.init(encoded, null);
> byte[] encodedAfter3 = params3.getEncoded();
> assertTrue("param encoded is different", Arrays.equals(encodedAfter2,
> encodedAfter3));
> }
> 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-2724)
[classlib][security]AlgorithmParameters.init(byte[] params, String spec)
throws NullPointerException while spec is Null on Harmony while not on RI.
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2724?page=comments#action_12459555 ]
Stepan Mishura commented on HARMONY-2724:
-----------------------------------------
Leo,
I did the same as for HARMONY-2733, HARMONY-2680 - I added test case which shows that null value should be passed to SPI provider's method.
I can not say that there is no difference - the spec. doesn't say it explicitly. Also a guide that describes how to implement a security crypto provider says:
" ... All API methods of an API object are declared "final", and their implementations invoke the corresponding SPI methods of the encapsulated SPI object ... "
By analogy, we have engine class (AlgorithmParameters) and corresponding abstract SPI class (AlgorithmParametersSpi), so
AlgorithmParameters.init(byte[]) = invokes => AlgorithmParametersSpi.engineInit(byte[])
AlgorithmParameters.init(byte[],String) = invokes => AlgorithmParametersSpi.engineInit(byte[],String)
Thanks,
Stepan.
> [classlib][security]AlgorithmParameters.init(byte[] params, String spec) throws NullPointerException while spec is Null on Harmony while not on RI.
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2724
> URL: http://issues.apache.org/jira/browse/HARMONY-2724
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Leo Li
> Assigned To: Stepan Mishura
>
> Here is a testcase:
> public void test_algorithmParameters_init() throws Exception
> {
> AlgorithmParameters params = AlgorithmParameters.getInstance("DSA");
> params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
> BigInteger.ONE));
> byte[] encoded = params.getEncoded();
> AlgorithmParameters params2 = AlgorithmParameters.getInstance("DSA");
> params2.init(encoded, "ASN.1");
> byte[] encodedAfter2 = params2.getEncoded();
>
> //Regression Test
> AlgorithmParameters params3 = AlgorithmParameters.getInstance("DSA");
> params3.init(encoded, null);
> byte[] encodedAfter3 = params3.getEncoded();
> assertTrue("param encoded is different", Arrays.equals(encodedAfter2,
> encodedAfter3));
> }
> 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