Unable to create certificate and key for Android on Windows


#1

I cant create certificates in .pem-format and keys in .pk8-format with openssl (using windows btw)


#2

Why can’t you create the key and cert? What happens? What kind of error are you getting?


#3

I followed this manual https://www.defold.com/manuals/android/
2018-08-09_00-20-16


#4

btw on another question how can I make my game horizontal for mobile?


#5

Looks like a permission issue. Try to run cmd.exe as administrator.

I think there’s a small bug for Android build at the moment, where you need to manually enter the values for height and width in game.project - even if they are the same as default. (Then re-save it)


#6

I ran cmd as admin this time


#7

I would try to search StackOverflow for the error message about config file. There’s a few solutions there, that may or may not work.


#8

try this for req line

openssl req -new -key key.pem -out request.pem -config C:\openssl\ssl\openssl.cnf

after -config, you should path it correctly to openssl.cnf file in your own directory


#9

tried that but instead of searching for D:\OpenSSL\bin\openssl.cnf its searching for C:/OpenSSL/openssl.cnf


#10

also tried your way didnt work either


#11

btw my horizontal game I meant something like the left picture


#12

If it’s ignoring the -config flag then you could alternatively type this in OpennSSL prompt before generating cert, to set the location.

SET OPENSSL_CONF=D:\OpenSSL\bin\openssl.cnf

Make sure the openssl.cnf file is in whatever path you specify.

New projects are like that by default, but there’s currently an issue with them(and Android) if you don’t manually edit and save the game.project file, here:


#13

dis that SET OPENSSL_CONF=D:\OpenSSL\bin\openssl.cnf but its still saying that WARNING: can’t open config file: C:/OpenSSL/openssl.cnf


#14

and alright you already answered about the android question thanks


#15

Hmm. I am running out of ideas :laughing: (aside from launching a Linux virtualbox)
Maybe try defining the file as .cfg instead of .cnf?

SET OPENSSL_CONF=D:\OpenSSL\bin\openssl.cfg

Also, which Windows version of OpenSSH are you using? (There aren’t any official Windows binaries)
Have you tried with Cygwin maybe?

No problem mate! Hope to see you making games soon!


#16

2018-08-09_21-55-28


#17

it looks like its working for the third time I used

SET OPENSSL_CONF=D:\OpenSSL\bin\openssl.cnf


#18

Awesome!

In your screenshot it was typed in the wrong prompt. It should be in the OpenSSL prompt, which you must’ve done :smiley:

OpenSSL> SET OPENSSL_CONF=D:\OpenSSL\bin\openssl.cnf