%global _empty_manifest_terminate_build 0
Name:		python-sslkeylog
Version:	0.4.0
Release:	1
Summary:	Log SSL/TLS keys for decrypting SSL/TLS connections
License:	MIT
URL:		https://github.com/segevfiner/sslkeylog
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/47/61/6c5adec2d2d5e3b247c760b22ac02034eea0c36fb789b7416647f1d2c36b/sslkeylog-0.4.0.tar.gz
BuildArch:	noarch


%description
This is an implementation of the ``SSLKEYLOGFILE`` facility, available in Firefox and
Chromium/Google Chrome, that is supported by Wireshark in order to decrypt SSL/TLS connections
even when you don't have the private key, or when using key exchange methods that will prevent
decryption even if you do (Such as Diffie-Hellman).
This is for the standard library ``ssl`` module, it won't work for other ssl modules.
**Note:**
   Python 3.8+ includes built-in support for generating an SSL key log file via
   ``ssl.SSLContext.keylog_filename``, and will also enable it when the ``SSLKEYLOGFILE``
   environment variable is set when creating a context via ``ssl.create_default_context``.
   This package uses the same callback the built-in implementation is using, which will likely cause
   both implementations to trample each other, causing the other not to work, or other unintended
   consequences. As such, you should probably not enable both at the same time.

%package -n python3-sslkeylog
Summary:	Log SSL/TLS keys for decrypting SSL/TLS connections
Provides:	python-sslkeylog
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-sslkeylog
This is an implementation of the ``SSLKEYLOGFILE`` facility, available in Firefox and
Chromium/Google Chrome, that is supported by Wireshark in order to decrypt SSL/TLS connections
even when you don't have the private key, or when using key exchange methods that will prevent
decryption even if you do (Such as Diffie-Hellman).
This is for the standard library ``ssl`` module, it won't work for other ssl modules.
**Note:**
   Python 3.8+ includes built-in support for generating an SSL key log file via
   ``ssl.SSLContext.keylog_filename``, and will also enable it when the ``SSLKEYLOGFILE``
   environment variable is set when creating a context via ``ssl.create_default_context``.
   This package uses the same callback the built-in implementation is using, which will likely cause
   both implementations to trample each other, causing the other not to work, or other unintended
   consequences. As such, you should probably not enable both at the same time.

%package help
Summary:	Development documents and examples for sslkeylog
Provides:	python3-sslkeylog-doc
%description help
This is an implementation of the ``SSLKEYLOGFILE`` facility, available in Firefox and
Chromium/Google Chrome, that is supported by Wireshark in order to decrypt SSL/TLS connections
even when you don't have the private key, or when using key exchange methods that will prevent
decryption even if you do (Such as Diffie-Hellman).
This is for the standard library ``ssl`` module, it won't work for other ssl modules.
**Note:**
   Python 3.8+ includes built-in support for generating an SSL key log file via
   ``ssl.SSLContext.keylog_filename``, and will also enable it when the ``SSLKEYLOGFILE``
   environment variable is set when creating a context via ``ssl.create_default_context``.
   This package uses the same callback the built-in implementation is using, which will likely cause
   both implementations to trample each other, causing the other not to work, or other unintended
   consequences. As such, you should probably not enable both at the same time.

%prep
%autosetup -n sslkeylog-0.4.0

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-sslkeylog -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.0-1
- Package Spec generated