1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/src/nsCertificatePrincipal.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef __NS_CERTIFICATEPRINCIPAL_H 1.10 +#define __NS_CERTIFICATEPRINCIPAL_H 1.11 + 1.12 +#include "nsICertificatePrincipal.h" 1.13 +#include "nsString.h" 1.14 +#include "nsCOMPtr.h" 1.15 + 1.16 +class nsCertificatePrincipal : public nsICertificatePrincipal 1.17 +{ 1.18 +public: 1.19 + NS_DECL_ISUPPORTS 1.20 + NS_DECL_NSICERTIFICATEPRINCIPAL 1.21 + 1.22 + nsCertificatePrincipal(const nsACString& aFingerprint, 1.23 + const nsACString& aSubjectName, 1.24 + const nsACString& aPrettyName, 1.25 + nsISupports* aCert) 1.26 + : mFingerprint(aFingerprint) 1.27 + , mSubjectName(aSubjectName) 1.28 + , mPrettyName(aPrettyName) 1.29 + , mCert(aCert) 1.30 + {} 1.31 + 1.32 + virtual ~nsCertificatePrincipal() {} 1.33 + 1.34 +private: 1.35 + nsCString mFingerprint; 1.36 + nsCString mSubjectName; 1.37 + nsCString mPrettyName; 1.38 + nsCOMPtr<nsISupports> mCert; 1.39 +}; 1.40 + 1.41 +#endif /* __NS_CERTIFICATEPRINCIPAL_H */