Skip to content

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

Closed
@girst

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions