Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{warning}This page is in quick notes form and needs to be rewritten as an article.{warning} These are the abridged notes from [
Wiki Markup
Warning

This page is in quick notes form and needs to be rewritten as an article.

These are the abridged notes from http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/

...

with

...

adjustments

...

for

...

the

...

configuration

...

we

...

are

...

using

...

here.

...

Tested

...

using:

...

  • JRE

...

  • 1.6.0_12

...

  • Tomcat

...

  • 6.0.18

...

Overall

...

the

...

following

...

steps

...

will

...

be

...

taken:

...

  1. Generating

...

  1. the

...

  1. Keystore

...

  1. file

...

  1. Configuring

...

  1. Tomcat

...

  1. for

...

  1. using

...

  1. the

...

  1. Keystore

...

  1. file

...

  1. Configuring

...

  1. your

...

  1. web

...

  1. application

...

  1. to

...

  1. work

...

  1. with

...

  1. SSL

...

Generating

...

the

...

Self-Signed

...

KeyStore

...

File

...

The

...

keystore

...

file

...

is

...

the

...

one

...

which

...

would

...

store

...

the

...

details

...

of

...

the

...

certificates

...

necessary

...

to

...

make

...

the

...

protocol

...

secured.

...

Certificates

...

contain

...

the

...

information

...

as

...

to

...

who

...

is

...

the

...

source

...

from

...

which

...

you

...

are

...

receiving

...

the

...

application

...

data

...

and

...

to

...

authenticate

...

whether

...

it

...

is

...

the

...

intended

...

party

...

or

...

not.

...

To

...

make

...

this

...

keystore

...

you

...

would

...

have

...

to

...

use

...

the

...

keytool

...

.

...

So

...

open

...

command

...

prompt

...

in

...

Windows

...

or

...

the

...

shell

...

in

...

Linux

...

and

...

type:

...

=}
Code Block
language
bash
cd %JAVA_HOME%/bin on Windows
cd $JAVA_HOME/bin on Linux{code}

You

...

would

...

land

...

up

...

in

...

the

...

Java

...

bin

...

directory.

...

Now

...

time

...

to

...

run

...

the

...

keytool

...

command.

...

You

...

have

...

to

...

provide

...

some

...

parameters

...

to

...

the

...

command

...

as

...

follows

...

:

...

}
Code Block
keytool \-genkey \-alias <your_cert_alias> \-keypass Password123 \-keystore mywebservices.bin \-storepass Password123{code}

Change

...

the

...

sample

...

input

...

according

...

to

...

your

...

requirements,

...

but

...

both

...

the

...

keypass

...

and

...

storepass

...

passwords

...

should

...

be

...

the

...

same.

...

The

...

.bin

...

file

...

is

...

actually

...

your

...

keystore

...

file.

...

}
Code Block
Enter keystore password:  mypassword
    What is your first and last name?
      [Unknown]:  mywebservice.myapp.mycompany.com When creating a cert for a website the first and last name will be the website url.
    What is the name of your organizational unit?
      [Unknown]:  My Unit
    What is the name of your organization?
      [Unknown]:  My Organization
    What is the name of your City or Locality?
      [Unknown]:  My City
    What is the name of your State or Province?
      [Unknown]:  My State
    What is the two-letter country code for this unit?
      [Unknown]:  CA{
}
Code Block

The

...

resulting

...

bin

...

file

...

will

...

be

...

generated

...

in

...

your

...

current

...

working

...

directory.

...

Configure

...

Tomcat

...

to

...

Use

...

the

...

SSL

...

Certificate

...

The

...

final

...

step

...

is

...

to

...

configure

...

Tomcat

...

to

...

use

...

SSL

...

.