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
This commit is contained in:
Simon J. Gerraty 2019-07-11 22:06:59 +00:00
parent 3f3f7c056f
commit 3ae2a848ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349924
2 changed files with 2 additions and 4 deletions

View File

@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$");
void
initialize (void)
{
#ifdef _STANDALONE
ve_trust_init();
#endif
openpgp_trust_init();
}
#else

View File

@ -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 */