From: mikeb Date: Sun, 30 Apr 2017 21:34:45 +0000 (+0000) Subject: Switch AES testcase to the new implementation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5e7b72498377080bb5a66ab633129ea70ffca9b2;p=openbsd Switch AES testcase to the new implementation OK djm@ --- diff --git a/regress/sys/crypto/aes/aestest.c b/regress/sys/crypto/aes/aestest.c index f51be2a2665..56966c67da3 100644 --- a/regress/sys/crypto/aes/aestest.c +++ b/regress/sys/crypto/aes/aestest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aestest.c,v 1.3 2015/10/23 18:44:15 mmcc Exp $ */ +/* $OpenBSD: aestest.c,v 1.4 2017/04/30 21:34:45 mikeb Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. @@ -31,7 +31,7 @@ */ #include -#include +#include #include #include #include @@ -43,17 +43,17 @@ static int docrypt(const unsigned char *key, size_t klen, const unsigned char *in, unsigned char *out, size_t len, int do_encrypt) { - rijndael_ctx ctx; + AES_CTX ctx; int error = 0; memset(&ctx, 0, sizeof(ctx)); - error = rijndael_set_key(&ctx, key, klen * 8); + error = AES_Setkey(&ctx, key, klen); if (error) return -1; if (do_encrypt) - rijndael_encrypt(&ctx, in, out); + AES_Encrypt(&ctx, in, out); else - rijndael_decrypt(&ctx, in, out); + AES_Decrypt(&ctx, in, out); return 0; }