Intermediate certificates are included in wildcard .cer file so I run command
openssl pkcs12 -export -in SMHcrt.cer -inkey privatekey.key -out SMHcert.p12
and I get :
Can't open privatekey.key for reading, No such file or directory
15132:error:02001002:system library:fopen:No such file or directory:crypto\bio\bss_file.c:69:fopen('privatekey.key','r')
15132:error:2006D080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c:76:
unable to load private key
I've fund this command to export key from .pem file
openssl pkey -in SMHcert.pem -out SMHcert.key
but I get
unable to load key
9524:error:0909006C:PEM routines:get_name:no start line:crypto\pem\pem_lib.c:745:Expecting: ANY PRIVATE KEY