Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using self-signed certificates #951

Closed
iamfinky opened this issue Jan 17, 2018 · 1 comment
Closed

Using self-signed certificates #951

iamfinky opened this issue Jan 17, 2018 · 1 comment

Comments

@iamfinky
Copy link

iamfinky commented Jan 17, 2018

Describe your problem

Dredd is unable to access our local test API as this uses self-signed SSL certificates

What command line options do you use?

$ dredd ../docs/swagger.yml https://localhost:8080

What is in your dredd.yml?

---
  swagger: "2.0"
  info:
    version: "0.1"
    title: "Dredd Test"
    license:
      name: "Proprietary"
  host: "localhost:8080"
  basePath: "/api/v1"
  schemes:
    - "https"
  consumes:
    - "application/json"
  produces:
    - "application/json"

  paths:
    /geography:
      get:
        description: "List geographies"
        parameters:
          - $ref: "#/parameters/limit"
          - $ref: "#/parameters/offset"
          - $ref: "#/parameters/sort"
          - $ref: "#/parameters/id"
          - $ref: "#/parameters/slug"
          - $ref: "#/parameters/created"
          - $ref: "#/parameters/created_gte"
          - $ref: "#/parameters/created_lte"
          -
            name: type
            in: query
            required: false
            type: string
          - $ref: "#/parameters/fields"
        responses:
          "200":
            description: "A list of geographies."

  parameters:
    limit:
      name: limit
      in: query
      required: false
      type: number
      format: int64

    offset:
      name: offset
      in: query
      required: false
      type: number
      format: int64

    sort:
      name: sort
      in: query
      required: false
      type: string

    id:
      name: id
      in: query
      required: false
      type: string

    slug:
      name: slug
      in: query
      required: false
      type: string

    created:
      name: created
      in: query
      required: false
      type: string

    created_gte:
      name: created_gte
      in: query
      required: false
      type: string

    created_lte:
      name: created_lte
      in: query
      required: false
      type: string

    fields:
      name: fields
      in: query
      required: false
      type: string

What's your dredd --version output?

dredd v4.9.1 (Darwin 17.3.0; x64)

Does dredd --level=debug uncover something?

Nothing more than standard run, other than debug output which shows:

debug: No emission of test data to reporters { Error: self signed certificate
    at TLSSocket.<anonymous> (_tls_wrap.js:1103:38)
    at emitNone (events.js:106:13)
    at TLSSocket.emit (events.js:208:7)
    at TLSSocket._finishInit (_tls_wrap.js:637:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:467:38)
 code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }

Can you send us failing test in a Pull Request?

Sadly, no

@honzajavorek
Copy link
Contributor

Hi, this is a known issue tracked in #913 / #323.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants