Skip to content

ncat --ssl -l: temporary certificate is only valid for 60 seconds #2167

Closed

Description

@girst

Describe the bug
The temporary certificates generated by --ssl are only valid for 60 seconds. they should be valid for 1 year.

It looks like the error is here

|| X509_gmtime_adj(ta, 60) == 0
, where the magic number 60 is used instead of the previously defined enum value.

To Reproduce

ncat --ssl -l 1234 & sleep 65; openssl s_client -quiet -connect localhost:1234

Expected behavior

The certificate should be valid for one year (or at least, more than 60 seconds).

Version info (please complete the following information):

  • OS: RHEL8, but using the nmap-ncat package from nmap.org/dist
  • Output of ncat --version: Ncat: Version 7.91 ( https://nmap.org/ncat )

Additional context

Activity

  1. added 3 commits that reference this issue on Nov 1, 2020
    ecc20f3
    7181bc5
    0e0d484
  2. self-assigned this
    on Dec 23, 2020
  3. deleted a comment from on Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions