chore: remove mssql x509negativeserial workaround (#37853)

The following TLS handshake error is fixed by newer versions of mssql
(refer to
https://github.com/microsoft/mssql-docker/issues/895#issuecomment-2737646391)

```
TLS Handshake failed: tls: failed to parse certificate from server: x509: negative serial number
```

Based on
https://github.com/microsoft/go-sqlcmd/issues/755#issuecomment-4491676993,
newer versions of mssql don't have this problem. And there're changes
going to mssql driver side to make this error more explicit
https://github.com/microsoft/go-mssqldb/pull/356.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Chongyi Zheng
2026-05-27 01:51:16 -05:00
committed by GitHub
parent 9e7fadb089
commit b7a3c7a3be

5
go.mod
View File

@@ -2,11 +2,6 @@ module gitea.dev
go 1.26.3
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
// But some CAs use negative serial number, just relax the check. related:
// Default TLS cert uses negative serial number #895 https://github.com/microsoft/mssql-docker/issues/895
godebug x509negativeserial=1
require (
code.gitea.io/actions-proto-go v0.4.1
code.gitea.io/sdk/gitea v0.25.1