Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/current/README_SSL_FIX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SSL Fix for Jekyll Build

If you encounter SSL certificate verification errors when running Jekyll builds, you can use the provided `openssl_fix.rb` script as a workaround.

## Usage

Run the Jekyll build with the `RUBYOPT` environment variable:

```bash
RUBYOPT="-r./openssl_fix.rb" bundle exec jekyll build --incremental --config _config_base.yml,_config_cockroachdb.yml
```

## What it does

This script disables SSL certificate verification for Ruby's OpenSSL library. It's intended as a temporary workaround for local development environments where SSL certificate issues may occur.

⚠️ **Warning**: This script disables SSL verification and should only be used in local development environments. Do not use in production.
27 changes: 27 additions & 0 deletions src/current/openssl_fix.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require "openssl"
require "net/http"

# Monkey patch to completely disable SSL verification
module OpenSSL
module SSL
remove_const :VERIFY_PEER
VERIFY_PEER = VERIFY_NONE
end
end

# Override Net::HTTP SSL context creation
class Net::HTTP
alias_method :original_use_ssl=, :use_ssl=

def use_ssl=(flag)
self.original_use_ssl = flag
if flag
@ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
@ssl_context.verify_hostname = false
end
end
end

# Set environment variable as fallback
ENV['SSL_VERIFY'] = 'false'
Loading