Skip to content

Commit

Permalink
compilation warning fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mom040267 committed Sep 6, 2016
1 parent 69d95f8 commit 7624480
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/ns_turn_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,16 @@ int stun_produce_integrity_key_str(u08bits *uname, u08bits *realm, u08bits *upwd
str[strl]=0;

if(shatype == SHATYPE_SHA256) {
unsigned int keylen = 0;
#if !defined(OPENSSL_NO_SHA256) && defined(SHA256_DIGEST_LENGTH)
#if OPENSSL_VERSION_NUMBER < 0x10100000L
unsigned int keylen = 0;
EVP_MD_CTX ctx;
EVP_DigestInit(&ctx,EVP_sha256());
EVP_DigestUpdate(&ctx,str,strl);
EVP_DigestFinal(&ctx,key,&keylen);
EVP_MD_CTX_cleanup(&ctx);
#else
unsigned int keylen = 0;
EVP_MD_CTX *ctx = EVP_MD_CTX_new();
EVP_DigestInit(ctx,EVP_sha256());
EVP_DigestUpdate(ctx,str,strl);
Expand Down

0 comments on commit 7624480

Please sign in to comment.