|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.handle.hdllib.AbstractMessage
public abstract class AbstractMessage
Base class for all request types
Constructor Summary | |
---|---|
AbstractMessage()
|
|
AbstractMessage(int opCode)
|
Method Summary | |
---|---|
void |
clearBuffers()
Removed all cached copies of the encoded message. |
static byte[] |
decryptMessage(byte[] ciphermsg,
byte[] secretKey)
Deprecated. use SessionInfo.decryptBuffer |
static byte[] |
encryptMessage(byte[] clearmsg,
byte[] secretKey)
Deprecated. use SessionInfo.encryptBuffer |
byte[] |
getEncodedMessage()
Get the encoded value of this message. |
byte[] |
getEncodedMessageBody()
Encode (if necessary) and retrieve the header and body portion of this message. |
static java.lang.String |
getResponseCodeMessage(int responseCode)
|
boolean |
hasEqualOrGreaterVersion(byte majorVersion,
byte minorVersion)
Return true if the major and minor version of this message is equal to or greater than the given major/minor versions. |
void |
signMessage(byte[] secretKey)
Generate a MAC code with a given secretKey. |
boolean |
signMessage(java.security.PrivateKey key)
Generate a signature for this message using the PrivateKey. |
void |
signMessage(java.security.Signature signer)
Generate a signature for this message using the given Signature object. |
void |
takeValuesFrom(AbstractMessage msg)
Takes the request parameters (certify, cacheCertify, authoritative, and encrypt) from the given request object. |
java.lang.String |
toString()
|
boolean |
verifyMessage(byte[] secretKey)
Validate the signature for this message. |
boolean |
verifyMessage(java.security.PublicKey pubKey)
Validate the signature for this message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int OC_RESERVED
public static final int OC_RESOLUTION
public static final int OC_GET_SITE_INFO
public static final int OC_CREATE_HANDLE
public static final int OC_DELETE_HANDLE
public static final int OC_ADD_VALUE
public static final int OC_REMOVE_VALUE
public static final int OC_MODIFY_VALUE
public static final int OC_LIST_HANDLES
public static final int OC_RESPONSE_TO_CHALLENGE
public static final int OC_VERIFY_CHALLENGE
public static final int OC_HOME_NA
public static final int OC_UNHOME_NA
public static final int OC_LIST_HOMED_NAS
public static final int OC_SESSION_SETUP
public static final int OC_SESSION_TERMINATE
public static final int OC_SESSION_EXCHANGEKEY
public static final int OC_GET_NEXT_TXN_ID
public static final int OC_RETRIEVE_TXN_LOG
public static final int OC_DUMP_HANDLES
public static final int OC_BACKUP_SERVER
public static final int RC_RESERVED
public static final int RC_SUCCESS
public static final int RC_ERROR
public static final int RC_SERVER_TOO_BUSY
public static final int RC_PROTOCOL_ERROR
public static final int RC_OPERATION_NOT_SUPPORTED
public static final int RC_RECURSION_COUNT_TOO_HIGH
public static final int RC_HANDLE_NOT_FOUND
public static final int RC_HANDLE_ALREADY_EXISTS
public static final int RC_INVALID_HANDLE
public static final int RC_VALUES_NOT_FOUND
public static final int RC_VALUE_ALREADY_EXISTS
public static final int RC_OUT_OF_DATE_SITE_INFO
public static final int RC_SERVER_NOT_RESP
public static final int RC_SERVICE_REFERRAL
public static final int RC_SERVER_BACKUP
public static final int RC_INVALID_ADMIN
public static final int RC_INSUFFICIENT_PERMISSIONS
public static final int RC_AUTHENTICATION_NEEDED
public static final int RC_AUTHENTICATION_FAILED
public static final int RC_INVALID_CREDENTIAL
public static final int RC_AUTHEN_TIMEOUT
public static final int RC_AUTHEN_ERROR
public static final int RC_SESSION_TIMEOUT
public static final int RC_SESSION_FAILED
public static final int RC_INVALID_SESSION_KEY
public static final int RC_NEED_RSAKEY_FOR_SESSIONEXCHANGE
public static final int RC_INVALID_SESSIONSETUP_REQUEST
public int requestId
public int sessionId
public byte majorProtocolVersion
public byte minorProtocolVersion
public int opCode
public int responseCode
public int siteInfoSerial
public int expiration
public short recursionCount
public boolean certify
public boolean cacheCertify
public boolean authoritative
public boolean encrypt
public boolean ignoreRestrictedValues
public boolean returnRequestDigest
public boolean recursive
public boolean continuous
public boolean keepAlive
public byte[] signerHdl
public int signerHdlIdx
public byte[] messageBody
public byte[] signature
public byte[] encodedMessage
public byte[] requestDigest
public byte rdHashType
Constructor Detail |
---|
public AbstractMessage()
public AbstractMessage(int opCode)
Method Detail |
---|
public boolean hasEqualOrGreaterVersion(byte majorVersion, byte minorVersion)
public final void takeValuesFrom(AbstractMessage msg) throws HandleException
HandleException
public final void signMessage(byte[] secretKey) throws HandleException
Credential section (including signature) within each message: Version octet (always be 0) Reserved octet (set to 0) Flags int2 Signer Handle 0 length UTF8 string index sesion id (speicified in message envelop) SignatureType UTF8String (the handle type of the signature - HS_MAC) SignatureLength int4 (length of signature section) SignatureSection (the bytes of the signature, dependent on SignatureType) SignatureSection for MAC signatures: DigestAlg UTF8String (e.g. SHA-1) ContentInfo int4, signedData (Hash onCall verifyMessage(byte[] secretKey) to verify. Also see method signMessage(Signature signer), signMessage(PrivateKey key).)
HandleException
public final boolean signMessage(java.security.PrivateKey key) throws HandleException, java.security.SignatureException
Credential section (including signature) within each message: Version octet (always be 0) Reserved octet (set to 0) Flags int2 Signer HdlValueRef (place holder in hdl authentication) (note: HdlValueRef: UTF8String:int4) SignatureType UTF8String (the handle type of the signature - HS_SIGNED) SignatureLength int4 (length of signature section) SignatureSection (the bytes of the signature, dependent on SignatureType) SignatureSection for HS_SIGNED signatures: DigestAlg UTF8String (e.g. SHA-1) ContentInfo int4, signedDataCall verifyMessage(PublicKey key) to verify. Also see method signMessage(Signature signer).
HandleException
java.security.SignatureException
public final void signMessage(java.security.Signature signer) throws HandleException, java.security.SignatureException
Credential section (including signature) within each message: Version octet (always be 0) Reserved octet (set to 0) Flags int2 Signer HdlValueRef (place holder in hdl authentication) (note: HdlValueRef: UTF8String:int4) SignatureType UTF8String (the handle type of the signature - HS_DSAPUBKEY, etc) SignatureLength int4 (length of signature section) SignatureSection (the bytes of the signature, dependent on SignatureType) SignatureSection for HS_DSAPUBKEY signatures: DigestAlg UTF8String (e.g. SHA-1) ContentInfo int4, signedDataAlso see method signMessageWithRSAKey(RSAPrivateKeyImpl key).
HandleException
java.security.SignatureException
public final boolean verifyMessage(byte[] secretKey) throws java.lang.Exception
java.lang.Exception
public final boolean verifyMessage(java.security.PublicKey pubKey) throws java.lang.Exception
java.lang.Exception
@Deprecated public static final byte[] encryptMessage(byte[] clearmsg, byte[] secretKey) throws HandleException
Call decryptMessage(byte[] ciphermsg, byte[] secretKey) to decrypt. Also see methods encryptMessage(PublicKey key), decrypt(PrivateKey key).
HandleException
@Deprecated public static final byte[] decryptMessage(byte[] ciphermsg, byte[] secretKey) throws HandleException
HandleException
public void clearBuffers()
public final byte[] getEncodedMessageBody() throws HandleException
HandleException
public final byte[] getEncodedMessage() throws HandleException
HandleException
public java.lang.String toString()
toString
in class java.lang.Object
public static final java.lang.String getResponseCodeMessage(int responseCode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |