summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevitte <levitte>2004-03-30 16:40:09 +0000
committerlevitte <levitte>2004-03-30 16:40:09 +0000
commit4fe015285a75e92dbd3d9de1c9cb7e7b4535e244 (patch)
treeb30781f0adaaaae7449895a0193d2eaad64b6aa7
parentd62c408d279531bcf1eb522298d485f8473e561a (diff)
downloadopenssl-4fe015285a75e92dbd3d9de1c9cb7e7b4535e244.tar.gz
Recent changes from 0.9.6-stable.
-rw-r--r--crypto/rand/randfile.c2
-rw-r--r--doc/crypto/RSA_public_encrypt.pod7
2 files changed, 6 insertions, 3 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index f64c7383b..767d2c70d 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -138,6 +138,7 @@ int RAND_write_file(const char *file)
int n;
#if defined(O_CREAT) && !defined(WIN32)
+ {
/* For some reason Win32 can't write to files created this way */
/* chmod(..., 0600) is too late to protect the file,
@@ -145,6 +146,7 @@ int RAND_write_file(const char *file)
int fd = open(file, O_CREAT, 0600);
if (fd != -1)
out = fdopen(fd, "wb");
+ }
#endif
if (out == NULL)
out = fopen(file,"wb");
diff --git a/doc/crypto/RSA_public_encrypt.pod b/doc/crypto/RSA_public_encrypt.pod
index 9ae5f9315..6ab2bb8a1 100644
--- a/doc/crypto/RSA_public_encrypt.pod
+++ b/doc/crypto/RSA_public_encrypt.pod
@@ -47,9 +47,10 @@ Encrypting user data directly with RSA is insecure.
=back
B<flen> must be less than RSA_size(B<rsa>) - 11 for the PKCS #1 v1.5
-based padding modes, and less than RSA_size(B<rsa>) - 41 for
-RSA_PKCS1_OAEP_PADDING. The random number generator must be seeded
-prior to calling RSA_public_encrypt().
+based padding modes, less than RSA_size(B<rsa>) - 41 for
+RSA_PKCS1_OAEP_PADDING and exactly RSA_size(B<rsa>) for RSA_NO_PADDING.
+The random number generator must be seeded prior to calling
+RSA_public_encrypt().
RSA_private_decrypt() decrypts the B<flen> bytes at B<from> using the
private key B<rsa> and stores the plaintext in B<to>. B<to> must point