org.cesecore.keybind.InternalKeyBindingInfo Maven / Gradle / Ivy
/*************************************************************************
* *
* EJBCA Community: The OpenSource Certificate Authority *
* *
* This software is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or any later version. *
* *
* See terms of license at gnu.org. *
* *
*************************************************************************/
package org.cesecore.keybind;
import java.io.Serializable;
import java.security.cert.Certificate;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.naming.OperationNotSupportedException;
import org.cesecore.config.AvailableExtendedKeyUsagesConfiguration;
import org.cesecore.util.ui.DynamicUiProperty;
/**
* Value object for remote invocation from JVMs where the implementation class is not available.
*
* @version $Id: InternalKeyBindingInfo.java 28496 2018-03-16 12:13:55Z henriks $
*/
public class InternalKeyBindingInfo implements InternalKeyBinding {
private static final long serialVersionUID = 1L;
final private String implementationAlias;
final private int id;
final private String name;
final private InternalKeyBindingStatus status;
final private InternalKeyBindingOperationalStatus operationalStatus;
final private String certificateId;
final private int cryptoTokenId;
final private String keyPairAlias;
final private String nextKeyPairAlias;
final private Map> properties;
final private List trustedCertificateReferences;
final private List ocspExtensions;
final private String signatureAlgorithm;
public InternalKeyBindingInfo(InternalKeyBinding internalKeyBinding) {
this.implementationAlias = internalKeyBinding.getImplementationAlias();
this.id = internalKeyBinding.getId();
this.name = internalKeyBinding.getName();
this.status = internalKeyBinding.getStatus();
this.operationalStatus = internalKeyBinding.getOperationalStatus();
this.certificateId = internalKeyBinding.getCertificateId();
this.cryptoTokenId = internalKeyBinding.getCryptoTokenId();
this.keyPairAlias = internalKeyBinding.getKeyPairAlias();
this.nextKeyPairAlias = internalKeyBinding.getNextKeyPairAlias();
this.properties = internalKeyBinding.getCopyOfProperties();
this.trustedCertificateReferences = internalKeyBinding.getTrustedCertificateReferences();
this.ocspExtensions = internalKeyBinding.getOcspExtensions();
this.signatureAlgorithm = internalKeyBinding.getSignatureAlgorithm();
}
@Override
public void init(int id, String name, InternalKeyBindingStatus status, String certificateId, int cryptoTokenId, String keyPairAlias,
LinkedHashMap