[B<-from ad>]
[B<-subject s>]
[B<-text>]
+[B<-rand file(s)>]
[cert.pem]...
=head1 DESCRIPTION
private key must be included in the certificate file specified with
the B<-recip> or B<-signer> file.
+=item B<-rand file(s)>
+
+a file or files containing random data used to seed the random number
+generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
+Multiple files can be specified separated by a OS-dependent character.
+The separator is B<;> for MS-Windows, B<,> for OpenVSM, and B<:> for
+all others.
+
=item B<cert.pem...>
one or more certificates of message recipients: used when encrypting
Create a cleartext signed message:
- openssl smime -sign -in message.txt -text -out mail.msg
- -signer mycert.pem
+ 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
- -signer mycert.pem
+ 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
- -signer mycert.pem -inkey mykey.pem -certfile mycerts.pem
+ 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:
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.