亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? srtp.c

?? mediastreamer2是開源的網(wǎng)絡(luò)傳輸媒體流的庫
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
  } else {    auth_start = NULL;    auth_tag = NULL;  }   /*   * if we expect message authentication, run the authentication   * function and compare the result with the value of the auth_tag   */  if (auth_start) {            /*      * if we're using a universal hash, then we need to compute the     * keystream prefix for encrypting the universal hash output     *     * if the keystream prefix length is zero, then we know that     * the authenticator isn't using a universal hash function     */      if (stream->rtp_auth->prefix_len != 0) {            prefix_len = auth_get_prefix_length(stream->rtp_auth);          status = cipher_output(stream->rtp_cipher, tmp_tag, prefix_len);      debug_print(mod_srtp, "keystream prefix: %s", 		  octet_string_hex_string(tmp_tag, prefix_len));      if (status)	return err_status_cipher_fail;    }     /* initialize auth func context */    status = auth_start(stream->rtp_auth);    if (status) return status;     /* now compute auth function over packet */    status = auth_update(stream->rtp_auth, (uint8_t *)auth_start,  			 *pkt_octet_len - tag_len);    /* run auth func over ROC, then write tmp tag */    status = auth_compute(stream->rtp_auth, (uint8_t *)&est, 4, tmp_tag);      debug_print(mod_srtp, "computed auth tag:    %s", 		octet_string_hex_string(tmp_tag, tag_len));    debug_print(mod_srtp, "packet auth tag:      %s", 		octet_string_hex_string(auth_tag, tag_len));    if (status)      return err_status_auth_fail;       if (octet_string_is_eq(tmp_tag, auth_tag, tag_len))      return err_status_auth_fail;  }  /*    * update the key usage limit, and check it to make sure that we   * didn't just hit either the soft limit or the hard limit, and call   * the event handler if we hit either.   */  switch(key_limit_update(stream->limit)) {  case key_event_normal:    break;  case key_event_soft_limit:     srtp_handle_event(ctx, stream, event_key_soft_limit);    break;   case key_event_hard_limit:    srtp_handle_event(ctx, stream, event_key_hard_limit);    return err_status_key_expired;  default:    break;  }  /* if we're encrypting, add keystream into ciphertext */  if (enc_start) {    status = cipher_encrypt(stream->rtp_cipher, 			    (uint8_t *)enc_start, &enc_octet_len);    if (status)      return err_status_cipher_fail;  }  /*    * verify that stream is for received traffic - this check will   * detect SSRC collisions, since a stream that appears in both   * srtp_protect() and srtp_unprotect() will fail this test in one of   * those functions.   *   * we do this check *after* the authentication check, so that the   * latter check will catch any attempts to fool us into thinking   * that we've got a collision   */  if (stream->direction != dir_srtp_receiver) {    if (stream->direction == dir_unknown) {      stream->direction = dir_srtp_receiver;    } else {      srtp_handle_event(ctx, stream, event_ssrc_collision);    }  }  /*    * if the stream is a 'provisional' one, in which the template context   * is used, then we need to allocate a new stream at this point, since   * the authentication passed   */  if (stream == ctx->stream_template) {      srtp_stream_ctx_t *new_stream;    /*      * allocate and initialize a new stream      *      * note that we indicate failure if we can't allocate the new     * stream, and some implementations will want to not return     * failure here     */    status = srtp_stream_clone(ctx->stream_template, hdr->ssrc, &new_stream);     if (status)      return status;        /* add new stream to the head of the stream_list */    new_stream->next = ctx->stream_list;    ctx->stream_list = new_stream;        /* set stream (the pointer used in this function) */    stream = new_stream;  }    /*    * the message authentication function passed, so add the packet   * index into the replay database    */  rdbx_add_index(&stream->rtp_rdbx, delta);  /* decrease the packet length by the length of the auth tag */  *pkt_octet_len -= tag_len;  return err_status_ok;  }err_status_tsrtp_init() {  err_status_t status;  /* initialize crypto kernel */  status = crypto_kernel_init();  if (status)     return status;  /* load srtp debug module into the kernel */  status = crypto_kernel_load_debug_module(&mod_srtp);  if (status)    return status;  return err_status_ok;}/*  * The following code is under consideration for removal.  See * SRTP_MAX_TRAILER_LEN  */#if 0/* * srtp_get_trailer_length(&a) returns the number of octets that will * be added to an RTP packet by the SRTP processing.  This value * is constant for a given srtp_stream_t (i.e. between initializations). */intsrtp_get_trailer_length(const srtp_stream_t s) {  return auth_get_tag_length(s->rtp_auth);}#endif/* * srtp_get_stream(ssrc) returns a pointer to the stream corresponding * to ssrc, or NULL if no stream exists for that ssrc * * this is an internal function  */srtp_stream_ctx_t *srtp_get_stream(srtp_t srtp, uint32_t ssrc) {  srtp_stream_ctx_t *stream;  /* walk down list until ssrc is found */  stream = srtp->stream_list;  while (stream != NULL) {    if (stream->ssrc == ssrc)      return stream;    stream = stream->next;  }    /* we haven't found our ssrc, so return a null */  return NULL;}err_status_tsrtp_dealloc(srtp_t session) {  srtp_stream_ctx_t *stream;  err_status_t status;  /*   * we take a conservative deallocation strategy - if we encounter an   * error deallocating a stream, then we stop trying to deallocate   * memory and just return an error   */  /* walk list of streams, deallocating as we go */  stream = session->stream_list;  while (stream != NULL) {    srtp_stream_t next = stream->next;    status = srtp_stream_dealloc(session, stream);    if (status)      return status;    stream = next;  }    /* deallocate stream template, if there is one */  if (session->stream_template != NULL) {    status = auth_dealloc(session->stream_template->rtcp_auth);     if (status)       return status;     status = cipher_dealloc(session->stream_template->rtcp_cipher);     if (status)       return status;     crypto_free(session->stream_template->limit);    status = cipher_dealloc(session->stream_template->rtp_cipher);     if (status)       return status;     status = auth_dealloc(session->stream_template->rtp_auth);    if (status)      return status;    crypto_free(session->stream_template);  }  /* deallocate session context */  crypto_free(session);  return err_status_ok;}err_status_tsrtp_add_stream(srtp_t session, 		const srtp_policy_t *policy)  {  err_status_t status;  srtp_stream_t tmp;  /* sanity check arguments */  if ((session == NULL) || (policy == NULL) || (policy->key == NULL))    return err_status_bad_param;  /* allocate stream  */  status = srtp_stream_alloc(&tmp, policy);  if (status) {    return status;  }    /* initialize stream  */  status = srtp_stream_init(tmp, policy);  if (status) {    crypto_free(tmp);    return status;  }    /*    * set the head of the stream list or the template to point to the   * stream that we've just alloced and init'ed, depending on whether   * or not it has a wildcard SSRC value or not   *   * if the template stream has already been set, then the policy is   * inconsistent, so we return a bad_param error code   */  switch (policy->ssrc.type) {  case (ssrc_any_outbound):    if (session->stream_template) {      return err_status_bad_param;    }    session->stream_template = tmp;    session->stream_template->direction = dir_srtp_sender;    break;  case (ssrc_any_inbound):    if (session->stream_template) {      return err_status_bad_param;    }    session->stream_template = tmp;    session->stream_template->direction = dir_srtp_receiver;    break;  case (ssrc_specific):    tmp->next = session->stream_list;    session->stream_list = tmp;    break;  case (ssrc_undefined):  default:    crypto_free(tmp);    return err_status_bad_param;  }      return err_status_ok;}err_status_tsrtp_create(srtp_t *session,               /* handle for session     */ 	    const srtp_policy_t *policy) { /* SRTP policy (list)     */  err_status_t stat;  srtp_ctx_t *ctx;  /* sanity check arguments */  if (session == NULL)    return err_status_bad_param;  /* allocate srtp context and set ctx_ptr */  ctx = (srtp_ctx_t *) crypto_alloc(sizeof(srtp_ctx_t));  if (ctx == NULL)    return err_status_alloc_fail;  *session = ctx;  /*    * loop over elements in the policy list, allocating and   * initializing a stream for each element   */  ctx->stream_template = NULL;  ctx->stream_list = NULL;  while (policy != NULL) {        stat = srtp_add_stream(ctx, policy);    if (stat) {      /* clean up everything */      srtp_dealloc(*session);      return stat;    }        /* set policy to next item in list  */    policy = policy->next;  }  return err_status_ok;}err_status_tsrtp_remove_stream(srtp_t session, uint32_t ssrc) {  srtp_stream_ctx_t *stream, *last_stream;  err_status_t status;  /* sanity check arguments */  if (session == NULL)    return err_status_bad_param;    /* find stream in list; complain if not found */  last_stream = stream = session->stream_list;  while ((stream != NULL) && (ssrc != stream->ssrc)) {    last_stream = stream;    stream = stream->next;  }  if (stream == NULL)    return err_status_no_ctx;  /* remove stream from the list */  last_stream->next = stream->next;  /* deallocate the stream */  status = srtp_stream_dealloc(session, stream);  if (status)    return status;  return err_status_ok;}/* * the default policy - provides a convenient way for callers to use * the default security policy *  * this policy is that defined in the current SRTP internet draft. * *//*  * NOTE: cipher_key_len is really key len (128 bits) plus salt len *  (112 bits) *//* There are hard-coded 16's for base_key_len in the key generation code */voidcrypto_policy_set_rtp_default(crypto_policy_t *p) {  p->cipher_type     = AES_128_ICM;             p->cipher_key_len  = 30;                /* default 128 bits per RFC 3711 */  p->auth_type       = HMAC_SHA1;               p->auth_key_len    = 20;                /* default 160 bits per RFC 3711 */  p->auth_tag_len    = 10;                /* default 80 bits per RFC 3711 */  p->sec_serv        = sec_serv_conf_and_auth;  }voidcrypto_policy_set_rtcp_default(crypto_policy_t *p) {  p->cipher_type     = AES_128_ICM;             p->cipher_key_len  = 30;                 /* default 128 bits per RFC 3711 */  p->auth_type       = HMAC_SHA1;               p->auth_key_len    = 20;                 /* default 160 bits per RFC 3711 */  p->auth_tag_len    = 10;                 /* default 80 bits per RFC 3711 */  p->sec_serv        = sec_serv_conf_and_auth;  }voidcrypto_policy_set_aes_cm_128_hmac_sha1_32(crypto_policy_t *p) {  /*   * corresponds to draft-ietf-mmusic-sdescriptions-12.txt   *   * note that this crypto policy is intended for SRTP, but not SRTCP   */  p->cipher_type     = AES_128_ICM;             p->cipher_key_len  = 30;                /* 128 bit key, 112 bit salt */  p->auth_type       = HMAC_SHA1;               p->auth_key_len    = 20;                /* 160 bit key               */  p->auth_tag_len    = 4;                 /* 32 bit tag                */  p->sec_serv        = sec_serv_conf_and_auth;  }voidcrypto_policy_set_aes_cm_128_null_auth(crypto_policy_t *p) {  /*   * corresponds to draft-ietf-mmusic-sdescriptions-12.txt   *   * note that this crypto policy is intended for SRTP, but not SRTCP   */  p->cipher_type     = AES_128_ICM;             p->cipher_key_len  = 30;                /* 128 bit key, 112 bit salt */  p->auth_type       = NULL_AUTH;               p->auth_key_len    = 0;   p->auth_tag_len    = 0;   p->sec_serv        = sec_serv_conf;  }voidcrypto_policy_set_null_cipher_hmac_sha1_80(crypto_policy_t *p) {  /*   * corresponds to draft-ietf-mmusic-sdescriptions-12.txt   */  p->cipher_type     = NULL_CIPHER;             p->cipher_key_len  = 0;  p->auth_type       = HMAC_SHA1;               p->auth_key_len    = 20;   p->auth_tag_len    = 10;   p->sec_serv        = sec_serv_auth;  }/*  * secure rtcp functions */err_status_t srtp_protect_rtcp(srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len) {  srtcp_hdr_t *hdr = (srtcp_hdr_t *)rtcp_hdr;  uint32_t *enc_start;      /* pointer to start of encrypted portion  */  uint32_t *auth_start;     /* pointer to start of auth. portion      */  uint32_t *trailer;        /* pointer to start of trailer            */  unsigned enc_octet_len = 0;/* number of octets in encrypted portion */  uint8_t *auth_tag = NULL; /* location of auth_tag within packet     */  err_status_t status;     int tag_len;  srtp_stream_ctx_t *stream;  int prefix_len;  uint32_t seq_num;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
