]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Undo added underscores on public symbols.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 23 Oct 2017 20:05:32 +0000 (22:05 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 23 Oct 2017 20:05:32 +0000 (22:05 +0200)
16 files changed:
ChangeLog
ecc-192.c
ecc-224.c
ecc-256.c
ecc-384.c
ecc-521.c
ecc-internal.h
examples/ecc-benchmark.c
nettle-lookup-hash.c
nettle-meta-aeads.c
nettle-meta-armors.c
nettle-meta-ciphers.c
nettle-meta-hashes.c
nettle-meta.h
testsuite/Makefile.in
testsuite/testutils.c

index 9a407deb0faf9e812a41d25f55a5054269993244..cf37b0b159a0feba3c4bd53dc207a806e51b164b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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>
 
        * ecc-curve.h (nettle_get_secp_192r1, nettle_get_secp_224r1)
index 4f428113674e246e22d7ad67d32d5b114983a656..57a7650b36dd75975f267a11c33facf90e7cab8c 100644 (file)
--- a/ecc-192.c
+++ b/ecc-192.c
@@ -110,7 +110,7 @@ ecc_192_modp (const struct ecc_modulo *m UNUSED, mp_limb_t *rp)
 #define ecc_192_modp ecc_mod
 #endif
 
-const struct ecc_curve _nettle_secp_192r1 =
+const struct ecc_curve nettle_secp_192r1 =
 {
   {
     192,
@@ -174,5 +174,5 @@ const struct ecc_curve _nettle_secp_192r1 =
 
 const struct ecc_curve *nettle_get_secp_192r1(void)
 {
-  return &_nettle_secp_192r1;
+  return &nettle_secp_192r1;
 }
index 5962e1b863bfd1e4e7bf1a723943c513a2c56b43..f665db60527f51acfcbbd0e05e02c97ea27cda32 100644 (file)
--- a/ecc-224.c
+++ b/ecc-224.c
@@ -62,7 +62,7 @@ ecc_224_modp (const struct ecc_modulo *m, mp_limb_t *rp);
 # error Configuration error
 #endif
 
-const struct ecc_curve _nettle_secp_224r1 =
+const struct ecc_curve nettle_secp_224r1 =
 {
   {
     224,
@@ -126,5 +126,5 @@ const struct ecc_curve _nettle_secp_224r1 =
 
 const struct ecc_curve *nettle_get_secp_224r1(void)
 {
-  return &_nettle_secp_224r1;
+  return &nettle_secp_224r1;
 }
index 7eed2835c08a0719ce6c6f5e6ff016f8d43e3eb2..bf5b6b8efecbeb8db3ac59c84e83ad8a3c5732a8 100644 (file)
--- a/ecc-256.c
+++ b/ecc-256.c
@@ -239,7 +239,7 @@ ecc_256_modq (const struct ecc_modulo *q, mp_limb_t *rp)
 #error Unsupported parameters
 #endif
 
-const struct ecc_curve _nettle_secp_256r1 =
+const struct ecc_curve nettle_secp_256r1 =
 {
   {
     256,
@@ -303,5 +303,5 @@ const struct ecc_curve _nettle_secp_256r1 =
 
 const struct ecc_curve *nettle_get_secp_256r1(void)
 {
-  return &_nettle_secp_256r1;
+  return &nettle_secp_256r1;
 }
index 94b8af91354e767b7a7232d955218226f9588730..cba0178ae7d7a5f7bafedd42a39c3ad6fd05a74f 100644 (file)
--- a/ecc-384.c
+++ b/ecc-384.c
@@ -147,7 +147,7 @@ ecc_384_modp (const struct ecc_modulo *p, mp_limb_t *rp)
 #define ecc_384_modp ecc_mod
 #endif
   
-const struct ecc_curve _nettle_secp_384r1 =
+const struct ecc_curve nettle_secp_384r1 =
 {
   {
     384,
@@ -211,5 +211,5 @@ const struct ecc_curve _nettle_secp_384r1 =
 
 const struct ecc_curve *nettle_get_secp_384r1(void)
 {
-  return &_nettle_secp_384r1;
+  return &nettle_secp_384r1;
 }
index 52a018dd7c9c0124c90dc1cbd389e79cd47e1c11..39a1871489f681cb9ff66ed9bedd1acbc48754b3 100644 (file)
--- a/ecc-521.c
+++ b/ecc-521.c
@@ -75,7 +75,7 @@ ecc_521_modp (const struct ecc_modulo *m UNUSED, mp_limb_t *rp)
 }
 #endif
 
-const struct ecc_curve _nettle_secp_521r1 =
+const struct ecc_curve nettle_secp_521r1 =
 {
   {
     521,
@@ -139,5 +139,5 @@ const struct ecc_curve _nettle_secp_521r1 =
 
 const struct ecc_curve *nettle_get_secp_521r1(void)
 {
-  return &_nettle_secp_521r1;
+  return &nettle_secp_521r1;
 }
index 94fc218b18092c147ea95b3b986ef1166985cf01..4b45199f42b90ec3b37963911e134b6d27f96827 100644 (file)
 #define sec_modinv _nettle_sec_modinv
 #define curve25519_eh_to_x _nettle_curve25519_eh_to_x
 
-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;
+/* FIXME: Rename with leading underscore, but keep current name (and
+   size!) for now, for ABI compatibility with nettle-3.1, soname
+   libhogweed.so.4. */
+#undef nettle_secp_192r1
+#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
    really implementing the equivalent twisted Edwards curve, with
index ea0be17368fbc48304d6b1cf0bcc26694e848a7f..8e5e0953af3f905b834bad2a6c4748d0aaa509b2 100644 (file)
@@ -330,12 +330,12 @@ bench_curve (const struct ecc_curve *ecc)
 }
 
 const struct ecc_curve * const curves[] = {
-  &_nettle_secp_192r1,
-  &_nettle_secp_224r1,
+  &nettle_secp_192r1,
+  &nettle_secp_224r1,
   &_nettle_curve25519,
-  &_nettle_secp_256r1,
-  &_nettle_secp_384r1,
-  &_nettle_secp_521r1,
+  &nettle_secp_256r1,
+  &nettle_secp_384r1,
+  &nettle_secp_521r1,
 };
 
 #define numberof(x)  (sizeof (x) / sizeof ((x)[0]))
index adf9188b62dafd5396b87f0b258d0a8019e8fc94..98cd4ae2d5bfb453c92e6e29ca70386203b1dbb5 100644 (file)
@@ -38,9 +38,7 @@
 
 #include "nettle-meta.h"
 
-/* Direct access to the array. */
 #undef nettle_hashes
-#define nettle_hashes _nettle_hashes
 
 const struct nettle_hash *
 nettle_lookup_hash (const char *name)
index c99cc46518dd38cee6450a8435ff505d26a27a81..51866b6d28eee000d81e87e2aea9a3062146b35f 100644 (file)
@@ -37,7 +37,9 @@
 
 #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_aes192,
   &nettle_gcm_aes256,
@@ -51,5 +53,5 @@ const struct nettle_aead * const _nettle_aeads[] = {
 const struct nettle_aead * const *
 nettle_get_aeads (void)
 {
-  return _nettle_aeads;
+  return nettle_aeads;
 }
index 17f87fcedd7165f60bffa06dcafa6364c3ed8991..b8a81bc2a97c6f61aea036ae37e8a284f239bfeb 100644 (file)
@@ -36,7 +36,9 @@
 #include <stddef.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_base64url,
   &nettle_base16,
@@ -46,5 +48,5 @@ const struct nettle_armor * const _nettle_armors[] = {
 const struct nettle_armor * const *
 nettle_get_armors (void)
 {
-  return _nettle_armors;
+  return nettle_armors;
 }
index 49cb47a70243e1e9c8f196f0403d535be54b67b3..ef905d8e8d8bb30826c2b867910e364c82f92fc5 100644 (file)
@@ -36,7 +36,9 @@
 #include <stddef.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_aes192,
   &nettle_aes256,
@@ -60,5 +62,5 @@ const struct nettle_cipher * const _nettle_ciphers[] = {
 const struct nettle_cipher * const *
 nettle_get_ciphers (void)
 {
-  return _nettle_ciphers;
+  return nettle_ciphers;
 }
index 37552edec5caca37a8bd43e7e4734205cb78e7eb..5df6f794639ba9850d81c38667fe35dffb798ee2 100644 (file)
@@ -37,7 +37,9 @@
 
 #include "nettle-meta.h"
 
-const struct nettle_hash * const _nettle_hashes[] = {
+#undef nettle_hashes
+
+const struct nettle_hash * const nettle_hashes[] = {
   &nettle_md2,
   &nettle_md4,
   &nettle_md5,
@@ -57,5 +59,5 @@ const struct nettle_hash * const _nettle_hashes[] = {
 const struct nettle_hash * const *
 nettle_get_hashes (void)
 {
-  return _nettle_hashes;
+  return nettle_hashes;
 }
index 3c13e9b295ed966253fdf7b75dcf6ad749230178..0d16a2b8344fc8c0d0e7d19222fc1774f13b5e20 100644 (file)
@@ -60,8 +60,11 @@ struct nettle_cipher
   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 */
-extern const struct nettle_cipher * const _nettle_ciphers[];
+extern const struct nettle_cipher * const nettle_ciphers[];
 
 const struct nettle_cipher * const *
 #ifdef __GNUC__
@@ -122,8 +125,11 @@ struct nettle_hash
  (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 */
-extern const struct nettle_hash * const _nettle_hashes[];
+extern const struct nettle_hash * const nettle_hashes[];
 
 const struct nettle_hash * const *
 #ifdef __GNUC__
@@ -174,9 +180,12 @@ struct nettle_aead
   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
    version of nettle */
-extern const struct nettle_aead * const _nettle_aeads[];
+extern const struct nettle_aead * const nettle_aeads[];
 
 const struct nettle_aead * const *
 #ifdef __GNUC__
@@ -243,8 +252,11 @@ struct nettle_armor
   (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 */
-extern const struct nettle_armor * const _nettle_armors[];
+extern const struct nettle_armor * const nettle_armors[];
 
 const struct nettle_armor * const *
 #ifdef __GNUC__
index 689d4325cc2842e2266ec72c37b3125a7e06a0f4..790b3c78eedf644be3bfd3c1c3adbafe0daba83d 100644 (file)
@@ -121,9 +121,10 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
 # data.
 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)
-       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)" \
           $(top_srcdir)/run-tests $(TS_ALL)
 
index 7a23a46d3eb7bfd21c0d565db848bf0b07448ae1..6f897617cadbd23077a5adbeac91d73c671140e5 100644 (file)
@@ -1212,11 +1212,11 @@ test_dsa_key(const struct dsa_params *params,
 }
 
 const struct ecc_curve * const ecc_curves[] = {
-  &_nettle_secp_192r1,
-  &_nettle_secp_224r1,
-  &_nettle_secp_256r1,
-  &_nettle_secp_384r1,
-  &_nettle_secp_521r1,
+  &nettle_secp_192r1,
+  &nettle_secp_224r1,
+  &nettle_secp_256r1,
+  &nettle_secp_384r1,
+  &nettle_secp_521r1,
   &_nettle_curve25519,
   NULL
 };