901-crypt_size_hack.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --- a/src/crypt/crypt_sha512.c
  2. +++ b/src/crypt/crypt_sha512.c
  3. @@ -13,6 +13,17 @@
  4. #include <string.h>
  5. #include <stdint.h>
  6. +#ifdef CRYPT_SIZE_HACK
  7. +#include <errno.h>
  8. +
  9. +char *__crypt_sha512(const char *key, const char *setting, char *output)
  10. +{
  11. + errno = ENOSYS;
  12. + return NULL;
  13. +}
  14. +
  15. +#else
  16. +
  17. /* public domain sha512 implementation based on fips180-3 */
  18. /* >=2^64 bits messages are not supported (about 2000 peta bytes) */
  19. @@ -369,3 +380,4 @@ char *__crypt_sha512(const char *key, co
  20. return "*";
  21. return p;
  22. }
  23. +#endif
  24. --- a/src/crypt/crypt_blowfish.c
  25. +++ b/src/crypt/crypt_blowfish.c
  26. @@ -50,6 +50,17 @@
  27. #include <string.h>
  28. #include <stdint.h>
  29. +#ifdef CRYPT_SIZE_HACK
  30. +#include <errno.h>
  31. +
  32. +char *__crypt_blowfish(const char *key, const char *setting, char *output)
  33. +{
  34. + errno = ENOSYS;
  35. + return NULL;
  36. +}
  37. +
  38. +#else
  39. +
  40. typedef uint32_t BF_word;
  41. typedef int32_t BF_word_signed;
  42. @@ -796,3 +807,4 @@ char *__crypt_blowfish(const char *key,
  43. return "*";
  44. }
  45. +#endif
  46. --- a/src/crypt/crypt_sha256.c
  47. +++ b/src/crypt/crypt_sha256.c
  48. @@ -13,6 +13,17 @@
  49. #include <string.h>
  50. #include <stdint.h>
  51. +#ifdef CRYPT_SIZE_HACK
  52. +#include <errno.h>
  53. +
  54. +char *__crypt_sha256(const char *key, const char *setting, char *output)
  55. +{
  56. + errno = ENOSYS;
  57. + return NULL;
  58. +}
  59. +
  60. +#else
  61. +
  62. /* public domain sha256 implementation based on fips180-3 */
  63. struct sha256 {
  64. @@ -320,3 +331,4 @@ char *__crypt_sha256(const char *key, co
  65. return "*";
  66. return p;
  67. }
  68. +#endif