libzrtp  1.2.0
ZRTP VoIP security
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Typedefs | Enumerations
Libzrtp Error Definitions

Typedefs

typedef enum zrtp_protocol_error_t zrtp_protocol_error_t
 Define protocol error codes according to ZRTP RFC sec. 5.9.
 
typedef enum zrtp_status_t zrtp_status_t
 libzrtp functions statuses.
 

Enumerations

enum  zrtp_protocol_error_t {
  zrtp_error_unknown = 0, zrtp_error_timeout = 1, zrtp_error_invalid_packet = 0x10, zrtp_error_software = 0x20,
  zrtp_error_version = 0x30, zrtp_error_hello_mistmatch = 0x40, zrtp_error_hash_unsp = 0x51, zrtp_error_cipher_unsp = 0x52,
  zrtp_error_pktype_unsp = 0x53, zrtp_error_auth_unsp = 0x54, zrtp_error_sas_unsp = 0x55, zrtp_error_no_secret = 0x56,
  zrtp_error_possible_mitm1 = 0x61, zrtp_error_possible_mitm2 = 0x62, zrtp_error_possible_mitm3 = 0x63, zrtp_error_auth_decrypt = 0x70,
  zrtp_error_nonse_reuse = 0x80, zrtp_error_equal_zid = 0x90, zrtp_error_service_unavail = 0xA0, zrtp_error_goclear_unsp = 0x100,
  zrtp_error_wrong_zid = 0x202, zrtp_error_wrong_meshmac = 0x203, zrtp_error_count
}
 Define protocol error codes according to ZRTP RFC sec. 5.9. More...
 
enum  zrtp_status_t {
  zrtp_status_ok = 0, zrtp_status_fail = 1, zrtp_status_bad_param = 2, zrtp_status_alloc_fail = 3,
  zrtp_status_auth_fail = 4, zrtp_status_cipher_fail = 5, zrtp_status_algo_fail = 6, zrtp_status_key_expired = 7,
  zrtp_status_buffer_size = 8, zrtp_status_drop = 9, zrtp_status_open_fail = 10, zrtp_status_read_fail = 11,
  zrtp_status_write_fail = 12, zrtp_status_old_pkt = 13, zrtp_status_rp_fail = 14, zrtp_status_zrp_fail = 15,
  zrtp_status_crc_fail = 16, zrtp_status_rng_fail = 17, zrtp_status_wrong_state = 18, zrtp_status_attack = 19,
  zrtp_status_notavailable = 20, zrtp_status_count = 21
}
 libzrtp functions statuses. More...
 

Detailed Description

In this section the ZRTP protocol error codes and the library internal errors are defined.

When ZRTP Protocl error detected, zrtp_callback_event_t::on_zrtp_security_event is called and zrtp_session_info_t::last_error contains error code.

Typedef Documentation

libzrtp functions statuses.

Note that the value of zrtp_status_ok is equal to zero. This can simplify error checking somewhat.

Enumeration Type Documentation

Define protocol error codes according to ZRTP RFC sec. 5.9.

Enumerator:
zrtp_error_software 

Malformed packet (CRC OK, but wrong structure)

zrtp_error_version 

Critical software error

zrtp_error_hello_mistmatch 

Unsupported ZRTP version

zrtp_error_hash_unsp 

Hello components mismatch

zrtp_error_cipher_unsp 

Hash type not supported

zrtp_error_pktype_unsp 

Cipher type not supported

zrtp_error_auth_unsp 

Public key exchange not supported

zrtp_error_sas_unsp 

SRTP auth. tag not supported

zrtp_error_no_secret 

SAS scheme not supported

zrtp_error_possible_mitm1 

No shared secret available, Preshared mode required

zrtp_error_possible_mitm2 

DH Error: bad pvi or pvr ( == 1, 0, or p-1)

zrtp_error_possible_mitm3 

DH Error: hvi != hashed data

zrtp_error_auth_decrypt 

Received relayed SAS from untrusted MiTM

zrtp_error_nonse_reuse 

Auth. Error: Bad Confirm pkt HMAC

zrtp_error_equal_zid 

Nonce reuse

zrtp_error_service_unavail 

Equal ZIDs in Hello

zrtp_error_goclear_unsp 

Service unavailable

zrtp_error_wrong_zid 

GoClear packet received, but not allowed

zrtp_error_wrong_meshmac 

ZID received in new Hello doesn't equal to ZID from the previous stream

zrtp_error_count 

Message HMAC doesn't match with pre-received one

libzrtp functions statuses.

Note that the value of zrtp_status_ok is equal to zero. This can simplify error checking somewhat.

Enumerator:
zrtp_status_fail 

OK status

zrtp_status_bad_param 

General, unspecified failure

zrtp_status_alloc_fail 

Wrong, unsupported parameter

zrtp_status_auth_fail 

Fail allocate memory

zrtp_status_cipher_fail 

SRTP authentication failure

zrtp_status_algo_fail 

Cipher failure on RTP encrypt/decrypt

zrtp_status_key_expired 

General Crypto Algorithm failure

zrtp_status_buffer_size 

SRTP can't use key any longer

zrtp_status_drop 

Input buffer too small

zrtp_status_open_fail 

Packet process DROP status

zrtp_status_read_fail 

Failed to open file/device

zrtp_status_write_fail 

Unable to read data from the file/stream

zrtp_status_old_pkt 

Unable to write to the file/stream

zrtp_status_rp_fail 

SRTP packet is out of sliding window

zrtp_status_zrp_fail 

RTP replay protection failed

zrtp_status_crc_fail 

ZRTP replay protection failed

zrtp_status_rng_fail 

ZRTP packet CRC is wrong

zrtp_status_wrong_state 

Can't generate random value

zrtp_status_attack 

Illegal operation in current state

zrtp_status_notavailable 

Attack detected

zrtp_status_count 

Function is not available in current configuration