`keygen` script should check for openssl 1.1.1+

Description

When setting up a production server for testing, there is an error when running the keygen script:

{{$ CERT_CN=$API_GATEWAY_DOMAIN_NAME CERT_SAN="DNS:${API_GATEWAY_DOMAIN_NAME},DNS:*.${STORAGE_PROXY_DOMAIN_NAME}" ../keygen}}
{{ req: Unknown digest addext}}
{{ req: Use -help for summary.}}

Looking at this link: https://docs.joshuatz.com/cheatsheets/security/self-signed-ssl-certs/ it hints that openssl >= 1.1.1 is needed otherwise addext failures may occur. While they can be worked around, unless you specifically want to maintain compatibility with older distributions it might be easier to just do a check for 1.1.1

Affects versions

Environment

Debian Stretch x86_64

Checklist

Activity

Show:

Alex MiliukovAugust 22, 2022 at 11:52 AM

eystein.maloy.stenbergAugust 12, 2022 at 8:29 PM

Thanks for the report!
Indeed I think the "addext" usage was added after the original version check of 1.0.0 and may be that it should have been bumped.

would you be open to making a patch and PR for it? It should be quite straightforward, just add a OPENSSL_VERSION_REGEX_MINOR_BACKREF and modify the IF statement logic accordingly: https://github.com/mendersoftware/integration/blob/master/keygen#L38-L43

FYI .

Fixed

Details

Assignee

Reporter

Labels

Story Points

Priority

Days in progress

0

Fix versions

Sprint

Backlog

yes

Zendesk Support

Checklist

Created August 1, 2022 at 9:23 PM
Updated August 24, 2022 at 11:36 AM
Resolved August 24, 2022 at 11:36 AM