Skip to content

Commit

Permalink
Remove EVP_CHECK_DES_KEY
Browse files Browse the repository at this point in the history
Thanks to the OpenBSD community for bringing this to our attention.

Reviewed-by: Rich Salz <[email protected]>
  • Loading branch information
ekasper committed Oct 14, 2015
1 parent b84939c commit 6f73d28
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
_______________

Changes between 1.0.2 and 1.1.0 [xx XXX xxxx]
*) Remove EVP_CHECK_DES_KEY, a compile-time option that never compiled.
[Emilia Käsper]

*) Removed DES and RC4 ciphersuites from DEFAULT. Also removed RC2 although
in 1.0.2 EXPORT was already removed and the only RC2 ciphersuite is also
Expand Down
5 changes: 0 additions & 5 deletions crypto/evp/e_des.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,7 @@ static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
}
}
# endif
# ifdef EVP_CHECK_DES_KEY
if (DES_set_key_checked(deskey, dat->ks.ks) != 0)
return 0;
# else
DES_set_key_unchecked(deskey, ctx->cipher_data);
# endif
return 1;
}

Expand Down
13 changes: 0 additions & 13 deletions crypto/evp/e_des3.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,8 @@ static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
}
}
# endif
# ifdef EVP_CHECK_DES_KEY
if (DES_set_key_checked(&deskey[0], &dat->ks1)
|| DES_set_key_checked(&deskey[1], &dat->ks2))
return 0;
# else
DES_set_key_unchecked(&deskey[0], &dat->ks1);
DES_set_key_unchecked(&deskey[1], &dat->ks2);
# endif
memcpy(&dat->ks3, &dat->ks1, sizeof(dat->ks1));
return 1;
}
Expand All @@ -302,16 +296,9 @@ static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
}
}
# endif
# ifdef EVP_CHECK_DES_KEY
if (DES_set_key_checked(&deskey[0], &dat->ks1)
|| DES_set_key_checked(&deskey[1], &dat->ks2)
|| DES_set_key_checked(&deskey[2], &dat->ks3))
return 0;
# else
DES_set_key_unchecked(&deskey[0], &dat->ks1);
DES_set_key_unchecked(&deskey[1], &dat->ks2);
DES_set_key_unchecked(&deskey[2], &dat->ks3);
# endif
return 1;
}

Expand Down

0 comments on commit 6f73d28

Please sign in to comment.