security/manager/ssl/src/nsUsageArrayHelper.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     5 #ifndef _NSUSAGEARRAYHELPER_H_
     6 #define _NSUSAGEARRAYHELPER_H_
     8 #include "CertVerifier.h"
     9 #include "nsNSSComponent.h"
    10 #include "certt.h"
    12 class nsUsageArrayHelper
    13 {
    14 public:
    15   nsUsageArrayHelper(CERTCertificate *aCert);
    17   nsresult GetUsagesArray(const char *suffix,
    18                bool localOnly,
    19                uint32_t outArraySize,
    20                uint32_t *_verified,
    21                uint32_t *_count,
    22                char16_t **tmpUsages);
    24   enum { max_returned_out_array_size = 12 };
    26 private:
    27   CERTCertificate *mCert;
    28   nsresult m_rv;
    29   CERTCertDBHandle *defaultcertdb;
    30   nsCOMPtr<nsINSSComponent> nssComponent;
    32   uint32_t check(uint32_t previousCheckResult,
    33                  const char *suffix,
    34                  mozilla::psm::CertVerifier * certVerifier,
    35                  SECCertificateUsage aCertUsage,
    36                  PRTime time,
    37                  mozilla::psm::CertVerifier::Flags flags,
    38                  uint32_t &aCounter,
    39                  char16_t **outUsages);
    41   void verifyFailed(uint32_t *_verified, int err);
    42 };
    44 #endif

mercurial