Top |
Functions
Types and Values
#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 |
Functions
gst_mikey_message_new ()
GstMIKEYMessage *
gst_mikey_message_new (void
);
Make a new MIKEY message.
Since: 1.4
gst_mikey_message_new_from_bytes ()
GstMIKEYMessage * gst_mikey_message_new_from_bytes (GBytes *bytes
,GstMIKEYDecryptInfo *info
,GError **error
);
Make a new GstMIKEYMessage from bytes
.
Since: 1.4
gst_mikey_message_new_from_caps ()
GstMIKEYMessage *
gst_mikey_message_new_from_caps (GstCaps *caps
);
Makes mikey message including:
Security Policy Payload
Key Data Transport Payload
Key Data Sub-Payload
Since: 1.8
gst_mikey_message_new_from_data ()
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.
Parameters
data |
bytes to read. |
[array length=size][element-type guint8] |
size |
length of |
|
info |
GstMIKEYDecryptInfo |
|
error |
a GError |
Since: 1.4
gst_mikey_message_to_bytes ()
GBytes * gst_mikey_message_to_bytes (GstMIKEYMessage *msg
,GstMIKEYEncryptInfo *info
,GError **error
);
Convert msg
to a GBytes.
Since: 1.4
gst_mikey_message_to_caps ()
gboolean gst_mikey_message_to_caps (const GstMIKEYMessage *msg
,GstCaps *caps
);
Parameters
msg |
||
caps |
a GstCaps to be filled with SRTP parameters (srtp/srtcp cipher, authorization, key data) |
Since: 1.8.1
gst_mikey_message_base64_encode ()
gchar *
gst_mikey_message_base64_encode (GstMIKEYMessage *msg
);
Since: 1.8
gst_mikey_message_copy ()
GstMIKEYMessage *
gst_mikey_message_copy (const GstMIKEYMessage *message
);
Create a copy of the given message.
Since: 1.4
gst_mikey_message_ref ()
GstMIKEYMessage *
gst_mikey_message_ref (GstMIKEYMessage *message
);
Increase the refcount of this message.
Since: 1.4
gst_mikey_message_unref ()
void
gst_mikey_message_unref (GstMIKEYMessage *message
);
Decrease the refcount of an message, freeing it if the refcount reaches 0.
Since: 1.4
gst_mikey_message_set_info ()
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
.
Parameters
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 |
Since: 1.4
gst_mikey_message_get_n_cs ()
guint
gst_mikey_message_get_n_cs (const GstMIKEYMessage *msg
);
Get the number of crypto sessions in msg
.
Since: 1.4
gst_mikey_message_get_cs_srtp ()
const GstMIKEYMapSRTP * gst_mikey_message_get_cs_srtp (const GstMIKEYMessage *msg
,guint idx
);
Get the policy information of msg
at idx
.
Since: 1.4
gst_mikey_message_insert_cs_srtp ()
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.
Since: 1.4
gst_mikey_message_remove_cs_srtp ()
gboolean gst_mikey_message_remove_cs_srtp (GstMIKEYMessage *msg
,gint idx
);
Remove the SRTP policy at idx
.
Since: 1.4
gst_mikey_message_replace_cs_srtp ()
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
.
Since: 1.4
gst_mikey_message_add_cs_srtp ()
gboolean gst_mikey_message_add_cs_srtp (GstMIKEYMessage *msg
,guint8 policy
,guint32 ssrc
,guint32 roc
);
Add a Crypto policy for SRTP to msg
.
Parameters
msg |
||
policy |
The security policy applied for the stream with |
|
ssrc |
the SSRC that must be used for the stream |
|
roc |
current rollover counter |
Since: 1.4
gst_mikey_message_get_n_payloads ()
guint
gst_mikey_message_get_n_payloads (const GstMIKEYMessage *msg
);
Get the number of payloads in msg
.
Since: 1.4
gst_mikey_message_get_payload ()
const GstMIKEYPayload * gst_mikey_message_get_payload (const GstMIKEYMessage *msg
,guint idx
);
Get the GstMIKEYPayload at idx
in msg
Returns
the GstMIKEYPayload at idx
. The payload
remains valid for as long as it is part of msg
.
[transfer none]
Since: 1.4
gst_mikey_message_find_payload ()
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
.
Since: 1.4
gst_mikey_message_insert_payload ()
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
.
Since: 1.4
gst_mikey_message_remove_payload ()
gboolean gst_mikey_message_remove_payload (GstMIKEYMessage *msg
,guint idx
);
Remove the payload in msg
at idx
Since: 1.4
gst_mikey_message_replace_payload ()
gboolean gst_mikey_message_replace_payload (GstMIKEYMessage *msg
,guint idx
,GstMIKEYPayload *payload
);
Replace the payload at idx
in msg
with payload
.
Since: 1.4
gst_mikey_message_add_payload ()
gboolean gst_mikey_message_add_payload (GstMIKEYMessage *msg
,GstMIKEYPayload *payload
);
Add a new payload to msg
.
Since: 1.4
gst_mikey_payload_new ()
GstMIKEYPayload *
gst_mikey_payload_new (GstMIKEYPayloadType type
);
Make a new GstMIKEYPayload with type
.
Since: 1.4
gst_mikey_payload_copy ()
GstMIKEYPayload *
gst_mikey_payload_copy (const GstMIKEYPayload *payload
);
Create a copy of the given payload.
Since: 1.4
gst_mikey_payload_key_data_set_interval ()
gboolean gst_mikey_payload_key_data_set_interval (GstMIKEYPayload *payload
,guint8 vf_len
,const guint8 *vf_data
,guint8 vt_len
,const guint8 *vt_data
);
Set the key validity period in the GST_MIKEY_PT_KEY_DATA
payload
.
Parameters
payload |
||
vf_len |
the length of |
|
vf_data |
the Valid From data. |
[array length=vf_data] |
vt_len |
the length of |
|
vt_data |
the Valid To data. |
[array length=vt_len] |
Since: 1.4
gst_mikey_payload_key_data_set_key ()
gboolean gst_mikey_payload_key_data_set_key (GstMIKEYPayload *payload
,GstMIKEYKeyDataType key_type
,guint16 key_len
,const guint8 *key_data
);
Set key_len
bytes of key_data
of type key_type
as the key for the
GST_MIKEY_PT_KEY_DATA
payload
.
Parameters
payload |
||
key_type |
a GstMIKEYKeyDataType |
|
key_len |
the length of |
|
key_data |
the key of type |
[array length=key_len] |
Since: 1.4
gst_mikey_payload_key_data_set_salt ()
gboolean gst_mikey_payload_key_data_set_salt (GstMIKEYPayload *payload
,guint16 salt_len
,const guint8 *salt_data
);
Set the salt key data. If salt_len
is 0 and salt_data
is NULL
, the
salt data will be removed.
Parameters
payload |
||
salt_len |
the length of |
|
salt_data |
the salt. |
[array length=salt_len][allow-none] |
Since: 1.4
gst_mikey_payload_key_data_set_spi ()
gboolean gst_mikey_payload_key_data_set_spi (GstMIKEYPayload *payload
,guint8 spi_len
,const guint8 *spi_data
);
Set the SPI/MKI validity in the GST_MIKEY_PT_KEY_DATA
payload
.
Since: 1.4
gst_mikey_payload_ref ()
GstMIKEYPayload *
gst_mikey_payload_ref (GstMIKEYPayload *payload
);
Increase the refcount of this payload.
Since: 1.4
gst_mikey_payload_unref ()
void
gst_mikey_payload_unref (GstMIKEYPayload *payload
);
Decrease the refcount of an payload, freeing it if the refcount reaches 0.
Since: 1.4
gst_mikey_payload_kemac_set ()
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.
Since: 1.4
gst_mikey_payload_kemac_add_sub ()
gboolean gst_mikey_payload_kemac_add_sub (GstMIKEYPayload *payload
,GstMIKEYPayload *newpay
);
Add a new sub payload to payload
.
Since: 1.4
gst_mikey_payload_kemac_get_n_sub ()
guint
gst_mikey_payload_kemac_get_n_sub (const GstMIKEYPayload *payload
);
Get the number of sub payloads of payload
. payload
should be of type
GST_MIKEY_PT_KEMAC
.
Since: 1.4
gst_mikey_payload_kemac_get_sub ()
const GstMIKEYPayload * gst_mikey_payload_kemac_get_sub (const GstMIKEYPayload *payload
,guint idx
);
Get the sub payload of payload
at idx
. payload
should be of type
GST_MIKEY_PT_KEMAC
.
Since: 1.4
gst_mikey_payload_kemac_remove_sub ()
gboolean gst_mikey_payload_kemac_remove_sub (GstMIKEYPayload *payload
,guint idx
);
Remove the sub payload at idx
in payload
.
Since: 1.4
gst_mikey_payload_pke_set ()
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
.
Parameters
payload |
||
C |
envelope key cache indicator |
|
data_len |
the length of |
|
data |
the encrypted envelope key. |
[array length=data_len] |
Since: 1.4
gst_mikey_message_add_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.
Parameters
msg |
||
C |
envelope key cache indicator |
|
data_len |
the length of |
|
data |
the encrypted envelope key. |
[array length=data_len] |
Since: 1.4
gst_mikey_payload_t_set ()
gboolean gst_mikey_payload_t_set (GstMIKEYPayload *payload
,GstMIKEYTSType type
,const guint8 *ts_value
);
Set the timestamp in a GST_MIKEY_PT_T
payload
.
Since: 1.4
gst_mikey_message_add_t ()
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.
Parameters
msg |
||
type |
specifies the timestamp type used |
|
ts_value |
The timestamp value of the specified |
[array] |
Since: 1.4
gst_mikey_message_add_t_now_ntp_utc ()
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.
Since: 1.4
gst_mikey_payload_rand_set ()
gboolean gst_mikey_payload_rand_set (GstMIKEYPayload *payload
,guint8 len
,const guint8 *rand
);
Set the random values in a GST_MIKEY_PT_RAND
payload
.
Since: 1.4
gst_mikey_message_add_rand ()
gboolean gst_mikey_message_add_rand (GstMIKEYMessage *msg
,guint8 len
,const guint8 *rand
);
Add a new RAND payload to msg
with the given parameters.
Since: 1.4
gst_mikey_message_add_rand_len ()
gboolean gst_mikey_message_add_rand_len (GstMIKEYMessage *msg
,guint8 len
);
Add a new RAND payload to msg
with len
random bytes.
Since: 1.4
gst_mikey_payload_sp_set ()
gboolean gst_mikey_payload_sp_set (GstMIKEYPayload *payload
,guint policy
,GstMIKEYSecProto proto
);
Set the Security Policy parameters for payload
.
Since: 1.4
gst_mikey_payload_sp_get_n_params ()
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
.
Since: 1.4
gst_mikey_payload_sp_get_param ()
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
.
Since: 1.4
gst_mikey_payload_sp_add_param ()
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
.
Since: 1.4
gst_mikey_payload_sp_remove_param ()
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
.
Since: 1.4
Types and Values
enum GstMIKEYType
Different MIKEY data types.
struct GstMIKEYMessage
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
Members
guint8 |
the version |
|
GstMIKEYType |
the GstMIKEYType message type |
|
gboolean |
verify flag |
|
GstMIKEYPRFFunc |
||
guint32 |
Identifies the Crypto Session Bundle |
|
GstMIKEYMapType |
||
GArray * |
map info array of type depending on |
|
GArray * |
the payload array of GstMIKEYPayload |
enum GstMIKEYMapType
Specifies the method of uniquely mapping Crypto Sessions to the security protocol sessions.
GstMIKEYMapSRTP
typedef struct { guint8 policy; guint32 ssrc; guint32 roc; } GstMIKEYMapSRTP;
The Security policy Map item for SRTP
enum GstMIKEYPayloadType
Different MIKEY Payload types.
struct GstMIKEYPayload
struct GstMIKEYPayload { GstMIKEYPayloadType type; guint len; };
Hold the common fields for all payloads
GstMIKEYPayloadKEMAC
typedef struct { GstMIKEYPayload pt; GstMIKEYEncAlg enc_alg; GstMIKEYMacAlg mac_alg; GArray *subpayloads; } GstMIKEYPayloadKEMAC;
A structure holding the KEMAC payload
Members
GstMIKEYPayload |
the common GstMIKEYPayload |
|
GstMIKEYEncAlg |
the GstMIKEYEncAlg |
|
GstMIKEYMacAlg |
the GstMIKEYMacAlg |
|
GArray * |
the subpayloads |
GstMIKEYPayloadPKE
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.
Members
GstMIKEYPayload |
the common GstMIKEYPayload |
|
envelope key cache indicator |
||
guint16 |
length of |
|
guint8 * |
the encrypted envelope key |
GstMIKEYPayloadT
typedef struct { GstMIKEYPayload pt; GstMIKEYTSType type; guint8 *ts_value; } GstMIKEYPayloadT;
The timestamp payload carries the timestamp information
Members
GstMIKEYPayload |
the payload header |
|
GstMIKEYTSType |
||
guint8 * |
the timestamp value |
GstMIKEYPayloadRAND
typedef struct { GstMIKEYPayload pt; guint8 len; guint8 *rand; } GstMIKEYPayloadRAND;
The RAND payload consists of a (pseudo-)random bit-string
Members
GstMIKEYPayload |
the payload header |
|
guint8 |
the length of |
|
guint8 * |
random values |
enum GstMIKEYSecSRTP
This policy specifies the parameters for SRTP and SRTCP
Members
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 |
GstMIKEYPayloadSP
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
Members
GstMIKEYPayload |
the payload header |
|
guint |
the policy number |
|
GstMIKEYSecProto |
the security protocol |
|
GArray * |
array of GstMIKEYPayloadPSParam |