vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.78k stars 2.16k forks source link

How to bypass https certificate check #20958

Open badboycxcc opened 7 months ago

badboycxcc commented 7 months ago

Describe the bug

Requesting self-signed https certificate website triggers error

Reproduction Steps

import net.http

resp := http.get('https://200.0.37.78/ui/#/login') or {
    println('failed to fetch data from the server')
    return
}

println(resp.body)

Expected Behavior

Return Body

Current Behavior

Error 0x80090325 returned by InitializeSecurityContext (2)
Error performing handshake
Error 0x80090325 returned by InitializeSecurityContext (2)
Error performing handshake
Error 0x80090325 returned by InitializeSecurityContext (2)
Error performing handshake
Error 0x80090325 returned by InitializeSecurityContext (2)
Error performing handshake
Error 0x80090325 returned by InitializeSecurityContext (2)
Error performing handshake
failed to fetch data from the server

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.4 d8c4a84

Environment details (OS name and version, etc.)

Windows

[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.

joe-conigliaro commented 7 months ago

This shouldn't be too hard to fix, I will take a look at the code.

badboycxcc commented 6 days ago

Hello, the problem does not seem to be solved. Can you refer to python, Or use another method?

verify=False