Get your own free workspace
View
 

OpenSSL

Page history last edited by PBworks 5 years, 12 months ago


 

Introduction

How do I find out what OpenSSL version I’m running?

Use the version option.

 

$ openssl version

OpenSSL 0.9.7d 17 Mar 2004

 

You can get much more information with the version -a option.

 

$ openssl version -a

OpenSSL 0.9.7i 14 Oct 2005

built on: Wed Feb 8 07:07:36 PST 2006

platform: linux-pentium

options: bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int)

blowfish(idx)

compiler: i686-pc-linux-gnu-gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB

-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5

-DL_ENDIAN -DTERMIO -Wall -march=pentium3 -O3 -pipe -Wa,--noexecstack

-DSHA1_ASM -DMD5_ASM -DRMD160_ASM

OPENSSLDIR: "/etc/ssl"

 

How do I get a list of the available commands?

There are three built-in options for getting lists of available commands, but none of them provide what I consider useful output. The best thing to do is provide an invalid command (help or -h will do nicely) to get a readable answer.

 

$ openssl help

openssl:Error: 'help' is an invalid command.

 

Standard commands

asn1parse ca ciphers crl crl2pkcs7

dgst dh dhparam dsa dsaparam

enc engine errstr gendh gendsa

genrsa nseq ocsp passwd pkcs12

pkcs7 pkcs8 rand req rsa

rsautl s_client s_server s_time sess_id

smime speed spkac verify version

x509

 

Message Digest commands (see the `dgst' command for more details)

md2 md4 md5 rmd160 sha

sha1

 

Cipher commands (see the `enc' command for more details)

aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc

aes-256-ecb base64 bf bf-cbc bf-cfb

bf-ecb bf-ofb cast cast-cbc cast5-cbc

cast5-cfb cast5-ecb cast5-ofb des des-cbc

des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb

des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb

des-ofb des3 desx rc2 rc2-40-cbc

rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb

rc4 rc4-40

 

What the shell calls “Standard commands” are the main top-level options.

 

You can use the same trick with any of the subcommands.

 

$ openssl dgst -h

unknown option '-h'

options are

-c to output the digest with separating colons

-d to output debug info

-hex output as hex dump

-binary output in binary form

-sign file sign digest using private key in file

-verify file verify a signature using public key in file

-prverify file verify a signature using private key in file

-keyform arg key file format (PEM or ENGINE)

-signature file signature to verify

-binary output in binary form

-engine e use engine e, possibly a hardware device.

-md5 to use the md5 message digest algorithm (default)

-md4 to use the md4 message digest algorithm

-md2 to use the md2 message digest algorithm

-sha1 to use the sha1 message digest algorithm

-sha to use the sha message digest algorithm

-mdc2 to use the mdc2 message digest algorithm

-ripemd160 to use the ripemd160 message digest algorithm

 

In more boring fashion, you can consult the OpenSSL man pages.

 

How do I get a list of available ciphers

Use the ciphers option. The ciphers(1) man page is quite helpful.

 

# list all available ciphers

openssl ciphers -v

# list only TLSv1 ciphers

openssl ciphers -v -tls1

# list only high encryption ciphers (keys larger than 128 bits)

openssl ciphers -v 'HIGH'

# list only high encryption ciphers using the AES algorithm

openssl ciphers -v 'AES+HIGH'

Comments (0)

You don't have permission to comment on this page.