| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | IntegerArgument port; |
| | | StringArgument bindDN; |
| | | StringArgument bindPW; |
| | | StringArgument certNickname; |
| | | StringArgument host; |
| | | StringArgument keyStoreFile; |
| | | StringArgument keyStorePW; |
| | |
| | | MSGID_STOPDS_DESCRIPTION_KSPWFILE); |
| | | argParser.addArgument(keyStorePWFile); |
| | | |
| | | certNickname = new StringArgument("certnickname", 'N', "certNickname", |
| | | false, false, true, "{nickname}", null, |
| | | null, MSGID_DESCRIPTION_CERT_NICKNAME); |
| | | argParser.addArgument(certNickname); |
| | | |
| | | trustStoreFile = new StringArgument("truststorefile", 'P', |
| | | "trustStoreFile", false, false, true, |
| | | "{trustStoreFile}", null, null, |
| | |
| | | { |
| | | try |
| | | { |
| | | String clientAlias; |
| | | if (certNickname.isPresent()) |
| | | { |
| | | clientAlias = certNickname.getValue(); |
| | | } |
| | | else |
| | | { |
| | | clientAlias = null; |
| | | } |
| | | |
| | | SSLConnectionFactory sslConnectionFactory = new SSLConnectionFactory(); |
| | | sslConnectionFactory.init(trustAll.isPresent(), keyStoreFile.getValue(), |
| | | keyStorePW.getValue(), |
| | | keyStorePW.getValue(), clientAlias, |
| | | trustStoreFile.getValue(), |
| | | trustStorePW.getValue()); |
| | | |