Commit e9a5e8cc authored by David Howells's avatar David Howells

sign-file: Fix warning about BIO_reset() return value

Fix the following warning:

	scripts/sign-file.c: In function ‘main’:
	scripts/sign-file.c:188: warning: value computed is not used

whereby the result of BIO_ctrl() is cast inside of BIO_reset() to an
integer of a different size - which we're not checking but probably should.
Reported-by: default avatarJames Morris <jmorris@namei.org>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 772111ab
...@@ -185,7 +185,7 @@ int main(int argc, char **argv) ...@@ -185,7 +185,7 @@ int main(int argc, char **argv)
ERR(!b, "%s", x509_name); ERR(!b, "%s", x509_name);
x509 = d2i_X509_bio(b, NULL); /* Binary encoded X.509 */ x509 = d2i_X509_bio(b, NULL); /* Binary encoded X.509 */
if (!x509) { if (!x509) {
BIO_reset(b); ERR(BIO_reset(b) != 1, "%s", x509_name);
x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); /* PEM encoded X.509 */ x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); /* PEM encoded X.509 */
if (x509) if (x509)
drain_openssl_errors(); drain_openssl_errors();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment