зеркало из https://github.com/mozilla/pjs.git
Propogate the password arg to the sign function.
This commit is contained in:
Родитель
fcecefc5d9
Коммит
df1265c29d
|
@ -1669,7 +1669,7 @@ SECKEYPrivateKey *selfsignprivkey, char *issuerNickName, void *pwarg)
|
||||||
caPrivateKey = selfsignprivkey;
|
caPrivateKey = selfsignprivkey;
|
||||||
} else {
|
} else {
|
||||||
/*CERTCertificate *issuer = CERT_FindCertByNickname(handle, issuerNickName);*/
|
/*CERTCertificate *issuer = CERT_FindCertByNickname(handle, issuerNickName);*/
|
||||||
CERTCertificate *issuer = PK11_FindCertFromNickname(issuerNickName, NULL);
|
CERTCertificate *issuer = PK11_FindCertFromNickname(issuerNickName, pwarg);
|
||||||
if( (CERTCertificate *)NULL == issuer ) {
|
if( (CERTCertificate *)NULL == issuer ) {
|
||||||
SECU_PrintError(progName, "unable to find issuer with nickname %s",
|
SECU_PrintError(progName, "unable to find issuer with nickname %s",
|
||||||
issuerNickName);
|
issuerNickName);
|
||||||
|
@ -1919,6 +1919,7 @@ CreateCert(
|
||||||
int serialNumber,
|
int serialNumber,
|
||||||
int warpmonths,
|
int warpmonths,
|
||||||
int validitylength,
|
int validitylength,
|
||||||
|
void *pwarg,
|
||||||
PRBool selfsign,
|
PRBool selfsign,
|
||||||
PRBool keyUsage,
|
PRBool keyUsage,
|
||||||
PRBool extKeyUsage,
|
PRBool extKeyUsage,
|
||||||
|
@ -2585,10 +2586,15 @@ main(int argc, char **argv)
|
||||||
/* Create a certificate (-C or -S). */
|
/* Create a certificate (-C or -S). */
|
||||||
if (certutil.commands[cmd_CreateAndAddCert].activated ||
|
if (certutil.commands[cmd_CreateAndAddCert].activated ||
|
||||||
certutil.commands[cmd_CreateNewCert].activated) {
|
certutil.commands[cmd_CreateNewCert].activated) {
|
||||||
|
if ( certutil.options[opt_PasswordFile].arg) {
|
||||||
|
pwdata.source = PW_FROMFILE;
|
||||||
|
pwdata.data = certutil.options[opt_PasswordFile].arg;
|
||||||
|
}
|
||||||
rv = CreateCert(certHandle,
|
rv = CreateCert(certHandle,
|
||||||
certutil.options[opt_IssuerName].arg,
|
certutil.options[opt_IssuerName].arg,
|
||||||
inFile, outFile, privkey, &pwdata,
|
inFile, outFile, privkey, &pwdata,
|
||||||
serialNumber, warpmonths, validitylength,
|
serialNumber, warpmonths, validitylength,
|
||||||
|
&pwdata,
|
||||||
certutil.options[opt_SelfSign].activated,
|
certutil.options[opt_SelfSign].activated,
|
||||||
certutil.options[opt_AddKeyUsageExt].activated,
|
certutil.options[opt_AddKeyUsageExt].activated,
|
||||||
certutil.options[opt_AddExtKeyUsageExt].activated,
|
certutil.options[opt_AddExtKeyUsageExt].activated,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче