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 <levitte@openssl.org>
Wed, 28 Sep 2016 20:00:26 +0000 (22:00 +0200)
commit53a71b7429a4315f7761bea1be20a6d0b9c9a502
treec981df58626dfb32542802ecf4a691b4a067876d
parenta269e5f09a6e8f5b7a1f5ab92a90a41e61631e74
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