How to use the k6/http.SSL_3_0 function in k6

To help you get started, we’ve selected a few k6 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github h5bp / server-configs-test / lib / ssl.js View on Github external
import * as http from 'k6/http'
import { options as defaultOptions, prepare, assert } from './abstract-test.js'

export const options = Object.assign(defaultOptions, {
  tlsVersion: {
    min: http.SSL_3_0,
    max: http.TLS_1_3
  }
})

export function setup () {
  return prepare([
    {
      name: 'intermediate policy',
      requests: ['https://secure.server.localhost/']
    }
  ])
}

export default function (data) {
  assert(data, '', () => ({
    'is TLS version secure': (r) => r.tls_version === http.TLS_1_2 || r.tls_version === http.TLS_1_3,