Bug 1850183 - 0 return code when passphrase is too short
Summary: 0 return code when passphrase is too short
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sscg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-23 16:47 UTC by Branislav Náter
Modified: 2020-07-05 02:09 UTC (History)
1 user (show)

Fixed In Version: sscg-2.6.2-1.fc31 sscg-2.6.2-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-05 01:48:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Branislav Náter 2020-06-23 16:47:37 UTC
Description of problem:
sscg should return non-zero return code when passphrase is too short or long

Version-Release number of selected component (if applicable):
sscg-2.6.1-4.fc33

How reproducible:
always

Steps to Reproduce:
1. create passfile.txt with 3 char long password
2. sscg --cert-key-passfile=passfile.txt

Actual results:
:: [ 12:42:11 ] :: [  BEGIN   ] :: Error message should be printed :: actually running 'sscg --cert-key-passfile=passfile.txt'
ERROR: Passphrases must be between 4 and 1023 characters. 
Wrote service certificate key to /tmp/tmp.meGqxPqXg6/service-key.pem
Wrote service certificate to /tmp/tmp.meGqxPqXg6/service.pem
Wrote CA certificate to /tmp/tmp.meGqxPqXg6/ca.crt
:: [ 12:42:12 ] :: [   FAIL   ] :: Error message should be printed (Expected 1-255, got 0)

Expected results:
non-zero return code is returned

Comment 1 Stephen Gallagher 2020-06-23 18:00:21 UTC
Good catch. I'll get that fixed up. Thanks for the bug report!

Comment 2 Stephen Gallagher 2020-06-23 18:06:38 UTC
Huh, looks like I actually already found and fixed this upstream[1] but forgot to make a release...


[1] https://github.com/sgallagher/sscg/commit/2017d903477671e971d91e52ace7dbeb2c6bc33f

Comment 3 Fedora Update System 2020-06-26 14:15:23 UTC
FEDORA-2020-b8306350d9 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b8306350d9

Comment 4 Fedora Update System 2020-06-27 01:21:16 UTC
FEDORA-2020-322bd1dcd7 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-322bd1dcd7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-322bd1dcd7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-06-27 03:12:55 UTC
FEDORA-2020-b8306350d9 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b8306350d9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b8306350d9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-07-05 01:48:45 UTC
FEDORA-2020-322bd1dcd7 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-07-05 02:09:36 UTC
FEDORA-2020-b8306350d9 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.