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

apps/openssl: make index.txt errors more verbose #15360

Closed
wants to merge 3 commits into from

Conversation

FlorianMickler
Copy link
Contributor

openssl ca was a little bit too silent, when it couldnt parse index.txt ...

steps to reproduce: create index.txt with

echo "" > index.txt

which creates

hexdump index.txt
0000000 000a
0000001

-> a "trivial" change, tested with openssl ca to sign a csr
-> the ocsp and svr changes were only compile tested by me, but seemed to make sense. ?

History:

  • Earlier Pull Request with erronous "CLA:Trivial Line": apps/openssl: make index.txt errors more verbose #10818
    • Sadly i used the master branch for that earlier one, which i force pushed to in order to update and rebase to current master.
    • This time I used a separate branch which I will not mess about with.
    • I removed the CLA:Trivial line from them and send in an ICLA.

@paulidale @t8m

Checklist

If index.txt exists but has some problems (like for example a single \n character in it) openssl will just exit without any error message.

Bug at least expirienced twice: https://superuser.com/questions/1327848/openssl-ca-fails-after-password-without-error-message
If index.txt exists but has some problems (like for example consisting of a single \n character in it,
or some field-number error in one of the lines) openssl will just exit without any error message.
If index.txt exists but has some problems (like for example
consisting of a single \n character or number of fields wrong in one of the lines)
then openssl will just exit. This fixes it by printing an error when
load_index returns null.
@h-vetinari
Copy link
Contributor

just FYI (not least since that other PR was approved already), you could have rewound using git reflog to look up the previous commit, and then done something like

git reset --hard <hash>
git push -f origin master

@paulidale paulidale added approval: review pending This pull request needs review by a committer branch: master Merge to master branch labels May 19, 2021
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels May 21, 2021
@paulidale paulidale self-assigned this May 21, 2021
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels May 22, 2021
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request May 24, 2021
If index.txt exists but has some problems (like for example a single \n character in it) openssl will just exit without any error message.

Bug at least expirienced twice: https://superuser.com/questions/1327848/openssl-ca-fails-after-password-without-error-message

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #15360)
openssl-machine pushed a commit that referenced this pull request May 24, 2021
If index.txt exists but has some problems (like for example consisting of a single \n character in it,
or some field-number error in one of the lines) openssl will just exit without any error message.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #15360)
openssl-machine pushed a commit that referenced this pull request May 24, 2021
If index.txt exists but has some problems (like for example
consisting of a single \n character or number of fields wrong in one of the lines)
then openssl will just exit. This fixes it by printing an error when
load_index returns null.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #15360)
@t8m
Copy link
Member

t8m commented May 24, 2021

Merged to master. Thank you for your contribution.

@t8m t8m closed this May 24, 2021
devnexen pushed a commit to devnexen/openssl that referenced this pull request Jul 7, 2021
If index.txt exists but has some problems (like for example a single \n character in it) openssl will just exit without any error message.

Bug at least expirienced twice: https://superuser.com/questions/1327848/openssl-ca-fails-after-password-without-error-message

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)
devnexen pushed a commit to devnexen/openssl that referenced this pull request Jul 7, 2021
If index.txt exists but has some problems (like for example consisting of a single \n character in it,
or some field-number error in one of the lines) openssl will just exit without any error message.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)
devnexen pushed a commit to devnexen/openssl that referenced this pull request Jul 7, 2021
If index.txt exists but has some problems (like for example
consisting of a single \n character or number of fields wrong in one of the lines)
then openssl will just exit. This fixes it by printing an error when
load_index returns null.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)
deejgregor pushed a commit to deejgregor/openssl that referenced this pull request Nov 17, 2021
If index.txt exists but has some problems (like for example a single \n character in it) openssl will just exit without any error message.

Bug at least expirienced twice: https://superuser.com/questions/1327848/openssl-ca-fails-after-password-without-error-message

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)

(cherry picked from commit ca29cc1)
deejgregor pushed a commit to deejgregor/openssl that referenced this pull request Nov 17, 2021
If index.txt exists but has some problems (like for example consisting of a single \n character in it,
or some field-number error in one of the lines) openssl will just exit without any error message.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)

(cherry picked from commit 2c6e33d)
deejgregor pushed a commit to deejgregor/openssl that referenced this pull request Nov 17, 2021
If index.txt exists but has some problems (like for example
consisting of a single \n character or number of fields wrong in one of the lines)
then openssl will just exit. This fixes it by printing an error when
load_index returns null.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)

(cherry picked from commit e16d9af)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants