-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
729 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "libargon2" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
build = "../build.rs" | ||
|
||
[lib] | ||
path = "../packages.rs" | ||
|
||
[package.metadata.build-package] | ||
package-name = "libargon2" | ||
releases-url = "https://github.com/P-H-C/phc-winner-argon2/releases/download" | ||
|
||
[[package.metadata.build-package.external-files]] | ||
url = "https://github.com/P-H-C/phc-winner-argon2/archive/refs/tags/20190702.tar.gz" | ||
sha512 = "0a4cb89e8e63399f7df069e2862ccd05308b7652bf4ab74372842f66bcc60776399e0eaf979a7b7e31436b5e6913fe5b0a6949549d8c82ebd06e0629b106e85f" | ||
force-upstream = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
%global debug_package %{nil} | ||
|
||
Name: %{_cross_os}libargon2 | ||
Version: 20190702 | ||
Release: 1%{?dist} | ||
Summary: The password-hashing library | ||
License: CC0-1.0 OR Apache-2.0 | ||
URL: https://github.com/P-H-C/phc-winner-argon2 | ||
Source0: %{url}/archive/%{version}.tar.gz | ||
|
||
BuildRequires: %{_cross_os}glibc-devel | ||
Requires: %{_cross_os}glibc | ||
|
||
%global soname 1 | ||
|
||
%description | ||
Argon2 is a password-hashing function that summarizes the state of the art | ||
in the design of memory-hard functions and can be used to hash passwords | ||
for credential storage, key derivation, or other applications. | ||
|
||
It has three variants: | ||
* Argon2d: Faster and uses data-depending memory access | ||
* Argon2i: Uses data-independent memory access | ||
* Argon2id: Hybrid of Argon2i and Argon2d | ||
|
||
%package devel | ||
Summary: Development files for Argon2 password hashing library | ||
Requires: %{name} | ||
|
||
%description devel | ||
Development files for the Argon2 password hashing library. | ||
|
||
%prep | ||
%autosetup -n phc-winner-argon2-%{version} | ||
|
||
# Verify soname version | ||
if ! grep -q 'ABI_VERSION = %{soname}' Makefile; then | ||
echo "Error: soname version mismatch" | ||
grep ABI_VERSION Makefile | ||
exit 1 | ||
fi | ||
|
||
# Fix pkgconfig file | ||
sed -e 's:lib/@HOST_MULTIARCH@:%{_lib}:;s/@UPSTREAM_VER@/%{version}/' -i libargon2.pc.in | ||
|
||
%build | ||
%set_cross_build_flags | ||
|
||
# Modify Makefile to use proper flags and paths | ||
sed -e '/^CFLAGS/s:^CFLAGS:LDFLAGS=%{_cross_ldflags}\nCFLAGS:' \ | ||
-e 's:-O3 -Wall:%{_cross_cflags}:' \ | ||
-e '/^LIBRARY_REL/s:lib:%{_lib}:' \ | ||
-e 's:-march=\$(OPTTARGET) :${CFLAGS} :' \ | ||
-e 's:CFLAGS += -march=\$(OPTTARGET)::' \ | ||
-i Makefile | ||
|
||
make -j1 PREFIX=%{_cross_prefix} \ | ||
CC=%{_cross_target}-gcc \ | ||
OPTTARGET=none \ | ||
LIBRARY_REL=lib | ||
|
||
%install | ||
make install DESTDIR=%{buildroot} \ | ||
PREFIX=%{_cross_prefix} \ | ||
LIBRARY_REL=lib | ||
|
||
rm %{buildroot}%{_cross_bindir}/argon2 | ||
rm %{buildroot}%{_cross_libdir}/libargon2.a | ||
# Fix permissions | ||
chmod -x %{buildroot}%{_cross_includedir}/argon2.h | ||
find %{buildroot}%{_cross_libdir} -name "libargon2.so" -type f -exec chmod +x {} \; | ||
|
||
%files | ||
%license LICENSE | ||
%{_cross_attribution_file} | ||
%{_cross_libdir}/libargon2.so | ||
%{_cross_libdir}/libargon2.so.%{soname} | ||
|
||
%files devel | ||
%doc README.md CHANGELOG.md | ||
%{_cross_includedir}/argon2.h | ||
%{_cross_pkgconfigdir}/libargon2.pc | ||
|
||
%changelog |
49 changes: 49 additions & 0 deletions
49
packages/systemd/9015-fix-openssl-error-format-strings.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/src/resolve/resolved-dns-dnssec.c b/src/resolve/resolved-dns-dnssec.c | ||
index f63cd9b..cb794c9 100644 | ||
--- a/src/resolve/resolved-dns-dnssec.c | ||
+++ b/src/resolve/resolved-dns-dnssec.c | ||
@@ -149,7 +149,7 @@ static int dnssec_rsa_verify_raw( | ||
r = EVP_PKEY_verify(ctx, signature, signature_size, data, data_size); | ||
if (r < 0) | ||
return log_debug_errno(SYNTHETIC_ERRNO(EIO), | ||
- "Signature verification failed: 0x%lx", ERR_get_error()); | ||
+ "Signature verification failed: 0x%u", ERR_get_error()); | ||
|
||
# pragma GCC diagnostic pop | ||
#else | ||
@@ -336,7 +336,7 @@ static int dnssec_ecdsa_verify_raw( | ||
|
||
if (EC_KEY_set_public_key(eckey, p) <= 0) | ||
return log_debug_errno(SYNTHETIC_ERRNO(EIO), | ||
- "EC_POINT_bn2point failed: 0x%lx", ERR_get_error()); | ||
+ "EC_POINT_bn2point failed: 0x%u", ERR_get_error()); | ||
|
||
assert(EC_KEY_check_key(eckey) == 1); | ||
|
||
@@ -361,7 +361,7 @@ static int dnssec_ecdsa_verify_raw( | ||
k = ECDSA_do_verify(data, data_size, sig, eckey); | ||
if (k < 0) | ||
return log_debug_errno(SYNTHETIC_ERRNO(EIO), | ||
- "Signature verification failed: 0x%lx", ERR_get_error()); | ||
+ "Signature verification failed: 0x%u", ERR_get_error()); | ||
|
||
# pragma GCC diagnostic pop | ||
#else | ||
@@ -512,7 +512,7 @@ static int dnssec_eddsa_verify_raw( | ||
evkey = EVP_PKEY_new_raw_public_key(EVP_PKEY_ED25519, NULL, key, key_size); | ||
if (!evkey) | ||
return log_debug_errno(SYNTHETIC_ERRNO(EIO), | ||
- "EVP_PKEY_new_raw_public_key failed: 0x%lx", ERR_get_error()); | ||
+ "EVP_PKEY_new_raw_public_key failed: 0x%u", ERR_get_error()); | ||
|
||
pctx = EVP_PKEY_CTX_new(evkey, NULL); | ||
if (!pctx) | ||
@@ -532,7 +532,7 @@ static int dnssec_eddsa_verify_raw( | ||
r = EVP_DigestVerify(ctx, signature, signature_size, data, data_size); | ||
if (r < 0) | ||
return log_debug_errno(SYNTHETIC_ERRNO(EIO), | ||
- "Signature verification failed: 0x%lx", ERR_get_error()); | ||
+ "Signature verification failed: 0x%u", ERR_get_error()); | ||
|
||
return r; | ||
|
Oops, something went wrong.