[packages/libsrtp2] - forked as libsrtp2, updated to 2.0.0 (parallel installable with 1.5.x) - updated headers patch, re
qboosh
qboosh at pld-linux.org
Fri Apr 1 15:47:48 CEST 2016
commit 943e4e6fcbe19d7be0e14a5bc1a88dd92630f1e6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Apr 1 15:47:49 2016 +0200
- forked as libsrtp2, updated to 2.0.0 (parallel installable with 1.5.x)
- updated headers patch, removed obsolete rename_functions,ismacryp patches
- added doxygen patch (update header.tex for recent doxygen)
libsrtp2-doxygen.patch | 139 +++++++++++++++
srtp-headers.patch => libsrtp2-headers.patch | 43 -----
srtp.spec => libsrtp2.spec | 24 +--
srtp-ismacryp.patch | 52 ------
srtp-rename_functions.patch | 257 ---------------------------
5 files changed, 151 insertions(+), 364 deletions(-)
---
diff --git a/srtp.spec b/libsrtp2.spec
similarity index 84%
rename from srtp.spec
rename to libsrtp2.spec
index d91dc27..74559a9 100644
--- a/srtp.spec
+++ b/libsrtp2.spec
@@ -1,18 +1,18 @@
Summary: Open-source implementation of Secure Real-time Transport Protocol
Summary(pl.UTF-8): Otwarta implementacja protokołu Secure Real-time Transport Protocol
-Name: srtp
-Version: 1.5.4
+Name: libsrtp2
+Version: 2.0.0
Release: 1
License: BSD
Group: Libraries
Source0: https://github.com/cisco/libsrtp/archive/v%{version}/libsrtp-%{version}.tar.gz
-# Source0-md5: 64a9580f86a9c3e1c4986e944e6a5a84
-Patch0: %{name}-rename_functions.patch
-Patch1: %{name}-headers.patch
-Patch2: %{name}-ismacryp.patch
+# Source0-md5: 54b7fbc8ed45aa3c1c02511ee8976dd9
+Patch0: %{name}-headers.patch
+Patch1: %{name}-doxygen.patch
URL: https://github.com/cisco/libsrtp
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: doxygen
BuildRequires: libpcap-devel
BuildRequires: openssl-devel >= 1.0.1
BuildRequires: pkgconfig
@@ -58,7 +58,6 @@ Statyczna biblioteka SRTP.
%setup -q -n libsrtp-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
%{__aclocal}
@@ -69,6 +68,7 @@ Statyczna biblioteka SRTP.
%{__make} shared_library
%{__make} all
+%{__make} libsrtp2doc
%install
rm -rf $RPM_BUILD_ROOT
@@ -84,15 +84,15 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGES LICENSE README TODO
-%attr(755,root,root) %{_libdir}/libsrtp.so.1
+%attr(755,root,root) %{_libdir}/libsrtp2.so.1
%files devel
%defattr(644,root,root,755)
%doc doc/{*.txt,*.pdf}
-%attr(755,root,root) %{_libdir}/libsrtp.so
-%{_pkgconfigdir}/libsrtp.pc
-%{_includedir}/srtp
+%attr(755,root,root) %{_libdir}/libsrtp2.so
+%{_pkgconfigdir}/libsrtp2.pc
+%{_includedir}/srtp2
%files static
%defattr(644,root,root,755)
-%{_libdir}/libsrtp.a
+%{_libdir}/libsrtp2.a
diff --git a/libsrtp2-doxygen.patch b/libsrtp2-doxygen.patch
new file mode 100644
index 0000000..45d75bf
--- /dev/null
+++ b/libsrtp2-doxygen.patch
@@ -0,0 +1,139 @@
+--- libsrtp-2.0.0/doc/header.template.orig 2016-03-31 21:54:16.950123873 +0200
++++ libsrtp-2.0.0/doc/header.template 2016-03-31 21:54:51.610122419 +0200
+@@ -4,31 +4,116 @@
+ % file generated by doxygen, with the initial chapters of the
+ % original libSRTP documentation tacked on
+ %
+-\documentclass[letterpaper]{book}
+-\usepackage{makeidx}
+-\usepackage{fancyhdr}
++\documentclass[twoside]{book}
++% Packages required by doxygen
++\usepackage{fixltx2e}
++\usepackage{calc}
++\usepackage{doxygen}
+ \usepackage{graphicx}
++\usepackage[utf8]{inputenc}
++\usepackage{makeidx}
+ \usepackage{multicol}
+-\usepackage{float}
++\usepackage{multirow}
++\PassOptionsToPackage{warn}{textcomp}
+ \usepackage{textcomp}
+-\usepackage{alltt}
+-\usepackage{times}
+-\usepackage{graphicx}
+-\ifx\pdfoutput\undefined
+-\usepackage[ps2pdf,
+- pagebackref=true,
+- colorlinks=true,
+- linkcolor=blue
+- ]{hyperref}
++\usepackage[nointegrals]{wasysym}
++\usepackage[table]{xcolor}
++
++% Font selection
++\usepackage[T1]{fontenc}
++\usepackage{mathptmx}
++\usepackage[scaled=.90]{helvet}
++\usepackage{courier}
++\usepackage{amssymb}
++\usepackage{sectsty}
++\renewcommand{\familydefault}{\sfdefault}
++\allsectionsfont{%
++ \fontseries{bc}\selectfont%
++ \color{darkgray}%
++}
++\renewcommand{\DoxyLabelFont}{%
++ \fontseries{bc}\selectfont%
++ \color{darkgray}%
++}
++\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}}
++
++% Page & text layout
++\usepackage{geometry}
++\geometry{%
++ letterpaper,%
++ top=2.5cm,%
++ bottom=2.5cm,%
++ left=2.5cm,%
++ right=2.5cm%
++}
++\tolerance=750
++\hfuzz=15pt
++\hbadness=750
++\setlength{\emergencystretch}{15pt}
++\setlength{\parindent}{0cm}
++\setlength{\parskip}{0.2cm}
++\makeatletter
++\renewcommand{\paragraph}{%
++ \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
++ \normalfont\normalsize\bfseries\SS at parafont%
++ }%
++}
++\renewcommand{\subparagraph}{%
++ \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
++ \normalfont\normalsize\bfseries\SS at subparafont%
++ }%
++}
++\makeatother
++
++% Headers & footers
++\usepackage{fancyhdr}
++\pagestyle{fancyplain}
++\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
++\fancyhead[CE]{\fancyplain{}{}}
++\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
++\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
++\fancyhead[CO]{\fancyplain{}{}}
++\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
++\fancyfoot[LE]{\fancyplain{}{}}
++\fancyfoot[CE]{\fancyplain{}{}}
++\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Mar 31 2016 21\+:45\+:34 for lib\+S\+R\+T\+P by Doxygen }}
++\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Mar 31 2016 21\+:45\+:34 for lib\+S\+R\+T\+P by Doxygen }}
++\fancyfoot[CO]{\fancyplain{}{}}
++\fancyfoot[RO]{\fancyplain{}{}}
++\renewcommand{\footrulewidth}{0.4pt}
++\renewcommand{\chaptermark}[1]{%
++ \markboth{#1}{}%
++}
++\renewcommand{\sectionmark}[1]{%
++ \markright{\thesection\ #1}%
++}
++
++% Indices & bibliography
++\usepackage{natbib}
++\usepackage[titles]{tocloft}
++\setcounter{tocdepth}{3}
++\setcounter{secnumdepth}{5}
++\makeindex
++
++% Hyperlinks (required, but should be loaded last)
++\usepackage{ifpdf}
++\ifpdf
++ \usepackage[pdftex,pagebackref=true]{hyperref}
+ \else
+-\usepackage[pdftex,
+- pagebackref=true,
+- colorlinks=true,
+- linkcolor=blue
+- ]{hyperref}
++ \usepackage[ps2pdf,pagebackref=true]{hyperref}
+ \fi
+-\usepackage{doxygen}
+-\makeindex
++\hypersetup{%
++ colorlinks=true,%
++ linkcolor=blue,%
++ citecolor=blue,%
++ unicode%
++}
++
++% Custom commands
++\newcommand{\clearemptydoublepage}{%
++ \newpage{\pagestyle{empty}\cleardoublepage}%
++}
++
+ \setcounter{tocdepth}{1}
+ \renewcommand{\footrulewidth}{0.4pt}
+
diff --git a/srtp-headers.patch b/libsrtp2-headers.patch
similarity index 58%
rename from srtp-headers.patch
rename to libsrtp2-headers.patch
index 43432ba..639ae5a 100644
--- a/srtp-headers.patch
+++ b/libsrtp2-headers.patch
@@ -50,27 +50,6 @@
#ifdef SRTP_KERNEL
---- libsrtp-1.5.2/crypto/include/kernel_compat.h.orig 2015-03-11 15:02:12.000000000 +0100
-+++ libsrtp-1.5.2/crypto/include/kernel_compat.h 2015-08-05 20:50:34.308246240 +0200
-@@ -46,6 +46,8 @@
- #ifndef KERNEL_COMPAT_H
- #define KERNEL_COMPAT_H
-
-+#include "config.h"
-+
- #ifdef SRTP_KERNEL_LINUX
-
- #include <linux/kernel.h>
---- libsrtp-1.5.2/crypto/include/prng.h.orig 2015-03-11 15:02:12.000000000 +0100
-+++ libsrtp-1.5.2/crypto/include/prng.h 2015-08-05 20:50:54.158245407 +0200
-@@ -46,6 +46,7 @@
- #ifndef PRNG_H
- #define PRNG_H
-
-+#include "config.h"
- #include "rand_source.h" /* for rand_source_func_t definition */
- #include "aes.h" /* for aes */
- //FIXME: this is temporary until we pull in the code to use OpenSSL for RNG
--- libsrtp-1.5.2/crypto/include/sha1.h.orig 2015-08-05 20:34:49.334952564 +0200
+++ libsrtp-1.5.2/crypto/include/sha1.h 2015-08-05 20:51:23.068244194 +0200
@@ -47,9 +47,7 @@
@@ -84,25 +63,3 @@
#include "err.h"
#ifdef OPENSSL
---- libsrtp-1.5.2/crypto/include/rand_source.h.orig 2015-03-11 15:02:12.000000000 +0100
-+++ libsrtp-1.5.2/crypto/include/rand_source.h 2015-08-05 21:41:41.868117509 +0200
-@@ -49,6 +49,10 @@
- #include "err.h"
- #include "datatypes.h"
-
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- err_status_t
- rand_source_init(void);
-
-@@ -88,4 +92,8 @@
- typedef err_status_t (*rand_source_func_t)
- (void *dest, uint32_t num_octets);
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif /* RAND_SOURCE */
diff --git a/srtp-ismacryp.patch b/srtp-ismacryp.patch
deleted file mode 100644
index 25f93c8..0000000
--- a/srtp-ismacryp.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- libsrtp-1.5.2/crypto/cipher/aes_icm.c.orig 2015-03-11 15:02:12.000000000 +0100
-+++ libsrtp-1.5.2/crypto/cipher/aes_icm.c 2015-08-06 21:28:11.477858986 +0200
-@@ -53,10 +53,14 @@
- #include "alloc.h"
-
-
-+#ifdef OPENSSL
-+extern debug_module_t mod_aes_icm;
-+#else
- debug_module_t mod_aes_icm = {
- 0, /* debugging is off by default */
- "aes icm" /* printable module name */
- };
-+#endif
-
- /*
- * integer counter mode works as follows:
-@@ -482,14 +482,17 @@
- return aes_icm_encrypt(c, buffer, &len);
- }
-
-+#ifndef OPENSSL
- uint16_t
- aes_icm_bytes_encrypted(aes_icm_ctx_t *c) {
- return htons(c->counter.v16[7]);
- }
-+#endif
-
- char
- aes_icm_description[] = "aes integer counter mode";
-
-+#ifndef OPENSSL
- uint8_t aes_icm_test_case_0_key[30] = {
- 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
- 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
-@@ -589,4 +594,5 @@
- (debug_module_t *) &mod_aes_icm,
- (cipher_type_id_t) AES_ICM
- };
-+#endif
-
---- libsrtp-1.5.2/configure.in.orig 2015-03-11 15:02:12.000000000 +0100
-+++ libsrtp-1.5.2/configure.in 2015-08-06 21:29:08.801189914 +0200
-@@ -153,7 +153,7 @@
- AC_CHECK_LIB([crypto], [EVP_aes_128_gcm], [],
- [AC_MSG_FAILURE([can't find openssl >1.0.1 crypto lib])])
- AC_DEFINE(OPENSSL, 1, [Define this to use OpenSSL crypto.])
-- AES_ICM_OBJS="crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o"
-+ AES_ICM_OBJS="crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o crypto/cipher/aes_icm.o crypto/cipher/aes.o"
- RNG_OBJS=rand_source_ossl.o
- HMAC_OBJS=crypto/hash/hmac_ossl.o
- USE_OPENSSL=1
diff --git a/srtp-rename_functions.patch b/srtp-rename_functions.patch
deleted file mode 100644
index 6c07d3f..0000000
--- a/srtp-rename_functions.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-diff --git a/crypto/hash/hmac.c b/crypto/hash/hmac.c
-index 4f389fe..5ab81e5 100644
---- a/crypto/hash/hmac.c
-+++ b/crypto/hash/hmac.c
-@@ -137,10 +137,10 @@ hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len) {
- debug_print(mod_hmac, "ipad: %s", octet_string_hex_string(ipad, 64));
-
- /* initialize sha1 context */
-- sha1_init(&state->init_ctx);
-+ srtp_sha1_init(&state->init_ctx);
-
- /* hash ipad ^ key */
-- sha1_update(&state->init_ctx, ipad, 64);
-+ srtp_sha1_update(&state->init_ctx, ipad, 64);
- memcpy(&state->ctx, &state->init_ctx, sizeof(sha1_ctx_t));
-
- return err_status_ok;
-@@ -161,7 +161,7 @@ hmac_update(hmac_ctx_t *state, const uint8_t *message, int msg_octets) {
- octet_string_hex_string(message, msg_octets));
-
- /* hash message into sha1 context */
-- sha1_update(&state->ctx, message, msg_octets);
-+ srtp_sha1_update(&state->ctx, message, msg_octets);
-
- return err_status_ok;
- }
-@@ -179,7 +179,7 @@ hmac_compute(hmac_ctx_t *state, const void *message,
-
- /* hash message, copy output into H */
- hmac_update(state, (const uint8_t*)message, msg_octets);
-- sha1_final(&state->ctx, H);
-+ srtp_sha1_final(&state->ctx, H);
-
- /*
- * note that we don't need to debug_print() the input, since the
-@@ -189,16 +189,16 @@ hmac_compute(hmac_ctx_t *state, const void *message,
- octet_string_hex_string((uint8_t *)H, 20));
-
- /* re-initialize hash context */
-- sha1_init(&state->ctx);
-+ srtp_sha1_init(&state->ctx);
-
- /* hash opad ^ key */
-- sha1_update(&state->ctx, (uint8_t *)state->opad, 64);
-+ srtp_sha1_update(&state->ctx, (uint8_t *)state->opad, 64);
-
- /* hash the result of the inner hash */
-- sha1_update(&state->ctx, (uint8_t *)H, 20);
-+ srtp_sha1_update(&state->ctx, (uint8_t *)H, 20);
-
- /* the result is returned in the array hash_value[] */
-- sha1_final(&state->ctx, hash_value);
-+ srtp_sha1_final(&state->ctx, hash_value);
-
- /* copy hash_value to *result */
- for (i=0; i < tag_len; i++)
-diff --git a/crypto/hash/sha1.c b/crypto/hash/sha1.c
-index b9a8d10..b1c9c8a 100644
---- a/crypto/hash/sha1.c
-+++ b/crypto/hash/sha1.c
-@@ -74,12 +74,12 @@ uint32_t SHA_K2 = 0x8F1BBCDC; /* Kt for 40 <= t <= 59 */
- uint32_t SHA_K3 = 0xCA62C1D6; /* Kt for 60 <= t <= 79 */
-
- void
--sha1(const uint8_t *msg, int octets_in_msg, uint32_t hash_value[5]) {
-+srtp_sha1(const uint8_t *msg, int octets_in_msg, uint32_t hash_value[5]) {
- sha1_ctx_t ctx;
-
-- sha1_init(&ctx);
-- sha1_update(&ctx, msg, octets_in_msg);
-- sha1_final(&ctx, hash_value);
-+ srtp_sha1_init(&ctx);
-+ srtp_sha1_update(&ctx, msg, octets_in_msg);
-+ srtp_sha1_final(&ctx, hash_value);
-
- }
-
-@@ -96,7 +96,7 @@ sha1(const uint8_t *msg, int octets_in_msg, uint32_t hash_value[5]) {
- */
-
- void
--sha1_core(const uint32_t M[16], uint32_t hash_value[5]) {
-+srtp_sha1_core(const uint32_t M[16], uint32_t hash_value[5]) {
- uint32_t H0;
- uint32_t H1;
- uint32_t H2;
-@@ -183,7 +183,7 @@ sha1_core(const uint32_t M[16], uint32_t hash_value[5]) {
- }
-
- void
--sha1_init(sha1_ctx_t *ctx) {
-+srtp_sha1_init(sha1_ctx_t *ctx) {
-
- /* initialize state vector */
- ctx->H[0] = 0x67452301;
-@@ -201,7 +201,7 @@ sha1_init(sha1_ctx_t *ctx) {
- }
-
- void
--sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) {
-+srtp_sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) {
- int i;
- uint8_t *buf = (uint8_t *)ctx->M;
-
-@@ -226,7 +226,7 @@ sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) {
-
- debug_print(mod_sha1, "(update) running sha1_core()", NULL);
-
-- sha1_core(ctx->M, ctx->H);
-+ srtp_sha1_core(ctx->M, ctx->H);
-
- } else {
-
-@@ -249,7 +249,7 @@ sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) {
- */
-
- void
--sha1_final(sha1_ctx_t *ctx, uint32_t *output) {
-+srtp_sha1_final(sha1_ctx_t *ctx, uint32_t *output) {
- uint32_t A, B, C, D, E, TEMP;
- uint32_t W[80];
- int i, t;
-diff --git a/crypto/include/sha1.h b/crypto/include/sha1.h
-index e3af4d4..af59b7e 100644
---- a/crypto/include/sha1.h
-+++ b/crypto/include/sha1.h
-@@ -72,18 +72,18 @@ typedef EVP_MD_CTX sha1_ctx_t;
- *
- */
-
--static inline void sha1_init (sha1_ctx_t *ctx)
-+static inline void srtp_sha1_init (sha1_ctx_t *ctx)
- {
- EVP_MD_CTX_init(ctx);
- EVP_DigestInit(ctx, EVP_sha1());
- }
-
--static inline void sha1_update (sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg)
-+static inline void srtp_sha1_update (sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg)
- {
- EVP_DigestUpdate(ctx, M, octets_in_msg);
- }
-
--static inline void sha1_final (sha1_ctx_t *ctx, uint32_t *output)
-+static inline void srtp_sha1_final (sha1_ctx_t *ctx, uint32_t *output)
- {
- unsigned int len = 0;
-
-@@ -107,7 +107,7 @@
- */
-
- void
--sha1(const uint8_t *message, int octets_in_msg, uint32_t output[5]);
-+srtp_sha1(const uint8_t *message, int octets_in_msg, uint32_t output[5]);
-
- /*
- * sha1_init(&ctx) initializes the SHA1 context ctx
-@@ -121,13 +121,13 @@
- */
-
- void
--sha1_init(sha1_ctx_t *ctx);
-+srtp_sha1_init(sha1_ctx_t *ctx);
-
- void
--sha1_update(sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg);
-+srtp_sha1_update(sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg);
-
- void
--sha1_final(sha1_ctx_t *ctx, uint32_t output[5]);
-+srtp_sha1_final(sha1_ctx_t *ctx, uint32_t output[5]);
-
- /*
- * The sha1_core function is INTERNAL to SHA-1, but it is declared
-@@ -145,7 +145,7 @@
- */
-
- void
--sha1_core(const uint32_t M[16], uint32_t hash_value[5]);
-+srtp_sha1_core(const uint32_t M[16], uint32_t hash_value[5]);
-
- #endif /* else OPENSSL */
-
-diff --git a/crypto/test/sha1_driver.c b/crypto/test/sha1_driver.c
-index 6036022..f29d76e 100644
---- a/crypto/test/sha1_driver.c
-+++ b/crypto/test/sha1_driver.c
-@@ -107,9 +107,9 @@ sha1_test_case_validate(const hash_test_case_t *test_case) {
- if (test_case->data_len > MAX_HASH_DATA_LEN)
- return err_status_bad_param;
-
-- sha1_init(&ctx);
-- sha1_update(&ctx, test_case->data, test_case->data_len);
-- sha1_final(&ctx, hash_value);
-+ srtp_sha1_init(&ctx);
-+ srtp_sha1_update(&ctx, test_case->data, test_case->data_len);
-+ srtp_sha1_final(&ctx, hash_value);
- if (0 == memcmp(test_case->hash, hash_value, 20)) {
- #if VERBOSE
- printf("PASSED: reference value: %s\n",
---- libsrtp-1.5.2/crypto/hash/hmac_ossl.c.orig 2015-03-11 15:02:12.000000000 +0100
-+++ libsrtp-1.5.2/crypto/hash/hmac_ossl.c 2015-07-05 20:23:10.490406837 +0200
-@@ -163,11 +163,11 @@ hmac_init (hmac_ctx_t *state, const uint
- debug_print(mod_hmac, "ipad: %s", octet_string_hex_string(ipad, sizeof(ipad)));
-
- /* initialize sha1 context */
-- sha1_init(&state->init_ctx);
-+ srtp_sha1_init(&state->init_ctx);
- state->init_ctx_initialized = 1;
-
- /* hash ipad ^ key */
-- sha1_update(&state->init_ctx, ipad, sizeof(ipad));
-+ srtp_sha1_update(&state->init_ctx, ipad, sizeof(ipad));
- return (hmac_start(state));
- }
-
-@@ -192,7 +192,7 @@ hmac_update (hmac_ctx_t *state, const ui
- octet_string_hex_string(message, msg_octets));
-
- /* hash message into sha1 context */
-- sha1_update(&state->ctx, message, msg_octets);
-+ srtp_sha1_update(&state->ctx, message, msg_octets);
-
- return err_status_ok;
- }
-@@ -211,8 +211,8 @@ hmac_compute (hmac_ctx_t *state, const v
- }
-
- /* hash message, copy output into H */
-- sha1_update(&state->ctx, message, msg_octets);
-- sha1_final(&state->ctx, H);
-+ srtp_sha1_update(&state->ctx, message, msg_octets);
-+ srtp_sha1_final(&state->ctx, H);
-
- /*
- * note that we don't need to debug_print() the input, since the
-@@ -222,16 +222,16 @@ hmac_compute (hmac_ctx_t *state, const v
- octet_string_hex_string((uint8_t*)H, sizeof(H)));
-
- /* re-initialize hash context */
-- sha1_init(&state->ctx);
-+ srtp_sha1_init(&state->ctx);
-
- /* hash opad ^ key */
-- sha1_update(&state->ctx, (uint8_t*)state->opad, sizeof(state->opad));
-+ srtp_sha1_update(&state->ctx, (uint8_t*)state->opad, sizeof(state->opad));
-
- /* hash the result of the inner hash */
-- sha1_update(&state->ctx, (uint8_t*)H, sizeof(H));
-+ srtp_sha1_update(&state->ctx, (uint8_t*)H, sizeof(H));
-
- /* the result is returned in the array hash_value[] */
-- sha1_final(&state->ctx, hash_value);
-+ srtp_sha1_final(&state->ctx, hash_value);
-
- /* copy hash_value to *result */
- for (i = 0; i < tag_len; i++) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libsrtp2.git/commitdiff/943e4e6fcbe19d7be0e14a5bc1a88dd92630f1e6
More information about the pld-cvs-commit
mailing list