michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _CERTUTIL_H michael@0: #define _CERTUTIL_H michael@0: michael@0: extern SECKEYPrivateKey * michael@0: CERTUTIL_GeneratePrivateKey(KeyType keytype, michael@0: PK11SlotInfo *slot, michael@0: int rsasize, michael@0: int publicExponent, michael@0: char *noise, michael@0: SECKEYPublicKey **pubkeyp, michael@0: char *pqgFile, michael@0: PK11AttrFlags attrFlags, michael@0: CK_FLAGS opFlagsOn, michael@0: CK_FLAGS opFlagsOff, michael@0: secuPWData *pwdata); michael@0: michael@0: extern char *progName; michael@0: michael@0: enum certutilExtns { michael@0: ext_keyUsage = 0, michael@0: ext_basicConstraint, michael@0: ext_authorityKeyID, michael@0: ext_CRLDistPts, michael@0: ext_NSCertType, michael@0: ext_extKeyUsage, michael@0: ext_authInfoAcc, michael@0: ext_subjInfoAcc, michael@0: ext_certPolicies, michael@0: ext_policyMappings, michael@0: ext_policyConstr, michael@0: ext_inhibitAnyPolicy, michael@0: ext_subjectKeyID, michael@0: ext_nameConstraints, michael@0: ext_subjectAltName, michael@0: ext_End michael@0: }; michael@0: michael@0: typedef struct ExtensionEntryStr { michael@0: PRBool activated; michael@0: const char *arg; michael@0: } ExtensionEntry; michael@0: michael@0: typedef ExtensionEntry certutilExtnList[ext_End]; michael@0: michael@0: extern SECStatus michael@0: AddExtensions(void *extHandle, const char *emailAddrs, const char *dnsNames, michael@0: certutilExtnList extList, const char *extGeneric); michael@0: michael@0: extern SECStatus michael@0: GetOidFromString(PLArenaPool *arena, SECItem *to, michael@0: const char *from, size_t fromLen); michael@0: michael@0: #endif /* _CERTUTIL_H */ michael@0: