You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

disable_digest_check.patch 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c
  2. index 42b8bb0..baaa76f 100644
  3. --- a/crypto/dsa/dsa_pmeth.c
  4. +++ b/crypto/dsa/dsa_pmeth.c
  5. @@ -174,26 +174,26 @@ static int pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
  6. return 1;
  7. case EVP_PKEY_CTRL_DSA_PARAMGEN_MD:
  8. - if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
  9. - EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
  10. - EVP_MD_type((const EVP_MD *)p2) != NID_sha256) {
  11. - DSAerr(DSA_F_PKEY_DSA_CTRL, DSA_R_INVALID_DIGEST_TYPE);
  12. - return 0;
  13. - }
  14. + // if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
  15. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
  16. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha256) {
  17. + // DSAerr(DSA_F_PKEY_DSA_CTRL, DSA_R_INVALID_DIGEST_TYPE);
  18. + // return 0;
  19. + // }
  20. dctx->md = p2;
  21. return 1;
  22. case EVP_PKEY_CTRL_MD:
  23. - if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
  24. - EVP_MD_type((const EVP_MD *)p2) != NID_dsa &&
  25. - EVP_MD_type((const EVP_MD *)p2) != NID_dsaWithSHA &&
  26. - EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
  27. - EVP_MD_type((const EVP_MD *)p2) != NID_sha256 &&
  28. - EVP_MD_type((const EVP_MD *)p2) != NID_sha384 &&
  29. - EVP_MD_type((const EVP_MD *)p2) != NID_sha512) {
  30. - DSAerr(DSA_F_PKEY_DSA_CTRL, DSA_R_INVALID_DIGEST_TYPE);
  31. - return 0;
  32. - }
  33. + // if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
  34. + // EVP_MD_type((const EVP_MD *)p2) != NID_dsa &&
  35. + // EVP_MD_type((const EVP_MD *)p2) != NID_dsaWithSHA &&
  36. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
  37. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha256 &&
  38. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha384 &&
  39. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha512) {
  40. + // DSAerr(DSA_F_PKEY_DSA_CTRL, DSA_R_INVALID_DIGEST_TYPE);
  41. + // return 0;
  42. + // }
  43. dctx->md = p2;
  44. return 1;
  45. diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c
  46. index b767490..70eea17 100644
  47. --- a/crypto/ec/ec_pmeth.c
  48. +++ b/crypto/ec/ec_pmeth.c
  49. @@ -379,15 +379,15 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
  50. return dctx->kdf_ukmlen;
  51. case EVP_PKEY_CTRL_MD:
  52. - if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
  53. - EVP_MD_type((const EVP_MD *)p2) != NID_ecdsa_with_SHA1 &&
  54. - EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
  55. - EVP_MD_type((const EVP_MD *)p2) != NID_sha256 &&
  56. - EVP_MD_type((const EVP_MD *)p2) != NID_sha384 &&
  57. - EVP_MD_type((const EVP_MD *)p2) != NID_sha512) {
  58. - ECerr(EC_F_PKEY_EC_CTRL, EC_R_INVALID_DIGEST_TYPE);
  59. - return 0;
  60. - }
  61. + // if (EVP_MD_type((const EVP_MD *)p2) != NID_sha1 &&
  62. + // EVP_MD_type((const EVP_MD *)p2) != NID_ecdsa_with_SHA1 &&
  63. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha224 &&
  64. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha256 &&
  65. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha384 &&
  66. + // EVP_MD_type((const EVP_MD *)p2) != NID_sha512) {
  67. + // ECerr(EC_F_PKEY_EC_CTRL, EC_R_INVALID_DIGEST_TYPE);
  68. + // return 0;
  69. + // }
  70. dctx->md = p2;
  71. return 1;