michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef _NSSASN_H_ michael@0: #define _NSSASN_H_ michael@0: michael@0: #include "nscore.h" michael@0: #include "nsIX509Cert.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: #include "nsIASN1Sequence.h" michael@0: #include "nsIASN1PrintableItem.h" michael@0: #include "nsIMutableArray.h" michael@0: michael@0: // michael@0: // Read comments in nsIX509Cert.idl for a description of the desired michael@0: // purpose for this ASN1 interface implementation. michael@0: // michael@0: michael@0: class nsNSSASN1Sequence : public nsIASN1Sequence michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIASN1SEQUENCE michael@0: NS_DECL_NSIASN1OBJECT michael@0: michael@0: nsNSSASN1Sequence(); michael@0: virtual ~nsNSSASN1Sequence(); michael@0: /* additional members */ michael@0: private: michael@0: nsCOMPtr mASN1Objects; michael@0: nsString mDisplayName; michael@0: nsString mDisplayValue; michael@0: uint32_t mType; michael@0: uint32_t mTag; michael@0: bool mIsValidContainer; michael@0: bool mIsExpanded; michael@0: }; michael@0: michael@0: class nsNSSASN1PrintableItem : public nsIASN1PrintableItem michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIASN1PRINTABLEITEM michael@0: NS_DECL_NSIASN1OBJECT michael@0: michael@0: nsNSSASN1PrintableItem(); michael@0: virtual ~nsNSSASN1PrintableItem(); michael@0: /* additional members */ michael@0: private: michael@0: nsString mDisplayName; michael@0: nsString mValue; michael@0: uint32_t mType; michael@0: uint32_t mTag; michael@0: unsigned char *mData; michael@0: uint32_t mLen; michael@0: }; michael@0: michael@0: nsresult CreateFromDER(unsigned char *data, michael@0: unsigned int len, michael@0: nsIASN1Object **retval); michael@0: #endif //_NSSASN_H_