When using the Windows version of OpenSSL to carry out operations on certificate it displays the following error message:
unable to load private key
error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY
unable to write 'random state'
This was due to the key file encoding (UTF-8-BOM).
To fix load the file into notepad++ and change the encoding from UTF-8-BOM to UTF-8. Then it should process the files fine.