summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/rand/rand_nw.c11
-rw-r--r--crypto/sha/shatest.c1
2 files changed, 9 insertions, 3 deletions
diff --git a/crypto/rand/rand_nw.c b/crypto/rand/rand_nw.c
index 0ff884783e..ba57812788 100644
--- a/crypto/rand/rand_nw.c
+++ b/crypto/rand/rand_nw.c
@@ -1,4 +1,4 @@
-/* crypto/rand/rand_win.c */
+/* crypto/rand/rand_nw.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -116,7 +116,7 @@
#if defined (OPENSSL_SYS_NETWARE)
#if defined(NETWARE_LIBC)
-#include <nks\thread.h>
+#include <nks/thread.h>
#endif
extern long RunningProcess;
@@ -147,18 +147,23 @@ int RAND_poll(void)
for( i=2; i<ENTROPY_NEEDED; i++)
{
+#ifdef __MWERKS__
asm
{
rdtsc
mov tsc, eax
}
+#else
+ asm volatile("rdtsc":"=A" (tsc));
+#endif
+
RAND_add(&tsc, sizeof(tsc), 1);
l = GetSuperHighResolutionTimer();
RAND_add(&l, sizeof(l), 0);
# if defined(NETWARE_LIBC)
- NXThreadYield();
+ NXThreadYield();
# else /* NETWARE_CLIB */
ThreadSwitchWithDelay();
# endif
diff --git a/crypto/sha/shatest.c b/crypto/sha/shatest.c
index 0e026c1245..ddb388b670 100644
--- a/crypto/sha/shatest.c
+++ b/crypto/sha/shatest.c
@@ -161,6 +161,7 @@ int main(int argc, char *argv[])
#ifdef OPENSSL_SYS_NETWARE
if (err) printf("ERROR: %d\n", err);
#endif
+ EVP_MD_CTX_cleanup(&c);
EXIT(err);
return(0);
}