aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2019-07-11 22:06:59 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2019-07-11 22:06:59 +0000
commit3ae2a848aeea53aedf625bdb540ad9a5a4a42551 (patch)
tree45dd8d2fd89f4e7cd379e192ec065a9155e999ee /lib
parent3f3f7c056fe531e4097a6c3d625b4efd3233555f (diff)
downloadsrc-3ae2a848aeea53aedf625bdb540ad9a5a4a42551.tar.gz
src-3ae2a848aeea53aedf625bdb540ad9a5a4a42551.zip
libsecureboot: avoid recusion in ve_trust_init
set our guard value immediately. also replace call to ve_trust_init in opgp_sig.c:initialize with call to openpgp_trust_init. Reported by: mindal@semihalf.com Reviewed by: jhibbits obrien MFC after: 1 week
Notes
Notes: svn path=/head/; revision=349924
Diffstat (limited to 'lib')
-rw-r--r--lib/libsecureboot/openpgp/opgp_sig.c4
-rw-r--r--lib/libsecureboot/vets.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/libsecureboot/openpgp/opgp_sig.c b/lib/libsecureboot/openpgp/opgp_sig.c
index df4c33e6405d..c16d8974e8a3 100644
--- a/lib/libsecureboot/openpgp/opgp_sig.c
+++ b/lib/libsecureboot/openpgp/opgp_sig.c
@@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$");
void
initialize (void)
{
-#ifdef _STANDALONE
- ve_trust_init();
-#endif
+ openpgp_trust_init();
}
#else
diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c
index 87fb190577eb..bc654f1129e0 100644
--- a/lib/libsecureboot/vets.c
+++ b/lib/libsecureboot/vets.c
@@ -345,7 +345,7 @@ ve_trust_init(void)
if (once >= 0)
return (once);
-
+ once = 0; /* to be sure */
ve_utc_set(time(NULL));
#ifdef BUILD_UTC
ve_utc_set(BUILD_UTC); /* just in case */