Closed 0xhellord closed 1 year ago
It seems you're getting a TLS alert.
#define QUIC_TLS_ALERT_HRESULT_PREFIX _HRESULT_TYPEDEF_(0x80410100L)
#define QUIC_STATUS_TLS_ALERT(Alert) (QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & Alert))
For 0x8041012a
that indicates alert 2a
which is bad_certificate
. For 0x80410130
that indicates alert 0x30
which seems to be unknown_ca
. (looked up from here).
So, something is up with the server certificate.
It seems you're getting a TLS alert.
#define QUIC_TLS_ALERT_HRESULT_PREFIX _HRESULT_TYPEDEF_(0x80410100L) #define QUIC_STATUS_TLS_ALERT(Alert) (QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & Alert))
For
0x8041012a
that indicates alert2a
which isbad_certificate
. For0x80410130
that indicates alert0x30
which seems to beunknown_ca
. (looked up from here).So, something is up with the server certificate.
yeah, I'm tring to compile the code and debug it.
And what intresting is: If run server and client in powershell , then everything works well! But if run in cmd, always got 0x8041012a or 0x80410130.
Are you running in an "admin" PowerShell perhaps?
Are you running in an "admin" PowerShell perhaps?
No, both cmd and PowerShell not in admin mode.
@0xhellord did you ever figure out what the problem was here?
@0xhellord did you ever figure out what the problem was here?
@nibanks Seems only reproduceable on my home pc. And these days I almost put all of my time on work, I'll begin to dig it this weekend.
After reboot, can't reproduce it anymore.
I encountered the same problem on macos, but quicsample ran normally after using powershell. I am not sure why this problem occurred.
I compiled msquic sample(/src/tools/sample/sample.c) with latest release msquic_windows_x64_Release_openssl.zip. But got error message: Shut down by transport, 0x8041012a if compile with msquic_windows_x64_release_schannel.zip, I got "Shut down by transport, 0x80410130".
Step:
1.create a VS project, import sample.c and headers, then link with lib file from latest msquic_windows_x64_Release_openssl.zip.
PS > New-SelfSignedCertificate -DnsName $env:computername,localhost -FriendlyName MsQuic-Test -KeyUsageProperty Sign -KeyUsage DigitalSignature -CertStoreLocation cert:\CurrentUser\My -HashAlgorithm SHA256 -Provider "Microsoft Software Key Storage Provider" -KeyExportPolicy Exportable
PSParentPath:Microsoft.PowerShell.Security\Certificate::CurrentUser\My
Thumbprint Subject BFAB735F6561DE0F6C94BC08374705014B6AF8D0 CN=DESKTOP-979GBCG
run quicsample.exe -server -cert_hash:BFAB735F6561DE0F6C94BC08374705014B6AF8D0
run quicsample.exe -client --unsecure -target:127.0.0.1 [conn][00000205B6E12090] Connecting... [conn][00000205B6E12090] Shut down by transport, 0x8041012a [conn][00000205B6E12090] All done
I tried use openssl to generate cert and key file, the result is same. If use channel version , the error code will be 0x80410130.
Os version is 10.0.22621.754(win11 x64).