Created
April 24, 2017 19:41
-
-
Save evan-a-a/80ee1f566251b110eb6f329790ebcf1e to your computer and use it in GitHub Desktop.
duo_unix openssl 1.1.0 update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update hmac related code for changes in openssl 1.1.0 | |
# Author: Evan Anderson <evananderson@thelinuxman.us> | |
--- a/lib/https.c 2016-08-08 13:55:29.000000000 -0400 | |
+++ b/lib/https.c 2017-04-24 15:31:51.980702951 -0400 | |
@@ -623,7 +623,7 @@ | |
int argc, char *argv[]) | |
{ | |
BIO *b64; | |
- HMAC_CTX hmac; | |
+ HMAC_CTX *hmac; | |
unsigned char MD[SHA_DIGEST_LENGTH]; | |
char *qs, *p; | |
int i, n, is_get; | |
@@ -655,11 +655,11 @@ | |
/* Add signature */ | |
BIO_puts(req->cbio, "Authorization: Basic "); | |
- HMAC_CTX_init(&hmac); | |
- HMAC_Init(&hmac, ctx->skey, strlen(ctx->skey), EVP_sha1()); | |
- HMAC_Update(&hmac, (unsigned char *)p, strlen(p)); | |
- HMAC_Final(&hmac, MD, NULL); | |
- HMAC_CTX_cleanup(&hmac); | |
+ hmac = HMAC_CTX_new(); | |
+ HMAC_Init(hmac, ctx->skey, strlen(ctx->skey), EVP_sha1()); | |
+ HMAC_Update(hmac, (unsigned char *)p, strlen(p)); | |
+ HMAC_Final(hmac, MD, NULL); | |
+ HMAC_CTX_free(hmac); | |
free(p); | |
b64 = _BIO_new_base64(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prepare() { | |
cd "${srcdir}/${pkgname}-${pkgver}" | |
patch -p1 -i ../../hmac_fixup.patch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment