base64 - Create X509 certificate and save as Base-64 -


i have been following guide covers signing authorization tokens web api security. 1 of aspects storing x509 certificate base-64 string in web.config. however, steps necessary on how x509 certificate , convert base-64 string not explained. found guides on how generate x509 certificate using openssl remain confused on parts use , how convert base-64. here want end with.

  1. a base-64 representation of certificate can store in web.config
  2. a password goes along certificate

the code want use in authentication server ..

signingcertificate = new x509certificate2(certificate, password); 

where certificate base 64 encoded representation of certificate , password signing certificate password.

so openssl tool able generate 2 files ...

  • cert file - mycert.pem
  • key file - mykey.pem

question #1 - need use mycert.pem file when converting base-64? or both files need combined both files single pfx file before representing base-64?

question #2 - there utility can use accepts file , exports base-64 string?

question #1 - need use mycert.pem file when converting base-64? or both files need combined both files single pfx file before representing base-64?

the pem file format encoded in base64. can applied private keys, certificates or certificate signing requests. files have header/foot distinguish them starting ----begin private key---- or ----begin certificate----

a pfx container private keys , certificates protected password. need include both pem files. pfx encoded in pkcs#12 format( binary).

concatenate cert key file , have openssl convert pkcs#12 (pfx)

cat mykey.pem mycert.pem > cert.pem openssl pkcs12 -export -in cert.pem -out mykeystore.p12 -name myalias #enter export password: 

if using service ( have searched in google), need pkcs12 file , assigned password

question #2 - there utility can use accepts file , exports base-64 string?

i use texteditor notepad++ mime plugin. alternatively, programming languages have method convert array of bytes base64 if need programmatically.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -