Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
926afef0
Unverified
Commit
926afef0
authored
Feb 15, 2019
by
Stefan Strogin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stun: Fix LibreSSL support
Closes #71
parent
c21b2b31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
stun/stunhmac.c
stun/stunhmac.c
+8
-4
No files found.
stun/stunhmac.c
View file @
926afef0
...
...
@@ -75,7 +75,8 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha,
assert (ret == 1);
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
HMAC_CTX
stackctx
;
HMAC_CTX
*
ctx
=
&
stackctx
;
HMAC_CTX_init
(
ctx
);
...
...
@@ -101,7 +102,8 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha,
TRY
(
HMAC_Final
(
ctx
,
sha
,
NULL
));
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
HMAC_CTX_cleanup
(
ctx
);
#else
HMAC_CTX_free
(
ctx
);
...
...
@@ -172,7 +174,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len,
#ifdef HAVE_OPENSSL
EVP_MD_CTX
*
ctx
;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
ctx
=
EVP_MD_CTX_create
();
#else
ctx
=
EVP_MD_CTX_new
();
...
...
@@ -186,7 +189,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len,
EVP_DigestUpdate
(
ctx
,
password_trimmed
,
password_len
);
EVP_DigestFinal_ex
(
ctx
,
md5
,
NULL
);
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
EVP_MD_CTX_destroy
(
ctx
);
#else
EVP_MD_CTX_free
(
ctx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment