Compare commits

..

No commits in common. "master" and "f19" have entirely different histories.
master ... f19

4 changed files with 60 additions and 86 deletions

4
.gitignore vendored
View File

@ -1,9 +1,7 @@
/.project volume_key-0.3.3.tar.xz
/volume_key-0.3.3.tar.xz
/volume_key-0.3.4.tar.xz /volume_key-0.3.4.tar.xz
/volume_key-0.3.5.tar.xz /volume_key-0.3.5.tar.xz
/volume_key-0.3.6.tar.xz /volume_key-0.3.6.tar.xz
/volume_key-0.3.7.tar.xz /volume_key-0.3.7.tar.xz
/volume_key-0.3.8.tar.xz /volume_key-0.3.8.tar.xz
/volume_key-0.3.9.tar.xz /volume_key-0.3.9.tar.xz
/volume_key-0.3.10.tar.xz

View File

@ -1 +1 @@
SHA512 (volume_key-0.3.10.tar.xz) = b050d333e021bc3721f5e72c1d2498adea3265afe7f702e1b1e859546755745ac70dcffc194739a4833d4b0b77168506f7fe90fde382d8aab4df2af7b635932b a2d14931177c660e1f3ebbcf5f47d8e2 volume_key-0.3.9.tar.xz

View File

@ -0,0 +1,33 @@
This case can be triggered by encrypting in FIPS mode, where the default
algorithm is unsupported and gpg crashes in response.
diff --git a/lib/crypto.c b/lib/crypto.c
index 06eb482..905d583 100644
--- a/lib/crypto.c
+++ b/lib/crypto.c
@@ -709,6 +709,12 @@ encrypt_with_passphrase (size_t *res_size, const void *data, size_t size,
}
gpgme_data_release (src_data);
gpgme_res = gpgme_data_release_and_get_mem (dest_data, res_size);
+ if (gpgme_res == NULL)
+ {
+ g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_CRYPTO,
+ _("Unknown error getting encryption result"));
+ goto err_ctx;
+ }
res = g_memdup (gpgme_res, *res_size);
gpgme_free (gpgme_res);
@@ -759,6 +765,12 @@ decrypt_with_passphrase (size_t *res_size, const void *data, size_t size,
}
gpgme_data_release (src_data);
gpgme_res = gpgme_data_release_and_get_mem (dest_data, res_size);
+ if (gpgme_res == NULL)
+ {
+ g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_CRYPTO,
+ _("Unknown error getting decryption result"));
+ goto err_ctx;
+ }
res = g_memdup (gpgme_res, *res_size);
gpgme_free (gpgme_res);

View File

@ -2,19 +2,18 @@
Summary: An utility for manipulating storage encryption keys and passphrases Summary: An utility for manipulating storage encryption keys and passphrases
Name: volume_key Name: volume_key
Version: 0.3.10 Version: 0.3.9
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2 License: GPLv2
Group: Applications/System Group: Applications/System
URL: https://pagure.io/volume_key/ URL: https://fedorahosted.org/volume_key/
Requires: volume_key-libs%{?_isa} = %{version}-%{release} Requires: volume_key-libs%{?_isa} = %{version}-%{release}
Source0: https://releases.pagure.org/volume_key/volume_key-%{version}.tar.xz Source0: https://fedorahosted.org/releases/v/o/volume_key/volume_key-%{version}.tar.xz
BuildRequires: gcc # Upstream commit 04991fe8c4f77c4e5c7874c2db8ca32fb4655f6e
BuildRequires: cryptsetup-luks-devel, gettext-devel, glib2-devel, /usr/bin/gpg2 Patch1: volume_key-0.3.9-fips-crash.patch
BuildRequires: gpgme-devel, libblkid-devel, nss-devel, python2-devel BuildRequires: cryptsetup-luks-devel, gettext-devel, glib2-devel, /usr/bin/gpg
# Needed by %%check: BuildRequires: gpgme-devel, libblkid-devel, nss-devel, python-devel
BuildRequires: nss-tools
%description %description
This package provides a command-line tool for manipulating storage volume This package provides a command-line tool for manipulating storage volume
@ -44,7 +43,7 @@ company data after an employee leaves abruptly.
%package libs %package libs
Summary: A library for manipulating storage encryption keys and passphrases Summary: A library for manipulating storage encryption keys and passphrases
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: /usr/bin/gpg2 Requires: /usr/bin/gpg
%description libs %description libs
This package provides libvolume_key, a library for manipulating storage volume This package provides libvolume_key, a library for manipulating storage volume
@ -56,13 +55,12 @@ back up can also be useful for extracting data after a hardware or software
failure that corrupts the header of the encrypted volume, or to access the failure that corrupts the header of the encrypted volume, or to access the
company data after an employee leaves abruptly. company data after an employee leaves abruptly.
%package -n python2-volume_key %package -n python-volume_key
%{?python_provide:%python_provide python2-volume_key}
Summary: Python bindings for libvolume_key Summary: Python bindings for libvolume_key
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: volume_key-libs%{?_isa} = %{version}-%{release} Requires: volume_key-libs%{?_isa} = %{version}-%{release}
%description -n python2-volume_key %description -n python-volume_key
This package provides Python bindings for libvolume_key, a library for This package provides Python bindings for libvolume_key, a library for
manipulating storage volume encryption keys and storing them separately from manipulating storage volume encryption keys and storing them separately from
volumes. volumes.
@ -79,6 +77,8 @@ for other formats is possible, some formats are planned for future releases.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .fips-crash
%build %build
%configure %configure
make %{?_smp_mflags} make %{?_smp_mflags}
@ -86,95 +86,38 @@ make %{?_smp_mflags}
%install %install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
%check
make check
%find_lang volume_key %find_lang volume_key
%ldconfig_scriptlets libs %clean
rm -rf $RPM_BUILD_ROOT
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-)
%doc README contrib %doc README contrib
%{_bindir}/volume_key %{_bindir}/volume_key
%{_mandir}/man8/volume_key.8* %{_mandir}/man8/volume_key.8*
%files devel %files devel
%defattr(-,root,root,-)
%{_includedir}/volume_key %{_includedir}/volume_key
%exclude %{_libdir}/libvolume_key.la %exclude %{_libdir}/libvolume_key.la
%{_libdir}/libvolume_key.so %{_libdir}/libvolume_key.so
%files libs -f volume_key.lang %files libs -f volume_key.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS %doc AUTHORS COPYING ChangeLog NEWS
%{_libdir}/libvolume_key.so.* %{_libdir}/libvolume_key.so.*
%files -n python2-volume_key %files -n python-volume_key
%defattr(-,root,root,-)
%exclude %{python_sitearch}/_volume_key.la %exclude %{python_sitearch}/_volume_key.la
%{python2_sitearch}/_volume_key.so %{python_sitearch}/_volume_key.so
%{python2_sitearch}/volume_key.py* %{python_sitearch}/volume_key.py*
%changelog %changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed May 16 2018 Jiri Kucera <jkucera@redhat.com> - 0.3.10-1
- Update to volume_key-0.3.10
Resolves: #1479349, #1517016
* Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.9-20
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.9-18
- Switch to %%ldconfig_scriptlets
* Tue Nov 7 2017 Miloslav Trmač <mitr@redhat.com> - 0.3.9-17
- Update for libcryptsetup ABI change
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.3.9-16
- Python 2 binary package renamed to python2-volume_key
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon May 29 2017 Miloslav Trmač <mitr@redhat.com> - 0.3.9-13
- Point URL: and Source: to the new home at pagure.io
Resolves: 1456378
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Dec 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.9-11
- Rebuild for gpgme 1.18
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-10
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Jan 13 2015 Miloslav Trmač <mitr@redhat.com> - 0.3.9-7
- Don't #include <config.h> in libvolume_key.h
Patch by Vratislav Podzimek <vpodzime@redhat.com>.
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-3 * Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild