security/manager/ssl/src/nsNSSASN1Object.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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 #ifndef _NSSASN_H_
michael@0 5 #define _NSSASN_H_
michael@0 6
michael@0 7 #include "nscore.h"
michael@0 8 #include "nsIX509Cert.h"
michael@0 9 #include "nsCOMPtr.h"
michael@0 10 #include "nsString.h"
michael@0 11 #include "nsIASN1Sequence.h"
michael@0 12 #include "nsIASN1PrintableItem.h"
michael@0 13 #include "nsIMutableArray.h"
michael@0 14
michael@0 15 //
michael@0 16 // Read comments in nsIX509Cert.idl for a description of the desired
michael@0 17 // purpose for this ASN1 interface implementation.
michael@0 18 //
michael@0 19
michael@0 20 class nsNSSASN1Sequence : public nsIASN1Sequence
michael@0 21 {
michael@0 22 public:
michael@0 23 NS_DECL_ISUPPORTS
michael@0 24 NS_DECL_NSIASN1SEQUENCE
michael@0 25 NS_DECL_NSIASN1OBJECT
michael@0 26
michael@0 27 nsNSSASN1Sequence();
michael@0 28 virtual ~nsNSSASN1Sequence();
michael@0 29 /* additional members */
michael@0 30 private:
michael@0 31 nsCOMPtr<nsIMutableArray> mASN1Objects;
michael@0 32 nsString mDisplayName;
michael@0 33 nsString mDisplayValue;
michael@0 34 uint32_t mType;
michael@0 35 uint32_t mTag;
michael@0 36 bool mIsValidContainer;
michael@0 37 bool mIsExpanded;
michael@0 38 };
michael@0 39
michael@0 40 class nsNSSASN1PrintableItem : public nsIASN1PrintableItem
michael@0 41 {
michael@0 42 public:
michael@0 43 NS_DECL_ISUPPORTS
michael@0 44 NS_DECL_NSIASN1PRINTABLEITEM
michael@0 45 NS_DECL_NSIASN1OBJECT
michael@0 46
michael@0 47 nsNSSASN1PrintableItem();
michael@0 48 virtual ~nsNSSASN1PrintableItem();
michael@0 49 /* additional members */
michael@0 50 private:
michael@0 51 nsString mDisplayName;
michael@0 52 nsString mValue;
michael@0 53 uint32_t mType;
michael@0 54 uint32_t mTag;
michael@0 55 unsigned char *mData;
michael@0 56 uint32_t mLen;
michael@0 57 };
michael@0 58
michael@0 59 nsresult CreateFromDER(unsigned char *data,
michael@0 60 unsigned int len,
michael@0 61 nsIASN1Object **retval);
michael@0 62 #endif //_NSSASN_H_

mercurial