Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL hostname is wrong sometimes #2958

Open
erg opened this issue Mar 23, 2024 · 0 comments
Open

SSL hostname is wrong sometimes #2958

erg opened this issue Mar 23, 2024 · 0 comments

Comments

@erg
Copy link
Member

erg commented Mar 23, 2024

This will sometimes get the SSL cert of cards.scryfall.io and that will throw subject-name-verify-error:

"https://data.scryfall.io/all-cards/all-cards-20240322091610.json" http-get

signal-2024-03-22-133649_002

alternative-dns-names is { "cards.scryfall.io" } when it fails, and subject-name is "cards.scryfall.io"

: check-subject-name ( host ssl-handle -- )
    get-ssl-peer-certificate [
        [ alternative-dns-names ]
        [ subject-name ] bi suffix members
        2dup [ subject-names-match? ] with any?
        [ 2drop ] [ subject-name-verify-error ] if
    ] [ certificate-missing-error ] if* ;

M: openssl check-certificate
    current-secure-context config>> verify>> [
        handle>>
        [ nip check-verify-result ]
        [ check-subject-name ] 
        2bi
    ] [ 2drop ] if ;

They both have the same exact ipv4/ipv6 addresses and this might be causing the bug. Or just a site misconfiguration bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant