public abstract class P11Identity extends Object implements Comparable<P11Identity>
| Modifier and Type | Field and Description |
|---|---|
protected X509Cert[] |
certificateChain |
protected P11IdentityId |
id |
protected PublicKey |
publicKey |
protected P11Slot |
slot |
| Modifier | Constructor and Description |
|---|---|
protected |
P11Identity(P11Slot slot,
P11IdentityId id,
int signatureBitLen) |
protected |
P11Identity(P11Slot slot,
P11IdentityId id,
PublicKey publicKey,
X509Cert[] certificateChain) |
| Modifier and Type | Method and Description |
|---|---|
X509Cert[] |
certificateChain() |
int |
compareTo(P11Identity obj) |
byte[] |
digestSecretKey(long mechanism) |
protected abstract byte[] |
digestSecretKey0(long mechanism) |
X509Cert |
getCertificate() |
P11IdentityId |
getId() |
PublicKey |
getPublicKey() |
int |
getSignatureKeyBitLength() |
boolean |
match(P11IdentityId id) |
boolean |
match(P11SlotIdentifier slotId,
String keyLabel) |
void |
setCertificates(X509Cert[] certificateChain) |
byte[] |
sign(long mechanism,
P11Params parameters,
byte[] content) |
protected abstract byte[] |
sign0(long mechanism,
P11Params parameters,
byte[] content)
Signs the content.
|
boolean |
supportsMechanism(long mechanism,
P11Params parameters) |
protected final P11Slot slot
protected final P11IdentityId id
protected final PublicKey publicKey
protected X509Cert[] certificateChain
protected P11Identity(P11Slot slot, P11IdentityId id, int signatureBitLen)
protected P11Identity(P11Slot slot, P11IdentityId id, PublicKey publicKey, X509Cert[] certificateChain)
public byte[] sign(long mechanism,
P11Params parameters,
byte[] content)
throws P11TokenException
P11TokenExceptionprotected abstract byte[] sign0(long mechanism,
P11Params parameters,
byte[] content)
throws P11TokenException
mechanism - mechanism to sign the content.parameters - Parameters. Could be null.content - Content to be signed. Must not be null.P11TokenException - if PKCS#11 token error occurs.public byte[] digestSecretKey(long mechanism)
throws P11TokenException,
XiSecurityException
P11TokenExceptionXiSecurityExceptionprotected abstract byte[] digestSecretKey0(long mechanism)
throws P11TokenException
P11TokenExceptionpublic P11IdentityId getId()
public X509Cert getCertificate()
public X509Cert[] certificateChain()
public PublicKey getPublicKey()
public void setCertificates(X509Cert[] certificateChain) throws P11TokenException
P11TokenExceptionpublic boolean match(P11IdentityId id)
public boolean match(P11SlotIdentifier slotId, String keyLabel)
public int getSignatureKeyBitLength()
public int compareTo(P11Identity obj)
compareTo in interface Comparable<P11Identity>public boolean supportsMechanism(long mechanism,
P11Params parameters)
Copyright © 2020. All rights reserved.