-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
7, 8
-
generic
-
generic
TESTFAIL:sun/security/tools/keytool/standard.sh
Reproduces on blanch.ie.oracle.com with a current build of jdk8/tl.
#Test Results (version 2)
#Sun Sep 04 22:12:10 IST 2011
#checksum:7eeab50bbb86b090
#-----testdescription-----
$file=/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/standard.sh
$root=/export/Users/ab23780/ws/jdk8/tl/jdk/test
author=Weijun Wang
keywords=shell
maxTimeout=600
run=USER_SPECIFIED shell/timeout=600 standard.sh This test is always excecuted. set a few environment variables so that the shell-script can run stand-alone in the source directory\n
source=standard.sh
title=(almost) all keytool behaviors
#-----environment-----
#-----testresult-----
description=file:/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/standard.sh
elapsed=143242 0:02:23.242
end=Sun Sep 04 22:12:10 IST 2011
environment=regtest
execStatus=Failed. Execution failed: exit code 1
hostname=blanch
javatestOS=SunOS 5.10 (sparc)
javatestVersion=4.1.4
script=com.sun.javatest.regtest.RegressionScript
sections=script_messages shell
start=Sun Sep 04 22:09:47 IST 2011
test=sun/security/tools/keytool/standard.sh
work=/export/home/alanb/JTwork/sun/security/tools/keytool
#section:script_messages
----------messages:(4/214)----------
JDK under test: (/export/home/alanb/jdk1.8)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201109031006.ab23780.jdk-b00)
Java HotSpot(TM) Server VM (build 22.0-b03, mixed mode)
#section:shell
----------messages:(3/410)----------
command: shell standard.sh [This, test, is, always, excecuted., set, a, few, environment, variables, so, that, the, shell-script, can, run, stand-alone, in, the, source, directory]
reason: User specified action: run shell/timeout=600 standard.sh This test is always excecuted. set a few environment variables so that the shell-script can run stand-alone in the source directory
elapsed time (seconds): 143.24
----------System.out:(0/0)----------
----------System.err:(210/22163)*----------
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:59: warning: KeyTool is internal proprietary API and may be removed in a future release
import sun.security.tools.KeyTool;
^
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:66: warning: ObjectIdentifier is internal proprietary API and may be removed in a future release
import sun.security.util.ObjectIdentifier;
^
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:157: warning: KeyTool is internal proprietary API and may be removed in a future release
KeyTool.main(("-debug "+cmd).split("\\\\s+"));
:
:
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:1164: warning: ObjectIdentifier is internal proprietary API and may be removed in a future release
assertTrue(!a.getExtension(new ObjectIdentifier("1.2.5")).isCritical());
^
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:1169: warning: ObjectIdentifier is internal proprietary API and may be removed in a future release
assertTrue(!a.getExtension(new ObjectIdentifier("2.3.4")).isCritical());
^
Note: /export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
59 warnings
.......................................................................v..v.v........................................v.v.......................................vv...vv....vvvvv..........vvvvvvvvv..v....v..vv.v.v.v.v.v.v..v.vvv..v..v...v.vv.vvvv......v.v......v.v....v.v...v.....v...v.v.v.v.v.v.vv.........vvvvvvvvvvv.....................vvxxxxxxxxxxxxxxxxxxxx...........vvxxxxxxxx......vvxxxxxx......vvxxxxxx...vxx...vxx...vvxxxx......vvvvvvvvvvvv.vv.........vvvvvvvvvvv.....................vvxxxxxxxxxxxxxxxxxxxx...........vvxxxxxxxx......vvxxxxxx......vvxxxxxx...vxx...vxx...vvxxxx......vvvvvvvvvvvv.vv.........vvvvvvvvvvv.....................vvxxxxxxxxxxxxxxxxxxxx...........vvxxxxxxxx......vvxxxxxx......vvxxxxxx...vxx...vxx...vvxxxx....
Test fails for the command ---
keytool -printcertreq -file test.req
Or its debug version ---
keytool -debug -printcertreq -file test.req
The command result should be OK, but it's not. Try run the command manually and type these input into it:
ERR is:
OUT is:
keytool error: java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
Exception in thread "main" java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
at sun.security.pkcs11.P11Signature.engineVerify(P11Signature.java:610)
at java.security.Signature$Delegate.engineVerify(Signature.java:1172)
at java.security.Signature.verify(Signature.java:623)
at sun.security.pkcs.PKCS10.<init>(PKCS10.java:173)
at sun.security.tools.KeyTool.doPrintCertReq(KeyTool.java:2196)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:1122)
at sun.security.tools.KeyTool.run(KeyTool.java:338)
at sun.security.tools.KeyTool.main(KeyTool.java:331)
at KeyToolTest.test(KeyToolTest.java:157)
at KeyToolTest.test(KeyToolTest.java:126)
at KeyToolTest.testOK(KeyToolTest.java:173)
at KeyToolTest.v3extTest(KeyToolTest.java:1150)
at KeyToolTest.main(KeyToolTest.java:1299)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
at sun.security.pkcs11.wrapper.PKCS11.C_Verify(Native Method)
at sun.security.pkcs11.P11Signature.engineVerify(P11Signature.java:587)
... 12 more
result: Failed. Execution failed: exit code 1
test result: Failed. Execution failed: exit code 1
This bug can be always reproduced by running
keytool -keystore x.jks -storepass changeit -keypass changeit -keyalg ec -genkeypair -dname CN=Olala -alias a
keytool -keystore x.jks -storepass changeit -alias a -certreq -rfc -file test.req
keytool -printcertreq -file test.req -debug
Reproduces on blanch.ie.oracle.com with a current build of jdk8/tl.
#Test Results (version 2)
#Sun Sep 04 22:12:10 IST 2011
#checksum:7eeab50bbb86b090
#-----testdescription-----
$file=/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/standard.sh
$root=/export/Users/ab23780/ws/jdk8/tl/jdk/test
author=Weijun Wang
keywords=shell
maxTimeout=600
run=USER_SPECIFIED shell/timeout=600 standard.sh This test is always excecuted. set a few environment variables so that the shell-script can run stand-alone in the source directory\n
source=standard.sh
title=(almost) all keytool behaviors
#-----environment-----
#-----testresult-----
description=file:/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/standard.sh
elapsed=143242 0:02:23.242
end=Sun Sep 04 22:12:10 IST 2011
environment=regtest
execStatus=Failed. Execution failed: exit code 1
hostname=blanch
javatestOS=SunOS 5.10 (sparc)
javatestVersion=4.1.4
script=com.sun.javatest.regtest.RegressionScript
sections=script_messages shell
start=Sun Sep 04 22:09:47 IST 2011
test=sun/security/tools/keytool/standard.sh
work=/export/home/alanb/JTwork/sun/security/tools/keytool
#section:script_messages
----------messages:(4/214)----------
JDK under test: (/export/home/alanb/jdk1.8)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201109031006.ab23780.jdk-b00)
Java HotSpot(TM) Server VM (build 22.0-b03, mixed mode)
#section:shell
----------messages:(3/410)----------
command: shell standard.sh [This, test, is, always, excecuted., set, a, few, environment, variables, so, that, the, shell-script, can, run, stand-alone, in, the, source, directory]
reason: User specified action: run shell/timeout=600 standard.sh This test is always excecuted. set a few environment variables so that the shell-script can run stand-alone in the source directory
elapsed time (seconds): 143.24
----------System.out:(0/0)----------
----------System.err:(210/22163)*----------
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:59: warning: KeyTool is internal proprietary API and may be removed in a future release
import sun.security.tools.KeyTool;
^
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:66: warning: ObjectIdentifier is internal proprietary API and may be removed in a future release
import sun.security.util.ObjectIdentifier;
^
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:157: warning: KeyTool is internal proprietary API and may be removed in a future release
KeyTool.main(("-debug "+cmd).split("\\\\s+"));
:
:
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:1164: warning: ObjectIdentifier is internal proprietary API and may be removed in a future release
assertTrue(!a.getExtension(new ObjectIdentifier("1.2.5")).isCritical());
^
/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java:1169: warning: ObjectIdentifier is internal proprietary API and may be removed in a future release
assertTrue(!a.getExtension(new ObjectIdentifier("2.3.4")).isCritical());
^
Note: /export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/security/tools/keytool/KeyToolTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
59 warnings
.......................................................................v..v.v........................................v.v.......................................vv...vv....vvvvv..........vvvvvvvvv..v....v..vv.v.v.v.v.v.v..v.vvv..v..v...v.vv.vvvv......v.v......v.v....v.v...v.....v...v.v.v.v.v.v.vv.........vvvvvvvvvvv.....................vvxxxxxxxxxxxxxxxxxxxx...........vvxxxxxxxx......vvxxxxxx......vvxxxxxx...vxx...vxx...vvxxxx......vvvvvvvvvvvv.vv.........vvvvvvvvvvv.....................vvxxxxxxxxxxxxxxxxxxxx...........vvxxxxxxxx......vvxxxxxx......vvxxxxxx...vxx...vxx...vvxxxx......vvvvvvvvvvvv.vv.........vvvvvvvvvvv.....................vvxxxxxxxxxxxxxxxxxxxx...........vvxxxxxxxx......vvxxxxxx......vvxxxxxx...vxx...vxx...vvxxxx....
Test fails for the command ---
keytool -printcertreq -file test.req
Or its debug version ---
keytool -debug -printcertreq -file test.req
The command result should be OK, but it's not. Try run the command manually and type these input into it:
ERR is:
OUT is:
keytool error: java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
Exception in thread "main" java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
at sun.security.pkcs11.P11Signature.engineVerify(P11Signature.java:610)
at java.security.Signature$Delegate.engineVerify(Signature.java:1172)
at java.security.Signature.verify(Signature.java:623)
at sun.security.pkcs.PKCS10.<init>(PKCS10.java:173)
at sun.security.tools.KeyTool.doPrintCertReq(KeyTool.java:2196)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:1122)
at sun.security.tools.KeyTool.run(KeyTool.java:338)
at sun.security.tools.KeyTool.main(KeyTool.java:331)
at KeyToolTest.test(KeyToolTest.java:157)
at KeyToolTest.test(KeyToolTest.java:126)
at KeyToolTest.testOK(KeyToolTest.java:173)
at KeyToolTest.v3extTest(KeyToolTest.java:1150)
at KeyToolTest.main(KeyToolTest.java:1299)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_VALUE_INVALID
at sun.security.pkcs11.wrapper.PKCS11.C_Verify(Native Method)
at sun.security.pkcs11.P11Signature.engineVerify(P11Signature.java:587)
... 12 more
result: Failed. Execution failed: exit code 1
test result: Failed. Execution failed: exit code 1
This bug can be always reproduced by running
keytool -keystore x.jks -storepass changeit -keypass changeit -keyalg ec -genkeypair -dname CN=Olala -alias a
keytool -keystore x.jks -storepass changeit -alias a -certreq -rfc -file test.req
keytool -printcertreq -file test.req -debug