mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
warcprox crashes with the following error when using `cryptography==35.0.0`. ``` ValueError: Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate? Traceback (most recent call last): File "/opt/spn2/bin/warcprox", line 8, in <module> sys.exit(main()) File "/opt/spn2/lib/python3.8/site-packages/warcprox/main.py", line 330, in main controller = warcprox.controller.WarcproxController(options) File "/opt/spn2/lib/python3.8/site-packages/warcprox/controller.py", line 145, in __init__ self.proxy = warcprox.warcproxy.WarcProxy( File "/opt/spn2/lib/python3.8/site-packages/warcprox/warcproxy.py", line 561, in __init__ SingleThreadedWarcProxy.__init__( File "/opt/spn2/lib/python3.8/site-packages/warcprox/warcproxy.py", line 509, in __init__ warcprox.mitmproxy.SingleThreadedMitmProxy.__init__( File "/opt/spn2/lib/python3.8/site-packages/warcprox/mitmproxy.py", line 861, in __init__ self.ca = CertificateAuthority( File "/opt/spn2/lib/python3.8/site-packages/warcprox/certauth.py", line 69, in __init__ self.cert, self.key = self.read_pem(ca_file) File "/opt/spn2/lib/python3.8/site-packages/warcprox/certauth.py", line 210, in read_pem cert = x509.load_pem_x509_certificate(f.read(), default_backend()) File "/opt/spn2/lib/python3.8/site-packages/cryptography/x509/base.py", line 436, in load_pem_x509_certificate return rust_x509.load_pem_x509_certificate(data) ValueError: Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate? ```
79 lines
2.7 KiB
Python
Executable File
79 lines
2.7 KiB
Python
Executable File
#!/usr/bin/env python
|
|
'''
|
|
setup.py - setuptools installation configuration for warcprox
|
|
|
|
Copyright (C) 2013-2024 Internet Archive
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
|
USA.
|
|
'''
|
|
|
|
import sys
|
|
import setuptools
|
|
|
|
deps = [
|
|
'warctools>=4.10.0',
|
|
'urlcanon>=0.3.0',
|
|
'doublethink @ git+https://github.com/internetarchive/doublethink.git@Py311',
|
|
'urllib3>=1.23',
|
|
'requests>=2.0.1',
|
|
'PySocks>=1.6.8',
|
|
'cryptography>=39,<40',
|
|
'idna',
|
|
'PyYAML>=5.1',
|
|
'cachetools',
|
|
'rfc3986>=1.5.0',
|
|
]
|
|
try:
|
|
import concurrent.futures
|
|
except:
|
|
deps.append('futures')
|
|
|
|
setuptools.setup(
|
|
name='warcprox',
|
|
version='2.5.3',
|
|
description='WARC writing MITM HTTP/S proxy',
|
|
url='https://github.com/internetarchive/warcprox',
|
|
author='Noah Levitt',
|
|
author_email='nlevitt@archive.org',
|
|
long_description=open('README.rst').read(),
|
|
license='GPL',
|
|
packages=['warcprox'],
|
|
install_requires=deps,
|
|
extras_require={'trough': ['trough @ git+https://github.com/internetarchive/trough.git@jammy_focal',],},
|
|
setup_requires=['pytest-runner'],
|
|
tests_require=['mock', 'pytest', 'warcio'],
|
|
entry_points={
|
|
'console_scripts': [
|
|
'warcprox=warcprox.main:main',
|
|
('warcprox-ensure-rethinkdb-tables='
|
|
'warcprox.main:ensure_rethinkdb_tables'),
|
|
],
|
|
},
|
|
zip_safe=False,
|
|
classifiers=[
|
|
'Development Status :: 5 - Production/Stable',
|
|
'Environment :: Console',
|
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
|
'Programming Language :: Python :: 3.8',
|
|
'Programming Language :: Python :: 3.9',
|
|
'Programming Language :: Python :: 3.10',
|
|
'Programming Language :: Python :: 3.11',
|
|
'Topic :: Internet :: Proxy Servers',
|
|
'Topic :: Internet :: WWW/HTTP',
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
'Topic :: System :: Archiving',
|
|
])
|