Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
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 |