Changeset 43
- Timestamp:
- 07/25/06 12:57:34 (2 years ago)
- Files:
-
- 10kz/.htaccess (modified) (1 prop)
- 10kz/conf/httpd.conf (modified) (1 prop)
- 10kz/conf/mime.types (modified) (1 prop)
- 10kz/dist/installer/README (modified) (1 prop)
- 10kz/dist/installer/install-gm.sh (modified) (1 prop)
- 10kz/docs/notes.txt (modified) (1 prop)
- 10kz/scripts/crypto-ui-injector.user.js (modified) (9 diffs, 1 prop)
- 10kz/scripts/gmailskins.js (modified) (1 prop)
- 10kz/scripts/test.user.js (modified) (1 prop)
- 10kz/shell/README.txt (modified) (1 prop)
- 10kz/shell/ajax-simple.html (modified) (1 prop)
- 10kz/shell/ajax-xml-pulldown.html (modified) (1 prop)
- 10kz/shell/configure.sh (modified) (1 prop)
- 10kz/shell/decode-form-post.jm3 (modified) (1 prop)
- 10kz/shell/decode-test-post-input.html (modified) (1 prop)
- 10kz/shell/dumb.jm3 (modified) (1 prop)
- 10kz/shell/get-secret-keys-as-html.jm3 (modified) (1 diff, 1 prop)
- 10kz/shell/get-secret-keys.jm3 (modified) (2 diffs, 1 prop)
- 10kz/shell/help/installing-gpg/index.html (modified) (1 prop)
- 10kz/shell/parse-decoded-params.jm3 (modified) (1 diff, 1 prop)
- 10kz/shell/perl.jm3 (modified) (1 prop)
- 10kz/shell/raw-post.jm3 (modified) (1 prop)
- 10kz/shell/sign-encrypt.jm3 (modified) (1 diff, 1 prop)
- 10kz/shell/simple-js.html (modified) (1 prop)
- 10kz/shell/simple-main.html (modified) (1 prop)
- 10kz/shell/simple.html (modified) (1 prop)
- 10kz/shell/test-4kplus-form-post.html (modified) (1 prop)
- 10kz/shell/test-cgi.jm3 (modified) (1 diff, 1 prop)
- 10kz/shell/test-post-input.html (modified) (1 prop)
- 10kz/shell/test-post.jm3 (modified) (1 prop)
- 10kz/shell/test.html (modified) (1 prop)
- 10kz/shell/test.jm3 (modified) (1 diff, 1 prop)
- 10kz/shell/url-decode.jm3 (modified) (1 prop)
- 10kz/shell/url-decode.sh (modified) (1 prop)
- 10kz/tests/form-post.data (modified) (1 prop)
- 10kz/tests/install-real-keyring.sh (modified) (1 prop)
- 10kz/tests/install-simple-keyring.sh (modified) (1 prop)
- 10kz/tests/params-decoded.txt (modified) (1 prop)
- 10kz/tests/parsed-params.txt (modified) (1 prop)
- 10kz/tests/run.sh (modified) (1 prop)
- 10kz/tests/secret-key-ids.txt (modified) (1 prop)
- 10kz/tests/test-cgi-ouput.html (modified) (1 prop)
- 10kz/tests/test-form-post-output.html (modified) (1 prop)
- 10kz/webserver/mini_httpd/mini_httpd.cnf (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
10kz/.htaccess
- Property svn:keywords set to Id
10kz/conf/httpd.conf
- Property svn:keywords set to Id
10kz/conf/mime.types
- Property svn:keywords set to Id
10kz/dist/installer/README
- Property svn:keywords set to Id
10kz/dist/installer/install-gm.sh
- Property svn:keywords set to Id
10kz/docs/notes.txt
- Property svn:keywords set to Id
10kz/scripts/crypto-ui-injector.user.js
- Property svn:keywords set to Id
r27 r43 23 23 24 24 function bail( e ) { 25 log( get_prog_name() + ": " + e ); 26 alert( get_prog_name() + ": " + e ); 27 } 28 29 function log( e ) { 25 30 GM_log( get_prog_name() + ": " + e ); 26 alert( get_prog_name() + ": " + e );27 31 } 28 32 … … 84 88 85 89 function decrypt_message( event, m) { 86 GM_log( "text for decryption: \n" + m );90 log( "text for decryption: \n" + m ); 87 91 88 92 var d = document.getElementById( "jm3_decrypt" ); … … 121 125 122 126 function sign_message() { 123 //alert( "sign_message: calling top.js._CM_OnSendButtonKeyDown()" );124 127 //debugger; 125 128 //top.js._CM_OnSendButtonKeyDown(); 126 129 //return true; 127 //alert( "typeof( top.js ) : " + typeof( top.js ));128 130 129 131 … … 154 156 cached_message = document.getElementById( "cached_message" ); 155 157 cached_message.innerHTML = pt.value; // whew. this is messy 156 GM_log( "cached_message body for later in hidden div: " + cached_message.innerHTML ); /* FIXME: destroy when done */158 log( "cached_message body for later in hidden div: " + cached_message.innerHTML ); /* FIXME: destroy when done */ 157 159 158 160 var p = document.getElementById( "passphrase" ); … … 303 305 /* FIXME: handle no local server / server error case */ 304 306 305 var injection_point = document.getElementById("6row_compose"); /* DELETE ME: "at" */ 307 var injection_point = document.getElementById("6row_compose"); 308 if( ! injection_point ) 309 return bail( "can't find injection point - either gmail has changed or we're confused." ); 306 310 var d = document.createElement("label"); 307 311 d.appendChild( document.createElement("b")); 308 d.firstChild.appendChild( document.createTextNode(" Using GPG key: "));309 312 310 313 var parser = new DOMParser(); 311 314 var dom = parser.parseFromString(x, "application/xml"); 312 315 var options = dom.getElementsByTagName('option'); 313 314 // for users with multiple keys, give them a select menu. 315 var key_info_ctrl; 316 if( options.length > 1) { 317 key_info_ctrl = document.createElement( "select" ); 318 key_info_ctrl.setAttribute( "name", "key_id" ); 319 key_info_ctrl.setAttribute( "style", "width: 28em;" ); 320 key_info_ctrl.setAttribute( "id", "gpg_key_id" ); 321 key_info_ctrl.innerHTML = x; 322 } else { 323 key_info_ctrl = document.createElement( "input" ); 324 key_info_ctrl.setAttribute( "type", "hidden" ); 325 key_info_ctrl.setAttribute( "name", "key_id" ); 326 key_info_ctrl.setAttribute( "id", "gpg_key_id" ); 327 key_info_ctrl.setAttribute( "value", options[0].attributes[0].value ); 328 d.appendChild( document.createTextNode( "Using key: " + options[0].childNodes[0].nodeValue )); 329 } 330 d.appendChild( key_info_ctrl ); 331 332 /* may need: moving next to from for now: injection_point.parentNode.appendChild( d ); */ 333 injection_point.childNodes[1].appendChild( d ); 334 316 if( ! options || options.length == 0 ) { 317 d.firstChild.appendChild( document.createTextNode( " No PGP / GPG keys found. " )); 318 d.firstChild.appendChild( document.createElement( "a" )); 319 d.firstChild.childNodes[1].setAttribute( "href", get_crypto_url() + "/help/installing-gpg/" ); 320 d.firstChild.childNodes[1].setAttribute( "target", "_blank" ); 321 d.firstChild.childNodes[1].appendChild( document.createTextNode("Have you installed GPG?")); 322 injection_point.childNodes[1].appendChild( d ); 323 324 return log( "no keys found - inject install link here." ); 325 } 326 327 d.firstChild.appendChild( document.createTextNode(" Using GPG key: ")); 328 if( options.length > 1 ) { 329 /* for users with multiple keys, give them a select menu. */ 330 var key_info_ctrl; 331 if( options.length > 1) { 332 key_info_ctrl = document.createElement( "select" ); 333 key_info_ctrl.setAttribute( "name", "key_id" ); 334 key_info_ctrl.setAttribute( "style", "width: 28em;" ); 335 key_info_ctrl.setAttribute( "id", "gpg_key_id" ); 336 key_info_ctrl.innerHTML = x; 337 } else if( options.length == 1 ) { 338 key_info_ctrl = document.createElement( "input" ); 339 key_info_ctrl.setAttribute( "type", "hidden" ); 340 key_info_ctrl.setAttribute( "name", "key_id" ); 341 key_info_ctrl.setAttribute( "id", "gpg_key_id" ); 342 key_info_ctrl.setAttribute( "value", options[0].attributes[0].value ); 343 d.appendChild( document.createTextNode( "Using key: " + options[0].childNodes[0].nodeValue )); 344 } 345 d.appendChild( key_info_ctrl ); 346 347 /* may need: moving next to from for now: injection_point.parentNode.appendChild( d ); */ 348 injection_point.childNodes[1].appendChild( d ); 349 } 335 350 } 336 351 … … 386 401 }, 387 402 onload: function(responseDetails) { 388 GM_log( responseDetails.responseText );403 log( responseDetails.responseText ); 389 404 /* FIXME: parse the response back for obvious errors like bad passphrase and signal them to user */ 390 405 /* FIXME: const this: */ … … 425 440 // this is supposed to call the onkeydown event handler on the snd button (but it doesnt) 426 441 function mock_send() { 427 GM_log( "mock_send() called" );442 log( "mock_send() called" ); 428 443 var fireOnThis = document.getElementById('snd'); 429 444 if( window.KeyEvent ) { … … 474 489 475 490 if( ct.indexOf( "-----BEGIN PGP MESSAGE-----") != -1) { /* FIXME: let const this */ 476 GM_log( "message body " + i + " contains encrypted PGP content");491 log( "message body " + i + " contains encrypted PGP content"); 477 492 478 493 // remove HTML from the message: … … 508 523 509 524 } else if( ct.indexOf( "-----BEGIN PGP SIGNED MESSAGE-----") != -1) { 510 GM_log( "message body " + i + " contains signed PGP content");525 log( "message body " + i + " contains signed PGP content"); 511 526 ct = html_to_text( ct ); 512 GM_log( "clean message body: " + i + " contains " + ct);527 log( "clean message body: " + i + " contains " + ct); 513 528 } 514 529 i++; 10kz/scripts/gmailskins.js
- Property svn:keywords set to Id
10kz/scripts/test.user.js
- Property svn:keywords set to Id
10kz/shell/README.txt
- Property svn:keywords set to Id
10kz/shell/ajax-simple.html
- Property svn:keywords set to Id
10kz/shell/ajax-xml-pulldown.html
- Property svn:keywords set to Id
10kz/shell/configure.sh
- Property svn:keywords set to Id
10kz/shell/decode-form-post.jm3
- Property svn:keywords set to Id
10kz/shell/decode-test-post-input.html
- Property svn:keywords set to Id
10kz/shell/dumb.jm3
- Property svn:keywords set to Id
10kz/shell/get-secret-keys-as-html.jm3
- Property svn:keywords set to Id
r20 r43 1 1 #!/bin/bash 2 # $Id : get-secret-keys-as-html.jm3 132 2006-07-15 23:58:18Z erdnase$2 # $Id$ 3 3 4 4 HOMEDIR="/Users/erdnase/.gnupg/" 10kz/shell/get-secret-keys.jm3
- Property svn:keywords set to Id
r20 r43 1 1 #!/bin/bash 2 # $Id : get-secret-keys.jm3 132 2006-07-15 23:58:18Z erdnase$2 # $Id$ 3 3 4 HOMEDIR="/Users/erdnase/.gnupg/" 5 gpg=/sw/bin/gpg 4 . configure.sh 5 6 HOMEDIR=$KEY_HOME 7 gpg=$GPG_HOME/gpg 6 8 7 9 echo Content-type: text/XML … … 24 26 then 25 27 echo "<error>no keys or GPG error: $return_val</error>" 28 echo "</keys>" 26 29 exit 1 27 30 fi 10kz/shell/help/installing-gpg/index.html
- Property svn:keywords set to Id
10kz/shell/parse-decoded-params.jm3
- Property svn:keywords set to Id
r20 r43 1 1 #!/bin/sh 2 # $Id : parse-decoded-params.jm3 132 2006-07-15 23:58:18Z erdnase$2 # $Id$ 3 3 4 4 if [ -z "$QUERY_STRING" ] 10kz/shell/perl.jm3
- Property svn:keywords set to Id
10kz/shell/raw-post.jm3
- Property svn:keywords set to Id
10kz/shell/sign-encrypt.jm3
- Property svn:keywords set to Id
r20 r43 1 1 #!/bin/bash 2 # $Id : sign-encrypt.jm3 132 2006-07-15 23:58:18Z erdnase$2 # $Id$ 3 3 4 4 KEY_ID=9112BC51 10kz/shell/simple-js.html
- Property svn:keywords set to Id
10kz/shell/simple-main.html
- Property svn:keywords set to Id
10kz/shell/simple.html
- Property svn:keywords set to Id
10kz/shell/test-4kplus-form-post.html
- Property svn:keywords set to Id
10kz/shell/test-cgi.jm3
- Property svn:keywords set to Id
r20 r43 1 1 #!/bin/bash 2 # $Id : test-cgi.jm3 132 2006-07-15 23:58:18Z erdnase$2 # $Id$ 3 3 4 4 echo Content-type: text/plain 10kz/shell/test-post-input.html
- Property svn:keywords set to Id
10kz/shell/test-post.jm3
- Property svn:keywords set to Id
10kz/shell/test.html
- Property svn:keywords set to Id
10kz/shell/test.jm3
- Property svn:keywords set to Id
r20 r43 1 1 #!/bin/bash 2 # $Id : test.jm3 132 2006-07-15 23:58:18Z erdnase$2 # $Id$ 3 3 4 4 # If we form-post to to a bash CGI, do we HAVE do deal with url-encoded characters? 10kz/shell/url-decode.jm3
- Property svn:keywords set to Id
10kz/shell/url-decode.sh
- Property svn:keywords set to Id
10kz/tests/form-post.data
- Property svn:keywords set to Id
10kz/tests/install-real-keyring.sh
- Property svn:keywords set to Id
10kz/tests/install-simple-keyring.sh
- Property svn:keywords set to Id
10kz/tests/params-decoded.txt
- Property svn:keywords set to Id
10kz/tests/parsed-params.txt
- Property svn:keywords set to Id
10kz/tests/run.sh
- Property svn:keywords set to Id
10kz/tests/secret-key-ids.txt
- Property svn:keywords set to Id
10kz/tests/test-cgi-ouput.html
- Property svn:keywords set to Id
10kz/tests/test-form-post-output.html
- Property svn:keywords set to Id
10kz/webserver/mini_httpd/mini_httpd.cnf
- Property svn:keywords set to Id