pk12util exit status 0 after error

RESOLVED FIXED in 3.6

Status

P3
normal
RESOLVED FIXED
18 years ago
17 years ago

People

(Reporter: sonja.mirtitsch, Assigned: kirk.erickson)

Tracking

3.2.1
Sun
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
I tried to load a cert into a rainbow card with the same command that I tried to
load it into the ncipher card:
pk12util -i iws-perf.pk12 -h rainbow -d . -w /tmp/iws_qa.pw.3266 -k
/tmp/iws_qa.pw.3266 
and got an errormessage saying:
pk12util: Invalid slot "rainbow": The security card or token does not exist,
needs to be initialized, or has been removed.
After this the exit status was 0
I think I am doing something wrong on the import, that is why I file this bug
only on the exit status. I could not see the cert in either the rainbow, nor the
ncipher device after trying to load it

----------------------------
+ pk12util -o iws-perf.pk12 -n iws-perf.red.iplanet.com -d . -w
/tmp/iws_qa.pw.3266 -k /tmp/nss_qa.pw.3266 
pk12util: PKCS12 EXPORT SUCCESSFUL
+ [ 0 -ne 0 ] 
+ pk12util -i iws-perf.pk12 -h ncipher -d . -w /tmp/iws_qa.pw.3266 -k
/tmp/iws_qa.pw.3266 
+ [ 0 -ne 0 ] 
+ pk12util -i iws-perf.pk12 -h rainbow -d . -w /tmp/iws_qa.pw.3266 -k
/tmp/iws_qa.pw.3266 
pk12util: Invalid slot "rainbow": The security card or token does not exist,
needs to be initialized, or has been removed.
+ [ 0 -ne 0 ] 
+ echo exporting client cert 
---------------------------

iws-perf(71) certutil -L -h rainbow

Certificate Name                                             Trust Attributes

Sun Microsystems Inc.                                        ,,   
ahong@netscape.com                                           ,p,  
ak@netscape.com                                              ,p,  
askc@netscape.com                                            ,p,  
jluber@netscape.com                                          ,p,  
...



iws-perf(72) modutil -list -dbdir .
Using database directory ....

Listing of PKCS #11 Modules
-----------------------------------------------------------
  1. ncipher
        library name: /opt/nfast/toolkits/pkcs11/libcknfast.so
         slots: 2 slots attached
        status: loaded

         slot: ocs
        token: 

         slot: ncipher
        token: ncipher

  2. NSS Internal PKCS #11 Module
         slots: 2 slots attached
        status: loaded

         slot: NSS Internal Cryptographic Services Version 3.2
        token: NSS Generic Crypto Services

         slot: NSS User Private Key and Certificate Services
        token: NSS Certificate DB

  3. rainbow
        library name: /usr/lib/libcryptoki22.so
         slots: 1 slot attached
        status: loaded

         slot: Rainbow Cryptoki 2.0 Software Library
        token: ISG 2.0 Cryptoki Interface
-----------------------------------------------------------
(Reporter)

Comment 1

18 years ago
I think I need this in order for th HW accelerator tests to work properly
Priority: -- → P2
Target Milestone: --- → 3.4

Comment 2

18 years ago
Assigned the bug to Kirk.
Assignee: wtc → kirke
(Reporter)

Updated

18 years ago
Severity: normal → blocker
(Reporter)

Comment 3

17 years ago
Do not have a server to test this on. Kirk is this fixed? Not a P2/blocker from
my point of view.
Severity: blocker → normal
Priority: P2 → P3
(Assignee)

Comment 4

17 years ago
I don't know if this is fixed.
Unfortunately, iws-perf, which has the Rainbow cards in it,
has been down for 3 weeks now. Krishna says he needs a serial
cable for the console to repair iws-perf.

Comment 5

17 years ago
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee

Comment 6

17 years ago
Set target milestone to NSS 3.5.
Target Milestone: 3.4 → 3.5
(Assignee)

Comment 7

17 years ago
Set target milestone to NSS 3.6.
Target Milestone: 3.5 → 3.6
(Assignee)

Comment 8

17 years ago
Verified this problem still exists at the tip.
On iws-perf.red.iplanet.com:
 
kirke@iws-perf[19] go
+ pk12util -o iws-perf.pk12 -n iws-perf.red.iplanet.com -d . -W nss -K nss 
pk12util: PKCS12 EXPORT SUCCESSFUL
+ echo pk12util (export) exit status: 0 
pk12util (export) exit status: 0
+ pk12util -i iws-perf.pk12 -h rainbow -d . -W nss -K nss 
pk12util: Invalid slot "rainbow": The security card or token does not exist,
needs to be initialized, or has been removed.
+ echo pk12util (import) exit status: 0 
pk12util (import) exit status: 0
kirke@iws-perf[20] pwd
/export1/kirke/workarea-nss/mozilla/tests_results/security/iws-perf.1/server

Appropritate error appears in:

"./mozilla/security/nss/cmd/pk12util/pk12util.h" line 45 of 69 --65%-- 
#define PK12UERR_PK11GETSLOT 13

One line fix:

diff -b -u -r1.19 pk12util.c
--- mozilla/security/nss/cmd/pk12util/pk12util.c    12 Apr 2002 19:04:48 -0000
1.19
+++ mozilla/security/nss/cmd/pk12util/pk12util.c    23 May 2002 22:12:37 -0000
@@ -814,6 +814,7 @@

    if (!slot) {
        SECU_PrintError(progName,"Invalid slot \"%s\"", slotname);
+       pk12uErrno = PK12UERR_PK11GETSLOT;
        goto done;
    }

kirke@iws-perf[32] go
+ pk12util -o iws-perf.pk12 -n iws-perf.red.iplanet.com -d . -W nss -K nss 
pk12util: PKCS12 EXPORT SUCCESSFUL
+ echo pk12util (export) exit status: 0 
pk12util (export) exit status: 0
+ pk12util -i iws-perf.pk12 -h rainbow -d . -W nss -K nss 
pk12util: Invalid slot "rainbow": The security card or token does not exist,
needs to be initialized, or has been removed.
+ echo pk12util (import) exit status: 13 
pk12util (import) exit status: 13
kirke@iws-perf[33] 
(Assignee)

Comment 9

17 years ago
Created attachment 84840 [details] [diff] [review]
exit with bad status (PK12UERR_PK11GETSLOT 13)
(Assignee)

Comment 10

17 years ago
Tested and checked-in fix at the tip (3.6).
Marked fixed.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.