From 6757eee21fd301be64cb6f3a8fbee19b76e201c1 Mon Sep 17 00:00:00 2001
From: Ivan Deniskin <ivanmordwin@yandex.ru>
Date: Fri, 29 Jun 2018 19:04:28 +0300
Subject: [PATCH] Build error fixes

---
 crypto/dap_enc_sidh16.c | 61 -----------------------------------------
 http/dap_http_client.c  |  5 ++--
 2 files changed, 3 insertions(+), 63 deletions(-)

diff --git a/crypto/dap_enc_sidh16.c b/crypto/dap_enc_sidh16.c
index 7a02729..4c7b475 100644
--- a/crypto/dap_enc_sidh16.c
+++ b/crypto/dap_enc_sidh16.c
@@ -280,65 +280,4 @@ size_t dap_enc_sidh16_decode(struct dap_enc_key *a_key, const void *a_in, size_t
 }
 
 
-int OQS_KEX_sidh_cln16_alice_1(OQS_KEX *k, const void *alice_priv, const uint8_t *bob_msg, const size_t bob_msg_len, uint8_t **key, size_t *key_len) {
-
-    int ret;
-    // decompression values
-    unsigned char *R = NULL, *A = NULL;
-
-    if (!k || !alice_priv || !bob_msg || !key || !key_len) {
-        return 0;
-    }
-
-    *key = NULL;
-
-    int compressed = isCompressed(k->named_parameters);
-
-    *key = malloc(SIDH_SHAREDKEY_LEN);
-    if (*key == NULL) {
-        goto err;
-    }
-    *key_len = SIDH_SHAREDKEY_LEN;
-
-    if (compressed) {
-        if (bob_msg_len != SIDH_COMPRESSED_PUBKEY_LEN) {
-            goto err;
-        }
-        A = malloc(SIDH_COMPRESSED_A_LEN);
-        if (A == NULL) {
-            goto err;
-        }
-        R = malloc(SIDH_COMPRESSED_R_LEN);
-        if (R == NULL) {
-            goto err;
-        }
-        // compute Alice's shared secret
-        oqs_sidh_cln16_PublicKeyBDecompression_A((unsigned char *) alice_priv, (unsigned char *) bob_msg, R, A, k->ctx);
-        if (oqs_sidh_cln16_EphemeralSecretAgreement_Compression_A((unsigned char *) alice_priv, R, A, (unsigned char *) *key, k->ctx) != SIDH_CRYPTO_SUCCESS) {
-            goto err;
-        }
-    } else {
-        if (bob_msg_len != SIDH_PUBKEY_LEN) {
-            goto err;
-        }
-        if (oqs_sidh_cln16_EphemeralSecretAgreement_A((unsigned char *) alice_priv, (unsigned char *) bob_msg, (unsigned char *) *key, k->ctx) != SIDH_CRYPTO_SUCCESS) {
-            goto err;
-        }
-    }
-
-    ret = 1;
-    goto cleanup;
-
-err:
-    ret = 0;
-    DAP_DELETE(*key);
-    *key = NULL;
-
-cleanup:
-    DAP_DELETE(A);
-    DAP_DELETE(R);
-
-    return ret;
-}
-
 
diff --git a/http/dap_http_client.c b/http/dap_http_client.c
index 7739605..329ad07 100644
--- a/http/dap_http_client.c
+++ b/http/dap_http_client.c
@@ -25,11 +25,12 @@
 #include <libgen.h>
 #include "dap_common.h"
 #include "dap_client_remote.h"
-#include "dap_http.h"
 
 #ifdef DAP_SERVER
-#include "../../libdap-server/core_server/dap_server.h"
+#include "dap_server.h"
+#include "dap_http.h"
 #endif
+
 #include "dap_http_header.h"
 #include "dap_http_client.h"
 
-- 
GitLab