diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 10:12:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 16:46:16 +0000 |
commit | e25972481d4bedfffcd6c54c08260d1f693c62cd (patch) | |
tree | 8583e24c4964808bd21ea3c747379b9e717a920a /testing/yafic | |
parent | 6479facda2a89b0cffa030f28cd6daf7d3653192 (diff) | |
download | aports-e25972481d4bedfffcd6c54c08260d1f693c62cd.tar.bz2 aports-e25972481d4bedfffcd6c54c08260d1f693c62cd.tar.xz |
testing/yafic: rebuild against openssl 1.1
Diffstat (limited to 'testing/yafic')
-rw-r--r-- | testing/yafic/APKBUILD | 11 | ||||
-rw-r--r-- | testing/yafic/openssl-1.1.patch | 136 |
2 files changed, 143 insertions, 4 deletions
diff --git a/testing/yafic/APKBUILD b/testing/yafic/APKBUILD index 6c00d6b5db..a870c01449 100644 --- a/testing/yafic/APKBUILD +++ b/testing/yafic/APKBUILD @@ -2,14 +2,16 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=yafic pkgver=1.2.2 -pkgrel=3 +pkgrel=4 pkgdesc="Yet Another File Integrity Checker" url="https://www.saddi.com/software/yafic/" arch="all" license="BSD" -makedepends="db-dev libressl-dev" +makedepends="db-dev openssl-dev" subpackages="$pkgname-doc" -source="https://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" +source="https://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + openssl-1.1.patch + " builddir="$srcdir/$pkgname-$pkgver" check() { @@ -33,4 +35,5 @@ package() { } -sha512sums="8e05a0838fc2063f1c6bb69d660e9ff5c9fbdc4199e1396232327498c04d037b35307c348d64d928e561875f5cf0ad40c24fd097680cd814b2308608cf738957 yafic-1.2.2.tar.gz" +sha512sums="8e05a0838fc2063f1c6bb69d660e9ff5c9fbdc4199e1396232327498c04d037b35307c348d64d928e561875f5cf0ad40c24fd097680cd814b2308608cf738957 yafic-1.2.2.tar.gz +ffe7781f2f6cff56f5bd32da5329db45122f899d3be9857ec4c51aeeadd90f30fa335cfe9d94116b8cc20cb5384317f7b98eb6165e280419dc3d47abec2f9d9f openssl-1.1.patch" diff --git a/testing/yafic/openssl-1.1.patch b/testing/yafic/openssl-1.1.patch new file mode 100644 index 0000000000..f11815f155 --- /dev/null +++ b/testing/yafic/openssl-1.1.patch @@ -0,0 +1,136 @@ +diff --git a/crypto.c b/crypto.c +index 43f62ae..8d7f3c4 100644 +--- a/crypto.c ++++ b/crypto.c +@@ -100,7 +100,7 @@ void + SignFile (int fd, const char *filename, const char *sigfile) + { + const EVP_MD *mdType; +- EVP_MD_CTX ctx; ++ EVP_MD_CTX *ctx; + ssize_t len; + unsigned char *sig = NULL; + unsigned int sigLen; +@@ -111,8 +111,7 @@ SignFile (int fd, const char *filename, const char *sigfile) + if (!pkey) + return; + +- mdType = EVP_PKEY_type (pkey->type) == EVP_PKEY_DSA ? EVP_dss1 () : +- EVP_sha1 (); ++ mdType = EVP_sha1 (); + + if (!sigfile) { + int tlen = strlen (filename) + 4 + 1; +@@ -122,11 +121,9 @@ SignFile (int fd, const char *filename, const char *sigfile) + sigfile = tsigfile; + } + +-#ifdef HAVE_EVP_MD_CTX_INIT +- EVP_MD_CTX_init (&ctx); +-#endif ++ ctx = EVP_MD_CTX_new(); + #ifdef EVP_DIGESTINIT_VOID +- EVP_SignInit (&ctx, mdType); ++ EVP_SignInit (ctx, mdType); + #else + if (!EVP_SignInit (&ctx, mdType)) + opensslError ("EVP_SignInit"); +@@ -134,7 +131,7 @@ SignFile (int fd, const char *filename, const char *sigfile) + + while ((len = read (fd, HashBuffer, HASH_BUFFER_SIZE)) > 0) { + #ifdef EVP_DIGESTINIT_VOID +- EVP_SignUpdate (&ctx, HashBuffer, len); ++ EVP_SignUpdate (ctx, HashBuffer, len); + #else + if (!EVP_SignUpdate (&ctx, HashBuffer, len)) + opensslError ("EVP_SignUpdate"); +@@ -146,7 +143,7 @@ SignFile (int fd, const char *filename, const char *sigfile) + + sig = mymalloc (EVP_PKEY_size (pkey)); + +- if (EVP_SignFinal (&ctx, sig, &sigLen, pkey)) { ++ if (EVP_SignFinal (ctx, sig, &sigLen, pkey)) { + if ((f = open (sigfile, O_CREAT|O_WRONLY|O_TRUNC, 0600)) != -1) { + if (write (f, sig, sigLen) != sigLen) + yaficError (sigfile); +@@ -162,7 +159,7 @@ SignFile (int fd, const char *filename, const char *sigfile) + if (sig) free (sig); + if (tsigfile) free (tsigfile); + #ifdef HAVE_EVP_MD_CTX_CLEANUP +- EVP_MD_CTX_cleanup (&ctx); ++ EVP_MD_CTX_cleanup (ctx); + #endif + } + +@@ -170,7 +167,7 @@ void + VerifyFile (int fd, const char *filename, const char *sigfile) + { + const EVP_MD *mdType; +- EVP_MD_CTX ctx; ++ EVP_MD_CTX *ctx; + ssize_t len; + unsigned char *sig = NULL; + int f; +@@ -181,8 +178,7 @@ VerifyFile (int fd, const char *filename, const char *sigfile) + if (!pkey) + return; + +- mdType = EVP_PKEY_type (pkey->type) == EVP_PKEY_DSA ? EVP_dss1 () : +- EVP_sha1 (); ++ mdType = EVP_sha1 (); + + if (!sigfile) { + int tlen = strlen (filename) + 4 + 1; +@@ -195,11 +191,9 @@ VerifyFile (int fd, const char *filename, const char *sigfile) + fprintf (stderr, "Verifying %s: ", filename); + fflush (stderr); + +-#ifdef HAVE_EVP_MD_CTX_INIT +- EVP_MD_CTX_init (&ctx); +-#endif ++ ctx = EVP_MD_CTX_new(); + #ifdef EVP_DIGESTINIT_VOID +- EVP_VerifyInit (&ctx, mdType); ++ EVP_VerifyInit (ctx, mdType); + #else + if (!EVP_VerifyInit (&ctx, mdType)) { + fprintf (stderr, "Error\n"); +@@ -209,9 +203,9 @@ VerifyFile (int fd, const char *filename, const char *sigfile) + + while ((len = read (fd, HashBuffer, HASH_BUFFER_SIZE)) > 0) { + #ifdef EVP_DIGESTINIT_VOID +- EVP_VerifyUpdate (&ctx, HashBuffer, len); ++ EVP_VerifyUpdate (ctx, HashBuffer, len); + #else +- if (!EVP_VerifyUpdate (&ctx, HashBuffer, len)) { ++ if (!EVP_VerifyUpdate (ctx, HashBuffer, len)) { + fprintf (stderr, "Error\n"); + opensslError ("EVP_SignUpdate"); + } +@@ -233,7 +227,7 @@ VerifyFile (int fd, const char *filename, const char *sigfile) + + close (f); + +- ret = EVP_VerifyFinal (&ctx, sig, len, pkey); ++ ret = EVP_VerifyFinal (ctx, sig, len, pkey); + if (ret < 0) { + fprintf (stderr, "Error\n"); + opensslError ("EVP_VerifyFinal"); +@@ -254,7 +248,7 @@ VerifyFile (int fd, const char *filename, const char *sigfile) + if (sig) free (sig); + if (tsigfile) free (tsigfile); + #ifdef HAVE_EVP_MD_CTX_CLEANUP +- EVP_MD_CTX_cleanup (&ctx); ++ EVP_MD_CTX_cleanup (ctx); + #endif + } + +@@ -265,7 +259,7 @@ KeyTypeStr (void) + + if (pkey) { + int bits = EVP_PKEY_bits (pkey); +- int type = EVP_PKEY_type (pkey->type); ++ int type = EVP_PKEY_base_id (pkey); + + switch (type) { + case EVP_PKEY_RSA: |