0

Right now I am building a hybrid app using PhoneGap. To make my app available for Apple devices I need an iOS signing key that I can upload to PhoneGap Build. This tutorial explains how to build an iOS signing key on Windows using OpenSSL. I followd this tutorial and installed OpenSSL-Win 64, but every time I run this command : openssl genrsa -des3 -out ios.key 2048 I get de following error message: OpenSSL unable to write 'random state' e is 65537 (0x10001)

I did some research on the internet and some people are say that you need a HOME system variable. So I created one on my Windows laptop and the location of my HOME variable is C:\. I ran the command OpenSSL unable to write 'random state' e is 65537 (0x10001) again but I still received the same error message.

I hope someone can help me because I don't know what I am doing wrong! :(

jww
  • 97,681
  • 90
  • 411
  • 885
Stijn Sande
  • 17
  • 1
  • 4

1 Answers1

1

I receive the same error unless I am running OpenSSL as administrator.

Right click OpenSSL and try Run as administrator and try the command again. That gets rid of the error message for me.

Additional notes from the OpenSSL FAQ:

2. Why do I get an "unable to write 'random state'" error message?

Sometimes the openssl command line utility does not abort with a "PRNG not seeded" error message, but complains that it is "unable to write 'random state'". This message refers to the default seeding file (see previous answer). A possible reason is that no default filename is known because neither RANDFILE nor HOME is set. (Versions up to 0.9.6 used file ".rnd" in the current directory in this case, but this has changed with 0.9.6a.)

Here is a link to the FAQ, including the "previous question" that it refers to.

Community
  • 1
  • 1
Eric Alberson
  • 1,116
  • 1
  • 11
  • 23
  • Thanks for your answer Eric but even when I am running OpenSSL as administrator I still get the error message e is 65537 (0x10001). Do you have an other solution? – Stijn Sande Feb 27 '15 at 09:54
  • The `e is 65537` is not part of the error. `e` is a prime number used in the RSA encryption algorithm. You can read about it here: http://en.wikipedia.org/wiki/RSA_%28cryptosystem%29#Key_generation. I'll update my answer with everything else I've found, though. – Eric Alberson Feb 27 '15 at 13:07