harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5301) [classlib][security] Functional test failure invoking Signature#getInstance(String) with no system property read permissions
Date Thu, 13 Dec 2007 13:59:43 GMT
[classlib][security] Functional test failure invoking Signature#getInstance(String) with no
system property read permissions
----------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-5301
                 URL: https://issues.apache.org/jira/browse/HARMONY-5301
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Harmony r603433, Windows x86
            Reporter: Tim Ellison


The functional test here
https://svn.apache.org/repos/asf/harmony/enhanced/buildtest/branches/2.0/tests/functional/src/test/functional/org/apache/harmony/test/func/api/java/security/F_KeyFactoryTest_01/F_KeyFactoryTest_01.java

installs an alternate security manager using System.setSecurityManager(new SecurityManager());
then later invokes Signature.getInstance(String) which in turn causes a permission check exception
in o.a.h.security.fortress.Engine#getInstance method as follows:

15:23:57| Instantiating of KeyPairGenerator object...
15:23:57| OK
Generating key pair...
15:24:10| OK
Instantiating of KeyFactory object...
15:24:10| OK
java.security.NoSuchAlgorithmException: Signature MD4WithRSAEncryption implementation not
found: 
	at java.security.Provider$Service.newInstance(Provider.java:847)
	at org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:112)
	at java.security.Signature.getInstance(Signature.java:98)
	at org.apache.harmony.test.func.api.java.security.F_KeyFactoryTest_01.F_KeyFactoryTest_01.test(F_KeyFactoryTest_01.java:74)
	at org.apache.harmony.share.Test.test(Test.java:94)
	at org.apache.harmony.test.func.api.java.security.F_KeyFactoryTest_01.F_KeyFactoryTest_01.main(F_KeyFactoryTest_01.java:145)
Caused by: java.security.AccessControlException: Permission check failed (java.util.PropertyPermission
org.bouncycastle.pkcs1.strict read)
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:133)
	at java.security.AccessController.checkPermission(AccessController.java:194)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:746)
	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:373)
	at java.lang.System.getProperty(System.java:158)
	at java.lang.System.getProperty(System.java:149)
	at org.bouncycastle.crypto.encodings.PKCS1Encoding.useStrict(Unknown Source)
	at org.bouncycastle.crypto.encodings.PKCS1Encoding.&lt;init&gt;(Unknown Source)
	at org.bouncycastle.jce.provider.JDKDigestSignature$MD4WithRSAEncryption.&lt;init&gt;(Unknown
Source)
	at java.lang.reflect.VMReflection.newClassInstance(VMReflection.java)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:283)
	at java.lang.Class.newInstance(Class.java:702)
	at java.security.Provider$Service.newInstance(Provider.java:844)
	at org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:112)
	... 4 more
15:24:10| Signature MD4WithRSAEncryption implementation not found: 


Possibly a missing doPrivileged block?


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


Mime
View raw message