| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | import org.opends.messages.Message; |
| | |
| | | keyStorePIN = pinStr.toCharArray(); |
| | | } else if (configuration.getKeyStorePin() != null) { |
| | | keyStorePIN = configuration.getKeyStorePin().toCharArray(); |
| | | } else { |
| | | // Pin wasn't defined anywhere. |
| | | Message message = |
| | | ERR_FILE_KEYMANAGER_NO_PIN.get(String.valueOf(configEntryDN)); |
| | | throw new ConfigException(message); |
| | | } |
| | | } |
| | | |
| | |
| | | // - As the value of a configuration attribute. |
| | | // |
| | | // In any case, the PIN must be in the clear. |
| | | // It is acceptable to have no PIN (OPENDJ-18) |
| | | if (configuration.getKeyStorePinProperty() != null) |
| | | { |
| | | String propertyName = configuration.getKeyStorePinProperty(); |
| | |
| | | configAcceptable = false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // Pin wasn't defined anywhere. |
| | | unacceptableReasons.add(ERR_FILE_KEYMANAGER_NO_PIN.get( |
| | | String.valueOf(cfgEntryDN))); |
| | | configAcceptable = false; |
| | | } |
| | | |
| | | return configAcceptable; |
| | | } |
| | |
| | | { |
| | | newPIN = configuration.getKeyStorePin().toCharArray(); |
| | | } |
| | | else |
| | | { |
| | | // Pin wasn't defined anywhere. |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | |
| | | messages.add(ERR_FILE_KEYMANAGER_NO_PIN.get( |
| | | String.valueOf(configEntryDN))); |
| | | } |
| | | |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | | { |