summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/src/crypto/aes/aes_wrap.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libssl/src/crypto/aes/aes_wrap.c b/src/lib/libssl/src/crypto/aes/aes_wrap.c
index 668978425a..40533440bf 100644
--- a/src/lib/libssl/src/crypto/aes/aes_wrap.c
+++ b/src/lib/libssl/src/crypto/aes/aes_wrap.c
@@ -231,19 +231,33 @@ main(int argc, char **argv)
231 }; 231 };
232 232
233 AES_KEY wctx, xctx; 233 AES_KEY wctx, xctx;
234 int ret; 234 int ret, nfailures = 0;
235 ret = AES_wrap_unwrap_test(kek, 128, NULL, e1, key, 16); 235 ret = AES_wrap_unwrap_test(kek, 128, NULL, e1, key, 16);
236 if (ret == 0)
237 nfailures++;
236 fprintf(stderr, "Key test result %d\n", ret); 238 fprintf(stderr, "Key test result %d\n", ret);
237 ret = AES_wrap_unwrap_test(kek, 192, NULL, e2, key, 16); 239 ret = AES_wrap_unwrap_test(kek, 192, NULL, e2, key, 16);
240 if (ret == 0)
241 nfailures++;
238 fprintf(stderr, "Key test result %d\n", ret); 242 fprintf(stderr, "Key test result %d\n", ret);
239 ret = AES_wrap_unwrap_test(kek, 256, NULL, e3, key, 16); 243 ret = AES_wrap_unwrap_test(kek, 256, NULL, e3, key, 16);
244 if (ret == 0)
245 nfailures++;
240 fprintf(stderr, "Key test result %d\n", ret); 246 fprintf(stderr, "Key test result %d\n", ret);
241 ret = AES_wrap_unwrap_test(kek, 192, NULL, e4, key, 24); 247 ret = AES_wrap_unwrap_test(kek, 192, NULL, e4, key, 24);
248 if (ret == 0)
249 nfailures++;
242 fprintf(stderr, "Key test result %d\n", ret); 250 fprintf(stderr, "Key test result %d\n", ret);
243 ret = AES_wrap_unwrap_test(kek, 256, NULL, e5, key, 24); 251 ret = AES_wrap_unwrap_test(kek, 256, NULL, e5, key, 24);
252 if (ret == 0)
253 nfailures++;
244 fprintf(stderr, "Key test result %d\n", ret); 254 fprintf(stderr, "Key test result %d\n", ret);
245 ret = AES_wrap_unwrap_test(kek, 256, NULL, e6, key, 32); 255 ret = AES_wrap_unwrap_test(kek, 256, NULL, e6, key, 32);
256 if (ret == 0)
257 nfailures++;
246 fprintf(stderr, "Key test result %d\n", ret); 258 fprintf(stderr, "Key test result %d\n", ret);
259
260 return nfailures;
247} 261}
248 262
249#endif 263#endif