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.

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

mercurial