Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gcrypt
Don't leak symbols into static library
 

Index | Next | Previous | View Flat


simon at josefsson

Apr 18, 2008, 12:00 AM


Views: 2203
Permalink
Don't leak symbols into static library

Before patch below:

jas [at] mocc:~/src/libgcrypt$ nm -B src/.libs/libgcrypt.a |grep ' T '|grep -v gcry|grep -v __
000059c0 T Camellia_DecryptBlock
00005b90 T Camellia_Ekeygen
00005850 T Camellia_EncryptBlock
00003020 T camellia_decrypt128
000049b0 T camellia_decrypt256
00002530 T camellia_encrypt128
00003b10 T camellia_encrypt256
00000000 T camellia_setup128
00005b30 T camellia_setup192
00000f10 T camellia_setup256
00001d30 T ac_data_extract
jas [at] mocc:~/src/libgcrypt$

After patch below:

jas [at] mocc:~/src/libgcrypt$ nm -B src/.libs/libgcrypt.a |grep ' T '|grep -v gcry|grep -v __
jas [at] mocc:~/src/libgcrypt$

What do you think?

/Simon

Index: cipher/camellia.h
===================================================================
--- cipher/camellia.h (revision 1283)
+++ cipher/camellia.h (working copy)
@@ -1,6 +1,6 @@
/* camellia.h ver 1.2.0
*
- * Copyright (C) 2006,2007
+ * Copyright (C) 2006,2007,2008
* NTT (Nippon Telegraph and Telephone Corporation).
*
* This library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
*
* This prefixes all external symbols with "foo_".
*/
+#define CAMELLIA_EXT_SYM_PREFIX _gcry_
#ifdef CAMELLIA_EXT_SYM_PREFIX
#define CAMELLIA_PREFIX1(x,y) x ## y
#define CAMELLIA_PREFIX2(x,y) CAMELLIA_PREFIX1(x,y)
Index: cipher/ac.c
===================================================================
--- cipher/ac.c (revision 1283)
+++ cipher/ac.c (working copy)
@@ -1,6 +1,6 @@
/* ac.c - Alternative interface for asymmetric cryptography.
Copyright (C) 2003, 2004, 2005, 2006
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.

This file is part of Libgcrypt.

@@ -1117,7 +1117,7 @@

(IDENTIFIER [...]
(ALGORITHM <list of named MPI values>)) */
-gcry_error_t
+static gcry_error_t
ac_data_extract (const char *identifier, const char *algorithm,
gcry_sexp_t sexp, gcry_ac_data_t *data)
{

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

Subject User Time
Don't leak symbols into static library simon at josefsson Apr 18, 2008, 12:00 AM
    Re: Don't leak symbols into static library wk at gnupg Apr 18, 2008, 2:10 AM
        Re: Don't leak symbols into static library simon at josefsson Apr 18, 2008, 2:20 AM
            Re: Don't leak symbols into static library wk at gnupg Apr 18, 2008, 3:13 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.