sbverify: clean up openssl init
Remove a duplicate call to ERR_load_crypto_strings, and move the digest init earlier. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
parent
c48e3922ca
commit
17f77a9aab
1 changed files with 1 additions and 3 deletions
|
@ -117,6 +117,7 @@ int main(int argc, char **argv)
|
||||||
certs = X509_STORE_new();
|
certs = X509_STORE_new();
|
||||||
verify = 1;
|
verify = 1;
|
||||||
|
|
||||||
|
OpenSSL_add_all_digests();
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -153,9 +154,6 @@ int main(int argc, char **argv)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
|
||||||
OpenSSL_add_all_digests();
|
|
||||||
|
|
||||||
header = image->buf + image->data_dir_sigtable->addr;
|
header = image->buf + image->data_dir_sigtable->addr;
|
||||||
buf = (void *)(header + 1);
|
buf = (void *)(header + 1);
|
||||||
p7 = d2i_PKCS7(NULL, &buf, header->size);
|
p7 = d2i_PKCS7(NULL, &buf, header->size);
|
||||||
|
|
Loading…
Reference in a new issue