diff options
Diffstat (limited to 'src/lib/libcrypto/engine/eng_padlock.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_padlock.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c index 4f2d426a06..0281ab810c 100644 --- a/src/lib/libcrypto/engine/eng_padlock.c +++ b/src/lib/libcrypto/engine/eng_padlock.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: eng_padlock.c,v 1.15 2016/11/04 13:56:05 miod Exp $ */ | 1 | /* $OpenBSD: eng_padlock.c,v 1.16 2018/04/14 07:18:37 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Support for VIA PadLock Advanced Cryptography Engine (ACE) | 3 | * Support for VIA PadLock Advanced Cryptography Engine (ACE) |
4 | * Written by Michal Ludvig <michal@logix.cz> | 4 | * Written by Michal Ludvig <michal@logix.cz> |
@@ -108,19 +108,21 @@ | |||
108 | 108 | ||
109 | #ifdef OPENSSL_NO_DYNAMIC_ENGINE | 109 | #ifdef OPENSSL_NO_DYNAMIC_ENGINE |
110 | #ifdef COMPILE_HW_PADLOCK | 110 | #ifdef COMPILE_HW_PADLOCK |
111 | static ENGINE *ENGINE_padlock (void); | 111 | static ENGINE *ENGINE_padlock(void); |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | void ENGINE_load_padlock (void) | 114 | void |
115 | ENGINE_load_padlock(void) | ||
115 | { | 116 | { |
116 | /* On non-x86 CPUs it just returns. */ | 117 | /* On non-x86 CPUs it just returns. */ |
117 | #ifdef COMPILE_HW_PADLOCK | 118 | #ifdef COMPILE_HW_PADLOCK |
118 | ENGINE *toadd = ENGINE_padlock (); | 119 | ENGINE *toadd = ENGINE_padlock(); |
119 | if (!toadd) | 120 | |
121 | if (toadd == NULL) | ||
120 | return; | 122 | return; |
121 | ENGINE_add (toadd); | 123 | ENGINE_add(toadd); |
122 | ENGINE_free (toadd); | 124 | ENGINE_free(toadd); |
123 | ERR_clear_error (); | 125 | ERR_clear_error(); |
124 | #endif | 126 | #endif |
125 | } | 127 | } |
126 | 128 | ||
@@ -203,9 +205,8 @@ ENGINE_padlock(void) | |||
203 | { | 205 | { |
204 | ENGINE *eng = ENGINE_new(); | 206 | ENGINE *eng = ENGINE_new(); |
205 | 207 | ||
206 | if (!eng) { | 208 | if (eng == NULL) |
207 | return NULL; | 209 | return NULL; |
208 | } | ||
209 | 210 | ||
210 | if (!padlock_bind_helper(eng)) { | 211 | if (!padlock_bind_helper(eng)) { |
211 | ENGINE_free(eng); | 212 | ENGINE_free(eng); |