mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-08-21 22:56:24 +00:00
Also probe aggregated API ports in new ciphers test
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
This commit is contained in:
co-authored by
Joshua Casey
parent
75ff3efb59
commit
1f8ac0ff23
@@ -38,13 +38,16 @@ func RunNmapSSLEnum(t *testing.T, host string, port uint16) (string, string) {
|
||||
|
||||
var stdout, stderr bytes.Buffer
|
||||
//nolint:gosec // we are not performing malicious argument injection against ourselves
|
||||
cmd := exec.CommandContext(ctx, "nmap", "--script", "ssl-enum-ciphers",
|
||||
cmd := exec.CommandContext(ctx,
|
||||
"nmap",
|
||||
"-Pn",
|
||||
"--script", "+ssl-enum-ciphers",
|
||||
"-p", strconv.FormatUint(uint64(port), 10),
|
||||
host,
|
||||
)
|
||||
cmd.Stdout = &stdout
|
||||
cmd.Stderr = &stderr
|
||||
|
||||
t.Log("Running cmd: " + strings.Join(cmd.Args, " "))
|
||||
require.NoErrorf(t, cmd.Run(), "stderr:\n%s\n\nstdout:\n%s\n\n", stderr.String(), stdout.String())
|
||||
|
||||
return stdout.String(), stderr.String()
|
||||
|
||||
@@ -5,12 +5,8 @@
|
||||
|
||||
package testlib
|
||||
|
||||
import "crypto/tls"
|
||||
|
||||
// Because of a bug in nmap, the cipher suite preference is
|
||||
// incorrectly shown as 'client' in some cases.
|
||||
// in fips-only mode, it correctly shows the cipher preference
|
||||
// as 'server', while in non-fips mode it shows as 'client'.
|
||||
const DefaultCipherSuitePreference = "server"
|
||||
|
||||
const MaxTLSVersion = tls.VersionTLS12
|
||||
|
||||
@@ -5,12 +5,8 @@
|
||||
|
||||
package testlib
|
||||
|
||||
import "crypto/tls"
|
||||
|
||||
// Because of a bug in nmap, the cipher suite preference is
|
||||
// incorrectly shown as 'client' in some cases.
|
||||
// in fips-only mode, it correctly shows the cipher preference
|
||||
// as 'server', while in non-fips mode it shows as 'client'.
|
||||
const DefaultCipherSuitePreference = "client"
|
||||
|
||||
const MaxTLSVersion = tls.VersionTLS13
|
||||
|
||||
Reference in New Issue
Block a user