Skip to content

Commit

Permalink
Partial fix for the openssl builds
Browse files Browse the repository at this point in the history
  • Loading branch information
trufae authored Nov 2, 2024
1 parent c68421c commit acde077
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 0 additions & 2 deletions libr/config.mk.tail
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ BN_LIBS=${SSL_LDFLAGS}
endif

#both of these need ssl includes
ifneq (,$(filter r_socket r_util,$(BINDEPS)))
ifeq (${HAVE_LIB_SSL},1)
CFLAGS+=${SSL_CFLAGS}
endif
endif

# XXX do it in configure stage
OSTYPE?=gnulinux
Expand Down
5 changes: 3 additions & 2 deletions libr/crypto/hash/deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ ifeq ($(WANT_SSL_CRYPTO),1)
CFLAGS+=${SSL_CFLAGS}
LDFLAGS+=${SSL_LDFLAGS}
LINK+=${SSL_LDFLAGS}
else
OBJS+=hash/md4.o hash/md5.o hash/sha1.o hash/sha2.o
#else
# OBJS+=hash/md4.o hash/md5.o hash/sha1.o hash/sha2.o
endif
OBJS+=hash/md4.o hash/md5.o hash/sha1.o hash/sha2.o

ifeq ($(USE_LIB_XXHASH),1)
LDFLAGS+=${LIB_XXHASH}
Expand Down
7 changes: 4 additions & 3 deletions libr/include/r_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ typedef struct r_hash_plugin_t {
} RHashPlugin;
#endif

#if WANT_SSL_CRYPTO
// WANT_SSL_CRYPTO
#if 0
// XXX breaks the build because openssl code is not portable, just force those plugins to always be native
#include <openssl/sha.h>
#include <openssl/md5.h>
typedef MD5_CTX RHashMD5Context;
Expand All @@ -41,7 +43,7 @@ typedef SHA512_CTX RSha512Context;
#define SHA384_BLOCK_LENGTH SHA384_CBLOCK
#define SHA512_BLOCK_LENGTH SHA512_CBLOCK
#else
#define MD5_CTX RHashMD5Context
// #define MD5_CTX RHashMD5Context

/* hashing */
typedef struct {
Expand Down Expand Up @@ -75,7 +77,6 @@ typedef struct _SHA512_CTX {
typedef RSha512Context RSha384Context;
#endif


/*
* Since we have not enough space in bitmask, you may do fine
* selection of required hash functions by the followed macros.
Expand Down

0 comments on commit acde077

Please sign in to comment.