apps/apps.c: initialize and de-initialize engine around key loading
authorRichard Levitte <levitte@openssl.org>
Wed, 28 Sep 2016 19:28:00 +0000 (21:28 +0200)
committerRichard Levitte <richard@levitte.org>
Wed, 28 Sep 2016 19:58:50 +0000 (21:58 +0200)
commita1b791225f2913ace014071bfb9099790ef468e5
tree4a36fbc6f5549bb9c833e8adda8a2ceb86d29b02
parent8061fdc8d3048220a758ad1304669944810ac386
apps/apps.c: initialize and de-initialize engine around key loading

Before loading a key from an engine, it may need to be initialized.
When done loading the key, we must de-initialize the engine.
(if the engine is already initialized somehow, only the reference
counter will be incremented then decremented)

Reviewed-by: Stephen Henson <steve@openssl.org>
(cherry picked from commit 49e476a5382602d0bad1139d6f1f66ddbc7959d6)
apps/apps.c