Skip to content

Commit

Permalink
wincng.c: fix clear memory feature compilation with mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Apr 3, 2015
1 parent e113202 commit 2d2744e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/wincng.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@
#include <wincrypt.h>
#endif

/* required for compilation of clear memory feature with mingw */
#ifdef LIBSSH2_CLEAR_MEMORY
#ifdef __MINGW32__
#ifndef SecureZeroMemory
#define SecureZeroMemory(ptr, cnt) RtlFillMemory(ptr, cnt, 0)
#endif
#endif
#endif

#define PEM_RSA_HEADER "-----BEGIN RSA PRIVATE KEY-----"
#define PEM_RSA_FOOTER "-----END RSA PRIVATE KEY-----"
#define PEM_DSA_HEADER "-----BEGIN DSA PRIVATE KEY-----"
Expand Down

0 comments on commit 2d2744e

Please sign in to comment.