Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| bd4e5a2081 | |||
| 13e71a3467 |
3
libksi-3.21.3087.tar.gz
Normal file
3
libksi-3.21.3087.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:65a686279fd6208fe146bbb7e1f6d741a2eb799fcf1b44e00899a92d6bdbce72
|
||||
size 744628
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a11d597971cf9973c6f20ba62ba0abe4e47baecee3482758ea0d6612829392c
|
||||
size 602461
|
||||
@@ -1,83 +0,0 @@
|
||||
Index: libksi-3.4.0.5/src/ksi/hash_openssl.c
|
||||
===================================================================
|
||||
--- libksi-3.4.0.5.orig/src/ksi/hash_openssl.c
|
||||
+++ libksi-3.4.0.5/src/ksi/hash_openssl.c
|
||||
@@ -102,7 +102,9 @@ int KSI_isHashAlgorithmSupported(KSI_Has
|
||||
|
||||
void KSI_DataHasher_free(KSI_DataHasher *hasher) {
|
||||
if (hasher != NULL) {
|
||||
- KSI_free(hasher->hashContext);
|
||||
+ if (hasher->hashContext != NULL) {
|
||||
+ EVP_MD_CTX_destroy(hasher->hashContext);
|
||||
+ }
|
||||
KSI_free(hasher);
|
||||
}
|
||||
}
|
||||
@@ -171,7 +173,7 @@ int KSI_DataHasher_reset(KSI_DataHasher
|
||||
|
||||
context = hasher->hashContext;
|
||||
if (context == NULL) {
|
||||
- context = KSI_new(EVP_MD_CTX);
|
||||
+ context = EVP_MD_CTX_create();
|
||||
if (context == NULL) {
|
||||
KSI_pushError(hasher->ctx, res = KSI_OUT_OF_MEMORY, NULL);
|
||||
goto cleanup;
|
||||
@@ -179,7 +181,7 @@ int KSI_DataHasher_reset(KSI_DataHasher
|
||||
|
||||
hasher->hashContext = context;
|
||||
} else {
|
||||
- EVP_MD_CTX_cleanup(context);
|
||||
+ EVP_MD_CTX_destroy(context);
|
||||
}
|
||||
|
||||
if (!EVP_DigestInit(context, evp_md)) {
|
||||
Index: libksi-3.4.0.5/src/ksi/pkitruststore_openssl.c
|
||||
===================================================================
|
||||
--- libksi-3.4.0.5.orig/src/ksi/pkitruststore_openssl.c
|
||||
+++ libksi-3.4.0.5/src/ksi/pkitruststore_openssl.c
|
||||
@@ -907,13 +907,13 @@ cleanup:
|
||||
int KSI_PKITruststore_verifyRawSignature(KSI_CTX *ctx, const unsigned char *data, size_t data_len, const char *algoOid, const unsigned char *signature, size_t signature_len, const KSI_PKICertificate *certificate) {
|
||||
int res;
|
||||
ASN1_OBJECT* algorithm = NULL;
|
||||
- EVP_MD_CTX md_ctx;
|
||||
+ EVP_MD_CTX *md_ctx;
|
||||
X509 *x509 = NULL;
|
||||
const EVP_MD *evp_md;
|
||||
EVP_PKEY *pubKey = NULL;
|
||||
|
||||
/* Needs to be initialized before jumping to cleanup. */
|
||||
- EVP_MD_CTX_init(&md_ctx);
|
||||
+ md_ctx = EVP_MD_CTX_create();
|
||||
|
||||
KSI_ERR_clearErrors(ctx);
|
||||
|
||||
@@ -956,17 +956,17 @@ int KSI_PKITruststore_verifyRawSignature
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- if (!EVP_VerifyInit(&md_ctx, evp_md)) {
|
||||
+ if (!EVP_VerifyInit(md_ctx, evp_md)) {
|
||||
KSI_pushError(ctx, res = KSI_CRYPTO_FAILURE, NULL);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- if (!EVP_VerifyUpdate(&md_ctx, (unsigned char *)data, data_len)) {
|
||||
+ if (!EVP_VerifyUpdate(md_ctx, (unsigned char *)data, data_len)) {
|
||||
KSI_pushError(ctx, res = KSI_CRYPTO_FAILURE, NULL);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- res = EVP_VerifyFinal(&md_ctx, (unsigned char *)signature, (unsigned)signature_len, pubKey);
|
||||
+ res = EVP_VerifyFinal(md_ctx, (unsigned char *)signature, (unsigned)signature_len, pubKey);
|
||||
if (res < 0) {
|
||||
KSI_pushError(ctx, res = KSI_CRYPTO_FAILURE, NULL);
|
||||
goto cleanup;
|
||||
@@ -982,7 +982,7 @@ int KSI_PKITruststore_verifyRawSignature
|
||||
|
||||
cleanup:
|
||||
|
||||
- EVP_MD_CTX_cleanup(&md_ctx);
|
||||
+ EVP_MD_CTX_destroy(md_ctx);
|
||||
if (algorithm != NULL) ASN1_OBJECT_free(algorithm);
|
||||
if (pubKey != NULL) EVP_PKEY_free(pubKey);
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 5 14:49:55 UTC 2024 - Thomas Blume <Thomas.Blume@suse.com>
|
||||
|
||||
- update to libksi 3.21.3087
|
||||
- switched from unmaintained old source repo to current:
|
||||
https://github.com/guardtime/libksi
|
||||
- removed patches: libksi-build-with-openssl-1.1.0.patch
|
||||
- see /usr/share/doc/packages/libksi13/changelog for details
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 29 17:04:41 UTC 2024 - pgajdos@suse.com
|
||||
|
||||
|
||||
23
libksi.spec
23
libksi.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libksi
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,24 +12,23 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define sover 1
|
||||
%define sover 13
|
||||
Name: libksi
|
||||
Version: 3.4.0.5
|
||||
Version: 3.21.3087
|
||||
Release: 0
|
||||
Summary: GuardTime KSI API
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: http://www.rsyslog.com/
|
||||
# https://github.com/rsyslog/libksi
|
||||
# extracted from http://rpms.adiscon.com/v8-stable/epel-7/x86_64/RPMS/libksi1-3.4.0.5-2.el7.src.rpm
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE bsc#1042656 -- Fix errors building with openssl-1.1.0
|
||||
Patch0: libksi-build-with-openssl-1.1.0.patch
|
||||
URL: https://github.com/guardtime/libksi/archive/refs/tags/v%{version}.tar.gz
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: curl-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@@ -56,6 +55,7 @@ needed to develop applications using libksi.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
autoreconf -ifv
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@@ -80,8 +80,7 @@ rm -v %{buildroot}/%{_datadir}/doc/%{name}/changelog
|
||||
%files -n %{name}%{sover}
|
||||
%defattr(-,root,root)
|
||||
%doc license.txt changelog
|
||||
%{_libdir}/libksi.so.%{sover}
|
||||
%{_libdir}/libksi.so.%{sover}.*
|
||||
%{_libdir}/libksi.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
|
||||
Reference in New Issue
Block a user