1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-21 16:25:00 -05:00

update dino-git

This commit is contained in:
Travis Burtrum 2020-05-08 22:57:15 -04:00
parent 620eac0b2b
commit adf9d2883d
3 changed files with 1 additions and 270 deletions

View File

@ -2,7 +2,7 @@
# Contributor: svalo <me@valo.space> # Contributor: svalo <me@valo.space>
pkgname=dino-git pkgname=dino-git
pkgver=r640.3b0a27e pkgver=r721.cd3a119
pkgrel=1 pkgrel=1
pkgdesc="Simple and modern Jabber/XMPP client written in vala" pkgdesc="Simple and modern Jabber/XMPP client written in vala"
arch=('i686' 'x86_64' 'aarch64') arch=('i686' 'x86_64' 'aarch64')

View File

@ -1,59 +0,0 @@
# Maintainer: Moritz Lipp <mlq@pwmt.org>
pkgname=libsignal-protocol-c
pkgver=2.3.2
pkgrel=1
pkgdesc="Signal Protocol C Library"
arch=('i686' 'x86_64')
url="https://github.com/WhisperSystems/libsignal-protocol-c"
license=('GPL3')
makedepends=('cmake')
checkdepends=('check' 'openssl>=1.0')
source=(https://github.com/WhisperSystems/$pkgname/archive/v$pkgver.tar.gz)
md5sums=('ad742a03263c29a468d00c3dcc0269cf')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
mkdir -p build && cd build
cmake \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=0 \
..
make
}
check() {
cd "$srcdir/$pkgname-$pkgver"
mkdir -p build && cd build
# Build with tests
cmake \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=1 \
..
make
# Build tests
cd tests
make
cd ..
# Run tests
ctest
}
package() {
cd "$srcdir/$pkgname-$pkgver/build"
make DESTDIR="$pkgdir/" install
}

View File

