blob: 362b25446b6c1cbada35a6f71882bef4659b9dd1 [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>
7 <title>NDN Decode Interest + Face Instance</title>
8
Jeff Thompson7ed5ef52012-08-26 11:28:48 -07009 <script type="text/javascript" src="../java_socket_bridge.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070010
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070011 <script type="text/javascript" src="../CCNProtocolDTags.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070012
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070013 <script type="text/javascript" src="../CCNTime.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070014
Jeff Thompsonf3bd3592012-09-29 23:25:30 -070015 <script type="text/javascript" src="../Name.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070016
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070017 <script type="text/javascript" src="../ContentObject.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070018
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070019 <script type="text/javascript" src="../DateFormat.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070020
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070021 <script type="text/javascript" src="../Exclude.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070022
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070023 <script type="text/javascript" src="../ExcludeAny.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070024
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070025 <script type="text/javascript" src="../ExcludeComponent.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070026
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070027 <script type="text/javascript" src="../Interest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070028
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070029 <script type="text/javascript" src="../KeyLocator.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070030
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070031 <script type="text/javascript" src="../PublisherID.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070032
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070033 <script type="text/javascript" src="../Signature.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070034
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070035 <script type="text/javascript" src="../SignedInfo.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070036
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070037 <script type="text/javascript" src="../PublisherPublicKeyDigest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070038
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070039 <script type="text/javascript" src="../FaceInstance.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070040
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070041 <script type="text/javascript" src="../ForwardingEntry.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070042
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 type="text/javascript" src="../encoding/EncodingUtils.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070052
53
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070054 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070055
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070056 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn.js"></script>
57 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn2.js"></script>
58 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa.js"></script>
59 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa2.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070060
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070061 <script language="JavaScript" type="text/javascript" src="../securityLib/sha1.js"></script>
62 <script language="JavaScript" type="text/javascript" src="../securityLib/sha256.js"></script>
63 <script language="JavaScript" type="text/javascript" src="../securityLib/sha512.js"></script>
64 <script language="JavaScript" type="text/javascript" src="../securityLib/md5.js"></script>
65 <script language="JavaScript" type="text/javascript" src="../securityLib/ripemd160.js"></script>
66 <script language="JavaScript" type="text/javascript" src="../securityLib/base64.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070067
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070068 <script language="JavaScript" type="text/javascript" src="../securityLib/rsapem-1.1.js"></script>
69 <script language="JavaScript" type="text/javascript" src="../securityLib/rsasign-1.2.js"></script>
70 <script language="JavaScript" type="text/javascript" src="../securityLib/asn1hex-1.1.js"></script>
71 <script language="JavaScript" type="text/javascript" src="../securityLib/x509-1.1.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070072
73 <script type="text/javascript">
74
75
76
77 function decode(){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070078
79 var input = document.getElementById('result').innerHTML;
80
81
82 var interest = decodeHexInterest(input);
83
84 if(LOG>3)console.log('INTEREST DECODED');
85 if(LOG>3)console.log(interest);
86
87 ///////////////////////////////////////
88
89 var output ="";
90
91
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070092 if(interest.name!=null && interest.name.components!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070093 output+= "NAME: ";
94
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070095 for(var i=0;i<interest.name.components.length;i++){
96 output+= "/"+ DataUtils.toString(interest.name.components[i]);
Meki Cherkaoui8f173612012-06-06 01:05:40 -070097 }
98 output+= "<br />";
99 output+= "<br />";
100 }
101
Jeff Thompson86aea882012-09-29 17:32:48 -0700102 if(interest.faceInstance!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700103 output+= "FaceInstance: ";
104
Jeff Thompson86aea882012-09-29 17:32:48 -0700105 output+= interest.faceInstance;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700106
107 output+= "<br />";
108 output+= "<br />";
109 }
110
Jeff Thompson86aea882012-09-29 17:32:48 -0700111 if(interest.exclude!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700112 output+= "Exclude: ";
113
Jeff Thompson86aea882012-09-29 17:32:48 -0700114 output+= interest.exclude;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700115
116 output+= "<br />";
117 output+= "<br />";
118 }
119
Jeff Thompson86aea882012-09-29 17:32:48 -0700120 if(interest.childSelector!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700121 output+= "ChildSelector: ";
122
Jeff Thompson86aea882012-09-29 17:32:48 -0700123 output+= interest.childSelector;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700124
125 output+= "<br />";
126 output+= "<br />";
127 }
128
Jeff Thompson86aea882012-09-29 17:32:48 -0700129 if(interest.answerOriginKind!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700130 output+= "AnswerOriginKind: ";
131
Jeff Thompson86aea882012-09-29 17:32:48 -0700132 output+= interest.answerOriginKind;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700133
134 output+= "<br />";
135 output+= "<br />";
136 }
137
Jeff Thompson86aea882012-09-29 17:32:48 -0700138 if(interest.interestLifetime!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700139 output+= "InterestLifetime: ";
140
Jeff Thompson86aea882012-09-29 17:32:48 -0700141 output+= interest.interestLifetime;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700142
143 output+= "<br />";
144 output+= "<br />";
145 }
146
Jeff Thompson86aea882012-09-29 17:32:48 -0700147 if(interest.nonce!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700148 output+= "Nonce: ";
149
Jeff Thompson86aea882012-09-29 17:32:48 -0700150 output+= interest.nonce;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700151
152 output+= "<br />";
153 output+= "<br />";
154 }
155
156
Jeff Thompson86aea882012-09-29 17:32:48 -0700157 if(interest.scope!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700158 output+= "SCOPE: ";
159
Jeff Thompson86aea882012-09-29 17:32:48 -0700160 output+= interest.scope;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700161
162 output+= "<br />";
163 output+= "<br />";
164 }
165
Jeff Thompson86aea882012-09-29 17:32:48 -0700166 if(interest.publisherPublicKeyDigest!=null ){
167 output+= "PUBLISHER PUBLIC KEY DIGEST: ";
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700168
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700169 output+= interest.publisherPublicKeyDigest.publisherPublicKeyDigest;
Jeff Thompson86aea882012-09-29 17:32:48 -0700170
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700171 output+= "<br />";
172 output+= "<br />";
173 }
174
Jeff Thompson86aea882012-09-29 17:32:48 -0700175 if(interest.maxSuffixComponents!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700176 output+= "MaxSuffixComponents : ";
177
Jeff Thompson86aea882012-09-29 17:32:48 -0700178 output+= interest.maxSuffixComponents;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700179
180 output+= "<br />";
181 output+= "<br />";
182 }
183
Jeff Thompson86aea882012-09-29 17:32:48 -0700184 if(interest.minSuffixComponents!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700185 output+= "MinSuffixComponents : ";
186
Jeff Thompson86aea882012-09-29 17:32:48 -0700187 output+= interest.minSuffixComponents;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700188
189 output+= "<br />";
190 output+= "<br />";
191 }
192
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700193 if(interest.name.components[3] !=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700194
195
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700196 var input = DataUtils.toHex(interest.name.components[3]) ;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700197
198 var contentObject = decodeHexContentObject(input);
199
Jeff Thompson86aea882012-09-29 17:32:48 -0700200 if(contentObject.content!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700201 output+= "Content of content Object: ";
202
Jeff Thompson86aea882012-09-29 17:32:48 -0700203 output+= DataUtils.toHex(contentObject.content);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700204
205 output+= "<br />";
206 output+= "<br />";
207 }
208
209
Jeff Thompson86aea882012-09-29 17:32:48 -0700210 var content = DataUtils.toHex(contentObject.content);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700211
212 var co = contentObject;
213
214
215 ////////////////////////////////////////
216
217
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700218 if(co.name!=null && co.name.components!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700219 output+= "NAME: ";
220
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700221 for(var i=0;i<co.name.components.length;i++){
222 output+= "/"+ DataUtils.toString(co.name.components[i]);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700223 }
224 output+= "<br />";
225 output+= "<br />";
226 }
227
Jeff Thompson86aea882012-09-29 17:32:48 -0700228 if(co.content !=null){
229 output += "CONTENT(ASCII): "+ DataUtils.toString(co.content);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700230
231 output+= "<br />";
232 output+= "<br />";
233 }
Jeff Thompson86aea882012-09-29 17:32:48 -0700234 if(co.content !=null){
235 output += "CONTENT(hex): "+ DataUtils.toHex(co.content);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700236
237 output+= "<br />";
238 output+= "<br />";
239 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700240 if(co.signature !=null && co.signature.signature!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700241
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700242 output += "SIGNATURE(hex): "+ DataUtils.toHex(co.signature.signature);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700243
244 output+= "<br />";
245 output+= "<br />";
246 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700247 if(co.signedInfo !=null && co.signedInfo.publisher!=null && co.signedInfo.publisher.publisherPublicKeyDigest!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700248
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700249 output += "Publisher Public Key Digest(hex): "+ DataUtils.toHex(co.signedInfo.publisher.publisherPublicKeyDigest);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700250
251 output+= "<br />";
252 output+= "<br />";
253 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700254 if(co.signedInfo !=null && co.signedInfo.timestamp!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700255 var d = new Date();
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700256 d.setTime( co.signedInfo.timestamp.msec );
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700257
258 var bytes = [217, 185, 12, 225, 217, 185, 12, 225];
259
260 output += "TimeStamp: "+d;
261 output+= "<br />";
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700262 output += "TimeStamp(number): "+ co.signedInfo.timestamp.msec;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700263
264
265 output+= "<br />";
266 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700267 if(co.signedInfo !=null && co.signedInfo.type!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700268
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700269 output += "Type: "+co.signedInfo.type;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700270 output+= "<br />";
271 output+= "<br />";
272 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700273 if(co.signedInfo !=null && co.signedInfo.locator!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700274
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700275 output += "Locator: "+co.signedInfo.locator.type;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700276 output+= "<br />";
277 output+= "<br />";
278 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700279 if(co.signedInfo !=null && co.signedInfo.freshnessSeconds!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700280
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700281 output += "FreshnessSeconds: "+co.signedInfo.freshnessSeconds;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700282 output+= "<br />";
283 output+= "<br />";
284 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700285 if(co.signedInfo !=null && co.signedInfo.finalBlockID!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700286
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700287 output += "FinalBlockID: "+co.signedInfo.finalBlockID;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700288 output+= "<br />";
289 output+= "<br />";
290 }
291
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700292 if(co.signedInfo!=null && co.signedInfo.locator!=null && co.signedInfo.locator.publicKey!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700293
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700294 var publickey = rstr2b64(DataUtils.toString(co.signedInfo.locator.publicKey));
295 var publickeyHex = DataUtils.toHex(co.signedInfo.locator.publicKey).toLowerCase();
296 var publickeyString = DataUtils.toString(co.signedInfo.locator.publicKey);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700297
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700298 var signature = DataUtils.toHex(co.signature.signature).toLowerCase();
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700299
300
301 var input = DataUtils.toString(co.rawSignatureData);
302
303
304 output += "DER Certificate: "+publickey ;
305
306 output+= "<br />";
307 output+= "<br />";
308
309
310
311 if(LOG>2) console.log(" ContentName + SignedInfo + Content = "+input);
312 if(LOG>2) console.log(" PublicKey = "+publickey );
313 if(LOG>2) console.log(" PublicKeyHex = "+publickeyHex );
314 if(LOG>2) console.log(" PublicKeyString = "+publickeyString );
315
316 if(LOG>2) console.log(" Signature "+signature );
317
318 if(LOG>2) console.log(" Signature NOW IS" );
319
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700320 if(LOG>2) console.log(co.signature.signature);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700321
322
323 /*var x509 = new X509();
324
325 x509.readCertPEM(publickey);
326
327
328 //x509.readCertPEMWithoutRSAInit(publickey);
329
330 var result = x509.subjectPublicKeyRSA.verifyString(input, signature);*/
331 //console.log('result is '+result);
332
333
334 var kp = publickeyHex.slice(56,314);
335
336 output += "PUBLISHER KEY(hex): "+kp ;
337
338 output+= "<br />";
339 output+= "<br />";
340
341 console.log('PUBLIC KEY IN HEX is ');
342 console.log(kp);
343
344 var exp = publickeyHex.slice(318,324);
345
346 console.log('kp size is '+kp.length );
347 output += "exponent: "+exp ;
348
349 output+= "<br />";
350 output+= "<br />";
351
352 console.log('EXPONENT is ');
353 console.log(exp);
354
355
356
357 /*var c1 = hex_sha256(input);
358 var c2 = signature;
359
360 if(LOG>4)console.log('input is ');
361 if(LOG>4)console.log(input);
362 if(LOG>4)console.log('C1 is ');
363 if(LOG>4)console.log(c1);
364 if(LOG>4)console.log('C2 is ');
365 if(LOG>4)console.log(c2);
366 var result = c1 == c2;*/
367
368 var rsakey = new RSAKey();
369
370 rsakey.setPublic(kp,exp);
371
372 var result = rsakey.verifyString(input, signature);
373
374
375
376 console.log('PUBLIC KEY n after is ');
377 console.log(rsakey.n);
378
379 console.log('EXPONENT e after is ');
380 console.log(rsakey.e);
381
382
383 if(result)
384 output += 'SIGNATURE VALID';
385 else
386 output += 'SIGNATURE INVALID';
387
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700388 //output += "VALID: "+ toHex(co.signedInfo.locator.publicKey);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700389
390 output+= "<br />";
391 output+= "<br />";
392
393
394 //if(LOG>4) console.log('str'[1]);
395 }
396
397 ////////////////////////////////////////
398
399
400 var forwardingEntry = decodeHexForwardingEntry(content);
401
402 if(LOG>3)console.log('FORWARDING ENTRY IS PRESENT');
403 if(LOG>3)console.log(forwardingEntry);
404
405 ///////////////////////////////////////
406
407 //var output ="";
408
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700409 if(forwardingEntry.action!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700410 output+= "Action: ";
411
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700412 output+= DataUtils.toHex(forwardingEntry.action);
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700413
414 output+= "<br />";
415 output+= "<br />";
416 }
417
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700418 if(forwardingEntry.prefixName!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700419 output+= "PrefixName: ";
420
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700421 output+= forwardingEntry.prefixName.getName();
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700422 output+= "<br />";
423 }
424
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700425 if(forwardingEntry.ccndID!=null){
426 output+= "ccndID: ";
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700427
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700428 output+= forwardingEntry.ccndID;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700429 output+= "<br />";
430 }
431
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700432 if(forwardingEntry.flags!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700433 output+= "Flags: ";
434
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700435 output+= forwardingEntry.flags;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700436 output+= "<br />";
437 }
438
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700439 if(forwardingEntry.lifetime!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700440 output+= "Lifetime: ";
441
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700442 output+= forwardingEntry.lifetime;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700443 output+= "<br />";
444 }
445
446
447 }
448
449
450
451 document.getElementById('result').innerHTML = output;
452
453 }
454
455 </script>
456
457</head>
458<body >
459 <form>
460
Jeff Thompson86aea882012-09-29 17:32:48 -0700461 Please Press Decode:<br />
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700462
463
464 </form>
465 <button onclick="decode()">Decode</button>
466
467 <!-- p id="result-old-from-ccnx">01d2f2faa563636e7800fa0285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f00fabd73656c6672656700fa1bf5048202aa03b208854a18988c72aee624da28e2e1acbccb209b8e89429041985521ed68f95a1c546872fba3d854b1377dc249b6d8ec5935e5069256c97a7f6d8a62e86222ccd2cfe5097aed3fe5ede6732ce191a8680d78e39d0c5058a2b7bb0f0687994e9f045de346b66c46498547a08da1f2f0cdfafba3afdfe7107931935ede79040137ba94a90000f20001a203e202851a4860caa4991e829bcdc9429fb711d52440968d23560726606050bf147acffc0002bab504fcb3f03aa40001e201da0a9530819f300d06092a864886f70d010101050003818d00308189028181008ed27580e3d1c4c67672208665133a1ba12d8ebf5cad8e054571926b3ff0782a04c71703384021a6cefb6616b66cbd8a679b761d69d6373a851546e26f7105510b4c23be9a3c7f2e652e100ecc1471855730659f1477ce4e8504ad1fd8f44116baaeae2ff67eec33abba790157a79bf5039e5a528a471d9d67c94e70117ed7490203010001000000019a0585058a04cabe73656c6672656700f2faad726f63636f000003e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004fa8e330003d2d63231343734383336343700000000000002d28e310000</p-->
468
469 <p id="result">01d2f2faa563636e7800fa0285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f00facd70726566697872656700fa29ad048202aa03b208854ddbf69779cdf4ef74be99474478c8bc3ca0873e0ffa1fa60120aa276db122b83404e595a8a3caeaf09630276658ba4e7beaadb4b91a8cc58e19ac4a42289507ed8d609aa9bef61a5a507f349c83d2944b8c16fecfd90d4a40ddb8687592c0a57517564235b2e359db54f51a37e1ac39e518a2196e3ffda7eb2fb301f3c404dd0000f20001a203e20285ef7c4f5d4743a8b8586ea2e741b7fc39d1dc0dbe1b1930e787cfd1d833ea7a610002bab504fce9e253d70001e2018219fd3082019b30820104020900b7d85c906bad52ee300d06092a864886f70d010105050030123110300e060355040313076178656c636476301e170d3132303432383233343433375a170d3132303532383233343433375a30123110300e060355040313076178656c63647630819f300d06092a864886f70d010101050003818d0030818902818100e17d30a7d828ab1b840b17542dcaf6207afd221e086b2a60d16cb7f54448ba9f3f08bcd099db21dd162a779e61aa89eee554d3a47de230bc7ac590d524067c3898bba6f5dc4360b845eda48cbd9cf126a723445f0e1952d7325a75faf556144f9a98af7186b0278685b8e2c08bea87171b4dee585c1828295b5395eb4a17779f0203010001300d06092a864886f70d010105050003818100cb3ab0357d7cd2ae97ed501e51a3a0e2817d418e47fb17906477af61495a7e8d8789141065b082d001f4b15193d0b43fb661cde20a6498372c6abbd3dcb9f0d12659ef07b3c6dbdf8bdf2f65477eed7adcd457d793b1c27badda7c5ade80ce95b7d8827fe78c8a35f3fb4ba648a081be2cfe84231abab3c2b531746df2e0492b000000019a02d5058a04cabe73656c6672656700f2faa56d656b69000004fa8e330003d2d63231343734383336343700000000000002d28e310000</p>
470
471</body>
472</html>