1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/public/nsIASN1Object.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +/** 1.13 + * This represents an ASN.1 object, 1.14 + * where ASN.1 is "Abstract Syntax Notation number One". 1.15 + * 1.16 + * The additional state information carried in this interface 1.17 + * makes it fit for being used as the data structure 1.18 + * when working with visual reprenstation of ASN.1 objects 1.19 + * in a human user interface, like in a tree widget 1.20 + * where open/close state of nodes must be remembered. 1.21 + */ 1.22 +[scriptable, uuid(ba8bf582-1dd1-11b2-898c-f40246bc9a63)] 1.23 +interface nsIASN1Object : nsISupports { 1.24 + 1.25 + /** 1.26 + * Identifiers for the possible types of object. 1.27 + */ 1.28 + const unsigned long ASN1_END_CONTENTS = 0; 1.29 + const unsigned long ASN1_BOOLEAN = 1; 1.30 + const unsigned long ASN1_INTEGER = 2; 1.31 + const unsigned long ASN1_BIT_STRING = 3; 1.32 + const unsigned long ASN1_OCTET_STRING = 4; 1.33 + const unsigned long ASN1_NULL = 5; 1.34 + const unsigned long ASN1_OBJECT_ID = 6; 1.35 + const unsigned long ASN1_ENUMERATED = 10; 1.36 + const unsigned long ASN1_UTF8_STRING = 12; 1.37 + const unsigned long ASN1_SEQUENCE = 16; 1.38 + const unsigned long ASN1_SET = 17; 1.39 + const unsigned long ASN1_PRINTABLE_STRING = 19; 1.40 + const unsigned long ASN1_T61_STRING = 20; 1.41 + const unsigned long ASN1_IA5_STRING = 22; 1.42 + const unsigned long ASN1_UTC_TIME = 23; 1.43 + const unsigned long ASN1_GEN_TIME = 24; 1.44 + const unsigned long ASN1_VISIBLE_STRING = 26; 1.45 + const unsigned long ASN1_UNIVERSAL_STRING = 28; 1.46 + const unsigned long ASN1_BMP_STRING = 30; 1.47 + const unsigned long ASN1_HIGH_TAG_NUMBER = 31; 1.48 + const unsigned long ASN1_CONTEXT_SPECIFIC = 32; 1.49 + const unsigned long ASN1_APPLICATION = 33; 1.50 + const unsigned long ASN1_PRIVATE = 34; 1.51 + 1.52 + /** 1.53 + * "type" will be equal to one of the defined object identifiers. 1.54 + */ 1.55 + attribute unsigned long type; 1.56 + 1.57 + 1.58 + /** 1.59 + * This contains a tag as explained in ASN.1 standards documents. 1.60 + */ 1.61 + attribute unsigned long tag; 1.62 + 1.63 + /** 1.64 + * "displayName" contains a human readable explanatory label. 1.65 + */ 1.66 + attribute AString displayName; 1.67 + 1.68 + /** 1.69 + * "displayValue" contains the human readable value. 1.70 + */ 1.71 + attribute AString displayValue; 1.72 +}; 1.73 +