Package ghidra.framework.remote
Class SignatureCallback
- java.lang.Object
- 
- ghidra.framework.remote.SignatureCallback
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- javax.security.auth.callback.Callback
 
 public class SignatureCallback extends java.lang.Object implements javax.security.auth.callback.Callback, java.io.SerializableSignatureCallbackprovides a Callback implementation used to perform PKI authentication. This callback is instantiated by the server with a random token which must be signed using the user's certificate which contains one of the recognizedAuthorities within it certificate chain.It is the responsibility of the callback handler to invoke the sign(X509Certificate[], byte[]) and return this object in response to the callback. - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longserialVersionUID
 - 
Constructor SummaryConstructors Constructor Description SignatureCallback(javax.security.auth.x500.X500Principal[] recognizedAuthorities, byte[] token, byte[] serverSignature)Construct callback with a random token to be signed by the client.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.cert.X509Certificate[]getCertificateChain()Returns certificate chain used to sign token.java.security.Principal[]getRecognizedAuthorities()Returns list of approved certificate authorities.byte[]getServerSignature()Returns the server's signature of the token bytes.java.lang.StringgetSigAlg()byte[]getSignature()Returns signed token bytes set by callback handler.byte[]getToken()Returns token to be signed using user certificate.voidsign(java.security.cert.X509Certificate[] sigCertChain, byte[] certSignature)Set token signature data.
 
- 
- 
- 
Field Detail- 
serialVersionUIDpublic static final long serialVersionUID - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
SignatureCallbackpublic SignatureCallback(javax.security.auth.x500.X500Principal[] recognizedAuthorities, byte[] token, byte[] serverSignature)Construct callback with a random token to be signed by the client.- Parameters:
- recognizedAuthorities- list of CA's from which one must occur within the certificate chain of the signing certificate.
- token- random bytes to be signed
 
 
- 
 - 
Method Detail- 
getRecognizedAuthoritiespublic java.security.Principal[] getRecognizedAuthorities() Returns list of approved certificate authorities.
 - 
getTokenpublic byte[] getToken() Returns token to be signed using user certificate.
 - 
getSignaturepublic byte[] getSignature() Returns signed token bytes set by callback handler.
 - 
getServerSignaturepublic byte[] getServerSignature() Returns the server's signature of the token bytes.
 - 
getCertificateChainpublic java.security.cert.X509Certificate[] getCertificateChain() Returns certificate chain used to sign token.
 - 
signpublic void sign(java.security.cert.X509Certificate[] sigCertChain, byte[] certSignature)Set token signature data. Method must be invoked by callback handler.- Parameters:
- sigCertChain- certificate chain used to sign token.
- certSignature- token signature
 
 - 
getSigAlgpublic java.lang.String getSigAlg() 
 
- 
 
-