* examples/rsa-decrypt.c (main) [WIN32]: Set stdout/stdin to
binary mode.
* examples/rsa-encrypt.c (main): Likewise.
Rev: nettle/examples/rsa-decrypt.c:1.2
Rev: nettle/examples/rsa-encrypt.c:1.4
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef WIN32
+#include <fcntl.h>
+#endif
/* string.h must be included before gmp.h */
#include "aes.h"
return EXIT_FAILURE;
}
+#ifdef WIN32
+ setmode(0, O_BINARY);
+ setmode(1, O_BINARY);
+#endif
+
if (!read_version(stdin))
{
werror("Bad version number in input file.\n");
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef WIN32
+#include <fcntl.h>
+#endif
/* string.h must be included before gmp.h */
#include "bignum.h"
rsa_session_set_encrypt_key(&ctx, &info);
+#ifdef WIN32
+ setmode(0, O_BINARY);
+ setmode(1, O_BINARY);
+#endif
+
write_version(stdout);
mpz_init(x);