summaryrefslogtreecommitdiff
path: root/lib/radius/client.h
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-01-22 14:11:32 +0100
committerLinus Nordberg <linus@nordberg.se>2013-01-22 14:11:32 +0100
commit1836d5238f3d7fddd1dda7aa68dc56f39ff073a4 (patch)
tree54105b01b0d26dca07b0fd1be9dd28dbbb82dd47 /lib/radius/client.h
parent95c4d4a42f2b4457c64a87c45c7c170dfba6a7c4 (diff)
Add md5.[ch] for when we are configured without OpenSSL.
This is Solar Designers implementation from http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 . RS_MD5Transform goes away since it's not in md5.h. It's not used in lib/radius/. Might want to move this into lib/radius/ if we end up not using it in lib/.
Diffstat (limited to 'lib/radius/client.h')
-rw-r--r--lib/radius/client.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/radius/client.h b/lib/radius/client.h
index 3394e73..ab4718a 100644
--- a/lib/radius/client.h
+++ b/lib/radius/client.h
@@ -151,25 +151,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#ifdef WITHOUT_OPENSSL
-#ifndef RS_MD5_CTX
-#error RS_MD5_CTX must be defined
-#endif
-#ifndef RS_MD5Init
-#error RS_MD5Init must be defined
-#endif
-#ifndef RS_MD5Update
-#error RS_MD5Update must be defined
-#endif
-#ifndef RS_MD5Final
-#error RS_MD5Final must be defined
-#endif
-#ifndef RS_MD5Transform
-#error RS_MD5Transform must be defined
+#include "md5.h"
+#else
+#include <openssl/md5.h>
#endif
-#else /* WITHOUT_OPENSSL */
-
-#include <openssl/md5.h>
/** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */
#define RS_MD5_CTX MD5_CTX
/** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */
@@ -178,9 +164,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define RS_MD5Update MD5_Update
/** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */
#define RS_MD5Final MD5_Final
-/** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */
-#define RS_MD5Transform MD5_Transform
-#endif
+
#ifndef RS_MAX_PACKET_LEN
/** The maximum size of a packet that the library will send or receive. \ingroup custom