mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-18 02:06:35 +00:00
Added troubleshooting section
includes a workaround fix for SSL CRL error Fixes StrawberryMaster/wayback-machine-downloader#33
This commit is contained in:
parent
d7a63361e3
commit
4b1ec1e1cc
39
README.md
39
README.md
@ -269,6 +269,45 @@ This can be useful for debugging or if you plan to extend the download later wit
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### SSL certificate errors
|
||||||
|
If you encounter an SSL error like:
|
||||||
|
```
|
||||||
|
SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get certificate CRL)
|
||||||
|
```
|
||||||
|
|
||||||
|
This is a known issue with **OpenSSL 3.6.0** when used with certain Ruby installations, and not a bug with this WMD work specifically. (See [ruby/openssl#949](https://github.com/ruby/openssl/issues/949) for details.)
|
||||||
|
|
||||||
|
The workaround is to create a file named `fix_ssl_store.rb` with the following content:
|
||||||
|
```ruby
|
||||||
|
require "openssl"
|
||||||
|
store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
||||||
|
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:cert_store] = store
|
||||||
|
```
|
||||||
|
|
||||||
|
and run wayback-machine-downloader with:
|
||||||
|
```bash
|
||||||
|
RUBYOPT="-r./fix_ssl_store.rb" wayback_machine_downloader "http://example.com"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Verifying the issue
|
||||||
|
You can test if your Ruby environment has this issue by running:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
require "net/http"
|
||||||
|
require "uri"
|
||||||
|
|
||||||
|
uri = URI("https://web.archive.org/")
|
||||||
|
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
|
||||||
|
resp = http.get("/")
|
||||||
|
puts "GET / => #{resp.code}"
|
||||||
|
end
|
||||||
|
```
|
||||||
|
If this fails with the same SSL error, the workaround above will fix it.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🤝 Contributing
|
## 🤝 Contributing
|
||||||
1. Fork the repository
|
1. Fork the repository
|
||||||
2. Create a feature branch
|
2. Create a feature branch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user