void-packages/srcpkgs/glusterfs/patches/patch-xlators_cloudsync_ssl...

30 lines
1.0 KiB
Diff

--- a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c 2019-04-01 11:59:35.934987018 -0400
+++ b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c 2019-04-01 12:01:04.701774641 -0400
@@ -300,7 +300,7 @@
char *
aws_sign_request(char *const str, char *awssekey)
{
-#if (OPENSSL_VERSION_NUMBER < 0x1010002f)
+#if (OPENSSL_VERSION_NUMBER < 0x1010002f) || defined(LIBRESSL_VERSION_NUMBER)
HMAC_CTX ctx;
#endif
HMAC_CTX *pctx = NULL;
@@ -310,7 +310,7 @@
unsigned len;
char *base64 = NULL;
-#if (OPENSSL_VERSION_NUMBER < 0x1010002f)
+#if (OPENSSL_VERSION_NUMBER < 0x1010002f) || defined(LIBRESSL_VERSION_NUMBER)
HMAC_CTX_init(&ctx);
pctx = &ctx;
#else
@@ -320,7 +320,7 @@
HMAC_Update(pctx, (unsigned char *)str, strlen(str));
HMAC_Final(pctx, (unsigned char *)md, &len);
-#if (OPENSSL_VERSION_NUMBER < 0x1010002f)
+#if (OPENSSL_VERSION_NUMBER < 0x1010002f) || defined(LIBRESSL_VERSION_NUMBER)
HMAC_CTX_cleanup(pctx);
#else
HMAC_CTX_free(pctx);