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

Error using 'dgst' with empty inputfile #106

Closed
VeronikaNguyen opened this issue Feb 1, 2023 · 3 comments · Fixed by #107
Closed

Error using 'dgst' with empty inputfile #106

VeronikaNguyen opened this issue Feb 1, 2023 · 3 comments · Fixed by #107

Comments

@VeronikaNguyen
Copy link
Contributor

VeronikaNguyen commented Feb 1, 2023

I built the provider in msys mingw64 under Windows 11.

When running the commands

set OPENSSL=[path_to]\openssl.exe
set OPENSSL_CONF=[path_to]\openssl.cfg
set ALGO=falcon1024
set KEY=falcon1024_srv.key
set PUBKEY=falcon1024_srv.pubkey
set CERT=falcon1024_srv.crt
set ISSUERCERT=falcon1024_CA.crt
set ISSUERKEY=falcon1024_CA.key
:: Issuer Cert & Key
%OPENSSL% req -x509 -new -newkey %ALGO% -keyout %ISSUERKEY% -out %ISSUERCERT% -nodes -subj "/CN=oqstest CA" -days 365
:: Subject Key & csr
%OPENSSL% req -new -newkey %ALGO% -keyout %KEY% -out %ALGO%_srv.csr -nodes -subj "/CN=oqstest server"
:: Subject Cert
%OPENSSL% x509 -req -in %ALGO%_srv.csr -out %CERT% -CA %ISSUERCERT% -CAkey %ISSUERKEY% -CAcreateserial -days 365
:: Subject Pub Key
%OPENSSL% x509 -in %CERT% -pubkey -noout > %PUBKEY%
:: Sign / Verify
%OPENSSL% dgst -sign %KEY% -out dgstsignfile inputfile
%OPENSSL% dgst -signature dgstsignfile -verify %PUBKEY% inputfile

with empty inputfile, the following error occurs
9CDB0000:error:4000000D:lib(128):oqs_sig_verify:reason(13):C:/projects/openssl_jetzt_tuts/oqs_provider/oqsprov/oqs_sig.c:335: 9CDB0000:error:0300009E:digital envelope routines:do_sigver_init:no default digest:crypto/evp/m_sigver.c:277:.

This error does not occur when using a non-empty inputfile. Is the behaviour on empty inputfiles intended?

@baentsch
Copy link
Member

baentsch commented Feb 3, 2023

Thanks for this thorough report.

Is the behaviour on empty inputfiles intended?

This behaviour is definitely not intended. It can be reproduced also under Linux. Will debug into this: Stay tuned...

@baentsch
Copy link
Member

baentsch commented Feb 4, 2023

@VeronikaNguyen , fyi, found a stupid oversight triggering this behaviour. See the diff in #107 .

@VeronikaNguyen
Copy link
Contributor Author

@baentsch Awesome, thank you for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants