blob: 2e04a64bb86a3d87f1559a32143219a0ac4aaa3f [file] [log] [blame]
Meki Cherkaoui8f173612012-06-06 01:05:40 -07001<?xml version = "1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3"DTD/xhtml1-strict.dtd">
4<html xmlns = "http://www.w3.org/1999/xhtml">
5
6<head>
Jeff Thompsone06b31e2012-09-30 17:19:19 -07007 <title>Test Connection</title>
Jeff Thompson7ed5ef52012-08-26 11:28:48 -07008 <script type="text/javascript" src="../java_socket_bridge.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -07009
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070010 <script type="text/javascript" src="../CCNProtocolDTags.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070011
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070012 <script type="text/javascript" src="../CCNTime.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070013
Jeff Thompsonf3bd3592012-09-29 23:25:30 -070014 <script type="text/javascript" src="../Name.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070015
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070016 <script type="text/javascript" src="../ContentObject.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070017
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070018 <script type="text/javascript" src="../DateFormat.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070019
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070020 <script type="text/javascript" src="../Exclude.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070021
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070022 <script type="text/javascript" src="../ExcludeAny.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070023
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070024 <script type="text/javascript" src="../ExcludeComponent.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070025
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070026 <script type="text/javascript" src="../Interest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070027
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070028 <script type="text/javascript" src="../KeyLocator.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070029
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070030 <script type="text/javascript" src="../PublisherID.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070031
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070032 <script type="text/javascript" src="../Signature.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070033
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070034 <script type="text/javascript" src="../SignedInfo.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070035
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070036 <script type="text/javascript" src="../PublisherPublicKeyDigest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070037
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070038 <script type="text/javascript" src="../FaceInstance.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070039
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070040 <script type="text/javascript" src="../ForwardingEntry.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070041
42
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070043 <script type="text/javascript" src="../encoding/BinaryXMLEncoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070044
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070045 <script type="text/javascript" src="../encoding/BinaryXMLCodec.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070046
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070047 <script type="text/javascript" src="../encoding/BinaryXMLDecoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070048
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070049 <script type="text/javascript" src="../encoding/DataUtils.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070050
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070051 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070052
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070053 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn.js"></script>
54 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn2.js"></script>
55 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa.js"></script>
56 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa2.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070057
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070058 <script language="JavaScript" type="text/javascript" src="../securityLib/sha1.js"></script>
59 <script language="JavaScript" type="text/javascript" src="../securityLib/sha256.js"></script>
60 <script language="JavaScript" type="text/javascript" src="../securityLib/sha512.js"></script>
61 <script language="JavaScript" type="text/javascript" src="../securityLib/md5.js"></script>
62 <script language="JavaScript" type="text/javascript" src="../securityLib/ripemd160.js"></script>
63 <script language="JavaScript" type="text/javascript" src="../securityLib/base64.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070064
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070065 <script language="JavaScript" type="text/javascript" src="../securityLib/rsapem-1.1.js"></script>
66 <script language="JavaScript" type="text/javascript" src="../securityLib/rsasign-1.2.js"></script>
67 <script language="JavaScript" type="text/javascript" src="../securityLib/asn1hex-1.1.js"></script>
68 <script language="JavaScript" type="text/javascript" src="../securityLib/x509-1.1.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070069
70 <script type="text/javascript">
71
72 function getAction(){
73 console.log('ABOUT TO GET');
74
Jeff Thompsone06b31e2012-09-30 17:19:19 -070075 // Interest for "/"
76 var hex = '01d2f20000';
77 var received = get('127.0.0.1', 9695, hex);
Meki Cherkaoui8f173612012-06-06 01:05:40 -070078
Jeff Thompsone06b31e2012-09-30 17:19:19 -070079 var output= '<br /> received Content: <br/>' + received;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070080
81 console.log('INTEREST RECEIVED '+ received);
82
83 document.getElementById('result').innerHTML = output;
84
85 }
86
87
88 function putAction(){
89 console.log('ABOUT TO PUT');
90
Jeff Thompsone06b31e2012-09-30 17:19:19 -070091 var hex = '01d2f2faa563636e7800fa0285e0290233a1f9da00a6b0db63b910379f6d98edd2b5ea7b0044109923286e6aaa00fabd73656c6672656700fa1a95048202aa03b20885a4024a492e588eade1bb1f94c151a617a41dde3d571d94ea1ac9d3c77f4c9f0ed5700c9722b3497124f3003320e346a2dead367b92a53bb087298023b0ac15584d3dcfb51482b6f458f24d37d46095c97b708aacaabd3fdfa981a86bd4831b2596b1ac23faa3ac6dcf3cb324dea96bc3d75aee7f1d6178ed82a09d5f31c6fa800000f20001a203e20285b5506b1aba3da7761b0f8d61a4aa7e3b6d15b426feb5bda82389aca765a3b81c0002bab505068dba9ba20001e201da0a9530819f300d06092a864886f70d010101050003818d0030818902818100e17d30a7d828ab1b840b17542dcaf6207afd221e086b2a60d16cb7f54448ba9f3f08bcd099db21dd162a779e61aa89eee554d3a47de230bc7ac590d524067c3898bba6f5dc4360b845eda48cbd9cf126a723445f0e1952d7325a75faf556144f9a98af7186b0278685b8e2c08bea87171b4dee585c1828295b5395eb4a17779f0203010001000000019a03a5058a04cabe73656c6672656700f2faa564656d6f00fabd6d657373616765000004fa8e330003d2d63231343734383336343700000000000002d28e310000';
92 var name = '/demo/message';
93 // Signed content of "It works!".
94 outputHex = '048202aa03b20885c8762b14c1df125229ecc88ff5080d042a2de01cd0b8e4357af88cff993c0c78c9774ebaf00bebfa2699ae81412fe03a155291981f3c914f2bc075446bb3dafce0314a40bc4c93890c6663da80b7798b66d97be6ddbee58ca30761d28b46ce3ac058b1fbbab7fad981626de954c54c09d68ebb8a18d31a4e1fb970677fb43f180000f2faa564656d6f00fabd6d657373616765000001a203e20285b5506b1aba3da7761b0f8d61a4aa7e3b6d15b426feb5bda82389aca765a3b81c0002bab505068dbab1f00001e201da0a9530819f300d06092a864886f70d010101050003818d0030818902818100e17d30a7d828ab1b840b17542dcaf6207afd221e086b2a60d16cb7f54448ba9f3f08bcd099db21dd162a779e61aa89eee554d3a47de230bc7ac590d524067c3898bba6f5dc4360b845eda48cbd9cf126a723445f0e1952d7325a75faf556144f9a98af7186b0278685b8e2c08bea87171b4dee585c1828295b5395eb4a17779f0203010001000000019add5468697320776f726b73210000';
95
96 var received = put('127.0.0.1', 9695, hex, name, outputHex);
Meki Cherkaoui8f173612012-06-06 01:05:40 -070097
Jeff Thompsone06b31e2012-09-30 17:19:19 -070098 var output= '<br /> received Content: <br/>' + received;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070099
100 document.getElementById('result').innerHTML = output;
101
102 }
103
104
105 </script>
106
107</head>
108<body >
109
110 <form>
111 Press Buttons:<br /><!-- input id="contentname" type="text" name="CONTENTNAME" value="/PARC/abc" /--> <br />
112 </form>
113
114 <button onclick="putAction()">PUT!</button>
115 <button onclick="getAction()">GET!</button>
116
117 <div >
Jeff Thompson67439692012-08-26 12:15:08 -0700118 <applet id="JavaSocketBridge" archive="../JavaSocketBridge.jar" code="JavaSocketBridge.class" width="0" height="0">
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700119 </applet>
120 </div>
121
122 <p id="result"></p>
123
124</body>
125</html>