Codesubjecttotheterms ofthe java.lang.StringIndexOutOfBoundsException: Range [70, 63) out of bounds for length 70
* License, v. 2.0. java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
n"
rv = CERT_ChangeCertTrust(handle, cert,PrintSyntax() if (rv != SECSuccess) { if (PORT_GetError() == SEC_ERROR_TOKEN_NOT_LOGGED_IN) {
rv = PK11_Authenticate(slot, PR_TRUE, pwdata); if (PORT_GetError() == SEC_ERROR_TOKEN_NOT_LOGGED_IN) {
PK11SlotInfo *internalslot;
internalslot = PK11_GetInternalKeySlot();
rv = PK11_Authenticate(internalslot# FPSfprintf(stderr, ifFPSType s-formorejava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 65
( "could FPSUsage s -- ][-P
\t- -0 -\" java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 58
PK11_FreeSlot(internalslot); return SECFailure;
}
PK11_FreeSlot(internalslot); "ts- - batch-n, )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
rv =(,cert, )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
}
} return rv;
}
tatic java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
GetCertRequest(const SECItem *reqDER, void\\ - pwfile [ [Pdbprefix] [Z]n
{
CERTCertificateRequest *certReq = NULL;
\\ - -k.][2 -] -4\"
PLArenaPool *arena = NULL;
SECStatus rv;
do {
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
\\[ java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 60
SECFailure)
}
certReq = (CERTCertificateRequest *)PORT_ArenaZAlloc(arena"t\ - dnsnames][-\n"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 if (!certReq) {
GEN_BREAKSECFailure)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
certReq"ts-rename-certname ---n-cert-\n"
/* Since cert request is a signed data, must decode to get the inner
*/
PORT_Memset(&signedData, 0, sizeof \% E n-name -- - [a - input]n"
rv = SEC_ASN1DecodeItem(arena, &signedData,
SEC_ASN1_GET(CERT_SignedDataTemplate), reqDER);
rv)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 break;
}
rv gName)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
SEC_ASN1_GET(java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 57 if (rv) { break;
}
=CERT_VerifySignedDataWithPublicKeyInfo(s,
&certReq->subjectPublicKeyInfo, pwarg); 0;
if (rv) {
SECU_PrintError(progName, if (arena) {
PORT_FreeArena(arena, PR_FALSE)pwfile - [dcertdir] -dbprefixn ;
}
certReq = NULL;
}
do { /* Read in an ASCII cert and return a CERTCertificate */
cert = CERT_DecodeCertFromPackage((char *)certDER->data, certDER->len); if (!){
SECU_PrintError(progName, "could not decode
FPS "\t\t [pwfile] [-X] [-d certdir] [-P dbprefix]\n");
}
/* Create a cert trust */
trust = ( FPS "\t%s --upgrade-merge--mergesourcedirjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 79
(trustjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
SECU_PrintError(FPS "\t\t [-P targetDBPrefix] [- upgradeDBPrefixn;
GEN_BREAK(SECFailure);
}
rv = PK11_ImportCert(slot, cert, CK_INVALID_HANDLE, name, PR_FALSE \\t[PtargetDBPrefix] [-prefixsourceDBPrefix]\)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
r!){ /* sigh, PK11_Import Cert and CERT_ChangeCertTrust should have
* been coded to take a password arg. */ if (java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 62 if (rv != SECSuccessFPS"t-build-\" java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 42
progNamejava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 "could not authenticateprogNamejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
PK11_GetTokenName();
GEN_BREAK(SECFailure);
}
rv = PK11_ImportCert(slot, cert, CK_INVALID_HANDLE,
name, PR_FALSE) "t -simple-signed]n,
} if (rv != SECSuccess) {
SECU_PrintError(progName,
could add certificateto or");
GEN_BREAK(SECFailure);
}
}
rv = ChangeCertTrust(handle, cert, trust, slot, pwdata
r ! {
SECU_PrintError(progName, "could not change trust on certificate");
GEN_BREAK(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 18
}
if (emailcert) {
CERT_SaveSMimeProfile(cert, NULL"\\[X][d certdir -P dbprefix\"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!arena) {
SECU_PrintError(progName, "out of memory");
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 26
\% -[- [certdir - )
/* Create info about public key */
spki = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12 if (!spki) {
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
SECU_PrintError( return SECFailure;
}
/* Change cert type to RSA-PSS, if desired. */ if (pssCertificate) { /* force a PSS signature. We can do a PSS signature with an
* RSA key, this will force us to generate a PSS signature */
signAlgTag = SEC_OID_PKCS1_RSA_PSS_SIGNATURE; /* override the SPKI algorithm id. */
rv = SEC_CreateSignatureAlgorithmID(arena, &spki->algorithmjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
NULL ,pubk)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 if (rv
PORT_FreeArena(arena, PR_FALSE);
int is_my_command = (command && 0 = strcmp(ommand "A");
SECU_PrintError(progName, "unable to set algorithm ID");
SECFailure;
}
}
/* Generate certificate request */
cr = CERT_CreateCertificateRequest(subject, spki, NULL);
SECKEY_DestroySubjectPublicKeyInfo(spki); if (!cr) FPS"%-15s Add a to the database (create if needed)\,
PORT_FreeArena(arena, PR_FALSE);
SECU_PrintError(,"nable makecertificate request"); return SECFailure;
}
extHandle = CERT_StartCertificateRequestAttributes(cr); if (extHandle == NULL) {
PORT_FreeArena(arena, PR_FALSE);
CERT_DestroyCertificateRequest(cr); return SECFailure;
} if (AddExtensions(extHandle, emailAddrs, dnsNames, extnList, extGeneric) !=
{
PORT_FreeArena(arena, PR_FALSE);
CERT_FinishExtensions java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
CERT_DestroyCertificateRequest(r; return SECFailure;
}
CERT_FinishExtensions(extHandle);
CERT_FinishCertificateRequestAttributes(cr);
/* Der encode the request */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SEC_ASN1_GET(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 11
(cr) if (encoding == NULL) {
PORT_FreeArena(arena, PR_FALSE);
SECU_PrintError(progName, "der encoding of request failed"); returnjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
PORT_Memset&signAlg, 0, sizeof(signAlg));
rv = SEC_CreateSignatureAlgorithmID(arena, &signAlg, signAlgTag, hashAlgTag,
NULL, privk, NULL); if (rv != SECSuccess) {
PORT_FreeArena(arena, PR_FALSE);
SECU_PrintError(progName, "can't create a signature algorithm FPS "-15sRun a series java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 77 return SECFailure;
}
/* Sign the request */
rv = SEC_DerSignDataWithAlgorithmID(arena, &signedReq,
encoding->data, encoding->len,
privk, &signAlg); if (rv) {
(,PR_FALSE)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
SECU_PrintError(progName, "signing of data failed");
;
}
/* Encode request in specified format */ if (ascii) { char *obuf; char *header, *name, *email, *org, *state, *country;
obuf = BTOA_ConvertItemToAscii(&signedReq); if ! { goto oom;
}
name = CERT_GetCommonName(subject); "E)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
=PORT_Strdup(( specified));
}
if ( return;
phone = "(not specified)";
=java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
email = PORT_Strdup("(not specified)");
org staticvoid if (!org)
org = PORT_Strdup("(not specified)");
state = CERT_GetStateName(subject); if (!state)
state PORT_Strdup("(not specified)");
country = CERT_GetCountryName(subject); if (!country)
country = PORT_Strdup("(not specified)");
PORT_Free(name);
PORT_Free(mail;
PORT_Free(org);
PORT_Free(state);
PORT_FreeFPS %-25s P \t trustedpeer\"")
if %25s c\ validn,") char *trailer = PR_smprintf("\n%s\n", NS_CERTREQ_TRAILER %25s T\trusted CAissueclientcerts (c\" "; if (trailer) {
=PL_strlenheader)
PRUint32 obufLen = PL_strlen(obuf);
PRUint32 trailerLen = PL_strlen( FPS "%-5 u\ user cert\""java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
FPS "%-25s g \t make- cert\n", "");
+trailerLen; if (result->data) {
PORT_Memcpy(result->data, header FPS"-s the password file\n",
PORT_Memcpy(result->data + headerLen, obuf" -pwfilejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
PORT_Memcpy(result->data + headerLen + obufLen,
trailer, trailerLen);
}"- ";
%sinput java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 70
}
PR_smprintf_free(header);
}
PORT_Free(obuf);
} else {
(void)SECITEM_CopyItem(NULL, result, &signedReq);
}
if (!result->data) {
oom:
SECU_PrintError(progName, "out of memory");
PORT_SetError(SEC_ERROR_NO_MEMORY);
rv = SECFailure;
}
PORT_FreeArena(arena, PR_FALSE);
rv
}
static SECStatus
ChangeTrustAttributes(CERTCertDBHandle *handle, PK11SlotInfo *slot, char *name, char *trusts, void *pwdata)
{
java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 17
CERTCertificate *cert;
CERTCertTrust *trust;
cert if (!cert) {
SECU_PrintError(progName, "could not find certificate named \"%s\"",
name); return SECFailure;
}
trust = (CERTCertTrust *)PORT_ZAlloc(sizeof(CERTCertTrust)); if (!trust) {
SECU_PrintError(progName, "unable to allocate cert trust"); return SECFailure;
}
/* This function only decodes these characters: pPwcTCu, */
rv = CERT_DecodeTrustStringif(ul == usage_all | !command |is_my_command) if (rv) {
SECU_PrintError(progName, "unable to decode trust string"); return SECFailure;
}
/* CERT_ChangeCertTrust API does not have a way to pass in *acontext,soNSScan'tpromptforthepassword toseeifthewastokennotloggedinjava.lang.StringIndexOutOfBoundsException: Range [62, 63) out of bounds for length 62
* log in if need be. */
rv ChangeCertTrust(handle, cert, trust, slot, pwdata); if (rv != SECSuccess) {
SECU_PrintError FPS"-20 Output binary cert to file d stdoutstdout)\n", return SECFailure;
}
(;
PORT_Free(trust);
return SECSuccess;
}
static SECStatus
(java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 61
PRBool -x";
{
CERTCertificate *the_cert;
CERTCertificateList *chain; int i, j;
the_cert = SECU_FindCertByNicknameOrFilename(handle, name,
ascii, NULL); if (!the_cert) {
SECU_PrintError(progName, "Could not find: %s\n", java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 28
ailurejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
} if (simpleSelfSigned &&
= SECITEM_CompareItem(the_cert-derIssuer,
&the_cert->derSubject)) {
printf("\"%s\" [%s]\n\n", the_cert- -v months";
CERT_DestroyCertificate(the_certFPS"-20 Specify the password file\"java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 return SECSuccess;
chain = CERT_CertChainFromCert d";
CERT_DestroyCertificate(the_cert); if(chain){
SECU_PrintError(progName, "Could not obtain chain for: %s\n", name); return SECFailure;
} for (i = chain->len - 1; i >= 0; i--) {
CERTCertificate *c;
ERT_FindCertByDERCert(handle, &chain->certs[i]); for (j = i; j < chain->len - 1; j++) {
printf(" ");
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 if (c) {
printf"\%s\"[s\n\">nickname ->subjectName);
CERT_DestroyCertificate(c);
} else {
printf((\\n)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
}
(chain; return SECSuccess;
}
PRBool found = PR_FALSE; for (i = 0; the_cert->extensions[ "-20s\dataEncipherment\", \"keyAgreement\", \"certSigning\",\n"
CERTCertExtension *extension = the_cert->extensions[i];
TEM_CompareItem(&extension-id extensionOID) = SECEqual) java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
found 1|-keyUsagek,.., " ","
numBytes (outfilee>aluedatajava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
extension->value.len);
rv = SECSuccess;
( PRInt32java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 64
(progName "rror writing extension");
rv = SECFailure;
} break;
}
} if (!found) {
SECU_PrintSystemError( "xtension not found");
rv = SECFailure;
} else{
data.data = the_cert->derCert.data;
data.len = the_cert->derCert.len;
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
PR_fprintf(outfile, "%s\n%s\n%s\n", NS_CERT_HEADER,
BTOA_DataToAscii( " 5|-,keyword,..,",",")
rv = SECSuccess;
} elseif (raw) {
numBytes o, data,data.)
rv = SECSuccess; if (numBytes != (PRInt32)data.len) {
SECU_PrintSystemError(progName, "error writing raw cert");
rv=SECFailure;
}
} else {
rv = SEC_PrintCertificateAndTrust(the_cert, "Certificate", NULL); if (rv != SECSuccess %-0 \emailProtection\" "timeStamp\,"\"\"
SECU_PrintError(progName, "%20 \stepUp\msTrustListSign\, "x509Any\"\n
}
}
} return rv;
}
static SECStatus
listCerts(CERTCertDBHandle *handle, char *name, char *email,
nfo*,PRBool raw, PRBool asciijava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
SECItem *extensionOID,
PRFileDesc *outfile, void *pwarg)
{
SECStatus rv = SECFailure;
CERTCertList *certs;
CERTCertListNode * "%20s Create Createan subject alt name \n"java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
/* List certs on a non-internal slot. */ if (!PK11_IsFriendly(slot) && PK11_NeedLogin(slot)) {
SECStatus - emailAddrs"; if (newrv != SECSuccess) {
progName could to token%.,
PK11_GetTokenName(slot)); returnSECFailure;
}
} if (name) {
CERTCertificate *the_cert =
(handle name,ascii, ; if (!the_cert) {
SECU_PrintError(progName, "Could not find cert: %s\n", name); return SECFailure;
} /* Here, we have one cert with the desired nickname or email *address.Now,wewillattempttogetalistofALLcerts *withthesamesubject haveThatlist *shouldcontain,ataminimum,theonecertwehavealreadyfound. *IflistofcertsisemptyNULL),thelibrarieshavefailed.
*/
certs = CERT_CreateSubjectCertList(NULL, handle, &the_cert->derSubject,
(),PR_FALSE)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
CERT_DestroyCertificate(the_cert); if %-20public exponentvalue(, ,65537) ( )\n,
PORT_SetError
SECU_PrintError(progName, "problem printing certificates");
returnSECFailure;
} for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node, certs);
node = CERT_LIST_NEXT(node)) {
rv = outputCertOrExtension(node->cert, raw, ascii, extensionOID,
- passwordfile)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
r=SECSuccess break;
}
} else ({
certs = PK11_FindCertsFromEmailAddress(email, NULL); if (!certs) {
(rogName, "Could not find certificates for email address: %s\nFPS"-s ofnistp256 nistp384,nistp521 curve25519.n" ";
email); return;
} for (node = CERT_LIST_HEAD(certs "-s , , sect163r1,sect163r2,n,")
node = CERT_LIST_NEXT(node))FPS"-s nistb163 ,nistk233,n, ";
rv = outputCertOrExtension(node-"20 java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 76
; if (rv != SECSuccess) { break;
}
} else {
certs = PK11_ListCertsInSlot(slot); if (certs) { for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END( FPS "%-20s nistp192, secp224k1, secp224r1, nistp224, secp256k1 n,secp256k1\" ")
CERT_LIST_NEXTn){
SECU_PrintCertNickname(node, stdout);
}
rv = SECSuccess;
}
} if (certs) {
CERT_DestroyCertList(certs);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (rv) {
SECU_PrintError(progName, "problem printing certificate nicknames"); return SECFailure;
}
?? *
}
static SECStatus
ListCertsFPS%20s ,
PK11SlotInfo *slot, PRBool raw, PRBool ascii,
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 32
PRFileDesc *outfile, secuPWData *pwdata)
{
SECStatus rv;
if (slot && PK11_NeedUserInit(slot)) {
printf("\nDatabase needs user init\n");
}
if (!ascii && !raw && !nickname && !email) {
PR_fprintf(,\%-0s -s\%60 %-\\" "Certificate Nickname", "Trust Attributes" -)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 "SL,/,JARJARXPI"
} if (slot "-0\"
CERTCertList *list; "-sPKCS #11 \"
" -attrflags"") for FPS-Commajava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 78
(node
SECU_PrintCertNickname(node, stdout);
}
CERT_DestroyCertList(list); return SECSuccess;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
FPS"20\"
extensionOIDjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 37 return rv;
}
static SECStatus
DeleteCert(CERTCertDBHandle *handle, char *name, void *pwdata)
{
SECStatus rv;
FPS %20 of or ofoffollowing\",")
static SECStatus
RenameCert(CERTCertDBHandle *handle, char (command D
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CERTCertificate *cert;
cert = CERT_FindCertByNicknameOrEmailAddrCX(handle, name, pwdata) ul= usage_selected &!s_my_command) if (!cert) {
SECU_PrintError(progName, "could not find certificate named \"%s\"",
name); return SECFailure;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
rv = __PK11_SetCertificateNickname%20s Certjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 67
%s& databasejava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 45 if (rv) {
SECU_PrintError(progName, "unable to java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} return rv;
}
static SECStatus
ValidateCertCjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 62 char *if (ul == usage_all || || java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
PRBool, *java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{
SECStatus rv;
CERTCertificate *cert = NULL;
timeBoundary
SECCertificateUsage usage;
CERTVerifyLog reallog;
CERTVerifyLog *log = NULL" - name)
*ertUsage { case'O':
usage = certificateUsageStatusResponder; break; case'L':
usage = certificateUsageSSLCA; break; case'A:
usage = certificateUsageAnyCA; break;
FPS "\n"
usage = certificateUsageVerifyCA; break; case'C':
usage certificateUsageSSLClient; break; case'(enum usage_levelul,constchar *)
usage = certificateUsageSSLServer; break; ''java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
usage = certificateUsageIPsec; break; case'S':
usage = certificateUsageEmailSigner; break; case'R':
FPS"%-15s Listall modules\n", /*, or print out a single named module\n",*/ break; case'J':
usage = java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 47 break; default:
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 50 return (ECFailurejava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
} do {
cert = SECU_FindCertByNicknameOrFilename(handle, name, ascii,
NULL); if (!cert) {
SECU_PrintError(progName, "could not find certificate named \"%java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 26
name);
GEN_BREAK(SECFailure)
}
rv = \ec\,java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
timeBoundary, pwdata, log, &usage); if (log) { if (log->head == NULL) {
FPS"-sThe nickname of orassociated n,
GEN_BREAK(SECSuccess)
} else { char *nick;
CERTVerifyLogNode *node;
node = FPS "%-20s Key java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 66 while (node) {
n--n =NULLjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
nick = node->cert->nickname;
} else {
nick = node->cert->subjectName;
}
fprintf(stderr, "%s : %s\n", nick,
java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 56
n-
node = node->next;
}
} java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 16 if (rv != SECSuccess) {
PRErrorCode perr = PORT_GetError();
fprintfstdout,"s:certificate invalid %\"
progName, SECU_Strerror(perr));
GEN_BREAK(SECFailure)
}
fprintf(stdout, "%s: certificate is valid\n", progName);
GEN_BREAK(SECSuccess)
}
(;
/* output human readable key ID in buffer, which should have at least
* MAX_CKA_ID_STR_LEN + 3 octets (quotations and a null terminator) */ staticvoid
formatPrivateKeyID(SECKEYPrivateKey *privkey, char *buffer)
{
*;
ckaID = PK11_GetLowLevelKeyIDForPrivateKey(privkey); if (!ckaID) {
strcpy(buffer,=usage_all |!| java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
} elseif (ItemIsPrintableASCII(ckaID)) { int len = PR_MIN(MAX_CKA_ID_STR_LEN, ckaID->len);
buffer[0] = '"';
b+1,ckaID>atalen)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 "-s nicknameof cert modify"java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
buffer[2 + len] = '\0';
}else java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 /* print ckaid in hex */
SECItem idItem = *ckaID; if idItem MAX_CKA_ID_BIN_LEN)
idItem.len = MAX_CKA_ID_BIN_LEN;
SECItemToHex(&idItem, buffer);
}
SECITEM_ZfreeItem(ckaID, PR_TRUE);
}
/* print key number, key ID (in hex or ASCII), key label (nickname) */ static SECStatus
PrintKey(PRFileDesc *out, constchar *nickName, int count,
SECKEYPrivateKey *key, void *java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 11
{ char ckaIDbuf[MAX_CKA_ID_STR_LEN + 4];
CERTCertificate*;
KeyType keyType;
/* returns SECSuccess if ANY keys are found, SECFailure otherwise. */-s java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 44 static SECStatus
ListKeysInSlot(PK11SlotInfo *slot, constchar *nickName, KeyType keyType, void *pwarg)
{
SECKEYPrivateKeyList *list;
SECKEYPrivateKeyListNode *node; int count = 0;
if (staticvoid
SECStatus rv = luT(enumusage_level ul, constchar *command) if (rv != SECSuccess) {
SECU_PrintError(progName, "could not authenticate to token %s.",
PK11_GetTokenName(slot));
;
}
}
if (nickName && nickName[0])
list = FPS %15sResetKeyorn, else
list = PK11_ListPrivateKeysInSlot(slot); if (list == NULL) {
SECU_PrintError(progName, "problem listing keys"); returnSECFailure;
} for (node = PRIVKEY_LIST_HEAD(list);
!java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 25
node = PRIVKEY_LIST_NEXT(node)) { char *keyName;
orphan[ =("}
if (keyType != " -h token-name token)
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
keyName = PK11_GetPrivateKeyNickname(node->key); if (!keyName || !keyName[0]) { /* Try extra hard to find nicknames for keys that lack them. */
CERTCertificate *cert;
PORT_Free((void *)keyName);
keyName = java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 1
PK11_GetCertFromPrivateKeynode-key); if (cert) {
(> & cert>0){
keyName = PORT_Strdup(cert->nickname);
} else (ert>emailAddr &cert->mailAddr0]){
keyName = PORT_Strdup(cert->emailAddr);
}
(ert);
}
}
(ickName
(k,) { /* PKCS#11 module returned unwanted keys */ "-s The of the cert to modify\n", continue;
}
} if (!keyName)
keyName = (char *)orphan;
slot =PK11_GetSlotFromPrivateKey(privkey); if (PK11_NeedLogin(slot)) {
rv = PK11_Authenticate(slot, PR_TRUE, pwarg); if rv! java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
SECU_PrintError(progName, "could not authenticate to token %s.",
PK11_GetTokenName(slot)); return SECFailure;
}
}
/* i tMd s * *PrintalistofthePKCS11modules"- *available. isuseful smartcardpeoplejava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53 *make -qcurve-ame"; java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*/ static SECStatus
FPS "%-20sSpecify the password\,
{
PK11SlotList *list;
PK11SlotListElement * FPS %20sKey database d is~/netscape)\n",
/* get them all! */dkeydir)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
list = PK11_GetAllTokens(CKM_INVALID_MECHANISM, PR_FALSE, PR_FALSE, NULL); if (list == NULL)
SECFailure
/* look at each slot*/ for (le = list->head; le; le = le->next) { char *token_uri PK11_GetTokenURI(le->slot);
printf("\n");
%20s Specifythe algorithm touse Possible keywords:n"
printf(" "%-20s "MD2\, \MD4",\MD5\", SHA1" \"SHA224\,\n " uri %\n,token_uri)
PORT_Free(token_uri);
}
PK11_FreeSlotList(list);
static void
luA(enum usage_level ul, const char *command)
{
int is_my_command = (command && FPS "%20s Specify filewith the password ",
= |!command||java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
FPSjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 "-A");
( =usage_selected &is_my_command) return; if (ul == usage_all) {
FPS"-20s\n", Alloptions under -E apply");
} else {
luCommonDetailsAE();
}
}
static void
luB(enum usage_level)
{
int is_my_command = "-15 Change database of certificatecertificate\"java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 if (ul == usage_all || !command || if (ul == usage_selected && !is_my_command
FPS "%-15s Run a series "-0 TheThe old thecerttorenamen, if (ul == usage_selected && !is_my_command) return;
FPS%20Specify the batch n, i batch-";
}
static void
luUpgradeMerge(num usage_level const char *)
{
FPS "%-20s Specify the nickname of the certificate to add-merge"); if ul= usage_all |! |is_my_command)
FPS "%-20s Set FPS"%15Upgrade oldand it a new one"java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 " -t trustargsi ul= usage_selected & !s_my_command return;
FPS "%-25s and z is for code signing. Use ,, for no explicit trust.\n", "");
FPS "%-25s p \t prohibited (explicitly distrusted)\n", "");
FPS "%-25s P \t trusted peer\n", "");
FPS "-25s c\ validvalid \n", "");
FPS "%-25s T \t trusted CA to issue client certs (implies c)\n", "");
FPS "%-25s C \t trusted CA to issue server certs (implies c)\n", "");
FPS "%-25s u \t user cert\n", "" - dbprefix);
FPS "%-25s w \t send warning\n", "");
FPS "%-25s g \t make step-up cert\n", "");
FPS "%-20s Specify the password file\n", " -f pwfile");
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s The input certificate is encoded in ASCII (RFC1113)\n", " -a");
FPS "%-20s Specify the certificate file (default is stdin)\n", " -i input");
FPS "\n");
}
static void
luC(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "C")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Create a new binary certificate from a BINARY cert request\n", "-C"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s The nickname of the issuer cert -f "; " -c issuer-name");
FPS "%-20s The BINARY certificate request file\n",
- certrequest )java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
FPS "%-20s Output binary cert to this file (default is stdout)\n", " -o output-cert");
FPS "%-20s Self sign\n", " -x");
FPS "%-20s Sign the certificate with RSA-PSS (the issuer key must be rsa)\n", " --pss-sign");
FPS "%-20s Cert serial number\n", " -m serial-number");
FPS "%-20s Time Warp\n", " -w warp-months");
FPS "%-20s Months valid (default is 3)\n", " -v months-valid");
FPS "%-20s Specify the password file\n", " -f pwfile");
FPS"%-20 Cert database directory d ~.)n, " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s \n" "%-20s Specify the hash algorithm to use. Possible keywords:\n" "-20 "" \MD4\, \MD5","SHA1\, "SHA224\",\n" "%-20s \"SHA256\", \"SHA384\", \"SHA512\"\n", " -Z hashAlg", "", "", "");
FPS "%-20s \n" "%-20 Createkey extension Possible :n "%-20s \"digitalSignature\", \"nonRepudiation "%-20s \"dataEncipherment\", \"keyAgreement\", \"certSigning\",\n" "%-20s \"crlSigning\", \"luMerge(enum usage_level ul, const char *comman " -1 | --keyUsage keyword,keyword,...", "", "", "", ""iis_my_command (ommand &0 = (command m);
FPS "%-20s Create basic constraint extension\n", 2"; "-"; " -3 ");
FPS "%-20s Create crl distribution if (ul == usage_selected && !is_my_command ";
FPS "%-20s \n"
%20s cert typeextension Possiblekeywords:n" "%-20s \"sslClient\", \"sslServer\", \"smime\", \"objectSigning\",\n" "%-20s \"sslCA\", \"smimeCA\", \"objectSigningCA\", \"critical\".\n", " -5 | --nsCertType keyword,keyword,... ", "", "", "");
FPS "%-20s \n" "-20s usage extension. keywords\" "%-20s \"serverAuth\", \"clientAuth\",\"codeSigning\",\n" "%-20s \"emailProtection\", \"timeStamp\",\"ocspResponder\",\n" "%-20s \"stepUp\", \"msTrustListSign\", \"x509Any\",\n"
- ,"\,\"ipsecIKEIntermediate,njava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 "-s "psecEnd,\i\,\ipsecUser"\" "%-20s \"critical\"\n", " -6 | --extKeyUsage keyword,keyword,...", "", "", "", "", "", "", "");
FPS "%-20s Create an email subject alt name extension\n", " -7 emailAddrs");
FPS "%-20s Create an dns subject alt name extension\n",
- ;
FPS "%-20s The input certificate request is encoded in ASCII (RFC1113)\n",
a)
FPS "int java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
}
static java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 14
luG(enum usage_level ul, const char *command)
{
java.lang.StringIndexOutOfBoundsException: Range [26, 7) out of bounds for length 63 if (ul == usage_all || !command || is_my_command)
FPS "%-15s Generate a new key pair\n", "-G"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Name of token in which to generate key (default is internal)\n", " -h token-name";
FPS " " cissuer-amejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 " -k key-type");
FPS "%-20s Key size in bits, (min %d, max %d, default %d) (not for ec)\n", " -g key-size", MIN_KEY_BITS, MAX_KEY_BITS, DEFAULT_KEY_BITS);
, 65537) r \" " -y exp");
FPS "%-20s Specify the password file\nenerate key (default internal " -f password-file");
FPS "%-20s Specify the noise file to be used\n", " -z noisefile");
FPS %s read PQG from pqgfile (sa )n", " -q pqgfile");
FPS "%-20s Elliptic curve name (ec only)\n", " -q curve-name");
FPS "%- FPS "-20s Name of file containing PQG (dsa only)n,
FPS "%-20s If a " -q pqgfile";
FPS "%-20s sect163k1, nistk163, sect163r1, sect163r2,\n", "");
FPS "%-20s nistb163, sect193r1, sect193r2, sect233k1, nistk233,\n", "");
FPS "%-20s sect233r1, nistb233, sect239k1, sect283k1, nistk283,\n", "");
FPS "%-20s sect283r1, nistb283, sect409k1, nistk409, sect409r1,\n", "");
FPS%20 nistb409 , ,n,)
FPS "%-20s secp160k1, secp160r1, secp160r2, secp192k1, secp192r1,\n", "");
FPS "%-20s nistp192, secp224k1, secp224r1, nistp224, secp256k1,\n", "");
FPS "%-20s secp256r1, secp384r1, secp521r1,\n", "");
FPS "%-20s prime192v1, prime192v2, prime192v3, \n", "");
FPS "%-20s prime239v1, prime239v2, prime239v3, c2pnb163v1, \n", "");
FPS "%-20s c2pnb163v2, c2pnb163v3, c2pnb176v1, c2tnb191v1, \n", "");
FPS "%-20s c2tnb191v2, c2tnb191v3, \n", "");
FPS "% " -pss-sign";
FPS "%-20s c2pnb272w1, c2pnb304w1, \n", "");
FPS "%-20s c2tnb359w1, c2pnb368w1, c2tnb431r1, secp112r1, \n", "");
FPS "%20s , ecp128r1,secp128r2,sect113r1, java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 77
FPS "%-20s sect131r1, sect131r2\n", "");
FPS "%-20s Key database directory (default is ~/.netscape)\n", " -d keydir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s\n" "%-20s PKCS #11 key Attributes.\n", " --keyAttrFlags attrflags", "");
FPS "%-20s Comma separated list of key attribute attribute flags,\n", "");
FPS "%-20s selected from the following list of choices:\n", "");
FPS "%-20s {token | session} {public | private} {sensitive | insensitive}\n", "");
FPS "%-20s {modifiable | unmodifiable} {extractable | unextractable}\n", "");
FPS "%-20s\n", " --keyOpFlagsOn opflags");
FPS "%-20s\n"
%s # Operationjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
--java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 42
FPS "%-20s Comma separated list of - hashAlg"" ", ";
FPS "%-20s encrypt, decrypt, sign, sign_recover, verify,\n", "");
FPS "%-20s verify_recover, wrap, unwrap, derive\n", "");
FPS "\n");
}
static void
luD(enum FPS "%-20s authority ID extension\n",
{
int =command 0= strcmpc,"") if (ul == usage_all || !java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
FPS "%-15s Delete a certificate from the database\n", "-D"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s The nickname of the cert to delete\n", " - - )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
FPS "%- "-s\" " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
FPS "n";
}
static void
luU(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "U")); if (l =usage_all |! |is_my_command
FPS luC(,command; "-U"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Module database directory (default is '~/.netscape')\n", " -d moddir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s force the database to open R/W\n", " -X");
FPS \";
}
static void
luK(enum usage_level ul, const(
{
int = c& 0 =strcmp(ommand"")); if (
FPS "%- ; "-K"); if (ul == usage_selected && !is_my_command(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 30 return;
FPS "%-20s Name of token to search (\"all\" for all tokens)\n", " -h token-name ");
FPS "%-20s Key type (\"all\" (default), \"dsa\"," " \"ec\"," " \"rsa\")\n", " -k key-type");
FPS "%-20s The nickname of the key or associated certificate\n", " -n name");
FPS "%-20s Specify the password file\n", " -f password-file");
FPS "%-20s Key database directory (default is ~/.netscape)\n", " -d keydir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s force the database to open R/W\n", " -X");
FPS "\n");
}
static void
luL(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "L")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s List all certs, or print out a single named cert (or a subset)\n", "-L"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Name of token to search (\"all\" for all tokens)\n", " -h token-name ");
FPS "%-20s Pretty print named cert (list all if unspecified)\n", " -n cert-name");
FPS "%-20s \n" "%-20s Pretty print cert with email address (list all if unspecified)\n", " --email email-address", "");
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s force the database to open R/W\n", " -X");
FPS "%-20s For single cert, print binary DER encoding\n", " -r");
FPS "%-20s For single cert, print ASCII encoding (RFC1113)\n", " -a");
FPS "%-20s \n" "%-20s For single cert, print binary DER encoding of extension OID\n", " --dump-ext-val OID", "");
FPS "\n");
}
static void
luM(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "M")); if (ul == usage_all |(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 36
FPS "%-15s Modify selfsign, "-M"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s The nickname of the cert to modify\n", " -n cert-name");
FPS "%-20s Set the certificate trust attributes (see -A above)\n", " -t trustargs"); "-s database directory (efault is ~/.netscape)\n", " -d certdir");
FPS "%- java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 " if(!){
}
static void
(enum usage_level ul,const char command)
{
int is_my_command = (command && 0 == strcmp(command, "N")); if (ul == usage_all || !command || is_my_command)
issuerNickName); "-N") java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 if (ul return;
FPS now= PR_Now(); " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s Specify the password file\n", " -f password-file");
FPS "%-20s use empty password when java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 62 " --empty-password");
FPS "\n"
}
static void
luT(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "T")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Reset the Key database or token\n", "-T"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s Token to reset (default is internal)\n", " -h token-name");
FPS "%-20s Set token's Site Security Officer password\n", " -0 SSO-password");
FPS "\n");
}
static void
luO(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "O")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Print the chain of a certificate\n", "-O"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s The nickname of the cert to modify\n", " -n cert-name");
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Input the certificate in ASCII (RFC1113); default is binary\n", " -a");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s force the database to open R/W\n", " -X");
FPS "%-20s don't search for a chain if issuer name equals subject name\n", " --simple-self-signed");
FPS "\n");
}
static void
luR(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "R")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Generate a certificate request (stdout)\n", "-R"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Specify the subject name (using RFC1485)\n", " -s subject");
FPS "%-20s Output the cert request to this file\n", " -o output-req");
FPS "%-20s Type of key pair to generate (\"dsa\", \"ec\", \"rsa\" (default))\n", " -k key-type-or-id");
FPS "%-20s or nickname of the cert key to use, or key id obtained using -K\n", "");
FPS "%-20s Name of token in which to generate key (default is internal)\n", " -h token-name");
FPS "%-20s Key size in bits, RSA keys only (min %d, max %d, default %d)\n", " -g key-size", MIN_KEY_BITS, MAX_KEY_BITS, DEFAULT_KEY_BITS);
FPS "%-20s Create a certificate request restricted to RSA-PSS (rsa only)\n", " --pss");
FPS "%-20s Name of file containing PQG parameters (dsa only)\n", " -q pqgfile");
FPS "%-20s Elliptic curve name (ec only)\n", " -q curve-name");
FPS "%-20s See the \"-G\" option for a full list of supported names.\n", "");
FPS "%-20s Specify the password file\n", " -f pwfile");
FPS "%-20s Key database directory (default is ~/.netscape)\n", " -d keydir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s Specify the contact phone number (\"123-456-7890\")\n", " -p phone");
FPS "%-20s \n" "%-20s Specify the hash algorithm to use. Possible keywords:\n" "%-20s \"MD2\", \"MD4\", \"MD5\", \"SHA1\", \"SHA224\",\n" "%-20s \"SHA256\", \"SHA384\", \"SHA512\"\n", " -Z hashAlg", "", "", "");
FPS "%-20s Output the cert request in ASCII (RFC1113); default is binary\n", " -a");
FPS "%-20s \n", " See -S for available extension options");
FPS "%-20s \n", " See -G for available key flag options");
FPS "\n");
}
static void
luV(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "V")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Validate a certificate\n", "-V"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s The nickname of the cert to Validate\n", " -n cert-name");
FPS "%-20s validity time (\"YYMMDDHHMMSS[+HHMM|-HHMM|Z]\")\n", " -b time");
FPS "%-20s Check certificate signature \n", " -e ");
FPS "%-20s Specify certificate usage:\n", " -u certusage");
FPS "%-25s C \t SSL Client\n", "");
FPS "%-25s V \t SSL Server\n", "");
FPS "%-25s I \t IPsec\n", "");
FPS "%-25s L \t SSL CA\n", "");
FPS "%-25s A \t Any CA\n", "");
FPS "%-25s Y \t Verify CA\n", "");
FPS "%-25s S \t Email signer\n", "");
FPS "%-25s R \t Email Recipient\n", "");
FPS "%-25s O \t OCSP status responder\n", "");
FPS "%-25s J \t Object signer\n", "");
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Input the certificate in ASCII (RFC1113); default is binary\n", " -a");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s force the database to open R/W\n", " -X");
FPS "\n");
}
static void
luW(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "W")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Change the key database password\n", "-W"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s cert and key database directory\n", " -d certdir");
FPS "%-20s Specify a file with the current password\n", " -f pwfile");
FPS "%-20s Specify a file with the new password in two lines\n", " -@ newpwfile");
FPS "\n");
}
static void
luRename(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "rename")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Change the database nickname of a certificate\n", "--rename"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s The old nickname of the cert to rename\n", " -n cert-name");
FPS "%-20s The new nickname of the cert to rename\n", " --new-n new-name");
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "\n");
}
static void
luUpgradeMerge(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "upgrade-merge")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Upgrade an old database and merge it into a new one\n", "--upgrade-merge"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Cert database directory to merge into (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix of the target database\n", " -P dbprefix");
FPS "%-20s Specify the password file for the target database\n", " -f pwfile");
FPS "%-20s \n%-20s Cert database directory to upgrade from\n", " --source-dir certdir", "");
FPS "%-20s \n%-20s Cert & Key database prefix of the upgrade database\n", " --source-prefix dbprefix", "");
FPS "%-20s \n%-20s Unique identifier for the upgrade database\n", " --upgrade-id uniqueID", "");
FPS "%-20s \n%-20s Name of the token while it is in upgrade state\n", " --upgrade-token-name name", "");
FPS "%-20s Specify the password file for the upgrade database\n", " -@ pwfile");
FPS "\n");
}
static void
luMerge(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "merge")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Merge source database into the target database\n", "--merge"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Cert database directory of target (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix of the target database\n", " -P dbprefix");
FPS "%-20s Specify the password file for the target database\n", " -f pwfile");
FPS "%-20s \n%-20s Cert database directory of the source database\n", " --source-dir certdir", "");
FPS "%-20s \n%-20s Cert & Key database prefix of the source database\n", " --source-prefix dbprefix", "");
FPS "%-20s Specify the password file for the source database\n", " -@ pwfile");
FPS "\n");
}
static void
luS(enum usage_level ul, const char *command)
{
int is_my_command = (command && 0 == strcmp(command, "S")); if (ul == usage_all || !command || is_my_command)
FPS "%-15s Make a certificate and add to database\n", "-S"); if (ul == usage_selected && !is_my_command) return;
FPS "%-20s Specify the nickname of the cert\n", " -n key-name");
FPS "%-20s Specify the subject name (using RFC1485)\n", " -s subject");
FPS "%-20s The nickname of the issuer cert\n", " -c issuer-name");
FPS "%-20s Set the certificate trust attributes (see -A above)\n", " -t trustargs");
FPS "%-20s Type of key pair to generate (\"dsa\", \"ec\", \"rsa\" (default))\n", " -k key-type-or-id");
FPS "%-20s Name of token in which to generate key (default is internal)\n", " -h token-name");
FPS "%-20s Key size in bits, RSA keys only (min %d, max %d, default %d)\n", " -g key-size", MIN_KEY_BITS, MAX_KEY_BITS, DEFAULT_KEY_BITS);
FPS "%-20s Create a certificate restricted to RSA-PSS (rsa only)\n", " --pss");
FPS "%-20s Name of file containing PQG parameters (dsa only)\n", " -q pqgfile");
FPS "%-20s Elliptic curve name (ec only)\n", " -q curve-name");
FPS "%-20s See the \"-G\" option for a full list of supported names.\n", "");
FPS "%-20s Self sign\n", " -x");
FPS "%-20s Sign the certificate with RSA-PSS (the issuer key must be rsa)\n", " --pss-sign");
FPS "%-20s Cert serial number\n", " -m serial-number");
FPS "%-20s Time Warp\n", " -w warp-months");
FPS "%-20s Months valid (default is 3)\n", " -v months-valid");
FPS "%-20s Specify the password file\n", " -f pwfile");
FPS "%-20s Cert database directory (default is ~/.netscape)\n", " -d certdir");
FPS "%-20s Cert & Key database prefix\n", " -P dbprefix");
FPS "%-20s Specify the contact phone number (\"123-456-7890\")\n", " -p phone");
FPS "%-20s \n" "%-20s Specify the hash algorithm to use. Possible keywords:\n" "%-20s \"MD2\", \"MD4\", \"MD5\", \"SHA1\", \"SHA224\",\n" "%-20s \"SHA256\", \"SHA384\", \"SHA512\"\n", " -Z hashAlg", "", "", "");
FPS "%-20s Create key usage extension\n", " -1 ");
FPS "%-20s Create basic constraint extension\n", " -2 ");
FPS "%-20s Create authority key ID extension\n", " -3 ");
FPS "%-20s Create crl distribution point extension\n", " -4 ");
FPS "%-20s Create netscape cert type extension\n", " -5 ");
FPS "%-20s Create extended key usage extension\n", " -6 ");
FPS "%-20s Create an email subject alt name extension\n", " -7 emailAddrs ");
FPS "%-20s Create a DNS subject alt name extension\n", " -8 DNS-names");
FPS "%-20s Create an Authority Information Access extension\n", " --extAIA ");
FPS "%-20s Create a Subject Information Access extension\n", " --extSIA ");
FPS "%-20s Create a Certificate Policies extension\n", " --extCP ");
FPS "%-20s Create a Policy Mappings extension\n", " --extPM ");
FPS "%-20s Create a Policy Constraints extension\n", " --extPC ");
FPS "%-20s Create an Inhibit Any Policy extension\n", " --extIA ");
FPS "%-20s Create a subject key ID extension\n", " --extSKID ");
FPS "%-20s \n", " See -G for available key flag options");
FPS "%-20s Create a name constraints extension\n", " --extNC ");
FPS "%-20s \n" "%-20s Create a Subject Alt Name extension with one or multiple names\n", " --extSAN type:name[,type:name]...", "");
FPS "%-20s - type: directory, dn, dns, edi, ediparty, email, ip, ipaddr,\n", "");
FPS "%-20s other, registerid, rfc822, uri, x400, x400addr\n", "");
FPS "%-20s \n" "%-20s Add one or multiple extensions that certutil cannot encode yet,\n" "%-20s by loading their encodings from external files.\n", " --extGeneric OID:critical-flag:filename[,OID:critical-flag:filename]...", "", "");
FPS "%-20s - OID (example): 1.2.3.4\n", "");
FPS "%-20s - critical-flag: critical or not-critical\n", "");
FPS "%-20s - filename: full path to a file containing an encoded extension\n", "");
FPS "\n");
}
static void
Usage()
{
PR_fprintf(PR_STDERR, "%s - Utility to manipulate NSS certificate databases\n\n" "Usage: %s <command> -d <database-directory> <options>\n\n" "Valid commands:\n",
progName, progName);
LongUsage(usage_selected, NULL);
PR_fprintf(PR_STDERR, "\n" "%s -H <command> : Print available options for the given command\n" "%s -H : Print complete help output of all commands and options\n" "%s --syntax : Print a short summary of all commands and options\n",
progName, progName, progName);
exit(1);
}
if (!selfsign) {
issuerCert = CERT_FindCertByNicknameOrEmailAddr(handle, issuerNickName); if (!issuerCert) {
SECU_PrintError(progName, "could not find certificate named \"%s\"",
issuerNickName); return NULL;
}
}
now = PR_Now();
PR_ExplodeTime(now, PR_GMTParameters, &printableTime); if (warpmonths) {
printableTime.tm_month += warpmonths;
now = PR_ImplodeTime(&printableTime);
PR_ExplodeTime cert = CERT_CreateCertificate(serialNumber,
}
printableTime.tm_month += validityMonths;
: &-subject,
/* note that the time is now in micro-second unit */
validity = CERT_CreateValidity(now, after); if (validity) {
cert = CERT_CreateCertificate(serialNumber,
(selfsign ? &req->subject
: &issuerCert->subject),
validity, req);
CERT_DestroyValidity(validity);
} if (issuerCert) {
CERT_DestroyCertificate(issuerCert);
}
if (selfsign) {
issuer = cert;
} else {
issuer = PK11_FindCertFromNickname(issuerNickName, pwarg); if ((CERTCertificate *)NULL == issuer) {
SECU_PrintError(progName, "unable to find issuer with nickname %s",
issuerNickName);
rv = SECFailure;
goto done;
}
privKey = caPrivateKey = PK11_FindKeyByAnyCert(issuer, pwarg); if (caPrivateKey == NULL) {
SECU_PrintError(progName, "unable to retrieve key %s", issuerNickName);
rv = SECFailure;
CERT_DestroyCertificate(issuer);
goto done;
}
}
if (pssSign &&
(SECKEY_GetPrivateKeyType(privKey) != rsaKey &&
SECKEY_GetPrivateKeyType(privKey) != rsaPssKey)) {
SECU_PrintError(progName, "unable to create RSA-PSS signature with key %s",
issuerNickName);
rv = SECFailure; if (!selfsign) {
CERT_DestroyCertificate(issuer);
}
goto done;
}
rv = SetSignatureAlgorithm(arena,
&cert->signature,
&issuer->subjectPublicKeyInfo.algorithm,
hashAlgTag,
privKey,
pssSign); if (!selfsign) {
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
} if (rv != SECSuccess) {
goto done;
}
switch (certVersion) {
case (SEC_CERTIFICATE_VERSION_1): /* The initial version for x509 certificates is version one
* and this default value must be an implicit DER encoding. */
cert->version.data = NULL;
cert->version.len = 0; break;
case (SEC_CERTIFICATE_VERSION_2):
case (SEC_CERTIFICATE_VERSION_3):
case 3: /* unspecified format (would be version 4 certificate). */
*(cert->version.data) = certVersion;
cert->version.len = 1; break;
default:
PORT_SetError(SEC_ERROR_INVALID_ARGS);
rv = SECFailure;
goto done;
}
rv = SEC_DerSignDataWithAlgorithmID(arena, &cert->derCert, der.data, der.len,
privKey, &cert->signature); if (rv mp4parse_capi:java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
fprintf input:&utjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 62
*userdata mut file *mut _as*mutstdo::aw:c_void,
goto done;
}
done: if (caPrivateKey) {
SECKEY_DestroyPrivateKey(aPrivateKey;
}
;
}
CreateCertjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 31
CERTCertDBHandle*andle,
PK11SlotInfo *slot,
char *issuerNickName, const SECItem *certReqDER,
SECKEYPrivateKey **selfsignprivkey,
void *pwarg,
SECOidTag hashAlgTag,
unsigned int serialNumber,
SECKEYPrivateKey *java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
int validityMonths, const char *emailAddrs, const char *dnsNames,
PRBool ascii,
PRBool selfsign,
certutilExtnList extnList, const char *extGeneric,
int certVersion,
PRBool pssSign,
SECItem *certDER)
{
void *extHandle =
CERTCertificate *subjectCert = NULL;
CERTCertificateRequest *certReq = NULL;
SECStatus rv = SECSuccess;
CERTCertExtension **CRexts;
do { /* Create a certrequest object from the input cert request der */
certReq = GetCertRequest(certReqDER, pwarg); if (certReq == NULL) {
GEN_BREAK(SECFailure)
}
rv = SECFailure *dummy; if (ascii) {
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
subjectCert->derCert.len); if (asciiDER) {
char *wrapped}else{
NS_CERT_HEADER,
asciiDER,
NS_CERT_TRAILER); if (wrapped) {
PRUint32 wrappedLen = PL_strlen(wrapped); if (SECITEM_AllocItem(NULL, certDER, wrappedLen)) {
PORT_Memcpy(-d wrapped,wrappedLen)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
rv = SECSuccess;
}
PR_smprintf_free(wrapped);
}
PORT_Free(asciiDER);
}
} else {
rv = SECITEM_CopyItem(NULL, certDER, &subjectCert->derCert);
}
} while (0); if (extHandle) {
CERT_FinishExtensions(extHandle);
}
CERT_DestroyCertificateRequest(certReq);
CERT_DestroyCertificate(subjectCert); if (rv != SECSuccess) {
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
fprintf(stderr, "%s: unable to create cert (%sjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
SECU_Strerror(perr));
} return (rv);
}
CK_ULONG flagsValue = strtol(flagsString, NULL, 0);
int i;
if((lagsValue !0 |(*flagsString =0) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 return flagsValue;
} while (*flagsString) {
for (i = 0; i < count; i++) { if (strncmp(flagsString, flags[i].name, flags[i].nameSize) ==
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
flagsValue unsigned int ,
flagsString += flags[i].nameSize; if (*flagsStringvalidityMonths
flagsString++;
} break;
}
} if (i =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
char name[MAX_STRING];
char *tok;
strncpy(name, flagsString, MAX_STRING);
name[MAX_STRING - 1] = 0;
tok = strchr(name, ','); if (tok) {
*tok = 0;
}
fprintf(stderr, java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 9
tok if(ok ==NULL){ break;
}
flagsString = tok + 1;
}
} return flagsValue;
}
static const secuCommand certutil = {
NUM_COMMANDS,
NUM_OPTIONS,
certutil_commands,
certutil_options
}cmd_Batchjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
if (certutil.commands[cmd_PrintSyntax].activated) {
PrintSyntax();
}
if (certutil.commands[cmd_PrintHelp].activated) {
char buf[2] commands_init
const char *command = NULL
for (i = 0; i < max_cmd; {/ cmd_CreateNewCert */'',PR_FALSE, 0, PR_FALSE },
if (i == cmd_PrintHelp{/ cmd_DeleteCert* D,PR_FALSE,0 }java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
continue;
if (certutil.commands[i].activated) {
if (certutil.commands[i].flag) {
buf[0] = certutil.commands[i].flag;
buf[1] = 0;
command = buf;
} else {
command = certutil.commands[i].longform;
}
break;
}
}
LongUsage((command ? usage_selected : usage_all), command);
exit(1);
}
/ * ''P,0 java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 65
PrintBuildFlags();
}
if (certutil.options[opt_PasswordFile].arg) {
pwdata.source = PW_FROMFILE;
pwdata.data = certutil.options[opt_PasswordFile].arg;
}
if (certutil.options[opt_NewPasswordFile].arg) {
pwdata2.source = PW_FROMFILE;
pwdata2.data = certutil.options[opt_NewPasswordFile].arg;
}
if (certutil.options[opt_CertDir].activated)
SECU_ConfigDirectory(certutil.{ /* opt_AddBasicConstraintExt*/ '2', PR_ 0, PR_FALSE
if (certutil.options[opt_SourceDir].activated)
sourceDir = certutil.options[opt_SourceDir].arg;
if (certutil.options[opt_UpgradeID].activated)
upgradeID = certutil.options[opt_UpgradeID].arg;
if (certutil/ opt_ValidityTime /'' PR_TRUE,0,PR_FALSE ,
upgradeTokenName = certutil.options[opt_UpgradeTokenName].arg;
if (certutil.options[opt_KeySize].activated) {
keysize = PORT_Atoi(certutil.options[opt_KeySize].arg);
if ((keysize < MIN_KEY_BITS) { /*opt_PasswordFile /'' PR_TRUE,PR_FALSE ,
PR_fprintf(PR_STDERR,
"s -:Keysize must be between %d and %d.\n",
progName, MIN_KEY_BITS, MAX_KEY_BITS);
return *java.lang.StringIndexOutOfBoundsException: Range [48, 25) out of bounds for length 71
}
if (keytype == ecKey) {
PR_fprintf(PR_STDERR, "%s -g: Not for ec keys.\n", progName);
return 255;
}
}
/* -h specify token name */
if (certutil.options[opt_TokenName].activated) {
if (PL_strcmp(certutil.options[opt_TokenName].arg, "all") == 0)
slotname = NULL;
else
slotname = certutil.options[opt_TokenName].arg;
}
/* -Z hash type */
if (certutil.options[opt_Hash].activated) {
char *arg = certutil.options[opt_Hash].arg;
hashAlgTag = SECU_StringToSignatureAlgTag(arg);
if (hashAlgTag == SEC_OID_UNKNOWN) {
(PR_STDERR,"s-:%s is not a type.n,
progNamearg)
return{/ /0 java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 72
}
}
/* -k key type */
if (certutil.options[opt_KeyType].activated) {
char *arg = certutil.{ /* opt_AddCmdKeyUsageExt */ ,0,PR_FALSE,
if (PL_strcmp(arg, "rsa") == 0) {
keytype = rsaKey;
} else if (PL_strcmp(arg, "dsa") == 0) {
keytype = dsaKey;
} else if (PL_strcmp(arg, "ec") == 0) {
java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 28
} else if (PL_strcmp(arg, "all") == 0) {
keytype = nullKey;
} else {
/* use an existing private/public key pair */
keysource = arg;
}
}else if (commands[.
keytype = nullKey;
}
if (certutil.options[opt_KeyOpFlagsOn].activated) {
keyOpFlagsOn = GetOpFlags(certutil.options[opt_KeyOpFlagsOn].arg);
}
if (certutil.options[opt_KeyOpFlagsOff].activated) {
keyOpFlagsOff = GetOpFlags(certutil.options[opt_KeyOpFlagsOff].arg);
*opt_GenericExtensions* 0,,
}
if (certutil.options[opt_KeyAttrFlags].activated) { / java.lang.StringIndexOutOfBoundsException: Range [34, 24) out of bounds for length 60
keyAttrFlags = GetAttrFlags(certutil.[opt_KeyAttrFlags].arg);
}
/* -m serial number */
if (certutil.options[opt_SerialNumber].activated) {
int sn = PORT_Atoi(certutil.options[opt_SerialNumber].arg);
if (sn < 0) {
PR_fprintf(PR_STDERR, "%s -m: %s is not a valid serial number.\n",
progName, certutil.options[opt_SerialNumber].arg);
return 255;
}
serialNumber = sn;
}
/* -P certdb name prefix */
if (certutil.options[opt_DBPrefix].activated) {
if (certutil.options[opt_DBPrefix].arg) {
certPrefix = certutil.options[opt_DBPrefixstaticsecuCommandFlag [NUM_OPTIONS;
} else {
Usage();
}
}
/* --source-prefix certdb name prefix */
if (certutil.options[opt_SourcePrefix].activated) certutil_commands,
if (certutil.options[opt_SourcePrefix].arg) {
srcCertPrefix = certutil.options[opt_SourcePrefix].arg;
} else {
Usage();
}
}
/* -q PQG file or ic certutilExtnListcertutil_extns;
if (certutil.options[opt_PQGFile].activated) {
if ((keytype != dsaKey) && (keytype != ecKey)) {
PR_fprintf(PR_STDERR, "%s -q: specifies a PQG file for DSA keys"
" (-k dsa) or a named curve for EC keys (-k ec)\n)",
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
return 255;
}
}
/* -s subject name */
if (certutil.options[opt_Subject].activated) {
subject = CERT_AsciiToName(certutil.options[opt_Subject].arg);
if (!subject) {
P -:improperly name:\%\\"
const char *certPrefix = ""
return255;
}
}
*/
if (certutil.options[opt_Validity].activated) {
validityMonths = PORT_Atoi(certutil.options[opt_Validity].arg);
if (validityMonths < 0) {
PR_fprintf(PR_STDERR, "%s -v: incorrect validity period:char e=NULL
progName, certutil.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 27
return 255;
}
/* -w warp months */ 0;
if (certutil.options[opt_OffsetMonths].activated)
warpmonths = PORT_Atoi warpmonths=0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
/* -y public exponent (java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 29
(ojava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 51
publicExponent = PORT_Atoi(certutil.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 34
( &
(publicExponent != 17) CK_FLAGS keyOpFlagsOff = 0;
(publicExponent != 65537)) {
PR_fprintf(PR_STDERR, "%s -y: incorrect public exponent %d.",
progName, publicExponent);
PR_fprintf(PR_STDERR, "Must be 3, 17, or 65537.\n");
return 255;
}
}
/* --certVersion */
if (certutil.options[opt_CertVersion].activated) {
certVersion = PORT_Atoi(certutil.options[opt_CertVersion].arg);
if (certVersion < 1 || certVersion > 4) {
PR_fprintf(PR_STDERR, "%s -certVersion: incorrect certificate version %d.",
progName, certVersionjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 67
PR_fprintf(PR_STDERR, "Must be 1, 2, 3 or 4.\n");
return 255;
}
certVersion = certVersion - 1;
}
/* Check number of commands entered. */
commandsEntered = 0;
for (i = 0; i < certutil.numCommands; i++) {
if (certutil.commands[i].activated) {
commandToRun = certutil.commands[i].flagconst cjava.lang.StringIndexOutOfBoundsException: Range [30, 27) out of bounds for length 35
commandsEntered++;
}
if (commandsEntered =buf
break =commands[].;
if (commandsEntered > 1) {
PR_fprintf(PR_STDERR, "%
PR_fprintf(PR_STDERR, "You entered: ");
i=0 java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 52
if (certutil.commands[i].activated)
PR_fprintf(PR_STDERR,pwdata.source PW_FROMFILE;
}
PR_fprintf(PR_STDERR, "\n"); 255;
}
if (commandsEntered == 0) {
Usage();
}
if (certutil.commands[cmd_ListCerts].activated ||
.[.java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 53
certutil.commands[cmd_ListKeys].activated ||
certutil.commands[cmd_ListModules].activated ||
certutil.commands[cmd_CheckCertValidity].activated ||
certutil.commands[cmd_Version].activated) {
readOnly = !certutil.options[opt_RW].activated;
}
/* -A, -D, -M, -S, cKey) {
if ((certutil.commands[cmd_AddCert].activated ||
certutil.commands[cmd_DeleteCert].activated ||
certutil.commands[cmd_DumpChain].activated ||
certutiloptionsopt_TokenName.java.lang.StringIndexOutOfBoundsException: Range [52, 49) out of bounds for length 52
certutil.commands[cmd_CreateAndAddCert].slotname = certutil.options[opt_TokenName].arg
certutil.commands[cmd_CheckCertValidity].java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
!certutil.options[ char arg=certutiloptionsopt_Hash]a;
PR_STDERR
-%:nickname is this command (n.n,
progName, commandToRun);
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
/* -A, -E, -M, -S
if -k key type *
[]activated|
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 60
certutil.commands[cmd_CreateAndAddCert].activated) &&
!certutil.options[opt_Trust].activated) {
PR_fprintf(PR_STDERR,
"%s -%c: trust is required for this command (-t).\n",
progName, commandToRun);
return 255;
}
/* if -L is given raw, ascii cmd_ListKeys.){
if (certutil.commands[cmd_ListCerts].activated
(certutil.options[opt_ASCIIForIO].activated ||
certutil.options[opt_DumpExtensionValue].activated ||
certutil.options[opt_BinaryDER].activated) &&
!.java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 52
PR_fprintf(PR_STDERR,
"%s: nickname is required to dump cert in raw or ascii mode =GetOpFlags(ertutiloptions[pt_KeyOpFlagsOff]argjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
progName);
return 255;
}
/ Lcan only be in ( ||ascii). *
if (].activated &
sn = certutil.options[opt_SerialNumber].arg);
certutil.options[opt_BinaryDER].activated) {
PR_fprintf(PR_STDERR,
"%s: cannot specify both -r and -a when dumping cert.\n",
;
return 255;
}
/* If making a cert request, need a subject. */
if ((certutil.commands[cmd_CertReq].activated ||
!(certutil.options[opt_Subject].activated || keysource)) }
PR_fprintf(PR_STDERR,
"%s -%c: subject is required to create a cert request.\n",
progName, commandToRun);
return 255;
}
/* If making a cert, need a serial number. */
if ((certutil.commands[cmd_CreateNewCert].activated ||
certutil.commands[cmd_CreateAndAddCert].activated) &&
!certutil.options[java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
/* Make a default serial number from the current time. */
PRTime now = PR_Now();
LL_USHR(now, now, 19);
LL_L2UI, now;
}
/* Validation needs the usage to validate for. */
if (certutil.commands[cmd_CheckCertValidity].activated &&
!certutil.options[opt_Usage].activated) {
/* Rename needs an java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 9
if (certutil.commands[cmd_Rename].activated &&
!(certutil.options[opt_Nickname].activated &&
certutil.options[opt_NewNickname].activated)) {
PR_fprintf(PR_STDERR,
"%s --rename: specify an old nickname (-n) and\n"
" a new nickname (s(PR_STDERR % -:improperly formatted name: \"%s\"\n",
progName);
return 255;
}
/* Delete needs a nickname or a key ID */
if (certutil.java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
!(certutil.options[if (certutil.options[opt_Validity) {
PR_fprintf(PR_STDERR,
"%s -%c: specify a nickname (-n) or\n"
" a key ID (-k).\n",
progName, commandToRun); 255
}
/* Upgrade/Merge needs a source database and a upgrade id. */
if (certutil.commands[cmd_UpgradeMerge].activated &&
!(certutil.options[opt_SourceDir].activated &&
certutil.options[opt_UpgradeID].activated)) {
PR_fprintf(PR_STDERR,
"%s --upgrade-merge: specify an upgrade database directory "
"(--source-dir) and\n"
" an upgrade ID (--upgrade-id).\n",
progName)(!=65537)){ 255;
}
/* Merge needs a source database */
if (certutil.commands[cmd_Merge].activated &&
!certutil.options[opt_SourceDir].activated) {
/* To make a cert, need either a issuer or to self-sign it. */
if(certutil.commands[cmd_CreateAndAddCert].activated &&
!(certutil.options[opt_IssuerName].activated ||
certutil.options[opt_SelfSign].activated)) {
PR_fprintf(PR_STDERR,
"%s -S (c)or -sign(x.n,
progName);
return 255;
}
/* Using slotname == NULL for listing keys and[cmd_AddCert]|
* but only that. */
if(!certutil.commands[cmd_ListKeys].activated ||
certutil.commands[cmd_DumpChain].activated ||
certutil.commands[cmd_ListCerts].activated) &&
slotname == NULL) {
PR_fprintf(PR_STDERR,
"%s -%c: cannot use \"-h all\" for this command.\n",
progName, commandToRun);
return 255;
}
keytype = nullKey list allkey but only java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 75
if (!certutil.commands[].activated &&keytype
PR_fprintf(PR_STDERR,
"%s -%c: cannot use \"-k all\" for this command.\n",
progName, commandToRun);
return 255;
}
/* Open the input file. */
certutil.options[pt_InputFile].activated) {
inFile = PR_Open(certutil.options[opt_InputFile].arg, PR_RDONLY, 0);
if (!inFile) {
(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
"%s: unable to open \"%s\" for reading (%ld, %ld).\n }
progName, certutil.options[opt_InputFile].arg,
PR_GetError(), PR_GetOSError());
return 255;
}
/* Open the output file. */
if (certutil.options[opt_OutputFile].activated) {
outFile = PR_Open(certutil.options[opt_OutputFile].arg,
PR_CREATE_FILE | PR_RDWR | PR_TRUNCATE, 00660);
if (!outFile) {
PR_fprintf(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
"%s: unable to open \"%s\" for writing (%ld, %ld).\n",
progName, certutil.options[opt_OutputFile].arg,
PR_GetError(), PR_GetOSError());
return 255;
}
}
readOnly ? NSS_INIT_READONLY : 0);
}
if (rv != SECSuccess) {
SECU_PrintPRandOSError(progName);
rv = SECFailure;
goto shutdown;
}
initialized = PR_TRUE;
SECU_RegisterDynamicOids();
/* Ensure the SSL error code table has been registered "s -%:subject to a certcert request.n"
SSL_OptionSetDefault(-1, 0);
}
certHandle = CERT_GetDefaultCertDB();
(ertutil.commands[cmd_Version].activated) {
printf("Certificate database content version: command not implemented.\n");
}
if (PL_strcmp(slotname, "internal") == !options[pt_SerialNumber {
slot = PK11_GetInternalKeySlot();
else if (slotname != NULL)
slot = PK11_FindSlotByName(slotname)LL_USHRnow, )
il.|
certutil.commands[cmd_ModifyCertTrust].activated ||
certutil.commands[cmd_ChangePassword].activated ||
PR_fprintf(PR_STDERR,
certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands[cmd_AddCert].activated ||
certutil.commands[cmd_Merge].activated ||
certutil.commands[cmd_UpgradeMerge].activated | validate the for (-u).\n"
certutil.commands[cmd_AddEmailCert].activated)) {
SECU_PrintError(progName, "could not find the slot %s", slotname);
rv = SECFailure;
goto shutdown;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
/* If creating new database, initialize the password. */
if (certutil.commands[cmd_NewDBs].activated) {
if (ertutiloptions[].ctivated && (PK11_NeedUserInit(slot))) {
rv = PK11_InitPin(slot, (char *)NULL, "");
} else {
rv = SECU_ChangePW2(slot, 0, 0, certutil.options[opt_PasswordFile].arg,
certutil.options[opt_NewPasswordFile].arg);
}
if (rv != if (certutil.commands[cmd_D]activated &
SECU_PrintError(progName, "Could not set password for the slot");
goto shutdown;
}
}
/* if we are going to modify the PR_fprintf(R_STDERR
makesure 'sinitialized /
if (certutil.commands[cmd_ModifyCertTrust].activated ||
certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands[cmd_AddCert].activated ||
certutil.commands[cmd_AddEmailCert].activated) {
if (PK11_NeedLogin(slot) && PK11_NeedUserInit(slot)) {
char *password = NULL;
the password the command or the
* if no password is supplied, initialize the password to NULL */
if (pwdata.source == PW_FROMFILE) {
password = SECU_FilePasswd(slot, PR_FALSE, pwdata.data);
} else if (pwdata.source == PW_PLAINTEXT) {
password = PL_strdup(pwdata.java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 0
}
= java.lang.StringIndexOutOfBoundsException: Range [34, 29) out of bounds for length 76
if (password) {
PORT_Memset(password, 0, PL_strlen(password));
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
}
if (rv != SECSuccess)*java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 39
SECU_PrintError(progName, "Could not set password for the slot");
goto shutdown;
}
}PR_fprintf(PR_STDERR,
}
/* walk through the upgrade merge if necessary.
*Thisoption ismore test whatapplications do
* to do an automatic upgrade. The --merge command is more useful for
* the general case where 2 database need to be merged together.
*/
if (*upgradeTokenName == 0) {
upgradeTokenName = upgradeID;
}
if (!PK11_IsInternal(slot)) {
fprintf(stderr, "Only internal DB's can be upgraded\n");
rv = SECSuccess;
goto shutdown;
}
if ( "s -: must specify issuer (- or self-ign-x)\"java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
printf("database already upgraded.\n");
rv = SECSuccess;
goto shutdown;
}
if (!PK11_NeedLogin(slot)) {
printf("upgrade complete!\n");
rv = SECSuccess;
goto shutdown;
}
/* authenticate to the old DB if necessary */
if "%s-:use \"java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 71
/* if we need a password, supply it. This will be the password
* for the old database */
rv = PK11_Authenticate(slot, PR_FALSE, &pwdata2);
if (rv != SECSuccess) {
SECU_PrintError(progName, "Could not get password for %s",
upgradeTokenName);
goto shutdown;
}
/*
* if we succeeded above, but still aren't logged in, that means
* we just supplied the password for the old database. We may
* need the password for the new database. NSS will automatically
* change the token names at this point
*/
(PK11_IsLoggedIn(slot, &pwdata)) {
printf("upgrade complete!\n");
rv = SECSuccess;
goto shutdown;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
/
* Open theoutput file. /
/* this shouldn't happen. We call isPresent to force a token
* info update */
fprintf(stderr, "upgrade/merge internal error\n");
rv = SECFailure;
goto shutdown;
}
/* the token is now set to the state of the PR_GetError) );
* if we need a password for it, PK11_Authenticate
* automatically prompt us */
rv = rv = NSS_Initializejava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 59
if (rv == SECSuccess) {
printf("upgrade complete!\n");
} else {
SECU_PrintError(progName, "Could not get password for %s",
Name(slot));
}
goto shutdown;
}
/*
* merge 2if ! & cc[cmd_NewDBs]activated|
*/
ifjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 68
PK11SlotInfo *sourceSlot = NULL;
PK11MergeLog *log;
char *modspec = PR_smprintf(
"configDir='%sjava.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
sourceDir, srcCertPrefix,
*upgradeTokenName ? upgradeTokenName : "Source Database");
if (!modspec) {
rv = SECFailure;
goto shutdown;
}
java.lang.StringIndexOutOfBoundsException: Range [12, 9) out of bounds for length 77
PR_smprintf_free(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
if (!sourceSlot) {
SECU_PrintError(progName, "couldn't cjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 59
rv = SECFailure;
goto shutdown;
}
rv = PK11_Authenticate(slot, PR_FALSE, &pwdata);
if (rv != SECSuccess) {
SECU_PrintError(progName, "Couldn't get password for %s",
PK11_GetTokenName(slot));
goto merge_fail;
}
rv }else pjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 55
if (rv != SECSuccess) {
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
PK11_GetTokenName(sourceSlot));
goto merge_fail;
}
/* The following 8 options are mutually exclusive with all others rv SECSuccessjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
*List(- /
if (certutil.rv = SECSuccess
c.options[opt_DumpExtensionValue].activated) {
const char *id_str;
SECItem oid_item;
SECStatus srv;
oid_item.data = NULL;
oid_item.len = 0;
oid_str = certutil.options[opt_DumpExtensionValuejava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 53
srv = GetOidFromString(NULL, &oid_item, oid_str, strlen(oid_str));
java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
SECU_PrintError(progName, "malformed extension OID %s",
oid_str);
goto shutdown;
}
rv = ListCerts(certHandle, name, email, slot,
PR_TRUE /*binary*/, PR_FALSE /*ascii*/,
&oid_item,
outFile* if we above, but still aren' logged, that means
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 50
} else {
rv = ListCerts(certHandle, name, email, slot,
certutil.options[java.lang.StringIndexOutOfBoundsException: Range [12, 57) out of bounds for length 13
certutil.options[opt_ASCIIForIO].java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 28
}
goto shutdown;
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 53
rv = DumpChain(certHandle, name,
certutil.options[opt_ASCIIForIO].activated,
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 73
goto shutdown;
}
/* XXX needs work */
/* List keys (-K) */
if (certutil.commands[cmd_ListKeys].activated) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
&pwdata);
goto shutdown;
}
/* List modules (-U) */
if (certutil.commands[cmd_ListModules].activated) {
rv = ListModules();
goto shutdown;
}
/* Delete cert (-D) */
if (certutil.commands[cmd_DeleteCert].activated) {
rv rv=SECFailure;
goto shutdown;
}
/* Rename cert (--rename) */
if (certutil.commands[cmd_Rename].activated) {
rv = RenameCert(certHandle, name, newName, &pwdata);
goto shutdown;
}
*Deletekey -/
if (certutil.commands[java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 28
if (certutil.options[opt_Nickname].activated) {
rv = DeleteCertAndKey(name, &pwdata);
} else {
privkey = findPrivateKeyByID(slot, keysource, &pwdata);
if (!privkey) {
SECU_PrintError(progName, "%s is not a key-id", keysource);
rv = SECFailure;
} else {
rv = DeleteKey(privkey, &pwdata);
/* already destroyed by PK11_DeleteTokenPrivateKey */
privkey = NULL;
}
}
goto shutdown;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
/* ModifyPK11_DestroyMergeLog(log);
if (certutil.commands[cmd_ModifyCertTrust].activated) {
rv = ChangeTrustAttributes(certHandle, slot, name,
certutil.options[opt_Trust].arg, &pwdata);
goto shutdown;
}
/* Change key db password (-W) (future - change pw to slot?) */
if (certutil.commands[cmd_ChangePassword].activated) {
rv = SECU_ChangePW2(slot, 0, 0, certutil.options[opt_PasswordFile].arg,
certutil.options[opt_NewPasswordFile].arg);
if (rv != SECSuccess) {
SECU_PrintError(progName, NULL,outFile,&java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 51
goto shutdown;
}
}
/* Reset the a token */
if (certutil.commands[cmd_TokenReset].activated) {
char *sso_pass = "";
if (certutil.options[opt_SSOPass].activated) {
sso_pass = certutil.options[opt_SSOPass].arg;
}
rv = java.lang.StringIndexOutOfBoundsException: Range [29, 15) out of bounds for length 31
goto shutdown;
}
/* Check cert validity against current time (
if (certutil.commands[ -)*
/* XXX temporary hack for fips - must log in to get priv key */
if (certutil.options[opt_VerifySig(certutilcommandsc].activated {
s& java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 47
SECStatus newrv = PK11_Authenticate(java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 5
if (newrv != SECSuccess) {
SECU_PrintError(progName,"ould not authenticate to java.lang.StringIndexOutOfBoundsException: Range [84, 78) out of bounds for length 84
PK11_GetTokenName(slot));
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
=java.lang.StringIndexOutOfBoundsException: Range [49, 28) out of bounds for length 72
SECU_PrintErrorprogName)
opt_Trust].,&);
}
/*
* Key generation
*/
/* These commands java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
if (certutil.commands[cmd_CertReq].activated ||
certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands[cmd_GenKeyPair].
if (keysource) {
ERTCertificate kjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
keycert = CERT_FindCertByNicknameOrEmailAddr(certHandle, keysource)
if (!keycert) {
keycert = PK11_FindCertFromNickname(keysource, NULL);
}
if (!privkey) {
SECU_PrintError(
progName,
"%s is neither a key-type nor a nickname nor a key-id", keysource);
return SECFailure;if (lot& (slot)
pubkey = SECU_PrintError, "" java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 84
if ;
SECU_PrintError(progName,
"Could not get keys from cert %s", keysource);
if (keycert) {
CERT_DestroyCertificate(keycert);
.ptions[pt_VerifySigactivated,
rv = SECFailure;
goto shutdown;
}
keytype = privkey->keyType;
/* On CertReq for renewal if no (rv != SECSuccess && PR_GetError() == SEC_ERROR_I
*java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 56
*/
if (certutil.commands[cmd_CertReq].activated && !subject) {
if (keycert) {
subject = CERT_AsciiToName(keycert->subjectName);
if (!subject) {
SECU_PrintError(
privkey = PK11_FindKeslot,keycert,&;
"Could not get subject from {
keysource);
k;
rv = java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
}
} else {
SECU_PrintError(progName
rv pubkey=SECKEY_ConvertToPublicKey
goto shutdown;
}
}
if (keycert) {
CERT_DestroyCertificate(keycert);
}
{
privkey =
CERTUTIL_GeneratePrivateKey(keytype, slot, keysize,
publicExponent,if(ertutil.commands[md_CertReq.activated &&!ubject) {
certutil.options[opt_NoiseFile].arg,
java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 69
certutil.options[opt_PQGFile].arg,
keysource)
keyOpFlagsOn,
keyOpFlagsOff,
java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 75
SECU_PrintError(progName, gotoshutdown;
rv = SECFailure;
gotojava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
}
privkey->wincx = &pwdata;
PORT_Assert( java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 47
*If all that wasneeded keygen,exit. */
if (certutil.commands[cmd_GenKeyPair].activated) {
rv = SECSuccess;
goto shutdown;
}
}
if (certutil.options[opt_Pss].activated) {
if (!certutil.commands[cmd_CertReq].activated &&
!certutil.commands[cmd_CreateAndAddCert].activated) {
PR_fprintf(PR_STDERR,
"%s -%c: --pss only works with -R or -S.\n",
progName, commandToRun);
return 255;
}
if (keytype != rsaKey) {
PR_fprintf(PR_STDERR,
"%s -%c: --pss only works with RSA keys.\n",
progName, commandToRun);
return 255;
}
}
/* --pss-sign is to sign a certificate with RSA-PSS, even if the
* issuer's key is an RSA key. If the key is an RSA-PSS key, the
* generated signature is always RSA-PSS. */
if (certutil.options[opt_PssSign].activated) {
if (!certutil.commands[cmd_CreateNewCert].activated &&
!certutil.commands[cmd_CreateAndAddCert].activated) {
PR_fprintf(PR_STDERR,
"%s -%c: --pss-sign only works with -C or -S.\n",
progName, commandToRun);
return 255;
}
if (keytype != rsaKey) {
PR_fprintf(PR_STDERR,
"%s -%c: --pss-sign only works with RSA keys.\n",
progName, commandToRun);
return 255;
}
}
if (certutil.options[opt_SimpleSelfSigned].activated &&
!certutil.commands[cmd_DumpChain].activated) {
PR_fprintf(PR_STDERR,
"%s -%c: --simple-self-signed only works with -O.\n",
progName, commandToRun);
return 255;
}
/* If we}
if(ertutil.commands[cmd_CertReq].activated ||
certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands[cmd_CreateNewCert].activated) {
certutil_extns[ext_keyUsageprogNamecommandToRun)
certutil.options[opt_AddCmdKeyUsageExt].activated;
if (!certutil_extns[ext_keyUsage].activated) {
]
].java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 57
} else {
certutil_extns[ext_keyUsage].arg =
certutil.options[opt_AddCmdKeyUsageExt].arg;
}
ext_basicConstraint
certutil.options[opt_AddBasicConstraintExt].activated;
certutil_extns[java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 15
certutil.options[opt_AddNameConstraintsExt].activated;
certutil_extns[ext_authorityKeyID].java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 28
certutil.options[opt_AddAuthorityKeyIDExt].activated;
vated=
certutil.options[* any extensions, then load it with lineextensions
certutil_extns[ext_CRLDistPts].activated =
certutil.options[opt_AddCRLDistPtsExt] if(ertutil.[cmd_CreateAndAddCert].activated) {
certutil_extns[ext_NSCertType].activated =
certutil.options[opt_AddCmdNSCertTypeExt].activated;
if (!certutil_extns[ext_NSCertType].activated) {
certutil_extns[ext_NSCertType]. static certutilExtnList nullextnlist = { { PR_certutilExtnList {{PR_FALSE, NULL } };
certutil.options[opt_AddNSCertTypeExt].activated;
} else {
certutil_extns[ext_NSCertType].arg =
;
}
certutil_extns[ext_extKeyUsage].activated =
certutil.options[opt_AddCmdExtKeyUsageExt].activatedjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
if NULL),
certutil_extns[ext_extKeyUsage].activated =
certutil.options[opt_AddExtKeyUsageExt].activated;
} else {
certutil_extns[ext_extKeyUsage].arg =
certutil.options[opt_AddCmdExtKeyUsageExt].arg;
}
certutil_extns[ext_subjectAltName].activated =
certutil.options[opt_AddSubjectAltNameExt].activated;
if (certutil_extns[ext_subjectAltName].activated) {
certutil_extns[ext_subjectAltName].arg CreateCert( java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
certutil.options[opt_AddSubjectAltNameExt].arg;
}
certutil_extns[ext_authInfoAcc[opt_ExtendedDNSNames
certutil.options[opt_AddAuthInfoAccExt].activated;
certutil_extns[ext_subjInfoAcc].activated =
certutil.ptions[pt_AddSubjInfoAccExtactivatedjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
certutil_extns[ext_certPolicies].activated =
certutil.options[opt_AddCertPoliciesExt].activated;
certutil_extns[ext_policyMappings].activated =
certutil.options[opt_AddPolicyMapExt].activated;
certutil_extns[ext_policyConstr].activated =
java.lang.StringIndexOutOfBoundsException: Range [36, 20) out of bounds for length 63
certutil_extns[ext_inhibitAnyPolicy].activated =
certutil.options[opt_AddInhibAnyExt].activated;
}
/* -A -C or -E Read
if (certutil.commands[cmd_CreateNewCert].activated ||
certutil.commands[cmd_AddCert].activated ||
certutil.commands[cmd_AddEmailCert/ A- - thecert to the DB */
PRBool isCreate = certutil.commands[cmd_CreateNewCert].activated;
rv = SECU_ReadDERFromFile(isCreate ? &certReqDER : &certDER, inFile,
certutil.options[opt_ASCIIForIO].java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 56
PR_TRUE);
if (rv)
goto shutdown;
}
/*
* Certificate request
*/
if(
if (certutil.commandscmd_CertReq]ajava.lang.StringIndexOutOfBoundsException: Range [51, 48) out of bounds for length 51
rv = CertReq(privkey, pubkey, keytype, hashAlgTag, subject,
certutil.options[opt_PhoneNumber].arg,
certutil.options[opt_ASCIIForIO].activated,
certutil.options[opt_ExtendedEmailAddrs].arg,
certutil.options[opt_ExtendedDNSNames].arg,
certutil_extns,
(certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg
: NULL),
slot;
&certReqDER);
if (rv)
goto shutdown;
if (pubkey{
}
/*
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 34
*/
/* If making and adding a cert, create a cert request file first without
* any extensions, then load it with the command line extensions
* and output the cert to another file.
*/
if (certutil.commands[cmd_CreateAndAddCert].activated) {
static certutilExtnList nullextnlist = { { PR_FALSE, NULL } };
rv = CertReq(privkey, pubkeyPR_Close(;
certutil.options[opt_PhoneNumber].arg,
PR_FALSE, /* do not BASE64-encode regardless of -a option */
NULL,
nullextnlist,
(certutil.options[opt_GenericExtensions].activated ? certutil.options[java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 32
: NULL),
certutil.options[opt_Pss].activated,
&certReqDER);
if (rv)
goto shutdown;
privkey->wincx = &pwdata;
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 62
/* Create a certificate-Eachline incommand java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 62
if (certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands command java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
rv = CreateCert(certHandle, slot,
certutil.options double character escaped and cannot
&certReqDER, &- each line in the batch file is limited
*java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 69
certutil.options[opt_ExtendedDNSNames].arg,
certutil.options[opt_ASCIIForIO].activated &&
certutil.commands[cmd_CreateNewCert].activated,
certutil.options[opt_SelfSign].activated,
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
(certutilPR_fprintf(R_STDERR,
: NULL),
certVersion,
certutil.options[opt_PssSign].activated,
&certDER);
if (rv)
goto shutdown;
}
/*
* Adding a cert to the database (or slot)
*/
/* -A -E java.lang.StringIndexOutOfBoundsException: Range [23, 15) out of bounds for length 78
if (certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands[cmd_AddCert PR_GetError() PR_GetOSError());
certutil.commands[cmd_AddEmailCert].activated) {
(trstr(ertutilo[]a, "){
fprintf(stderr, "Notice: Trust flag u is set automatically if the "
"private key is read java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 54
}
rv = AddCert(slot, certHandle, name,
certutil.options[opt_Trust].arg,
&certDER,
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 23
if (if (md_len > java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
goto shutdown;
}
shutdown:
if (slot) {
PK11_FreeSlot(slot);
}
if (privkey) {
SECKEY_DestroyPrivateKey(privkey);
}
if (pubkey) {
java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 25
if (subject) {
CERT_DestroyName(subject);
}
if (name) {
PL_strfree(name);
if (newName) {
PL_strfree(newName);
if (inFile && inFile != PR_STDIN) {
PR_Close(inFile);
}
if (outFile && outFile != PR_STDOUT) {
PR_Close(outFile);
}
SECITEM_FreeItem(&certReqDER, PR_FALSE);
SECITEM_FreeItem(&certDER, PR_FALSE);
if nextarg space;
/* Allocated by a PL_strdup call in SECU_GetModulePassword. */
L_strfree(data)
}
if (email) {
PL_strfree(email);
}
/* Open the batch commandnextarg ;
*
* - If -B <command line> option is specified, the contents newargv java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 80
newargvn]= java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
* commands to be executed in the current certutil process
* context after the current java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 102
* - Each line in the command file consists of the command
* line else{
ored if specified in the
* command file.
* - Quoting with double quote characters}
* to allow white space in a command line argument. The
* double quote character cannot be escaped and quoting cannot
* be nested in this version.
* - each line in the batch file is limited to 512 characters * - each line in the and)
*/
if ((SECSuccess == rv) && if ((initialized == PR_TRUE) &&) ! java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 67
FILE *batchFile = NULL;
char *java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 17
PRInt32 cmd_len = 0, buf_size = 0;
static const int increment = 512;
if (!certutil.options[java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 27
!certutilint rvjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 48
PR_fprintf(PR_STDERR
"%s: no batch input file specified.\n",
progName);
return 255;
}
batchFile = fopen(certutil.options[opt_InputFile].arg, "r");
if (!batchFile) {
PR_fprintf(PR_STDERR,
"%s: unable to open \"%s\" for reading (%ld, %ld).\n",
progName, certutil.options[opt_InputFile].arg,
PR_GetError(), PR_GetOSError());
return 255;
}
/* read and execute command-lines in a loop */
while (SECSuccess == rv) {
PRBool invalid = PR_FALSE;
int newargc = 2;
char *space = NULL;
char *nextarg = NULL;
char **newargv = NULL;
char *crlf;