public interface ZrtpCallback
| Modifier and Type | Interface and Description |
|---|---|
static class |
ZrtpCallback.EnableSecurity |
static class |
ZrtpCallback.Role
This enum defines which role a ZRTP peer has.
|
| Modifier and Type | Method and Description |
|---|---|
int |
activateTimer(int time)
Activate timer.
|
int |
cancelTimer()
Cancel the active timer.
|
boolean |
checkSASSignature(byte[] sasHash)
ZRTP calls this method to request a SAS signature check.
|
void |
handleGoClear()
This method handles GoClear requests.
|
boolean |
sendDataZRTP(byte[] data)
Send a ZRTP packet via RTP.
|
void |
sendInfo(ZrtpCodes.MessageSeverity severity,
EnumSet<?> subCode)
Send information messages to the hosting environment.
|
void |
signSAS(byte[] sasHash)
Request a SAS signature.
|
void |
srtpSecretsOff(ZrtpCallback.EnableSecurity part)
Switch off the security for the defined part.
|
void |
srtpSecretsOn(String c,
String s,
boolean verified)
Switch on the security.
|
boolean |
srtpSecretsReady(ZrtpSrtpSecrets secrets,
ZrtpCallback.EnableSecurity part)
SRTP crypto data ready for the sender or receiver.
|
void |
zrtpAskEnrollment(ZrtpCodes.InfoEnrollment info)
Inform about a PBX enrollment request.
|
void |
zrtpInformEnrollment(ZrtpCodes.InfoEnrollment info)
Inform about PBX enrollment result.
|
void |
zrtpNegotiationFailed(ZrtpCodes.MessageSeverity severity,
EnumSet<?> subCode)
Handle ZRTP negotiation failed.
|
void |
zrtpNotSuppOther()
ZRTP calls this method if the other side does not support ZRTP.
|
boolean sendDataZRTP(byte[] data)
data - Points to ZRTP packet to send.int activateTimer(int time)
time - The time in ms for the timerint cancelTimer()
void sendInfo(ZrtpCodes.MessageSeverity severity, EnumSet<?> subCode)
severity - This defines the message's severitysubCode - The subcode identifying the reason.ZrtpCodes.MessageSeverityboolean srtpSecretsReady(ZrtpSrtpSecrets secrets, ZrtpCallback.EnableSecurity part)
enum Role. The called method (the implementation
of this abstract method) must either copy the pointers to the SRTP
data or the SRTP data itself to a save place. The SrtpSecret_t
structure is destroyed after the callback method returns to the
ZRTP implementation.
The SRTP data themselfs are ontained in the ZRtp object and are
valid as long as the ZRtp object is active. TheZRtp's
destructor clears the secrets. Thus the called method needs to
save the pointers only, ZRtp takes care of the data.
The implementing class may enable SRTP processing in this
method or delay it to srtpSecertsOn().secrets - A pointer to a SrtpSecret_t structure that
contains all necessary data.part - for which part (Sender or Receiver) this data is
valid.void srtpSecretsOff(ZrtpCallback.EnableSecurity part)
part - Defines for which part (sender or receiver) to
switch on securityvoid srtpSecretsOn(String c, String s, boolean verified)
c - The name of the used cipher algorithm and mode, or
NULLs - The SAS stringverified - if verified is true then SAS was
verified by both parties during a previous call.void handleGoClear()
void zrtpNegotiationFailed(ZrtpCodes.MessageSeverity severity, EnumSet<?> subCode)
severity - This defines the message's severitysubCode - The subcode identifying the reason.ZrtpCodes.MessageSeverityvoid zrtpNotSuppOther()
void zrtpAskEnrollment(ZrtpCodes.InfoEnrollment info)
info - Give some information to the user about the PBX
requesting an enrollment.void zrtpInformEnrollment(ZrtpCodes.InfoEnrollment info)
info - Give some information to the user about the result
of an enrollment.void signSAS(byte[] sasHash)
setSignatureData() to set the resulting
signature in the ZRTP protocol. Refer to chapter 7.2 of RFC 6189.sasHash - The SAS hash to sign.boolean checkSASSignature(byte[] sasHash)
getSignatureData()of
ZrtpQueue to get the signature data and to perform the signature check.
Refer to chapter 7.2 of RFC 6189 (ZRTP specification).
NOTEsasHash - The SAS hash that was signed by the other peer.true if the signature was ok, false otherwise.Copyright © 2020. All rights reserved.