<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Openssl_common_commands</id>
	<title>Openssl common commands - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Openssl_common_commands"/>
	<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Openssl_common_commands&amp;action=history"/>
	<updated>2026-04-06T02:07:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=Openssl_common_commands&amp;diff=5091&amp;oldid=prev</id>
		<title>Busk: Created page with &quot;https://www.sslshopper.com/article-most-common-openssl-commands.html  ``` General OpenSSL Commands These commands allow you to generate CSRs, Certificates, Private Keys and do...&quot;</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Openssl_common_commands&amp;diff=5091&amp;oldid=prev"/>
		<updated>2024-03-10T16:22:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;https://www.sslshopper.com/article-most-common-openssl-commands.html  ``` General OpenSSL Commands These commands allow you to generate CSRs, Certificates, Private Keys and do...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;https://www.sslshopper.com/article-most-common-openssl-commands.html&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
General OpenSSL Commands&lt;br /&gt;
These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.&lt;br /&gt;
&lt;br /&gt;
Generate a new private key and Certificate Signing Request&lt;br /&gt;
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key&lt;br /&gt;
Generate a self-signed certificate (see How to Create and Install an Apache Self Signed Certificate for more info)&lt;br /&gt;
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt&lt;br /&gt;
Generate a certificate signing request (CSR) for an existing private key&lt;br /&gt;
openssl req -out CSR.csr -key privateKey.key -new&lt;br /&gt;
Generate a certificate signing request based on an existing certificate&lt;br /&gt;
openssl x509 -x509toreq -in certificate.crt -out CSR.csr -signkey privateKey.key&lt;br /&gt;
Remove a passphrase from a private key&lt;br /&gt;
openssl rsa -in privateKey.pem -out newPrivateKey.pem&lt;br /&gt;
Checking Using OpenSSL&lt;br /&gt;
If you need to check the information within a Certificate, CSR or Private Key, use these commands. You can also check CSRs and check certificates using our online tools.&lt;br /&gt;
&lt;br /&gt;
Check a Certificate Signing Request (CSR)&lt;br /&gt;
openssl req -text -noout -verify -in CSR.csr&lt;br /&gt;
Check a private key&lt;br /&gt;
openssl rsa -in privateKey.key -check&lt;br /&gt;
Check a certificate&lt;br /&gt;
openssl x509 -in certificate.crt -text -noout&lt;br /&gt;
Check a PKCS#12 file (.pfx or .p12)&lt;br /&gt;
openssl pkcs12 -info -in keyStore.p12&lt;br /&gt;
Debugging Using OpenSSL&lt;br /&gt;
If you are receiving an error that the private doesn't match the certificate or that a certificate that you installed to a site is not trusted, try one of these commands. If you are trying to verify that an SSL certificate is installed correctly, be sure to check out the SSL Checker.&lt;br /&gt;
&lt;br /&gt;
Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key&lt;br /&gt;
openssl x509 -noout -modulus -in certificate.crt | openssl md5&lt;br /&gt;
openssl rsa -noout -modulus -in privateKey.key | openssl md5&lt;br /&gt;
openssl req -noout -modulus -in CSR.csr | openssl md5&lt;br /&gt;
Check an SSL connection. All the certificates (including Intermediates) should be displayed&lt;br /&gt;
openssl s_client -connect www.paypal.com:443&lt;br /&gt;
Converting Using OpenSSL&lt;br /&gt;
These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software. For example, you can convert a normal PEM file that would work with Apache to a PFX (PKCS#12) file and use it with Tomcat or IIS. Use our SSL Converter to convert certificates without messing with OpenSSL.&lt;br /&gt;
&lt;br /&gt;
Convert a DER file (.crt .cer .der) to PEM&lt;br /&gt;
openssl x509 -inform der -in certificate.cer -out certificate.pem&lt;br /&gt;
Convert a PEM file to DER&lt;br /&gt;
openssl x509 -outform der -in certificate.pem -out certificate.der&lt;br /&gt;
Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM&lt;br /&gt;
openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes&lt;br /&gt;
You can add -nocerts to only output the private key or add -nokeys to only output the certificates.&lt;br /&gt;
&lt;br /&gt;
Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)&lt;br /&gt;
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.cr&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
</feed>