nts: allow missing SIV support

When compiled with NTS support, don't require a SIV cipher to be always
supported (e.g. due to a different version of a library used for
building). Handle this case with a fatal message instead of crash.
Also, check the support early in the client unit test to prevent a hang.
This commit is contained in:
Miroslav Lichvar
2020-06-03 11:03:00 +02:00
parent 15dc83420d
commit cf10ce1b68
3 changed files with 9 additions and 2 deletions

View File

@@ -67,6 +67,8 @@ NNS_Initialise(void)
server = Malloc(sizeof (struct NtsServer));
server->siv = SIV_CreateInstance(SERVER_SIV);
if (!server->siv)
LOG_FATAL("Could not initialise SIV cipher");
}
/* ================================================== */