提交 366448ec 编写于 作者: D Dr. Stephen Henson

reformat evp_test.c

Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 2207ba7b
...@@ -333,12 +333,12 @@ static int find_key(EVP_PKEY **ppk, const char *name, struct key_list *lst) ...@@ -333,12 +333,12 @@ static int find_key(EVP_PKEY **ppk, const char *name, struct key_list *lst)
static void free_key_list(struct key_list *lst) static void free_key_list(struct key_list *lst)
{ {
while (lst != NULL) { while (lst != NULL) {
struct key_list *ltmp; struct key_list *ltmp;
EVP_PKEY_free(lst->key); EVP_PKEY_free(lst->key);
OPENSSL_free(lst->name); OPENSSL_free(lst->name);
ltmp = lst->next; ltmp = lst->next;
OPENSSL_free(lst); OPENSSL_free(lst);
lst = ltmp; lst = ltmp;
} }
} }
...@@ -346,7 +346,7 @@ static int check_unsupported() ...@@ -346,7 +346,7 @@ static int check_unsupported()
{ {
long err = ERR_peek_error(); long err = ERR_peek_error();
if (ERR_GET_LIB(err) == ERR_LIB_EVP if (ERR_GET_LIB(err) == ERR_LIB_EVP
&& ERR_GET_REASON(err) == EVP_R_UNSUPPORTED_ALGORITHM) { && ERR_GET_REASON(err) == EVP_R_UNSUPPORTED_ALGORITHM) {
ERR_clear_error(); ERR_clear_error();
return 1; return 1;
} }
...@@ -483,7 +483,7 @@ int main(int argc, char **argv) ...@@ -483,7 +483,7 @@ int main(int argc, char **argv)
ERR_load_crypto_strings(); ERR_load_crypto_strings();
OpenSSL_add_all_algorithms(); OpenSSL_add_all_algorithms();
memset(&t,0,sizeof(t)); memset(&t, 0, sizeof(t));
t.meth = NULL; t.meth = NULL;
t.public = NULL; t.public = NULL;
t.private = NULL; t.private = NULL;
...@@ -769,7 +769,7 @@ static int cipher_test_enc(struct evp_test *t, int enc) ...@@ -769,7 +769,7 @@ static int cipher_test_enc(struct evp_test *t, int enc)
} }
if (tag || cdat->aead != EVP_CIPH_GCM_MODE) { if (tag || cdat->aead != EVP_CIPH_GCM_MODE) {
if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG,
cdat->tag_len, tag)) cdat->tag_len, tag))
goto err; goto err;
} }
} }
...@@ -784,8 +784,8 @@ static int cipher_test_enc(struct evp_test *t, int enc) ...@@ -784,8 +784,8 @@ static int cipher_test_enc(struct evp_test *t, int enc)
if (!enc && cdat->aead == EVP_CIPH_OCB_MODE) { if (!enc && cdat->aead == EVP_CIPH_OCB_MODE) {
if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG,
cdat->tag_len, cdat->tag)) { cdat->tag_len, cdat->tag)) {
err = "TAG_SET_ERROR"; err = "TAG_SET_ERROR";
goto err; goto err;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册