tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

certutil.h (1647B)


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