Commit 1675f6eb authored by Richard Levitte's avatar Richard Levitte
Browse files

Let's make all the example formated the same, shall we?

parent 8548d442
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -129,23 +129,23 @@ The PEM private key format uses the header and footer lines:

To remove the pass phrase on a DSA private key:

C<openssl dsa -in key.pem -out keyout.pem>
 openssl dsa -in key.pem -out keyout.pem

To encrypt a private key using triple DES:

C<openssl dsa -in key.pem -des3 -out keyout.pem>
 openssl dsa -in key.pem -des3 -out keyout.pem

To convert a private key from PEM to DER format: 

C<openssl dsa -in key.pem -outform DER -out keyout.der>
 openssl dsa -in key.pem -outform DER -out keyout.der

To print out the components of a private key to standard output:

C<openssl dsa -in key.pem -text -noout>
 openssl dsa -in key.pem -text -noout

To just output the public part of a private key:

C<openssl dsa -in key.pem -pubout -out pubkey.pem>
 openssl dsa -in key.pem -pubout -out pubkey.pem

=head1 SEE ALSO

+5 −5
Original line number Diff line number Diff line
@@ -135,23 +135,23 @@ The PEM private key format uses the header and footer lines:

To remove the pass phrase on an RSA private key:

C<openssl rsa -in key.pem -out keyout.pem>
 openssl rsa -in key.pem -out keyout.pem

To encrypt a private key using triple DES:

C<openssl rsa -in key.pem -des3 -out keyout.pem>
 openssl rsa -in key.pem -des3 -out keyout.pem

To convert a private key from PEM to DER format: 

C<openssl rsa -in key.pem -outform DER -out keyout.der>
 openssl rsa -in key.pem -outform DER -out keyout.der

To print out the components of a private key to standard output:

C<openssl rsa -in key.pem -text -noout>
 openssl rsa -in key.pem -text -noout

To just output the public part of a private key:

C<openssl rsa -in key.pem -pubout -out pubkey.pem>
 openssl rsa -in key.pem -pubout -out pubkey.pem

=head1 SEE ALSO

+16 −13
Original line number Diff line number Diff line
@@ -248,24 +248,25 @@ the signers certificates.

Create a cleartext signed message:

 openssl smime -sign -in message.txt -text -out mail.msg
 openssl smime -sign -in message.txt -text -out mail.msg \
	-signer mycert.pem

Create and opaque signed message

 openssl smime -sign -in message.txt -text -out mail.msg -nodetach
 openssl smime -sign -in message.txt -text -out mail.msg -nodetach \
	-signer mycert.pem

Create a signed message, include some additional certificates and
read the private key from another file:

 openssl smime -sign -in in.txt -text -out mail.msg
 openssl smime -sign -in in.txt -text -out mail.msg \
	-signer mycert.pem -inkey mykey.pem -certfile mycerts.pem

Send a signed message under Unix directly to sendmail, including headers:

 openssl smime -sign -in in.txt -text -signer mycert.pem -from steve@openssl.org
  -to someone@somewhere -subject "Signed message" | sendmail someone@somewhere
 openssl smime -sign -in in.txt -text -signer mycert.pem \
	-from steve@openssl.org -to someone@somewhere \
	-subject "Signed message" | sendmail someone@somewhere

Verify a message and extract the signer's certificate if successful:

@@ -273,14 +274,16 @@ Verify a message and extract the signer's certificate if successful:

Send encrypted mail using triple DES:

 openssl smime -encrypt -in in.txt -from steve@openssl.org -to someone@somewhere
   -subject "Encrypted message" -des3 user.pem -out mail.msg
 openssl smime -encrypt -in in.txt -from steve@openssl.org \
	-to someone@somewhere -subject "Encrypted message" \
	-des3 user.pem -out mail.msg

Sign and encrypt mail:

 openssl smime -sign -in ml.txt -signer my.pem -text | openssl -encrypt -out mail.msg 
  -from steve@openssl.org -to someone@somewhere -subject "Signed and Encrypted message"
  -des3 user.pem
 openssl smime -sign -in ml.txt -signer my.pem -text \
	| openssl -encrypt -out mail.msg \
	-from steve@openssl.org -to someone@somewhere \
	-subject "Signed and Encrypted message" -des3 user.pem

Note: the encryption command does not include the B<-text> option because the message
being encrypted already has MIME headers.
+4 −4

File changed.

Contains only whitespace changes.

+12 −12

File changed.

Contains only whitespace changes.