26
26
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
27
* SUCH DAMAGE.
28
28
*
29
- * $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.28 2006/07/13 04:15:25 neilc Exp $
29
+ * $PostgreSQL: pgsql/contrib/pgcrypto/openssl.c,v 1.29 2006/09/05 23:02:28 tgl Exp $
30
30
*/
31
31
32
32
#include "postgres.h"
@@ -154,11 +154,12 @@ static int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *res, unsigned int
154
154
#include "sha2.c"
155
155
#include "internal-sha2.c"
156
156
157
- typedef int (* init_f )(PX_MD * md );
157
+ typedef void (* init_f )(PX_MD * md );
158
158
159
159
static int compat_find_digest (const char * name ,PX_MD * * res )
160
160
{
161
161
init_f init = NULL ;
162
+
162
163
if (pg_strcasecmp (name ,"sha224" )== 0 )
163
164
init = init_sha224 ;
164
165
else if (pg_strcasecmp (name ,"sha256" )== 0 )
@@ -169,6 +170,7 @@ static int compat_find_digest(const char *name, PX_MD **res)
169
170
init = init_sha512 ;
170
171
else
171
172
return PXE_NO_HASH ;
173
+
172
174
* res = px_alloc (sizeof (PX_MD ));
173
175
init (* res );
174
176
return 0 ;