- Timestamp:
- Feb 21, 2013 5:01:28 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r4197 r4364 614 614 srtp->session_inited = PJ_TRUE; 615 615 616 PJ_LOG(5, (srtp->pool->obj_name, "TX: %s key=%s", srtp->tx_policy.name.ptr, 617 octet_string_hex_string(tx->key.ptr, tx->key.slen))); 618 if (srtp->tx_policy.flags) { 619 PJ_LOG(5,(srtp->pool->obj_name,"TX: disable%s%s", (cr_tx_idx?"":" enc"), 620 (au_tx_idx?"":" auth"))); 621 } 622 623 PJ_LOG(5, (srtp->pool->obj_name, "RX: %s key=%s", srtp->rx_policy.name.ptr, 624 octet_string_hex_string(rx->key.ptr, rx->key.slen))); 625 if (srtp->rx_policy.flags) { 626 PJ_LOG(5,(srtp->pool->obj_name,"RX: disable%s%s", (cr_rx_idx?"":" enc"), 627 (au_rx_idx?"":" auth"))); 628 } 616 /* Logging stuffs */ 617 #if PJ_LOG_MAX_LEVEL >= 5 618 { 619 char b64[PJ_BASE256_TO_BASE64_LEN(MAX_KEY_LEN)]; 620 int b64_len; 621 622 /* TX crypto and key */ 623 b64_len = sizeof(b64); 624 status = pj_base64_encode((pj_uint8_t*)tx->key.ptr, tx->key.slen, 625 b64, &b64_len); 626 if (status != PJ_SUCCESS) 627 b64_len = pj_ansi_sprintf(b64, "--key too long--"); 628 else 629 b64[b64_len] = '\0'; 630 631 PJ_LOG(5, (srtp->pool->obj_name, "TX: %s key=%s", 632 srtp->tx_policy.name.ptr, b64)); 633 if (srtp->tx_policy.flags) { 634 PJ_LOG(5,(srtp->pool->obj_name, "TX: disable%s%s", 635 (cr_tx_idx?"":" enc"), 636 (au_tx_idx?"":" auth"))); 637 } 638 639 /* RX crypto and key */ 640 b64_len = sizeof(b64); 641 status = pj_base64_encode((pj_uint8_t*)rx->key.ptr, rx->key.slen, 642 b64, &b64_len); 643 if (status != PJ_SUCCESS) 644 b64_len = pj_ansi_sprintf(b64, "--key too long--"); 645 else 646 b64[b64_len] = '\0'; 647 648 PJ_LOG(5, (srtp->pool->obj_name, "RX: %s key=%s", 649 srtp->rx_policy.name.ptr, b64)); 650 if (srtp->rx_policy.flags) { 651 PJ_LOG(5,(srtp->pool->obj_name,"RX: disable%s%s", 652 (cr_rx_idx?"":" enc"), 653 (au_rx_idx?"":" auth"))); 654 } 655 } 656 #endif 629 657 630 658 on_return:
Note: See TracChangeset
for help on using the changeset viewer.