2016-12-10 11:26:59 +00:00
|
|
|
--- a/src/openvpn/syshead.h
|
|
|
|
+++ b/src/openvpn/syshead.h
|
2017-06-22 21:01:01 +00:00
|
|
|
@@ -597,11 +597,11 @@ socket_defined(const socket_descriptor_t
|
2016-12-10 11:26:59 +00:00
|
|
|
/*
|
|
|
|
* Should we include NTLM proxy functionality
|
|
|
|
*/
|
|
|
|
-#if defined(ENABLE_CRYPTO)
|
|
|
|
-#define NTLM 1
|
|
|
|
-#else
|
|
|
|
+//#if defined(ENABLE_CRYPTO)
|
|
|
|
+//#define NTLM 1
|
|
|
|
+//#else
|
|
|
|
#define NTLM 0
|
|
|
|
-#endif
|
|
|
|
+//#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Should we include proxy digest auth functionality
|
|
|
|
--- a/src/openvpn/crypto_mbedtls.c
|
|
|
|
+++ b/src/openvpn/crypto_mbedtls.c
|
2017-06-22 21:01:01 +00:00
|
|
|
@@ -319,6 +319,7 @@ int
|
2016-12-10 11:26:59 +00:00
|
|
|
key_des_num_cblocks(const mbedtls_cipher_info_t *kt)
|
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
+#ifdef MBEDTLS_DES_C
|
|
|
|
if (kt->type == MBEDTLS_CIPHER_DES_CBC)
|
|
|
|
{
|
|
|
|
ret = 1;
|
2017-06-22 21:01:01 +00:00
|
|
|
@@ -331,6 +332,7 @@ key_des_num_cblocks(const mbedtls_cipher
|
2016-12-10 11:26:59 +00:00
|
|
|
{
|
|
|
|
ret = 3;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
dmsg(D_CRYPTO_DEBUG, "CRYPTO INFO: n_DES_cblocks=%d", ret);
|
|
|
|
return ret;
|
2017-06-22 21:01:01 +00:00
|
|
|
@@ -339,6 +341,7 @@ key_des_num_cblocks(const mbedtls_cipher
|
2016-12-10 11:26:59 +00:00
|
|
|
bool
|
|
|
|
key_des_check(uint8_t *key, int key_len, int ndc)
|
|
|
|
{
|
|
|
|
+#ifdef MBEDTLS_DES_C
|
|
|
|
int i;
|
|
|
|
struct buffer b;
|
|
|
|
|
2017-06-22 21:01:01 +00:00
|
|
|
@@ -367,11 +370,15 @@ key_des_check(uint8_t *key, int key_len,
|
2016-12-10 11:26:59 +00:00
|
|
|
|
|
|
|
err:
|
|
|
|
return false;
|
|
|
|
+#else
|
|
|
|
+ return true;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
key_des_fixup(uint8_t *key, int key_len, int ndc)
|
|
|
|
{
|
|
|
|
+#ifdef MBEDTLS_DES_C
|
|
|
|
int i;
|
|
|
|
struct buffer b;
|
|
|
|
|
2017-06-22 21:01:01 +00:00
|
|
|
@@ -386,6 +393,7 @@ key_des_fixup(uint8_t *key, int key_len,
|
2016-12-10 11:26:59 +00:00
|
|
|
}
|
|
|
|
mbedtls_des_key_set_parity(key);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2019-11-01 23:30:02 +00:00
|
|
|
@@ -705,10 +713,12 @@ cipher_des_encrypt_ecb(const unsigned ch
|
2016-12-10 11:26:59 +00:00
|
|
|
unsigned char *src,
|
|
|
|
unsigned char *dst)
|
|
|
|
{
|
|
|
|
+#ifdef MBEDTLS_DES_C
|
|
|
|
mbedtls_des_context ctx;
|
|
|
|
|
|
|
|
ASSERT(mbed_ok(mbedtls_des_setkey_enc(&ctx, key)));
|
|
|
|
ASSERT(mbed_ok(mbedtls_des_crypt_ecb(&ctx, src, dst)));
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|