1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/cmd/certutil/certutil.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef _CERTUTIL_H 1.9 +#define _CERTUTIL_H 1.10 + 1.11 +extern SECKEYPrivateKey * 1.12 +CERTUTIL_GeneratePrivateKey(KeyType keytype, 1.13 + PK11SlotInfo *slot, 1.14 + int rsasize, 1.15 + int publicExponent, 1.16 + char *noise, 1.17 + SECKEYPublicKey **pubkeyp, 1.18 + char *pqgFile, 1.19 + PK11AttrFlags attrFlags, 1.20 + CK_FLAGS opFlagsOn, 1.21 + CK_FLAGS opFlagsOff, 1.22 + secuPWData *pwdata); 1.23 + 1.24 +extern char *progName; 1.25 + 1.26 +enum certutilExtns { 1.27 + ext_keyUsage = 0, 1.28 + ext_basicConstraint, 1.29 + ext_authorityKeyID, 1.30 + ext_CRLDistPts, 1.31 + ext_NSCertType, 1.32 + ext_extKeyUsage, 1.33 + ext_authInfoAcc, 1.34 + ext_subjInfoAcc, 1.35 + ext_certPolicies, 1.36 + ext_policyMappings, 1.37 + ext_policyConstr, 1.38 + ext_inhibitAnyPolicy, 1.39 + ext_subjectKeyID, 1.40 + ext_nameConstraints, 1.41 + ext_subjectAltName, 1.42 + ext_End 1.43 +}; 1.44 + 1.45 +typedef struct ExtensionEntryStr { 1.46 + PRBool activated; 1.47 + const char *arg; 1.48 +} ExtensionEntry; 1.49 + 1.50 +typedef ExtensionEntry certutilExtnList[ext_End]; 1.51 + 1.52 +extern SECStatus 1.53 +AddExtensions(void *extHandle, const char *emailAddrs, const char *dnsNames, 1.54 + certutilExtnList extList, const char *extGeneric); 1.55 + 1.56 +extern SECStatus 1.57 +GetOidFromString(PLArenaPool *arena, SECItem *to, 1.58 + const char *from, size_t fromLen); 1.59 + 1.60 +#endif /* _CERTUTIL_H */ 1.61 +