9i在线看片成人免费| 亚洲午夜久久久久久久久久久 | 自拍偷在线精品自拍偷无码专区| 美国精品在线观看| 欧美一级午夜免费电影| 日韩成人午夜电影| 26uuu国产电影一区二区| 国产麻豆日韩欧美久久| 国产精品三级久久久久三级| av中文字幕不卡| 亚洲一级电影视频| 日韩一区二区三区高清免费看看| 美女性感视频久久| 欧美国产精品一区| 91传媒视频在线播放| 天堂av在线一区| 久久免费的精品国产v∧| 福利一区二区在线| 亚洲最大的成人av| 精品久久久三级丝袜| 成人毛片在线观看| 亚洲国产sm捆绑调教视频 | 99精品欧美一区二区三区小说| 中文字幕一区二区5566日韩| 欧美日韩国产大片| 国产曰批免费观看久久久| 国产精品第一页第二页第三页| 在线观看国产一区二区| 捆绑变态av一区二区三区| 亚洲国产精品国自产拍av| 欧美三区在线视频| 国产麻豆成人精品| 亚洲电影欧美电影有声小说| 亚洲精品在线观看网站| 欧洲一区二区av| 久久99国产精品久久99果冻传媒| 国产精品二三区| 精品久久久久久最新网址| 99久久综合精品| 久久精品国产99| 亚洲精品老司机| 久久精子c满五个校花| 欧美性猛片xxxx免费看久爱| 国产一区美女在线| 亚洲成人免费在线| 国产精品久久久久久亚洲伦| 日韩欧美视频在线| 欧美性猛交一区二区三区精品| 国产成人一区二区精品非洲| 免费成人在线观看| 亚洲主播在线播放| 国产精品三级电影| 国产亚洲一区二区三区四区| 欧美一区二区三区人| 在线亚洲欧美专区二区| 国产99久久久国产精品潘金| 久久精品国产亚洲高清剧情介绍 | 亚洲国产成人高清精品| 日韩美女视频一区二区| 久久久久久久久免费| 制服.丝袜.亚洲.另类.中文| 91欧美一区二区| 国产精华液一区二区三区| 蜜臀99久久精品久久久久久软件| 久色婷婷小香蕉久久| 亚洲国产中文字幕| 一区二区高清在线| 亚洲欧洲综合另类在线| 国产精品你懂的在线| 久久久精品中文字幕麻豆发布| 日韩欧美视频一区| 日韩视频一区二区在线观看| 欧美日韩免费观看一区二区三区| 色综合中文字幕国产 | 国产成人免费av在线| 久久av资源站| 另类小说视频一区二区| 午夜久久电影网| 亚洲高清免费观看| 亚洲二区在线观看| 天天色 色综合| 婷婷中文字幕综合| 日韩国产一区二| 蜜桃视频一区二区| 六月婷婷色综合| 精品一区二区免费看| 激情小说欧美图片| 成人一级片网址| 99久久综合狠狠综合久久| 91在线观看地址| 欧美在线三级电影| 制服视频三区第一页精品| 欧美成人高清电影在线| 久久欧美中文字幕| 国产精品麻豆99久久久久久| 亚洲视频每日更新| 亚洲精品国产视频| 香蕉乱码成人久久天堂爱免费| 日日夜夜精品视频免费| 国产综合色在线视频区| 成人高清视频在线观看| 欧美在线色视频| 日韩三区在线观看| 国产色产综合产在线视频 | 亚洲美女视频在线| 偷拍一区二区三区四区| 久久成人免费电影| 岛国一区二区在线观看| 色吊一区二区三区| 欧美绝品在线观看成人午夜影视| 日韩免费看的电影| 国产精品乱子久久久久| 亚洲成av人片一区二区| 国内精品嫩模私拍在线| 一本在线高清不卡dvd| 欧美裸体bbwbbwbbw| 精品国产精品网麻豆系列| 中文字幕一区免费在线观看 | 日韩欧美美女一区二区三区| 久久精品免视看| 亚洲国产中文字幕| 国产成人三级在线观看| 欧美男女性生活在线直播观看| 久久九九国产精品| 青娱乐精品视频| 99热国产精品| 精品国精品国产| 一区二区三区四区亚洲| 国产精品一区三区| 欧美美女一区二区三区| 国产精品第五页| 精品一区二区三区在线观看| 91黄色免费看| 国产欧美日本一区视频| 五月激情综合网| 91网站在线播放| 久久亚洲捆绑美女| 午夜精品久久久久久久久| 成人精品视频一区二区三区尤物| 在线播放亚洲一区| 一区二区三区毛片| 国v精品久久久网| 欧美www视频| 午夜精品久久久久久久99水蜜桃 | 久久―日本道色综合久久| 亚洲一区在线观看免费 | 国产91精品在线观看| 欧美一区二区视频在线观看2022| 国产精品伦一区二区三级视频| 狂野欧美性猛交blacked| 欧美丰满高潮xxxx喷水动漫| 亚洲欧美日韩小说| 成人爱爱电影网址| 亚洲精品在线观看网站| 免费成人美女在线观看.| 欧美日韩aaaaa| 一区二区久久久| 色噜噜狠狠成人中文综合| 国产精品二三区| 99r精品视频| 国产精品日韩成人| 国产99久久久久| 国产人成一区二区三区影院| 精品中文字幕一区二区| 日韩亚洲欧美成人一区| 日日骚欧美日韩| 91精品国产综合久久久久| 午夜视频一区在线观看| 欧美日韩在线观看一区二区 | 91蝌蚪porny九色| 亚洲少妇中出一区| 色综合网色综合| 一区二区三区在线观看视频| 欧美自拍丝袜亚洲| 亚洲va韩国va欧美va精品| 欧美精品 日韩| 久久精品国产一区二区三| 精品久久人人做人人爽| 国产91露脸合集magnet| 亚洲视频在线观看一区| 色女孩综合影院| 午夜欧美2019年伦理| 日韩一二三区视频| 国产传媒一区在线| 中文字幕一区二区三区在线观看| 在线视频你懂得一区二区三区| 亚洲一区视频在线观看视频| 91精品国产综合久久精品图片| 麻豆精品一区二区| 国产片一区二区| 一本久久综合亚洲鲁鲁五月天 | 欧美日韩电影一区| 喷白浆一区二区| 久久久五月婷婷| 91亚洲国产成人精品一区二区三| 亚洲尤物视频在线| 精品国产乱子伦一区| jizzjizzjizz欧美| 性做久久久久久久免费看| 日韩亚洲电影在线|