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.

74 lines
1.6 KiB

  1. --- a/src/openvpn/syshead.h
  2. +++ b/src/openvpn/syshead.h
  3. @@ -572,7 +572,7 @@ socket_defined(const socket_descriptor_t
  4. /*
  5. * Should we include NTLM proxy functionality
  6. */
  7. -#define NTLM 1
  8. +//#define NTLM 1
  9. /*
  10. * Should we include proxy digest auth functionality
  11. --- a/src/openvpn/crypto_mbedtls.c
  12. +++ b/src/openvpn/crypto_mbedtls.c
  13. @@ -383,6 +383,7 @@ int
  14. key_des_num_cblocks(const mbedtls_cipher_info_t *kt)
  15. {
  16. int ret = 0;
  17. +#ifdef MBEDTLS_DES_C
  18. if (kt->type == MBEDTLS_CIPHER_DES_CBC)
  19. {
  20. ret = 1;
  21. @@ -395,6 +396,7 @@ key_des_num_cblocks(const mbedtls_cipher
  22. {
  23. ret = 3;
  24. }
  25. +#endif
  26. dmsg(D_CRYPTO_DEBUG, "CRYPTO INFO: n_DES_cblocks=%d", ret);
  27. return ret;
  28. @@ -403,6 +405,7 @@ key_des_num_cblocks(const mbedtls_cipher
  29. bool
  30. key_des_check(uint8_t *key, int key_len, int ndc)
  31. {
  32. +#ifdef MBEDTLS_DES_C
  33. int i;
  34. struct buffer b;
  35. @@ -431,11 +434,15 @@ key_des_check(uint8_t *key, int key_len,
  36. err:
  37. return false;
  38. +#else
  39. + return true;
  40. +#endif
  41. }
  42. void
  43. key_des_fixup(uint8_t *key, int key_len, int ndc)
  44. {
  45. +#ifdef MBEDTLS_DES_C
  46. int i;
  47. struct buffer b;
  48. @@ -450,6 +457,7 @@ key_des_fixup(uint8_t *key, int key_len,
  49. }
  50. mbedtls_des_key_set_parity(key);
  51. }
  52. +#endif
  53. }
  54. /*
  55. @@ -770,10 +778,12 @@ cipher_des_encrypt_ecb(const unsigned ch
  56. unsigned char *src,
  57. unsigned char *dst)
  58. {
  59. +#ifdef MBEDTLS_DES_C
  60. mbedtls_des_context ctx;
  61. ASSERT(mbed_ok(mbedtls_des_setkey_enc(&ctx, key)));
  62. ASSERT(mbed_ok(mbedtls_des_crypt_ecb(&ctx, src, dst)));
  63. +#endif
  64. }