PageRenderTime 33ms CodeModel.GetById 22ms RepoModel.GetById 0ms 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
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  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. */
  9. package com.hurlant.util.der
  10. {
  11. import com.hurlant.util.Hex;
  12. public class Type
  13. {
  14. public static const TLS_CERT:Array = [
  15. {name:"signedCertificate", extract:true, value: [
  16. {name:"versionHolder", optional:true, value: [
  17. {name:"version"}
  18. ], defaultValue: function():Sequence{
  19. var s:Sequence = new Sequence(0, 0);
  20. var v:Integer = new Integer(2,1, Hex.toArray("00"));
  21. s.push(v);
  22. s.version = v;
  23. return s;
  24. }()
  25. },
  26. {name:"serialNumber"},
  27. {name:"signature", value: [
  28. {name:"algorithmId"}
  29. ]},
  30. {name:"issuer", extract:true, value: [
  31. {name:"type"},
  32. {name:"value"}
  33. ]},
  34. {name:"validity", value: [
  35. {name:"notBefore"},
  36. {name:"notAfter"}
  37. ]},
  38. {name:"subject", extract:true, value: [
  39. ]},
  40. {name:"subjectPublicKeyInfo", value: [
  41. {name:"algorithm", value: [
  42. {name:"algorithmId"}
  43. ]},
  44. {name:"subjectPublicKey"}
  45. ]},
  46. {name:"extensions", value: [
  47. ]}
  48. ]},
  49. {name:"algorithmIdentifier",value:[
  50. {name:"algorithmId"}
  51. ]},
  52. {name:"encrypted", value:null}
  53. ];
  54. public static const CERTIFICATE:Array = [
  55. {name:"tbsCertificate", value:[
  56. {name:"tag0", value:[
  57. {name:"version"}
  58. ]},
  59. {name:"serialNumber"},
  60. {name:"signature"},
  61. {name:"issuer", value:[
  62. {name:"type"},
  63. {name:"value"}
  64. ]},
  65. {name:"validity", value:[
  66. {name:"notBefore"},
  67. {name:"notAfter"}
  68. ]},
  69. {name:"subject"},
  70. {name:"subjectPublicKeyInfo", value:[
  71. {name:"algorithm"},
  72. {name:"subjectPublicKey"}
  73. ]},
  74. {name:"issuerUniqueID"},
  75. {name:"subjectUniqueID"},
  76. {name:"extensions"}
  77. ]},
  78. {name:"signatureAlgorithm"},
  79. {name:"signatureValue"}
  80. ];
  81. public static const RSA_PUBLIC_KEY:Array = [
  82. {name:"modulus"},
  83. {name:"publicExponent"}
  84. ];
  85. public static const RSA_SIGNATURE:Array = [
  86. {name:"algorithm", value:[
  87. {name:"algorithmId"}
  88. ]},
  89. {name:"hash"}
  90. ];
  91. }
  92. }