DBA Hub

📋Steps in this guide1/3

Signing JAR Files

This article describes the method for creating a keystore and signing JAR files.

oracle miscconfigurationintermediate
by OracleDba
15 views
1

Create Keystore (keytool)

Before you can sign a jar file you need a keystore. If one doesn't already exist, you can create it using the utility. The utility is normally found under the JDK bin directory, so you may find it in several locations on your server. For example, on Oracle Application Server and WebLogic environments you would find it in at least the following locations: - OAS: $ORACLE_HOME/jdk/bin/keytool - WebLogic: $MW_HOME/oracle_common/jdk/bin/keytool Navigate to the users home directory. Use the utility to generate the keystore. The default name for the keystore is ".keystore", but this can be overridden with the "-keystore" parameter. See the linked documentation for more information about the command line syntax.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ cd ~
$ # Or
$ cd $HOME

$ $ORACLE_HOME/jdk/bin/keytool -genkey -alias myapp -keyalg RSA -keystore .keystore_myapp

Enter keystore password:  mypassword
What is your first and last name?
  [Unknown]:  Joe Bloggs
What is the name of your organizational unit?
  [Unknown]:  My Department
What is the name of your organization?
  [Unknown]:  My Company
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]:  UK
Is CN=Joe Bloggs, OU=My Department, O=My Company, L=My City, ST=My State, C=UK correct?
  [no]:  yes

Enter key password for <myapp>
        (RETURN if same as keystore password):

$
2

Sign JAR Files (jarsigner)

Once the keystore is created, you can use the utility to sign the JAR files. The utility is normally found under the JDK bin directory, so you may find it in several locations on your server. For example, on Oracle Application Server and WebLogic environments you would find it in at least the following locations: - OAS: $ORACLE_HOME/jdk/bin/jarsigner - WebLogic: $MW_HOME/oracle_common/jdk/bin/jarsigner Sign the JARs using the information from the keystore. See the linked documentation for more information about the command line syntax.

Code/Command (click line numbers to comment):

1
$ORACLE_HOME/jdk/bin/jarsigner -keystore .keystore_myapp -storepass mypassword $ORACLE_HOME/forms/java/frmall.jar myapp
3

WebLogic 11g

For more information see: - keytool - Key and Certificate Management Tool - Signing JAR Files Hope this helps. Regards Tim...

Comments (0)

Please to add comments

No comments yet. Be the first to comment!