asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
340 stars 97 forks source link

Disabling SSL verification #874

Closed GauntletPL closed 6 months ago

GauntletPL commented 7 months ago

Please provide details about:

class SSLVerifyNonePreprocessor < Extensions::Preprocessor
    def process(document, reader)
        ssl = OpenSSL::SSL
        ssl.send(:remove_const, :VERIFY_PEER) if ssl.const_defined?(:VERIFY_PEER)
        ssl.const_set(:VERIFY_PEER, ssl::VERIFY_NONE)
        return reader
    end
end
ggrossetie commented 6 months ago

unxhr is a Node implementation of https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest. As far as I know, it's not possible to ignore self-signed certificate in XMLHttpRequest.

Did you try to set process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'?

GauntletPL commented 6 months ago

That did the trick. Thank you so much for making me aware of this NODE_TLS_REJECT_UNAUTHORIZED env variable.