Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.51
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
crypto /
x509 /
[ HOME SHELL ]
Name
Size
Permission
Action
pkix
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
cert_pool.go
3.75
KB
-rw-r--r--
example_test.go
5.32
KB
-rw-r--r--
name_constraints_test.go
44.98
KB
-rw-r--r--
pem_decrypt.go
6.5
KB
-rw-r--r--
pem_decrypt_test.go
8.92
KB
-rw-r--r--
pkcs1.go
4.64
KB
-rw-r--r--
pkcs8.go
4.36
KB
-rw-r--r--
pkcs8_test.go
8.05
KB
-rw-r--r--
root.go
483
B
-rw-r--r--
root_aix.go
290
B
-rw-r--r--
root_bsd.go
518
B
-rw-r--r--
root_cgo_darwin.go
11.47
KB
-rw-r--r--
root_darwin.go
8.24
KB
-rw-r--r--
root_darwin_arm_gen.go
4.54
KB
-rw-r--r--
root_darwin_armx.go
256.1
KB
-rw-r--r--
root_darwin_test.go
4.31
KB
-rw-r--r--
root_js.go
275
B
-rw-r--r--
root_linux.go
684
B
-rw-r--r--
root_nocgo_darwin.go
264
B
-rw-r--r--
root_plan9.go
844
B
-rw-r--r--
root_solaris.go
419
B
-rw-r--r--
root_unix.go
2.16
KB
-rw-r--r--
root_unix_test.go
3.02
KB
-rw-r--r--
root_windows.go
9.98
KB
-rw-r--r--
sec1.go
4.25
KB
-rw-r--r--
sec1_test.go
5.36
KB
-rw-r--r--
test-file.crt
1.9
KB
-rw-r--r--
verify.go
33.48
KB
-rw-r--r--
verify_test.go
88.68
KB
-rw-r--r--
x509.go
81.23
KB
-rw-r--r--
x509_test.go
97.43
KB
-rw-r--r--
x509_test_import.go
1.7
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : root_unix_test.go
// Copyright 2017 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. // +build dragonfly freebsd linux netbsd openbsd solaris package x509 import ( "fmt" "os" "testing" ) const ( testDir = "testdata" testDirCN = "test-dir" testFile = "test-file.crt" testFileCN = "test-file" testMissing = "missing" ) func TestEnvVars(t *testing.T) { testCases := []struct { name string fileEnv string dirEnv string files []string dirs []string cns []string }{ { // Environment variables override the default locations preventing fall through. name: "override-defaults", fileEnv: testMissing, dirEnv: testMissing, files: []string{testFile}, dirs: []string{testDir}, cns: nil, }, { // File environment overrides default file locations. name: "file", fileEnv: testFile, dirEnv: "", files: nil, dirs: nil, cns: []string{testFileCN}, }, { // Directory environment overrides default directory locations. name: "dir", fileEnv: "", dirEnv: testDir, files: nil, dirs: nil, cns: []string{testDirCN}, }, { // File & directory environment overrides both default locations. name: "file+dir", fileEnv: testFile, dirEnv: testDir, files: nil, dirs: nil, cns: []string{testFileCN, testDirCN}, }, { // Environment variable empty / unset uses default locations. name: "empty-fall-through", fileEnv: "", dirEnv: "", files: []string{testFile}, dirs: []string{testDir}, cns: []string{testFileCN, testDirCN}, }, } // Save old settings so we can restore before the test ends. origCertFiles, origCertDirectories := certFiles, certDirectories origFile, origDir := os.Getenv(certFileEnv), os.Getenv(certDirEnv) defer func() { certFiles = origCertFiles certDirectories = origCertDirectories os.Setenv(certFileEnv, origFile) os.Setenv(certDirEnv, origDir) }() for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { if err := os.Setenv(certFileEnv, tc.fileEnv); err != nil { t.Fatalf("setenv %q failed: %v", certFileEnv, err) } if err := os.Setenv(certDirEnv, tc.dirEnv); err != nil { t.Fatalf("setenv %q failed: %v", certDirEnv, err) } certFiles, certDirectories = tc.files, tc.dirs r, err := loadSystemRoots() if err != nil { t.Fatal("unexpected failure:", err) } if r == nil { t.Fatal("nil roots") } // Verify that the returned certs match, otherwise report where the mismatch is. for i, cn := range tc.cns { if i >= len(r.certs) { t.Errorf("missing cert %v @ %v", cn, i) } else if r.certs[i].Subject.CommonName != cn { fmt.Printf("%#v\n", r.certs[0].Subject) t.Errorf("unexpected cert common name %q, want %q", r.certs[i].Subject.CommonName, cn) } } if len(r.certs) > len(tc.cns) { t.Errorf("got %v certs, which is more than %v wanted", len(r.certs), len(tc.cns)) } }) } }
Close