PageRenderTime 14ms CodeModel.GetById 2ms app.highlight 8ms RepoModel.GetById 2ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Type.as

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
ActionScript | 94 lines | 84 code | 2 blank | 8 comment | 0 complexity | cffe7fd7c8f00530a6d1a52ea08305a9 MD5 | raw file
 1/**
 2 * Type
 3 * 
 4 * A few Asn-1 structures
 5 * Copyright (c) 2007 Henri Torgemane
 6 * 
 7 * See LICENSE.txt for full license information.
 8 */
 9package com.hurlant.util.der
10{
11	import com.hurlant.util.Hex;
12	
13	public class Type
14	{
15		public static const TLS_CERT:Array = [ 
16			{name:"signedCertificate", extract:true, value: [
17				{name:"versionHolder", optional:true, value: [
18					{name:"version"}
19				], defaultValue: function():Sequence{ 
20						var s:Sequence = new Sequence(0, 0); 
21						var v:Integer = new Integer(2,1, Hex.toArray("00"));
22						s.push(v);
23						s.version = v;
24						return s;
25					}()
26				},
27				{name:"serialNumber"},
28				{name:"signature", value: [
29					{name:"algorithmId"}
30				]},
31				{name:"issuer", extract:true, value: [ 
32					{name:"type"},
33					{name:"value"}
34				]},
35				{name:"validity", value: [
36					{name:"notBefore"},
37					{name:"notAfter"}
38				]},
39				{name:"subject", extract:true, value: [
40				]},
41				{name:"subjectPublicKeyInfo", value: [
42					{name:"algorithm", value: [
43						{name:"algorithmId"}
44					]},
45					{name:"subjectPublicKey"}
46				]},
47				{name:"extensions", value: [
48				]}
49			]}, 
50			{name:"algorithmIdentifier",value:[
51				{name:"algorithmId"}
52			]}, 
53			{name:"encrypted", value:null}
54		];
55		public static const CERTIFICATE:Array = [
56			{name:"tbsCertificate", value:[
57				{name:"tag0", value:[
58					{name:"version"}
59				]},
60				{name:"serialNumber"},
61				{name:"signature"},
62				{name:"issuer", value:[
63					{name:"type"},
64					{name:"value"}
65				]},
66				{name:"validity", value:[
67					{name:"notBefore"},
68					{name:"notAfter"}
69				]},
70				{name:"subject"},
71				{name:"subjectPublicKeyInfo", value:[
72					{name:"algorithm"},
73					{name:"subjectPublicKey"}
74				]},
75				{name:"issuerUniqueID"},
76				{name:"subjectUniqueID"},
77				{name:"extensions"}
78			]},
79			{name:"signatureAlgorithm"},
80			{name:"signatureValue"}
81		];
82		public static const RSA_PUBLIC_KEY:Array = [
83			{name:"modulus"},
84			{name:"publicExponent"}
85		];
86		public static const RSA_SIGNATURE:Array = [
87			{name:"algorithm", value:[
88				{name:"algorithmId"}
89			 ]},
90			{name:"hash"}
91		];
92		
93	}
94}