security/nss/cmd/certutil/certutil.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef _CERTUTIL_H
michael@0 6 #define _CERTUTIL_H
michael@0 7
michael@0 8 extern SECKEYPrivateKey *
michael@0 9 CERTUTIL_GeneratePrivateKey(KeyType keytype,
michael@0 10 PK11SlotInfo *slot,
michael@0 11 int rsasize,
michael@0 12 int publicExponent,
michael@0 13 char *noise,
michael@0 14 SECKEYPublicKey **pubkeyp,
michael@0 15 char *pqgFile,
michael@0 16 PK11AttrFlags attrFlags,
michael@0 17 CK_FLAGS opFlagsOn,
michael@0 18 CK_FLAGS opFlagsOff,
michael@0 19 secuPWData *pwdata);
michael@0 20
michael@0 21 extern char *progName;
michael@0 22
michael@0 23 enum certutilExtns {
michael@0 24 ext_keyUsage = 0,
michael@0 25 ext_basicConstraint,
michael@0 26 ext_authorityKeyID,
michael@0 27 ext_CRLDistPts,
michael@0 28 ext_NSCertType,
michael@0 29 ext_extKeyUsage,
michael@0 30 ext_authInfoAcc,
michael@0 31 ext_subjInfoAcc,
michael@0 32 ext_certPolicies,
michael@0 33 ext_policyMappings,
michael@0 34 ext_policyConstr,
michael@0 35 ext_inhibitAnyPolicy,
michael@0 36 ext_subjectKeyID,
michael@0 37 ext_nameConstraints,
michael@0 38 ext_subjectAltName,
michael@0 39 ext_End
michael@0 40 };
michael@0 41
michael@0 42 typedef struct ExtensionEntryStr {
michael@0 43 PRBool activated;
michael@0 44 const char *arg;
michael@0 45 } ExtensionEntry;
michael@0 46
michael@0 47 typedef ExtensionEntry certutilExtnList[ext_End];
michael@0 48
michael@0 49 extern SECStatus
michael@0 50 AddExtensions(void *extHandle, const char *emailAddrs, const char *dnsNames,
michael@0 51 certutilExtnList extList, const char *extGeneric);
michael@0 52
michael@0 53 extern SECStatus
michael@0 54 GetOidFromString(PLArenaPool *arena, SECItem *to,
michael@0 55 const char *from, size_t fromLen);
michael@0 56
michael@0 57 #endif /* _CERTUTIL_H */
michael@0 58

mercurial