| Top |
| #define | GST_MIKEY_VERSION |
| enum | GstMIKEYType |
| struct | GstMIKEYMessage |
| enum | GstMIKEYPRFFunc |
| enum | GstMIKEYMapType |
| GstMIKEYMapSRTP | |
| enum | GstMIKEYPayloadType |
| struct | GstMIKEYPayload |
| enum | GstMIKEYEncAlg |
| enum | GstMIKEYMacAlg |
| GstMIKEYPayloadKEMAC | |
| enum | GstMIKEYCacheType |
| GstMIKEYPayloadPKE | |
| enum | GstMIKEYTSType |
| GstMIKEYPayloadT | |
| GstMIKEYPayloadRAND | |
| enum | GstMIKEYSecProto |
| enum | GstMIKEYSecSRTP |
| GstMIKEYPayloadSP | |
| GstMIKEYPayloadSPParam |
GstMIKEYMessage * gst_mikey_message_new_from_bytes (GBytes *bytes,GstMIKEYDecryptInfo *info,GError **error);
Make a new GstMIKEYMessage from bytes
.
GstMIKEYMessage * gst_mikey_message_new_from_data (gconstpointer data,gsize size,GstMIKEYDecryptInfo *info,GError **error);
Parse size
bytes from data
into a GstMIKEYMessage. info
contains the
parameters to decrypt and verify the data.
void
gst_mikey_message_free (GstMIKEYMessage *msg);
Free all resources allocated in msg
.
GBytes * gst_mikey_message_to_bytes (GstMIKEYMessage *msg,GstMIKEYEncryptInfo *info,GError **error);
Convert msg
to a GBytes.
gboolean gst_mikey_message_set_info (GstMIKEYMessage *msg,guint8 version,GstMIKEYType type,gboolean V,GstMIKEYPRFFunc prf_func,guint32 CSB_id,GstMIKEYMapType map_type);
Set the information in msg
.
msg |
||
version |
a version |
|
type |
||
V |
verify flag |
|
prf_func |
the GstMIKEYPRFFunc function to use |
|
CSB_id |
the Crypto Session Bundle id |
|
map_type |
the GstMIKEYCSIDMapType |
guint
gst_mikey_message_get_n_cs (const GstMIKEYMessage *msg);
Get the number of crypto sessions in msg
.
const GstMIKEYMapSRTP * gst_mikey_message_get_cs_srtp (const GstMIKEYMessage *msg,guint idx);
Get the policy information of msg
at idx
.
gboolean gst_mikey_message_insert_cs_srtp (GstMIKEYMessage *msg,gint idx,const GstMIKEYMapSRTP *map);
Insert a Crypto Session map for SRTP in msg
at idx
When idx
is -1, the policy will be appended.
gboolean gst_mikey_message_remove_cs_srtp (GstMIKEYMessage *msg,gint idx);
Remove the SRTP policy at idx
.
gboolean gst_mikey_message_replace_cs_srtp (GstMIKEYMessage *msg,gint idx,const GstMIKEYMapSRTP *map);
Replace a Crypto Session map for SRTP in msg
at idx
with map
.
gboolean gst_mikey_message_add_cs_srtp (GstMIKEYMessage *msg,guint8 policy,guint32 ssrc,guint32 roc);
Add a Crypto policy for SRTP to msg
.
guint
gst_mikey_message_get_n_payloads (const GstMIKEYMessage *msg);
Get the number of payloads in msg
.
const GstMIKEYPayload * gst_mikey_message_get_payload (const GstMIKEYMessage *msg,guint idx);
Get the GstMIKEYPayload at idx
in msg
const GstMIKEYPayload * gst_mikey_message_find_payload (const GstMIKEYMessage *msg,GstMIKEYPayloadType type,guint nth);
Find the nth
occurence of the payload with type
in msg
.
gboolean gst_mikey_message_insert_payload (GstMIKEYMessage *msg,guint idx,GstMIKEYPayload *payload);
Insert the payload
at index idx
in msg
. If idx
is -1, the payload
will be appended to msg
.
gboolean gst_mikey_message_remove_payload (GstMIKEYMessage *msg,guint idx);
Remove the payload in msg
at idx
gboolean gst_mikey_message_replace_payload (GstMIKEYMessage *msg,guint idx,GstMIKEYPayload *payload);
Replace the payload at idx
in msg
with payload
.
gboolean gst_mikey_message_add_payload (GstMIKEYMessage *msg,GstMIKEYPayload *payload);
Add a new payload to msg
.
void
(*GstMIKEYPayloadClearFunc) (GstMIKEYPayload *payload);
Function used to clear a payload
GstMIKEYPayload *
(*GstMIKEYPayloadCopyFunc) (const GstMIKEYPayload *payload);
Function used to copy a payload
GstMIKEYPayload *
gst_mikey_payload_new (GstMIKEYPayloadType type);
Make a new GstMIKEYPayload with type
.
GstMIKEYPayload *
gst_mikey_payload_copy (const GstMIKEYPayload *payload);
Copy payload
.
gboolean gst_mikey_payload_kemac_set (GstMIKEYPayload *payload,GstMIKEYEncAlg enc_alg,GstMIKEYMacAlg mac_alg);
Set the KEMAC parameters. payload
should point to a GST_MIKEY_PT_KEMAC
payload.
gboolean gst_mikey_payload_pke_set (GstMIKEYPayload *payload,GstMIKEYCacheType C,guint16 data_len,const guint8 *data);
Set the PKE values in payload
. payload
must be of type
GST_MIKEY_PT_PKE.
gboolean gst_mikey_message_add_pke (GstMIKEYMessage *msg,GstMIKEYCacheType C,guint16 data_len,const guint8 *data);
Add a new PKE payload to msg
with the given parameters.
gboolean gst_mikey_payload_t_set (GstMIKEYPayload *payload,GstMIKEYTSType type,const guint8 *ts_value);
Set the timestamp in a GST_MIKEY_PT_T payload
.
gboolean gst_mikey_message_add_t (GstMIKEYMessage *msg,GstMIKEYTSType type,const guint8 *ts_value);
Add a new T payload to msg
with the given parameters.
gboolean
gst_mikey_message_add_t_now_ntp_utc (GstMIKEYMessage *msg);
Add a new T payload to msg
that contains the current time
in NTP-UTC format.
gboolean gst_mikey_payload_rand_set (GstMIKEYPayload *payload,guint8 len,const guint8 *rand);
Set the random values in a GST_MIKEY_PT_RAND payload
.
gboolean gst_mikey_message_add_rand (GstMIKEYMessage *msg,guint8 len,const guint8 *rand);
Add a new RAND payload to msg
with the given parameters.
gboolean gst_mikey_message_add_rand_len (GstMIKEYMessage *msg,guint8 len);
Add a new RAND payload to msg
with len
random bytes.
gboolean gst_mikey_payload_sp_set (GstMIKEYPayload *payload,guint policy,GstMIKEYSecProto proto);
Set the Security Policy parameters for payload
.
guint
gst_mikey_payload_sp_get_n_params (const GstMIKEYPayload *payload);
Get the number of security policy parameters in a GST_MIKEY_PT_SP
payload
.
const GstMIKEYPayloadSPParam * gst_mikey_payload_sp_get_param (const GstMIKEYPayload *payload,guint idx);
Get the Security Policy parameter in a GST_MIKEY_PT_SP payload
at idx
.
gboolean gst_mikey_payload_sp_add_param (GstMIKEYPayload *payload,guint8 type,guint8 len,const guint8 *val);
Add a new parameter to the GST_MIKEY_PT_SP payload
with type
, len
and val
.
gboolean gst_mikey_payload_sp_remove_param (GstMIKEYPayload *payload,guint idx);
Remove the Security Policy parameters from a GST_MIKEY_PT_SP
payload
at idx
.
Different MIKEY data types.
struct GstMIKEYMessage {
guint8 version;
GstMIKEYType type;
gboolean V;
GstMIKEYPRFFunc prf_func;
guint32 CSB_id;
GstMIKEYMapType map_type;
GArray *map_info;
GArray *payloads;
};
Structure holding the information of the MIKEY message
the version |
||
GstMIKEYType |
the GstMIKEYType message type |
|
gboolean |
verify flag |
|
GstMIKEYPRFFunc |
||
Identifies the Crypto Session Bundle |
||
GstMIKEYMapType |
||
GArray * |
map info array of type depending on |
|
GArray * |
the payload array of GstMIKEYPayload |
Specifies the method of uniquely mapping Crypto Sessions to the security protocol sessions.
typedef struct {
guint8 policy;
guint32 ssrc;
guint32 roc;
} GstMIKEYMapSRTP;
The Security policy Map item for SRTP
Different MIKEY Payload types.
struct GstMIKEYPayload {
GstMIKEYPayloadType type;
guint len;
GstMIKEYPayloadClearFunc clear_func;
GstMIKEYPayloadCopyFunc copy_func;
};
Hold the common fields for all payloads
GstMIKEYPayloadType |
the payload type |
|
guint |
length of the payload |
|
GstMIKEYPayloadClearFunc |
function to clear the payload |
|
GstMIKEYPayloadCopyFunc |
function to copy the payload |
typedef struct {
GstMIKEYPayload pt;
GstMIKEYEncAlg enc_alg;
GstMIKEYMacAlg mac_alg;
GArray *subpayloads;
} GstMIKEYPayloadKEMAC;
A structure holding the KEMAC payload
GstMIKEYPayload |
the common GstMIKEYPayload |
|
GstMIKEYEncAlg |
the GstMIKEYEncAlg |
|
GstMIKEYMacAlg |
the GstMIKEYMacAlg |
|
GArray * |
typedef struct {
GstMIKEYPayload pt;
GstMIKEYCacheType C;
guint16 data_len;
guint8 *data;
} GstMIKEYPayloadPKE;
The Envelope data payload contains the encrypted envelope key that is used in the public-key transport to protect the data in the Key data transport payload. The encryption algorithm used is implicit from the certificate/public key used.
GstMIKEYPayload |
the common GstMIKEYPayload |
|
envelope key cache indicator |
||
length of |
||
the encrypted envelope key |
typedef struct {
GstMIKEYPayload pt;
GstMIKEYTSType type;
guint8 *ts_value;
} GstMIKEYPayloadT;
The timestamp payload carries the timestamp information
typedef struct {
GstMIKEYPayload pt;
guint8 len;
guint8 *rand;
} GstMIKEYPayloadRAND;
The RAND payload consists of a (pseudo-)random bit-string
This policy specifies the parameters for SRTP and SRTCP
|
Encryption algorithm |
||
|
Session Encr. key length |
||
|
Authentication algorithm |
||
|
Session Auth. key length |
||
|
Session Salt key length |
||
|
SRTP Pseudo Random Function |
||
|
Key derivation rate |
||
|
SRTP encryption off/on, 0 if off, 1 if on |
||
|
SRTCP encryption off/on, 0 if off, 1 if on |
||
|
sender's FEC order |
||
|
SRTP authentication off/on, 0 if off, 1 if on |
||
|
Authentication tag length |
||
|
SRTP prefix length |
typedef struct {
GstMIKEYPayload pt;
guint policy;
GstMIKEYSecProto proto;
GArray *params;
} GstMIKEYPayloadSP;
The Security Policy payload defines a set of policies that apply to a specific security protocol
GstMIKEYPayload |
the payload header |
|
guint |
the policy number |
|
GstMIKEYSecProto |
the security protocol |
|
GArray * |
array of GstMIKEYPayloadPSParam |