@ -1,210 +0,0 @@
From 0dbc7bdbe1ad3b42fed52d2a326db6fa40204a06 Mon Sep 17 00:00:00 2001
From: Derek Konigsberg <dkonigsberg@whatsapp.com>
Date: Thu, 4 May 2017 09:22:35 -0700
Subject: [PATCH] Added support for building against OpenSSL 1.1
OpenSSL 1.1 introduced some minor API changes in how certain context
objects could be created. This update uses preprocessor macros to adapt
to those changes, while preserving backwards compatibility.
Referencing #66
---
tests/test_common_openssl.c | 79 +++++++++++++++++++++++++++++++++++++--------
1 file changed, 65 insertions(+), 14 deletions(-)
diff --git a/tests/test_common_openssl.c b/tests/test_common_openssl.c
index da3fb87..90d4b0c 100644
--- a/tests/test_common_openssl.c
+++ b/tests/test_common_openssl.c
@@ -1,5 +1,6 @@
#include "test_common.h"
+#include <openssl/opensslv.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
@@ -17,11 +18,19 @@ int test_random_generator(uint8_t *data, size_t len, void *user_data)
int test_hmac_sha256_init(void **hmac_context, const uint8_t *key, size_t key_len, void *user_data)
{
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+ HMAC_CTX *ctx = HMAC_CTX_new();
+ if(!ctx) {
+ return SG_ERR_NOMEM;
+ }
+#else
HMAC_CTX *ctx = malloc(sizeof(HMAC_CTX));
if(!ctx) {
return SG_ERR_NOMEM;
}
HMAC_CTX_init(ctx);
+#endif
+
*hmac_context = ctx;
if(HMAC_Init_ex(ctx, key, key_len, EVP_sha256(), 0) != 1) {
@@ -65,8 +74,12 @@ void test_hmac_sha256_cleanup(void *hmac_context, void *user_data)
{
if(hmac_context) {
HMAC_CTX *ctx = hmac_context;
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+ HMAC_CTX_free(ctx);
+#else
HMAC_CTX_cleanup(ctx);
free(ctx);
+#endif
}
}
@@ -188,6 +201,7 @@ int test_encrypt(signal_buffer **output,
void *user_data)
{
int result = 0;
+ EVP_CIPHER_CTX *ctx = 0;
uint8_t *out_buf = 0;
const EVP_CIPHER *evp_cipher = aes_cipher(cipher, key_len);
@@ -206,10 +220,22 @@ int test_encrypt(signal_buffer **output,
return SG_ERR_UNKNOWN;
}
- EVP_CIPHER_CTX ctx;
- EVP_CIPHER_CTX_init(&ctx);
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+ ctx = EVP_CIPHER_CTX_new();
+ if(!ctx) {
+ result = SG_ERR_NOMEM;
+ goto complete;
+ }
+#else
+ ctx = malloc(sizeof(EVP_CIPHER_CTX));
+ if(!ctx) {
+ result = SG_ERR_NOMEM;
+ goto complete;
+ }
+ EVP_CIPHER_CTX_init(ctx);
+#endif
- result = EVP_EncryptInit_ex(&ctx, evp_cipher, 0, key, iv);
+ result = EVP_EncryptInit_ex(ctx, evp_cipher, 0, key, iv);
if(!result) {
fprintf(stderr, "cannot initialize cipher\n");
result = SG_ERR_UNKNOWN;
@@ -217,7 +243,7 @@ int test_encrypt(signal_buffer **output,
}
if(cipher == SG_CIPHER_AES_CTR_NOPADDING) {
- result = EVP_CIPHER_CTX_set_padding(&ctx, 0);
+ result = EVP_CIPHER_CTX_set_padding(ctx, 0);
if(!result) {
fprintf(stderr, "cannot set padding\n");
result = SG_ERR_UNKNOWN;
@@ -233,7 +259,7 @@ int test_encrypt(signal_buffer **output,
}
int out_len = 0;
- result = EVP_EncryptUpdate(&ctx,
+ result = EVP_EncryptUpdate(ctx,
out_buf, &out_len, plaintext, plaintext_len);
if(!result) {
fprintf(stderr, "cannot encrypt plaintext\n");
@@ -242,7 +268,7 @@ int test_encrypt(signal_buffer **output,
}
int final_len = 0;
- result = EVP_EncryptFinal_ex(&ctx, out_buf + out_len, &final_len);
+ result = EVP_EncryptFinal_ex(ctx, out_buf + out_len, &final_len);
if(!result) {
fprintf(stderr, "cannot finish encrypting plaintext\n");
result = SG_ERR_UNKNOWN;
@@ -252,7 +278,13 @@ int test_encrypt(signal_buffer **output,
*output = signal_buffer_create(out_buf, out_len + final_len);
complete:
- EVP_CIPHER_CTX_cleanup(&ctx);
+ if(ctx) {
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+ EVP_CIPHER_CTX_free(ctx);
+#else
+ free(ctx);
+#endif
+ }
if(out_buf) {
free(out_buf);
}
@@ -267,6 +299,7 @@ int test_decrypt(signal_buffer **output,
void *user_data)
{
int result = 0;
+ EVP_CIPHER_CTX *ctx = 0;
uint8_t *out_buf = 0;
const EVP_CIPHER *evp_cipher = aes_cipher(cipher, key_len);
@@ -285,10 +318,22 @@ int test_decrypt(signal_buffer **output,
return SG_ERR_UNKNOWN;
}
- EVP_CIPHER_CTX ctx;
- EVP_CIPHER_CTX_init(&ctx);
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+ ctx = EVP_CIPHER_CTX_new();
+ if(!ctx) {
+ result = SG_ERR_NOMEM;
+ goto complete;
+ }
+#else
+ ctx = malloc(sizeof(EVP_CIPHER_CTX));
+ if(!ctx) {
+ result = SG_ERR_NOMEM;
+ goto complete;
+ }
+ EVP_CIPHER_CTX_init(ctx);
+#endif
- result = EVP_DecryptInit_ex(&ctx, evp_cipher, 0, key, iv);
+ result = EVP_DecryptInit_ex(ctx, evp_cipher, 0, key, iv);
if(!result) {
fprintf(stderr, "cannot initialize cipher\n");
result = SG_ERR_UNKNOWN;
@@ -296,7 +341,7 @@ int test_decrypt(signal_buffer **output,
}
if(cipher == SG_CIPHER_AES_CTR_NOPADDING) {
- result = EVP_CIPHER_CTX_set_padding(&ctx, 0);
+ result = EVP_CIPHER_CTX_set_padding(ctx, 0);
if(!result) {
fprintf(stderr, "cannot set padding\n");
result = SG_ERR_UNKNOWN;
@@ -312,7 +357,7 @@ int test_decrypt(signal_buffer **output,
}
int out_len = 0;
- result = EVP_DecryptUpdate(&ctx,
+ result = EVP_DecryptUpdate(ctx,
out_buf, &out_len, ciphertext, ciphertext_len);
if(!result) {
fprintf(stderr, "cannot decrypt ciphertext\n");
@@ -321,7 +366,7 @@ int test_decrypt(signal_buffer **output,
}
int final_len = 0;
- result = EVP_DecryptFinal_ex(&ctx, out_buf + out_len, &final_len);
+ result = EVP_DecryptFinal_ex(ctx, out_buf + out_len, &final_len);
if(!result) {
fprintf(stderr, "cannot finish decrypting ciphertext\n");
result = SG_ERR_UNKNOWN;
@@ -331,7 +376,13 @@ int test_decrypt(signal_buffer **output,
*output = signal_buffer_create(out_buf, out_len + final_len);
complete:
- EVP_CIPHER_CTX_cleanup(&ctx);
+ if(ctx) {
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+ EVP_CIPHER_CTX_free(ctx);
+#else
+ free(ctx);
+#endif
+ }
if(out_buf) {
free(out_buf);
}