In the LDAP KDB module, fix an empty initializer. In the SPAKE
edwards25519 code, use autoconf tests to determine whether to use the
64-bit code. In the SPAKE update_thash() function, make sure the
types of the conditional expression results match exactly. In
libkrb5support, link against zap.o now that k5buf.o can use zap() (as
of commit
8ee8246c14702dc03b02e31b9fb5b7c2bb674bfb).
[ghudson@mit.edu: squashed commits; rewrote commit message; adjusted
autoconf tests; minor code changes]
ticket: 8769 (new)
tags: pullup
target_version: 1.17
#include <net/route.h>
])
+# Tests for 64-bit edwards25519 code.
+AC_CHECK_SIZEOF([size_t])
+AC_CHECK_TYPES([__int128_t, __uint128_t])
+
# stuff for util/profile
# AC_KRB5_TCL already done
int i = 0;
krb5_error_code ret;
char *auth_ind = NULL;
- char *strval[10] = {};
+ char *strval[10] = { 0 };
char *ai, *ai_save = NULL;
int sv_num = sizeof(strval) / sizeof(*strval);
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
#endif
-/*
- * These preprocessor conditionals are derived the BoringSSL
- * include/openssl/base.h (OPENSSL_64_BIT) and crypto/internal.h
- * (BORINGSSL_HAS_UINT128).
- */
-#if defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || defined(__aarch64__) || ((defined(__PPC64__) || defined(__powerpc64__)) && defined(_LITTLE_ENDIAN)) || defined(__mips__) && defined(__LP64__)
-#if !defined(_MSC_VER) || defined(__clang__)
+#if SIZEOF_SIZE_T >= 8 && defined(HAVE___INT128_T) && defined(HAVE___UINT128_T)
#define BORINGSSL_CURVE25519_64BIT
typedef __int128_t int128_t;
typedef __uint128_t uint128_t;
#endif
-#endif
#ifndef EDWARDS25519_ASSERTS
#define assert_fe(f)
krb5_error_code ret;
size_t hashlen;
krb5_data dlist[3];
+ const krb5_data empty = empty_data();
if (thash->length == 0) {
/* Initialize the transcript hash to all zeros. */
/* Set up the data array and hash it with the group's hash function. */
dlist[0] = *thash;
- dlist[1] = (data1 != NULL) ? *data1 : empty_data();
- dlist[2] = (data2 != NULL) ? *data2 : empty_data();
+ dlist[1] = (data1 != NULL) ? *data1 : empty;
+ dlist[2] = (data2 != NULL) ? *data2 : empty;
return group_hash(context, gstate, group, dlist, 3,
(uint8_t *)thash->data);
}
##DOS## $(RM) libkrb5support.exports
##DOS## $(MV) new-exports libkrb5support.exports
-T_K5BUF_OBJS= t_k5buf.o k5buf.o $(PRINTF_ST_OBJ)
+T_K5BUF_OBJS= t_k5buf.o k5buf.o zap.o $(PRINTF_ST_OBJ)
t_k5buf: $(T_K5BUF_OBJS)
$(CC_LINK) -o t_k5buf $(T_K5BUF_OBJS)
t_base64: t_base64.o base64.o
$(CC_LINK) -o $@ t_base64.o base64.o
-T_JSON_OBJS= t_json.o json.o base64.o k5buf.o $(PRINTF_ST_OBJ)
+T_JSON_OBJS= t_json.o json.o base64.o k5buf.o zap.o $(PRINTF_ST_OBJ)
t_json: $(T_JSON_OBJS)
$(CC_LINK) -o $@ $(T_JSON_OBJS)
t_utf8: t_utf8.o utf8.o
$(CC_LINK) -o t_utf8 t_utf8.o utf8.o
-T_UTF16_OBJS= t_utf16.o utf8_conv.o utf8.o k5buf.o $(PRINTF_ST_OBJ)
+T_UTF16_OBJS= t_utf16.o utf8_conv.o utf8.o k5buf.o zap.o $(PRINTF_ST_OBJ)
t_utf16: $(T_UTF16_OBJS)
$(CC_LINK) -o $@ $(T_UTF16_OBJS)