Skip to content

Debugging Server Side

crised edited this page Jul 1, 2012 · 1 revision

Steps to Setup Eclipse

  1. Unzip the attached source code and set up the project in eclipse.
  2. create table in mysql database by running scripts from tables.sql file in dbfiles folder.
  3. Set up tomcat server in eclipse. Add the project in tomcat and run the server.
  4. Open Chrome. Type in chrome://extensions in the location bar. Click on "Load unpacked extensions" and then browse to chromeextension folder in the project attached.
  5. On successful installation of Chrome extension, open google.com in the browser. You should able to see encrypt button and two textarea in the bottom of the page.(It might be the case where you can't see the button and textarea. In that case open manifest.json and change the matches url "matches": ["https://www.google.co.in/**"] to the google.com url that you can see in your browser).
  6. Enter the text to be encrypted in frst text area. It will invoke the server and in response the second text area will be populated with the encrypted text and url of the question and answer screen.

Steps to make MySQL database:

Create DATABASE safemail; use safemail;

create table Message ( messageId varchar(256) PRIMARY KEY, prvKey varchar(2048) NOT NULL, messageKey varchar(2048) NOT NULL, question varchar(1024) NOT NULL, answer varchar(1024) NOT NULL ); ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

Changed messageid to 255 bytes to avoid that error.

mysql> create table User (userId varchar(255) PRIMARY KEY, pubKey varchar(2048) NOT NULL, prvKey varchar(2048) NOT NULL);

mysql> create table Message (messageId varchar(255) PRIMARY KEY, prvKey varchar(2048) NOT NULL, messageKey varchar(2048) NOT NULL, question varchar(1024) NOT NULL, answer varchar(1024) NOT NULL);

Tomcat in Eclipse

Clone this wiki locally