Exploit databaseDownload repository ZIP
GH-8958357e96f9d8f8c98383150c404283
notkmhn/cve-2022-21449-tls-poc
Sources for CVE-2022-21449
14 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files23
notkmhn/cve-2022-21449-tls-pocRevision fa239eebae2b
- ↑..Parent directory
- internal/
- pkix/
- testdata/
- cert_pool.go
- parser.go
- pem_decrypt.go
- pkcs1.go
- pkcs8.go
- root.go
- root_aix.go
- root_bsd.go
- root_darwin.go
- root_js.go
- root_linux.go
- root_plan9.go
- root_solaris.go
- root_unix.go
- root_windows.go
- sec1.go
- test-file.crt
- verify.go
- x509.go
- x509_test_import.go
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
go/src/crypto/x509/root_plan9.go
Go · 828 bytes// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build plan9
package x509
import (
"os"
)
// Possible certificate files; stop after finding one.
var certFiles = []string{
"/sys/lib/tls/ca.pem",
}
func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {
return nil, nil
}
func loadSystemRoots() (*CertPool, error) {
roots := NewCertPool()
var bestErr error
for _, file := range certFiles {
data, err := os.ReadFile(file)
if err == nil {
roots.AppendCertsFromPEM(data)
return roots, nil
}
if bestErr == nil || (os.IsNotExist(bestErr) && !os.IsNotExist(err)) {
bestErr = err
}
}
if bestErr == nil {
return roots, nil
}
return nil, bestErr
}