Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
f804da9b
Commit
f804da9b
authored
Oct 27, 1999
by
Kurt Zeilenga
Browse files
Port to NT.
parent
3fbee54f
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/portable.nt
View file @
f804da9b
...
...
@@ -94,6 +94,9 @@ typedef char * caddr_t;
/* we have <process.h> */
#define HAVE_PROCESS_H 1
/* we have <wincrypt.h> */
#define HAVE_WINCRYPT_H 1
#define LDAP_SIGUSR1 SIGILL
#define LDAP_SIGUSR2 SIGTERM
...
...
libraries/liblutil/entropy.c
View file @
f804da9b
...
...
@@ -6,6 +6,16 @@
#include
"portable.h"
#include
<ac/string.h>
#include
<ac/time.h>
#ifdef HAVE_WINCRYPT_H
#include
<wincrypt.h>
#endif
#ifdef HAVE_PROCESS_H
#include
<process.h>
#endif
#include
<fcntl.h>
#include
<lutil.h>
...
...
@@ -35,6 +45,26 @@ int lutil_entropy( char *buf, int nbytes )
/* should return nbytes */
if
(
rc
<
nbytes
)
return
-
1
;
return
0
;
}
#elif PROV_RSA_FULL
{
/* Not used since _WIN32_WINNT not set... */
HCRYPTPROV
hProv
=
0
;
/* Get handle to user default provider */
if
(
!
CryptAcquireContext
(
&
hProv
,
NULL
,
NULL
,
PROV_RSA_FULL
,
0
))
{
return
-
1
;
}
/* Generate random initialization vector */
if
(
!
CryptGenRandom
(
hProv
,
(
DWORD
)
nbytes
,
(
BYTE
*
)
buf
))
{
return
-
1
;
}
/* Release provider handle */
if
(
hProv
!=
0
)
CryptReleaseContext
(
hProv
,
0
);
return
0
;
}
#else
...
...
libraries/liblutil/liblutil.dsp
View file @
f804da9b
...
...
@@ -136,6 +136,10 @@ SOURCE=.\debug.c
# End Source File
# Begin Source File
SOURCE=.\entropy.c
# End Source File
# Begin Source File
SOURCE="..\..\include\getopt-compat.h"
# End Source File
# Begin Source File
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment