mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-27 00:10:29 +00:00
PKGBUILDs/community: add community/fastd
This commit is contained in:
parent
f142b3551c
commit
94ccdf819a
2 changed files with 86 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
||||||
|
From 8505374ee208d51a39e7b22846f9b781b9ccb452 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <8505374ee208d51a39e7b22846f9b781b9ccb452.1515434692.git.mschiffer@universe-factory.net>
|
||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Fri, 19 May 2017 19:36:24 +0200
|
||||||
|
Subject: [PATCH] cipher: aes128-ctr: openssl: fix compatiblity with OpenSSL
|
||||||
|
1.1
|
||||||
|
|
||||||
|
---
|
||||||
|
src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c b/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
|
||||||
|
index 7a2b565..c44427f 100644
|
||||||
|
--- a/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
|
||||||
|
+++ b/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
|
||||||
|
@@ -47,7 +47,7 @@ static fastd_cipher_state_t * aes128_ctr_init(const uint8_t *key) {
|
||||||
|
fastd_cipher_state_t *state = fastd_new(fastd_cipher_state_t);
|
||||||
|
|
||||||
|
state->aes = EVP_CIPHER_CTX_new();
|
||||||
|
- EVP_EncryptInit(state->aes, EVP_aes_128_ctr(), (const unsigned char *)key, NULL);
|
||||||
|
+ EVP_EncryptInit_ex(state->aes, EVP_aes_128_ctr(), NULL, (const unsigned char *)key, NULL);
|
||||||
|
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
@@ -56,7 +56,7 @@ static fastd_cipher_state_t * aes128_ctr_init(const uint8_t *key) {
|
||||||
|
static bool aes128_ctr_crypt(const fastd_cipher_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv) {
|
||||||
|
int clen, clen2;
|
||||||
|
|
||||||
|
- if (!EVP_EncryptInit(state->aes, NULL, NULL, iv))
|
||||||
|
+ if (!EVP_EncryptInit_ex(state->aes, NULL, NULL, NULL, iv))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!EVP_EncryptUpdate(state->aes, (unsigned char *)out, &clen, (const unsigned char *)in, len))
|
||||||
|
--
|
||||||
|
2.15.1
|
||||||
|
|
50
community/fastd/PKGBUILD
Normal file
50
community/fastd/PKGBUILD
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# Maintainer: Konstantin Gizdov <arch at kge dot pw>
|
||||||
|
# Contributor: Baptiste Jonglez <archlinux at bitsofnetworks dot org>
|
||||||
|
# Contributor: NeoRaider
|
||||||
|
|
||||||
|
# ALARM: David Beauchamp <david@archlinuxarm.org>
|
||||||
|
# - add cmocka to makedepends
|
||||||
|
# - comment out checkdepends
|
||||||
|
|
||||||
|
pkgname=fastd
|
||||||
|
pkgver=22
|
||||||
|
pkgrel=1
|
||||||
|
arch=('x86_64')
|
||||||
|
pkgdesc="Fast and secure tunneling daemon"
|
||||||
|
makedepends=('meson' 'cmocka')
|
||||||
|
#checkdepends=('cmocka')
|
||||||
|
depends=('gcc-libs' 'libcap' 'libmnl' 'libuecc>=6' 'libsodium' 'json-c' 'openssl')
|
||||||
|
url="https://github.com/NeoRaider/fastd"
|
||||||
|
license=('BSD')
|
||||||
|
source=("https://github.com/NeoRaider/fastd/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
|
||||||
|
sha512sums=('66196fa13c93b87b78b9e31bc267cf616dcfb4a964387c4a3f0f3176fa1529be335a6fac91379038d6a8b1a1be4fea547659551a8a9fa8d6939589d5f8a9a7aa')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/fastd-${pkgver}"
|
||||||
|
meson setup \
|
||||||
|
--prefix=/usr \
|
||||||
|
-Dbuildtype=release \
|
||||||
|
-Db_lto=true \
|
||||||
|
-Dsystemd=enabled \
|
||||||
|
-Dbuild_tests=true \
|
||||||
|
. "$srcdir/build-${pkgver}"
|
||||||
|
|
||||||
|
cd "$srcdir/build-${pkgver}"
|
||||||
|
ninja
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$srcdir/build-${pkgver}"
|
||||||
|
ninja test
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/build-${pkgver}"
|
||||||
|
DESTDIR="$pkgdir" ninja install
|
||||||
|
|
||||||
|
install -dm755 "${pkgdir}/etc/fastd/"
|
||||||
|
|
||||||
|
install -Dm644 "$srcdir/${pkgname}-${pkgver}/COPYRIGHT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
install -Dm644 "$srcdir/${pkgname}-${pkgver}/doc/examples/fastd@.service" "${pkgdir}/usr/lib/systemd/system/fastd@.service"
|
||||||
|
install -Dm644 "$srcdir/${pkgname}-${pkgver}/doc/fastd.1" "${pkgdir}/usr/share/man/man1/fastd.1"
|
||||||
|
}
|
Loading…
Reference in a new issue