add utf8 string as primitive type
This commit is contained in:
parent
36592cedc1
commit
6a108e0849
|
@ -16,11 +16,11 @@ var PEM = exports.PEM;
|
||||||
ASN1.ELOOP = "uASN1.js Error: iterated over 15+ elements (probably a malformed file)";
|
ASN1.ELOOP = "uASN1.js Error: iterated over 15+ elements (probably a malformed file)";
|
||||||
ASN1.EDEEP = "uASN1.js Error: element nested 20+ layers deep (probably a malformed file)";
|
ASN1.EDEEP = "uASN1.js Error: element nested 20+ layers deep (probably a malformed file)";
|
||||||
// Container Types are Sequence 0x30, Container Array? (0xA0, 0xA1)
|
// Container Types are Sequence 0x30, Container Array? (0xA0, 0xA1)
|
||||||
// Value Types are Integer 0x02, Null 0x05, Object ID 0x06, Value Array? (0x82)
|
// Value Types are Integer 0x02, Null 0x05, Object ID 0x06, String 0x0C, Value Array? (0x82)
|
||||||
// Bit String (0x03) and Octet String (0x04) may be values or containers
|
// Bit String (0x03) and Octet String (0x04) may be values or containers
|
||||||
// Sometimes Bit String is used as a container (RSA Pub Spki)
|
// Sometimes Bit String is used as a container (RSA Pub Spki)
|
||||||
ASN1.CTYPES = [ 0x30, 0x31, 0xa0, 0xa1 ];
|
ASN1.CTYPES = [ 0x30, 0x31, 0xa0, 0xa1 ];
|
||||||
ASN1.VTYPES = [ 0x02, 0x05, 0x06, 0x82 ];
|
ASN1.VTYPES = [ 0x02, 0x05, 0x06, 0x0c, 0x82 ];
|
||||||
ASN1.parse = function parseAsn1(buf, depth, ws) {
|
ASN1.parse = function parseAsn1(buf, depth, ws) {
|
||||||
if (!ws) { ws = ''; }
|
if (!ws) { ws = ''; }
|
||||||
if (!depth) { depth = 0; }
|
if (!depth) { depth = 0; }
|
||||||
|
|
Loading…
Reference in New Issue