Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 13 Apr 2013 01:45:04 +0400
From: Solar Designer <>
Subject: Re: jumbo pull request #255 (trouble with static builds)

On Fri, Apr 12, 2013 at 04:26:44PM -0500, jfoug wrote:
> Yup, it probably would have been better to simply use something like
> jtr_SHA512_Init(x) as my sha2 function interface, and then properly define
> SHA512_Init(x) to use that function. In hind sight, I should have coded them
> that way, but did not.

Note that in my previous message I suggested a slightly different
approach.  You'd keep the function name in the declarations (in both the
.h and the .c file) at SHA512_Init, but near the beginning of the .h
file, before(!) the function prototypes, you'd put:

#define SHA512_Init john_SHA512_Init

Then you would actually be declaring the function under the altered
name.  The corresponding .c file would need to include this .h file too,
so that it'd declare the function under the altered name too.
Similarly, users of these interfaces will use simply SHA512_Init, but
will happen to refer to the altered name as long as the include the .h
file.  To build with OpenSSL interfaces instead, you'd simply omit the
body of the .h file (and the .c file), including the #define line.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.