generate-csr

Generates a new CSR (certificate signing request).

Synopsis

asadmin generate-csr [--help]
[--domainName=name]
[--domainDir=directory]
[--node=nodeName]
[--nodeDir=directory]
[--listener=listenername]
[--target=instanceName]
[alias]

Description

This command can generate a certificate signing request (CSR) for an instance or listener’s self-signed certificate, placing the resultant CSR file in the as-install/glassfish/tls directory, using the alias name as the generated file name for the CSR.

The command overwrite a CSR with the same name already present in the directory.

Options

--help
-?

Displays the help text for the subcommand.

--target

This option helps specify the target on which you are generating the CSR. Valid values are:

server

Applies to the default server instance. This is the default value.

cluster_name

Applies to every server instance in the cluster.

instance_name

Applies to a specified sever instance.

--listener

The name of the HTTP or IIOP listener to add the certificate to.

--domainname

The name of the domain where the target instance exists.

Defaults to domain1 or the existing domain if only one exists.

--domainDir

The path to the directory containing the target domain.

Defaults to as-install/glassfish/domains

--node

The name of the node where the target instance exists.

Defaults to localhost-$domainname

--nodeDir

The path to the directory containing the target node.

Defaults to as-install/glassfish/nodes

Operands

alias

The alias name to use when generating the CSR for the corresponding self-signed certificate.

Examples

Example 1 Generate a new CSR for the certificate with the test-cert alias

asadmin generate-csr --listener http-listener-2 --target instance-1 test_cert

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also