JSSTEST_CASE 11 (JSSE server / JSS client) can not fail

RESOLVED FIXED in 4.1.3

Status

RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: jason.m.reid, Assigned: Sandeep.Konchady)

Tracking

4.1.1
4.1.3
x86
Linux

Details

(Reporter)

Description

13 years ago
JSSTEST_CASE 11 (JSSE server / JSS client) lists a PASS even when the following happen:

From 20051027 securitytip biarritz-SunOS5.10_i86pc_OPT
============= Generate known cert pair for testing
org.mozilla.jss.pkcs11.PK11Token$NotInitializedException
        at org.mozilla.jss.pkcs11.PK11Token.nativeLogin(Native Method)
        at org.mozilla.jss.pkcs11.PK11Token.login(PK11Token.java:178)
        at org.mozilla.jss.tests.GenerateTestCert.doIt(GenerateTestCert.java:88)
        at org.mozilla.jss.tests.GenerateTestCert.main(GenerateTestCert.java:66)
Generate known cert pair for testing returned 1
============= convert PKCS11 cert to PKCS12 format
pk12util: find user certs from nickname failed: security library: bad database.
Convert PKCS11 to PKCS12 returned 24
============= Start JSSE server tests
============= Start JSS client tests
java.io.FileNotFoundException: ./SunOS5.10_i86pc_OPT.OBJ/keystore.pfx (No such f
ile or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at org.mozilla.jss.tests.JSSE_SSLServer.getServerSocketFactory(JSSE_SSLS
erver.java:207)
        at org.mozilla.jss.tests.JSSE_SSLServer.main(JSSE_SSLServer.java:112)
***FilePasswordCallback returns netscape
Unable to connect: (-5981) Connection refused by peer.
org.mozilla.jss.ssl.SSLSocketException: Unable to connect: (-5981) Connection re
fused by peer.
        at org.mozilla.jss.ssl.SSLSocket.socketConnect(Native Method)
        at org.mozilla.jss.ssl.SSLSocket.<init>(SSLSocket.java:259)
        at org.mozilla.jss.ssl.SSLSocket.<init>(SSLSocket.java:230)
        at org.mozilla.jss.tests.JSS_SSLClient.doIt(JSS_SSLClient.java:212)
        at org.mozilla.jss.tests.JSS_SSLClient.main(JSS_SSLClient.java:419)
JSSTEST_CASE 11 (JSSE server / JSS client): PASS

From 20051027 securitytip mandela-SunOS5.10_i86pc_DBG
============= Generate known cert pair for testing
main: jss library loaded
***FilePasswordCallback returns netscape
org.mozilla.jss.crypto.TokenException
        at org.mozilla.jss.CryptoManager.importCertPackageNative(Native Method)
        at org.mozilla.jss.CryptoManager.importUserCACertPackage(CryptoManager.java:1008)
        at org.mozilla.jss.tests.GenerateTestCert.doIt(GenerateTestCert.java:104)
        at org.mozilla.jss.tests.GenerateTestCert.main(GenerateTestCert.java:66)
Generate known cert pair for testing returned 1
============= convert PKCS11 cert to PKCS12 format
pk12util: PKCS12 EXPORT SUCCESSFUL
============= Start JSSE server tests
============= Start JSS client tests
*** Using J2SE 1.4.x ***
main: jss library loaded
***FilePasswordCallback returns netscape
in TestCertApprovalCallback.approve()
Peer cert details:
     subject: OU=JSS Testing,O=Mozilla24022402,C=US,CN=CACert
     issuer:  OU=JSS Testing,O=Mozilla24022402,C=US,CN=CACert
     serial:  1
item 1 reason=-12276 depth=0
 cert details:
     subject: OU=JSS Testing,O=Mozilla24022402,C=US,CN=CACert
     issuer:  OU=JSS Testing,O=Mozilla24022402,C=US,CN=CACert
     serial:  1
Server exiting
--------------------------------------------------------
Summary of JSS client to JSSE server communication test :
--------------------------------------------------------
[0]     SSLSocket.SSL3_RSA_WITH_NULL_MD5
[1]     SSLSocket.SSL3_RSA_WITH_NULL_SHA
[2]     SSLSocket.SSL3_RSA_EXPORT_WITH_RC4_40_MD5
[3]     SSLSocket.SSL3_RSA_WITH_RC4_128_MD5
[4]     SSLSocket.SSL3_RSA_WITH_RC4_128_SHA
[5]     SSLSocket.SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5
[6]     SSLSocket.SSL3_RSA_WITH_DES_CBC_SHA
[7]     SSLSocket.SSL3_RSA_WITH_3DES_EDE_CBC_SHA
[8]     SSLSocket.SSL3_DHE_DSS_WITH_DES_CBC_SHA
[9]     SSLSocket.SSL3_DHE_DSS_WITH_3DES_EDE_CBC_SHA
[10]    SSLSocket.SSL3_DHE_RSA_WITH_DES_CBC_SHA
[11]    SSLSocket.SSL3_DHE_RSA_WITH_3DES_EDE_CBC_SHA
[12]    SSLSocket.SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA
[13]    SSLSocket.SSL_RSA_FIPS_WITH_DES_CBC_SHA
[14]    SSLSocket.TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA
[15]    SSLSocket.TLS_RSA_EXPORT1024_WITH_RC4_56_SHA
[16]    SSLSocket.TLS_DHE_DSS_WITH_RC4_128_SHA
[17]    SSLSocket.TLS_RSA_WITH_AES_128_CBC_SHA
[18]    SSLSocket.TLS_DHE_DSS_WITH_AES_128_CBC_SHA
[19]    SSLSocket.TLS_DHE_RSA_WITH_AES_128_CBC_SHA
[20]    SSLSocket.TLS_RSA_WITH_AES_256_CBC_SHA
[21]    SSLSocket.TLS_DHE_DSS_WITH_AES_256_CBC_SHA
[22]    SSLSocket.TLS_DHE_RSA_WITH_AES_256_CBC_SHA
java.lang.ArrayIndexOutOfBoundsException: 49
        at org.mozilla.jss.tests.ClassServer.run(ClassServer.java:117)
        at java.lang.Thread.run(Thread.java:534)
JSSTEST_CASE 11 (JSSE server / JSS client): PASS

Updated

13 years ago
Assignee: wtchang → Sandeep.Konchady
(Assignee)

Comment 1

13 years ago
In this bug there are two issues.

[1] Even though the test fails it is falsely reported as PASS
[2] java.lang.ArrayIndexOutOfBoundsException is thrown at org.mozilla.jss.tests.ClassServer.run(ClassServer.java:117)

Need to fix this in both JSS 4.1.x as well as tip (JSS 4.2.x branch).
Status: NEW → ASSIGNED
Target Milestone: --- → 4.1.3
(Assignee)

Comment 2

13 years ago
There is another issue here - "Unable to connect: (-5981) Connection refused by peer" with the same test. This has been addressed by 316629.
(Assignee)

Comment 3

13 years ago
ArrayIndexOutOfBoundsException has already been fixed by bug : 317498 when backporting changes from tip to JSS 4.1.x branch. The fix is in the file ClassServer.java revision 1.1.2.1
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.