Commit 54e1450a authored by Niels Möller's avatar Niels Möller

Undo added underscores on public symbols.

parent b84dff15
2017-10-23 Niels Möller <nisse@lysator.liu.se>
Undo added underscores on public symbols.
2017-04-09 Niels Möller <nisse@lysator.liu.se> 2017-04-09 Niels Möller <nisse@lysator.liu.se>
* ecc-curve.h (nettle_get_secp_192r1, nettle_get_secp_224r1) * ecc-curve.h (nettle_get_secp_192r1, nettle_get_secp_224r1)
......
...@@ -110,7 +110,7 @@ ecc_192_modp (const struct ecc_modulo *m UNUSED, mp_limb_t *rp) ...@@ -110,7 +110,7 @@ ecc_192_modp (const struct ecc_modulo *m UNUSED, mp_limb_t *rp)
#define ecc_192_modp ecc_mod #define ecc_192_modp ecc_mod
#endif #endif
const struct ecc_curve _nettle_secp_192r1 = const struct ecc_curve nettle_secp_192r1 =
{ {
{ {
192, 192,
...@@ -174,5 +174,5 @@ const struct ecc_curve _nettle_secp_192r1 = ...@@ -174,5 +174,5 @@ const struct ecc_curve _nettle_secp_192r1 =
const struct ecc_curve *nettle_get_secp_192r1(void) const struct ecc_curve *nettle_get_secp_192r1(void)
{ {
return &_nettle_secp_192r1; return &nettle_secp_192r1;
} }
...@@ -62,7 +62,7 @@ ecc_224_modp (const struct ecc_modulo *m, mp_limb_t *rp); ...@@ -62,7 +62,7 @@ ecc_224_modp (const struct ecc_modulo *m, mp_limb_t *rp);
# error Configuration error # error Configuration error
#endif #endif
const struct ecc_curve _nettle_secp_224r1 = const struct ecc_curve nettle_secp_224r1 =
{ {
{ {
224, 224,
...@@ -126,5 +126,5 @@ const struct ecc_curve _nettle_secp_224r1 = ...@@ -126,5 +126,5 @@ const struct ecc_curve _nettle_secp_224r1 =
const struct ecc_curve *nettle_get_secp_224r1(void) const struct ecc_curve *nettle_get_secp_224r1(void)
{ {
return &_nettle_secp_224r1; return &nettle_secp_224r1;
} }
...@@ -239,7 +239,7 @@ ecc_256_modq (const struct ecc_modulo *q, mp_limb_t *rp) ...@@ -239,7 +239,7 @@ ecc_256_modq (const struct ecc_modulo *q, mp_limb_t *rp)
#error Unsupported parameters #error Unsupported parameters
#endif #endif
const struct ecc_curve _nettle_secp_256r1 = const struct ecc_curve nettle_secp_256r1 =
{ {
{ {
256, 256,
...@@ -303,5 +303,5 @@ const struct ecc_curve _nettle_secp_256r1 = ...@@ -303,5 +303,5 @@ const struct ecc_curve _nettle_secp_256r1 =
const struct ecc_curve *nettle_get_secp_256r1(void) const struct ecc_curve *nettle_get_secp_256r1(void)
{ {
return &_nettle_secp_256r1; return &nettle_secp_256r1;
} }
...@@ -147,7 +147,7 @@ ecc_384_modp (const struct ecc_modulo *p, mp_limb_t *rp) ...@@ -147,7 +147,7 @@ ecc_384_modp (const struct ecc_modulo *p, mp_limb_t *rp)
#define ecc_384_modp ecc_mod #define ecc_384_modp ecc_mod
#endif #endif
const struct ecc_curve _nettle_secp_384r1 = const struct ecc_curve nettle_secp_384r1 =
{ {
{ {
384, 384,
...@@ -211,5 +211,5 @@ const struct ecc_curve _nettle_secp_384r1 = ...@@ -211,5 +211,5 @@ const struct ecc_curve _nettle_secp_384r1 =
const struct ecc_curve *nettle_get_secp_384r1(void) const struct ecc_curve *nettle_get_secp_384r1(void)
{ {
return &_nettle_secp_384r1; return &nettle_secp_384r1;
} }
...@@ -75,7 +75,7 @@ ecc_521_modp (const struct ecc_modulo *m UNUSED, mp_limb_t *rp) ...@@ -75,7 +75,7 @@ ecc_521_modp (const struct ecc_modulo *m UNUSED, mp_limb_t *rp)
} }
#endif #endif
const struct ecc_curve _nettle_secp_521r1 = const struct ecc_curve nettle_secp_521r1 =
{ {
{ {
521, 521,
...@@ -139,5 +139,5 @@ const struct ecc_curve _nettle_secp_521r1 = ...@@ -139,5 +139,5 @@ const struct ecc_curve _nettle_secp_521r1 =
const struct ecc_curve *nettle_get_secp_521r1(void) const struct ecc_curve *nettle_get_secp_521r1(void)
{ {
return &_nettle_secp_521r1; return &nettle_secp_521r1;
} }
...@@ -73,11 +73,20 @@ ...@@ -73,11 +73,20 @@
#define sec_modinv _nettle_sec_modinv #define sec_modinv _nettle_sec_modinv
#define curve25519_eh_to_x _nettle_curve25519_eh_to_x #define curve25519_eh_to_x _nettle_curve25519_eh_to_x
extern const struct ecc_curve _nettle_secp_192r1; /* FIXME: Rename with leading underscore, but keep current name (and
extern const struct ecc_curve _nettle_secp_224r1; size!) for now, for ABI compatibility with nettle-3.1, soname
extern const struct ecc_curve _nettle_secp_256r1; libhogweed.so.4. */
extern const struct ecc_curve _nettle_secp_384r1; #undef nettle_secp_192r1
extern const struct ecc_curve _nettle_secp_521r1; #undef nettle_secp_224r1
#undef nettle_secp_256r1
#undef nettle_secp_384r1
#undef nettle_secp_521r1
extern const struct ecc_curve nettle_secp_192r1;
extern const struct ecc_curve nettle_secp_224r1;
extern const struct ecc_curve nettle_secp_256r1;
extern const struct ecc_curve nettle_secp_384r1;
extern const struct ecc_curve nettle_secp_521r1;
/* Keep this structure internal for now. It's misnamed (since it's /* Keep this structure internal for now. It's misnamed (since it's
really implementing the equivalent twisted Edwards curve, with really implementing the equivalent twisted Edwards curve, with
......
...@@ -330,12 +330,12 @@ bench_curve (const struct ecc_curve *ecc) ...@@ -330,12 +330,12 @@ bench_curve (const struct ecc_curve *ecc)
} }
const struct ecc_curve * const curves[] = { const struct ecc_curve * const curves[] = {
&_nettle_secp_192r1, &nettle_secp_192r1,
&_nettle_secp_224r1, &nettle_secp_224r1,
&_nettle_curve25519, &_nettle_curve25519,
&_nettle_secp_256r1, &nettle_secp_256r1,
&_nettle_secp_384r1, &nettle_secp_384r1,
&_nettle_secp_521r1, &nettle_secp_521r1,
}; };
#define numberof(x) (sizeof (x) / sizeof ((x)[0])) #define numberof(x) (sizeof (x) / sizeof ((x)[0]))
......
...@@ -38,9 +38,7 @@ ...@@ -38,9 +38,7 @@
#include "nettle-meta.h" #include "nettle-meta.h"
/* Direct access to the array. */
#undef nettle_hashes #undef nettle_hashes
#define nettle_hashes _nettle_hashes
const struct nettle_hash * const struct nettle_hash *
nettle_lookup_hash (const char *name) nettle_lookup_hash (const char *name)
......
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
#include "nettle-meta.h" #include "nettle-meta.h"
const struct nettle_aead * const _nettle_aeads[] = { #undef nettle_aeads
const struct nettle_aead * const nettle_aeads[] = {
&nettle_gcm_aes128, &nettle_gcm_aes128,
&nettle_gcm_aes192, &nettle_gcm_aes192,
&nettle_gcm_aes256, &nettle_gcm_aes256,
...@@ -51,5 +53,5 @@ const struct nettle_aead * const _nettle_aeads[] = { ...@@ -51,5 +53,5 @@ const struct nettle_aead * const _nettle_aeads[] = {
const struct nettle_aead * const * const struct nettle_aead * const *
nettle_get_aeads (void) nettle_get_aeads (void)
{ {
return _nettle_aeads; return nettle_aeads;
} }
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
#include <stddef.h> #include <stddef.h>
#include "nettle-meta.h" #include "nettle-meta.h"
const struct nettle_armor * const _nettle_armors[] = { #undef nettle_armors
const struct nettle_armor * const nettle_armors[] = {
&nettle_base64, &nettle_base64,
&nettle_base64url, &nettle_base64url,
&nettle_base16, &nettle_base16,
...@@ -46,5 +48,5 @@ const struct nettle_armor * const _nettle_armors[] = { ...@@ -46,5 +48,5 @@ const struct nettle_armor * const _nettle_armors[] = {
const struct nettle_armor * const * const struct nettle_armor * const *
nettle_get_armors (void) nettle_get_armors (void)
{ {
return _nettle_armors; return nettle_armors;
} }
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
#include <stddef.h> #include <stddef.h>
#include "nettle-meta.h" #include "nettle-meta.h"
const struct nettle_cipher * const _nettle_ciphers[] = { #undef nettle_ciphers
const struct nettle_cipher * const nettle_ciphers[] = {
&nettle_aes128, &nettle_aes128,
&nettle_aes192, &nettle_aes192,
&nettle_aes256, &nettle_aes256,
...@@ -60,5 +62,5 @@ const struct nettle_cipher * const _nettle_ciphers[] = { ...@@ -60,5 +62,5 @@ const struct nettle_cipher * const _nettle_ciphers[] = {
const struct nettle_cipher * const * const struct nettle_cipher * const *
nettle_get_ciphers (void) nettle_get_ciphers (void)
{ {
return _nettle_ciphers; return nettle_ciphers;
} }
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
#include "nettle-meta.h" #include "nettle-meta.h"
const struct nettle_hash * const _nettle_hashes[] = { #undef nettle_hashes
const struct nettle_hash * const nettle_hashes[] = {
&nettle_md2, &nettle_md2,
&nettle_md4, &nettle_md4,
&nettle_md5, &nettle_md5,
...@@ -57,5 +59,5 @@ const struct nettle_hash * const _nettle_hashes[] = { ...@@ -57,5 +59,5 @@ const struct nettle_hash * const _nettle_hashes[] = {
const struct nettle_hash * const * const struct nettle_hash * const *
nettle_get_hashes (void) nettle_get_hashes (void)
{ {
return _nettle_hashes; return nettle_hashes;
} }
...@@ -60,8 +60,11 @@ struct nettle_cipher ...@@ -60,8 +60,11 @@ struct nettle_cipher
nettle_cipher_func *decrypt; nettle_cipher_func *decrypt;
}; };
/* FIXME: Rename with leading underscore, but keep current name (and
size!) for now, for ABI compatibility with nettle-3.1, soname
libnettle.so.6. */
/* null-terminated list of ciphers implemented by this version of nettle */ /* null-terminated list of ciphers implemented by this version of nettle */
extern const struct nettle_cipher * const _nettle_ciphers[]; extern const struct nettle_cipher * const nettle_ciphers[];
const struct nettle_cipher * const * const struct nettle_cipher * const *
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -122,8 +125,11 @@ struct nettle_hash ...@@ -122,8 +125,11 @@ struct nettle_hash
(nettle_hash_digest_func *) name##_digest \ (nettle_hash_digest_func *) name##_digest \
} }
/* FIXME: Rename with leading underscore, but keep current name (and
size!) for now, for ABI compatibility with nettle-3.1, soname
libnettle.so.6. */
/* null-terminated list of digests implemented by this version of nettle */ /* null-terminated list of digests implemented by this version of nettle */
extern const struct nettle_hash * const _nettle_hashes[]; extern const struct nettle_hash * const nettle_hashes[];
const struct nettle_hash * const * const struct nettle_hash * const *
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -174,9 +180,12 @@ struct nettle_aead ...@@ -174,9 +180,12 @@ struct nettle_aead
nettle_hash_digest_func *digest; nettle_hash_digest_func *digest;
}; };
/* FIXME: Rename with leading underscore, but keep current name (and
size!) for now, for ABI compatibility with nettle-3.1, soname
libnettle.so.6. */
/* null-terminated list of aead constructions implemented by this /* null-terminated list of aead constructions implemented by this
version of nettle */ version of nettle */
extern const struct nettle_aead * const _nettle_aeads[]; extern const struct nettle_aead * const nettle_aeads[];
const struct nettle_aead * const * const struct nettle_aead * const *
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -243,8 +252,11 @@ struct nettle_armor ...@@ -243,8 +252,11 @@ struct nettle_armor
(nettle_armor_decode_final_func *) name##_decode_final, \ (nettle_armor_decode_final_func *) name##_decode_final, \
} }
/* FIXME: Rename with leading underscore, but keep current name (and
size!) for now, for ABI compatibility with nettle-3.1, soname
libnettle.so.6. */
/* null-terminated list of armor schemes implemented by this version of nettle */ /* null-terminated list of armor schemes implemented by this version of nettle */
extern const struct nettle_armor * const _nettle_armors[]; extern const struct nettle_armor * const nettle_armors[];
const struct nettle_armor * const * const struct nettle_armor * const *
#ifdef __GNUC__ #ifdef __GNUC__
......
...@@ -121,9 +121,10 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \ ...@@ -121,9 +121,10 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
# data. # data.
VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
# The PATH update is for locating dlls on w*ndows. # The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
check: $(TS_ALL) check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \ LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \
srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \ EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \
$(top_srcdir)/run-tests $(TS_ALL) $(top_srcdir)/run-tests $(TS_ALL)
......
...@@ -1212,11 +1212,11 @@ test_dsa_key(const struct dsa_params *params, ...@@ -1212,11 +1212,11 @@ test_dsa_key(const struct dsa_params *params,
} }
const struct ecc_curve * const ecc_curves[] = { const struct ecc_curve * const ecc_curves[] = {
&_nettle_secp_192r1, &nettle_secp_192r1,
&_nettle_secp_224r1, &nettle_secp_224r1,
&_nettle_secp_256r1, &nettle_secp_256r1,
&_nettle_secp_384r1, &nettle_secp_384r1,
&_nettle_secp_521r1, &nettle_secp_521r1,
&_nettle_curve25519, &_nettle_curve25519,
NULL NULL
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment