be strict about passing wincx in pk12util.

This commit is contained in:
mcgreer%netscape.com 2001-08-12 20:57:40 +00:00
Родитель b958495c5e
Коммит f5e05df41e
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -214,11 +214,11 @@ char *
SECU_GetModulePassword(PK11SlotInfo *slot, PRBool retry, void *arg)
{
char prompt[255];
secuPWData *pwdata = arg;
secuPWData *pwdata = (secuPWData *)arg;
secuPWData pwnull = { PW_NONE, 0 };
char *pw;
if (arg == NULL)
if (pwdata == NULL)
pwdata = &pwnull;
if (retry && pwdata->source != PW_NONE) {

Просмотреть файл

@ -546,7 +546,7 @@ P12U_ImportPKCS12Object(char *in_file, PK11SlotInfo *slot,
}
/* init the decoder context */
p12dcx = SEC_PKCS12DecoderStart(&uniPwitem, slot, NULL,
p12dcx = SEC_PKCS12DecoderStart(&uniPwitem, slot, slotPw,
p12u_DigestOpen, p12u_DigestClose,
p12u_DigestRead, p12u_DigestWrite,
tmpcxt);
@ -711,7 +711,7 @@ P12U_ExportPKCS12Object(char *nn, char *outfile, PK11SlotInfo *inSlot,
pk12uErrno = PK12UERR_PK11GETSLOT;
goto loser;
}
cert = PK11_FindCertFromNickname(nn, NULL);
cert = PK11_FindCertFromNickname(nn, slotPw);
if(!cert) {
SECU_PrintError(progName,"find cert by nickname failed");
pk12uErrno = PK12UERR_FINDCERTBYNN;
@ -730,7 +730,7 @@ P12U_ExportPKCS12Object(char *nn, char *outfile, PK11SlotInfo *inSlot,
goto loser;
}
p12ecx = SEC_PKCS12CreateExportContext(NULL, NULL, cert->slot, NULL);
p12ecx = SEC_PKCS12CreateExportContext(NULL, NULL, cert->slot, slotPw);
if(!p12ecx) {
SECU_PrintError(progName,"export context creation failed");
pk12uErrno = PK12UERR_EXPORTCXCREATE;