org.hyperledger.fabric.sdk.identity.X509Enrollment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-sdk-java Show documentation
Show all versions of fabric-sdk-java Show documentation
Java SDK for Hyperledger Fabric. Deprecated as of Fabric v2.5, replaced by org.hyperledger.fabric:fabric-gateway.
package org.hyperledger.fabric.sdk.identity;
import java.io.Serializable;
import java.security.KeyPair;
import java.security.PrivateKey;
import org.hyperledger.fabric.sdk.Enrollment;
public class X509Enrollment implements Enrollment, Serializable {
private final PrivateKey key;
private final String cert;
public X509Enrollment(KeyPair signingKeyPair, String signedPem) {
this.key = signingKeyPair.getPrivate();
this.cert = signedPem;
}
public X509Enrollment(PrivateKey key, String signedPem) {
this.key = key;
this.cert = signedPem;
}
public PrivateKey getKey() {
return key;
}
public String getCert() {
return cert;
}
}