1 1.1 christos =pod 2 1.1 christos 3 1.1 christos =head1 NAME 4 1.1 christos 5 1.1 christos openssl - OpenSSL command line program 6 1.1 christos 7 1.1 christos =head1 SYNOPSIS 8 1.1 christos 9 1.1 christos =for openssl duplicate options 10 1.1 christos 11 1.1 christos B<openssl> 12 1.1 christos I<command> 13 1.1 christos [ I<options> ... ] 14 1.1 christos [ I<parameters> ... ] 15 1.1 christos 16 1.1 christos B<openssl> B<no->I<XXX> [ I<options> ] 17 1.1 christos 18 1.1 christos B<openssl> B<-help> | B<-version> 19 1.1 christos 20 1.1 christos =head1 DESCRIPTION 21 1.1 christos 22 1.1 christos OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL) 23 1.1 christos and Transport Layer Security (TLS) network protocols and related 24 1.1 christos cryptography standards required by them. 25 1.1 christos 26 1.1 christos The B<openssl> program is a command line program for using the various 27 1.1 christos cryptography functions of OpenSSL's B<crypto> library from the shell. 28 1.1 christos It can be used for 29 1.1 christos 30 1.1 christos o Creation and management of private keys, public keys and parameters 31 1.1 christos o Public key cryptographic operations 32 1.1 christos o Creation of X.509 certificates, CSRs and CRLs 33 1.1 christos o Calculation of Message Digests and Message Authentication Codes 34 1.1 christos o Encryption and Decryption with Ciphers 35 1.1 christos o SSL/TLS Client and Server Tests 36 1.1 christos o Handling of S/MIME signed or encrypted mail 37 1.1 christos o Timestamp requests, generation and verification 38 1.1 christos 39 1.1 christos =head1 COMMAND SUMMARY 40 1.1 christos 41 1.1 christos The B<openssl> program provides a rich variety of commands (I<command> in 42 1.1 christos the L</SYNOPSIS> above). 43 1.1 christos Each command can have many options and argument parameters, shown above as 44 1.1 christos I<options> and I<parameters>. 45 1.1 christos 46 1.1 christos Detailed documentation and use cases for most standard subcommands are available 47 1.1 christos (e.g., L<openssl-x509(1)>). The subcommand L<openssl-list(1)> may be used to list 48 1.1 christos subcommands. 49 1.1 christos 50 1.1 christos The command B<no->I<XXX> tests whether a command of the 51 1.1 christos specified name is available. If no command named I<XXX> exists, it 52 1.1 christos returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1 53 1.1 christos and prints I<XXX>. In both cases, the output goes to B<stdout> and 54 1.1 christos nothing is printed to B<stderr>. Additional command line arguments 55 1.1 christos are always ignored. Since for each cipher there is a command of the 56 1.1 christos same name, this provides an easy way for shell scripts to test for the 57 1.1 christos availability of ciphers in the B<openssl> program. (B<no->I<XXX> is 58 1.1 christos not able to detect pseudo-commands such as B<quit>, 59 1.1 christos B<list>, or B<no->I<XXX> itself.) 60 1.1 christos 61 1.1 christos =head2 Configuration Option 62 1.1 christos 63 1.1 christos Many commands use an external configuration file for some or all of their 64 1.1 christos arguments and have a B<-config> option to specify that file. 65 1.1 christos The default name of the file is F<openssl.cnf> in the default certificate 66 1.1 christos storage area, which can be determined from the L<openssl-version(1)> 67 1.1 christos command using the B<-d> or B<-a> option. 68 1.1 christos The environment variable B<OPENSSL_CONF> can be used to specify a different 69 1.1 christos file location or to disable loading a configuration (using the empty string). 70 1.1 christos 71 1.1 christos Among others, the configuration file can be used to load modules 72 1.1 christos and to specify parameters for generating certificates and random numbers. 73 1.1 christos See L<config(5)> for details. 74 1.1 christos 75 1.1 christos =head2 Standard Commands 76 1.1 christos 77 1.1 christos =over 4 78 1.1 christos 79 1.1 christos =item B<asn1parse> 80 1.1 christos 81 1.1 christos Parse an ASN.1 sequence. 82 1.1 christos 83 1.1 christos =item B<ca> 84 1.1 christos 85 1.1 christos Certificate Authority (CA) Management. 86 1.1 christos 87 1.1 christos =item B<ciphers> 88 1.1 christos 89 1.1 christos Cipher Suite Description Determination. 90 1.1 christos 91 1.1 christos =item B<cms> 92 1.1 christos 93 1.1 christos CMS (Cryptographic Message Syntax) command. 94 1.1 christos 95 1.1 christos =item B<crl> 96 1.1 christos 97 1.1 christos Certificate Revocation List (CRL) Management. 98 1.1 christos 99 1.1 christos =item B<crl2pkcs7> 100 1.1 christos 101 1.1 christos CRL to PKCS#7 Conversion. 102 1.1 christos 103 1.1 christos =item B<dgst> 104 1.1 christos 105 1.1 christos Message Digest calculation. MAC calculations are superseded by 106 1.1 christos L<openssl-mac(1)>. 107 1.1 christos 108 1.1 christos =item B<dhparam> 109 1.1 christos 110 1.1 christos Generation and Management of Diffie-Hellman Parameters. Superseded by 111 1.1 christos L<openssl-genpkey(1)> and L<openssl-pkeyparam(1)>. 112 1.1 christos 113 1.1 christos =item B<dsa> 114 1.1 christos 115 1.1 christos DSA Data Management. 116 1.1 christos 117 1.1 christos =item B<dsaparam> 118 1.1 christos 119 1.1 christos DSA Parameter Generation and Management. Superseded by 120 1.1 christos L<openssl-genpkey(1)> and L<openssl-pkeyparam(1)>. 121 1.1 christos 122 1.1 christos =item B<ec> 123 1.1 christos 124 1.1 christos EC (Elliptic curve) key processing. 125 1.1 christos 126 1.1 christos =item B<ecparam> 127 1.1 christos 128 1.1 christos EC parameter manipulation and generation. 129 1.1 christos 130 1.1 christos =item B<enc> 131 1.1 christos 132 1.1 christos Encryption, decryption, and encoding. 133 1.1 christos 134 1.1 christos =item B<engine> 135 1.1 christos 136 1.1 christos Engine (loadable module) information and manipulation. 137 1.1 christos 138 1.1 christos =item B<errstr> 139 1.1 christos 140 1.1 christos Error Number to Error String Conversion. 141 1.1 christos 142 1.1 christos =item B<fipsinstall> 143 1.1 christos 144 1.1 christos FIPS configuration installation. 145 1.1 christos 146 1.1 christos =item B<gendsa> 147 1.1 christos 148 1.1 christos Generation of DSA Private Key from Parameters. Superseded by 149 1.1 christos L<openssl-genpkey(1)> and L<openssl-pkey(1)>. 150 1.1 christos 151 1.1 christos =item B<genpkey> 152 1.1 christos 153 1.1 christos Generation of Private Key or Parameters. 154 1.1 christos 155 1.1 christos =item B<genrsa> 156 1.1 christos 157 1.1 christos Generation of RSA Private Key. Superseded by L<openssl-genpkey(1)>. 158 1.1 christos 159 1.1 christos =item B<help> 160 1.1 christos 161 1.1 christos Display information about a command's options. 162 1.1 christos 163 1.1 christos =item B<info> 164 1.1 christos 165 1.1 christos Display diverse information built into the OpenSSL libraries. 166 1.1 christos 167 1.1 christos =item B<kdf> 168 1.1 christos 169 1.1 christos Key Derivation Functions. 170 1.1 christos 171 1.1 christos =item B<list> 172 1.1 christos 173 1.1 christos List algorithms and features. 174 1.1 christos 175 1.1 christos =item B<mac> 176 1.1 christos 177 1.1 christos Message Authentication Code Calculation. 178 1.1 christos 179 1.1 christos =item B<nseq> 180 1.1 christos 181 1.1 christos Create or examine a Netscape certificate sequence. 182 1.1 christos 183 1.1 christos =item B<ocsp> 184 1.1 christos 185 1.1 christos Online Certificate Status Protocol command. 186 1.1 christos 187 1.1 christos =item B<passwd> 188 1.1 christos 189 1.1 christos Generation of hashed passwords. 190 1.1 christos 191 1.1 christos =item B<pkcs12> 192 1.1 christos 193 1.1 christos PKCS#12 Data Management. 194 1.1 christos 195 1.1 christos =item B<pkcs7> 196 1.1 christos 197 1.1 christos PKCS#7 Data Management. 198 1.1 christos 199 1.1 christos =item B<pkcs8> 200 1.1 christos 201 1.1 christos PKCS#8 format private key conversion command. 202 1.1 christos 203 1.1 christos =item B<pkey> 204 1.1 christos 205 1.1 christos Public and private key management. 206 1.1 christos 207 1.1 christos =item B<pkeyparam> 208 1.1 christos 209 1.1 christos Public key algorithm parameter management. 210 1.1 christos 211 1.1 christos =item B<pkeyutl> 212 1.1 christos 213 1.1 christos Public key algorithm cryptographic operation command. 214 1.1 christos 215 1.1 christos =item B<prime> 216 1.1 christos 217 1.1 christos Compute prime numbers. 218 1.1 christos 219 1.1 christos =item B<rand> 220 1.1 christos 221 1.1 christos Generate pseudo-random bytes. 222 1.1 christos 223 1.1 christos =item B<rehash> 224 1.1 christos 225 1.1 christos Create symbolic links to certificate and CRL files named by the hash values. 226 1.1 christos 227 1.1 christos =item B<req> 228 1.1 christos 229 1.1 christos PKCS#10 X.509 Certificate Signing Request (CSR) Management. 230 1.1 christos 231 1.1 christos =item B<rsa> 232 1.1 christos 233 1.1 christos RSA key management. 234 1.1 christos 235 1.1 christos =item B<rsautl> 236 1.1 christos 237 1.1 christos RSA command for signing, verification, encryption, and decryption. Superseded 238 1.1 christos by L<openssl-pkeyutl(1)>. 239 1.1 christos 240 1.1 christos =item B<s_client> 241 1.1 christos 242 1.1 christos This implements a generic SSL/TLS client which can establish a transparent 243 1.1 christos connection to a remote server speaking SSL/TLS. It's intended for testing 244 1.1 christos purposes only and provides only rudimentary interface functionality but 245 1.1 christos internally uses mostly all functionality of the OpenSSL B<ssl> library. 246 1.1 christos 247 1.1 christos =item B<s_server> 248 1.1 christos 249 1.1 christos This implements a generic SSL/TLS server which accepts connections from remote 250 1.1 christos clients speaking SSL/TLS. It's intended for testing purposes only and provides 251 1.1 christos only rudimentary interface functionality but internally uses mostly all 252 1.1 christos functionality of the OpenSSL B<ssl> library. It provides both an own command 253 1.1 christos line oriented protocol for testing SSL functions and a simple HTTP response 254 1.1 christos facility to emulate an SSL/TLS-aware webserver. 255 1.1 christos 256 1.1 christos =item B<s_time> 257 1.1 christos 258 1.1 christos SSL Connection Timer. 259 1.1 christos 260 1.1 christos =item B<sess_id> 261 1.1 christos 262 1.1 christos SSL Session Data Management. 263 1.1 christos 264 1.1 christos =item B<smime> 265 1.1 christos 266 1.1 christos S/MIME mail processing. 267 1.1 christos 268 1.1 christos =item B<speed> 269 1.1 christos 270 1.1 christos Algorithm Speed Measurement. 271 1.1 christos 272 1.1 christos =item B<spkac> 273 1.1 christos 274 1.1 christos SPKAC printing and generating command. 275 1.1 christos 276 1.1 christos =item B<srp> 277 1.1 christos 278 1.1 christos Maintain SRP password file. This command is deprecated. 279 1.1 christos 280 1.1 christos =item B<storeutl> 281 1.1 christos 282 1.1 christos Command to list and display certificates, keys, CRLs, etc. 283 1.1 christos 284 1.1 christos =item B<ts> 285 1.1 christos 286 1.1 christos Time Stamping Authority command. 287 1.1 christos 288 1.1 christos =item B<verify> 289 1.1 christos 290 1.1 christos X.509 Certificate Verification. 291 1.1 christos See also the L<openssl-verification-options(1)> manual page. 292 1.1 christos 293 1.1 christos =item B<version> 294 1.1 christos 295 1.1 christos OpenSSL Version Information. 296 1.1 christos 297 1.1 christos =item B<x509> 298 1.1 christos 299 1.1 christos X.509 Certificate Data Management. 300 1.1 christos 301 1.1 christos =back 302 1.1 christos 303 1.1 christos =head2 Message Digest Commands 304 1.1 christos 305 1.1 christos =over 4 306 1.1 christos 307 1.1 christos =item B<blake2b512> 308 1.1 christos 309 1.1 christos BLAKE2b-512 Digest 310 1.1 christos 311 1.1 christos =item B<blake2s256> 312 1.1 christos 313 1.1 christos BLAKE2s-256 Digest 314 1.1 christos 315 1.1 christos =item B<md2> 316 1.1 christos 317 1.1 christos MD2 Digest 318 1.1 christos 319 1.1 christos =item B<md4> 320 1.1 christos 321 1.1 christos MD4 Digest 322 1.1 christos 323 1.1 christos =item B<md5> 324 1.1 christos 325 1.1 christos MD5 Digest 326 1.1 christos 327 1.1 christos =item B<mdc2> 328 1.1 christos 329 1.1 christos MDC2 Digest 330 1.1 christos 331 1.1 christos =item B<rmd160> 332 1.1 christos 333 1.1 christos RMD-160 Digest 334 1.1 christos 335 1.1 christos =item B<sha1> 336 1.1 christos 337 1.1 christos SHA-1 Digest 338 1.1 christos 339 1.1 christos =item B<sha224> 340 1.1 christos 341 1.1 christos SHA-2 224 Digest 342 1.1 christos 343 1.1 christos =item B<sha256> 344 1.1 christos 345 1.1 christos SHA-2 256 Digest 346 1.1 christos 347 1.1 christos =item B<sha384> 348 1.1 christos 349 1.1 christos SHA-2 384 Digest 350 1.1 christos 351 1.1 christos =item B<sha512> 352 1.1 christos 353 1.1 christos SHA-2 512 Digest 354 1.1 christos 355 1.1 christos =item B<sha3-224> 356 1.1 christos 357 1.1 christos SHA-3 224 Digest 358 1.1 christos 359 1.1 christos =item B<sha3-256> 360 1.1 christos 361 1.1 christos SHA-3 256 Digest 362 1.1 christos 363 1.1 christos =item B<sha3-384> 364 1.1 christos 365 1.1 christos SHA-3 384 Digest 366 1.1 christos 367 1.1 christos =item B<sha3-512> 368 1.1 christos 369 1.1 christos SHA-3 512 Digest 370 1.1 christos 371 1.1 christos =item B<keccak-224> 372 1.1 christos 373 1.1 christos KECCAK 224 Digest 374 1.1 christos 375 1.1 christos =item B<keccak-256> 376 1.1 christos 377 1.1 christos KECCAK 256 Digest 378 1.1 christos 379 1.1 christos =item B<keccak-384> 380 1.1 christos 381 1.1 christos KECCAK 384 Digest 382 1.1 christos 383 1.1 christos =item B<keccak-512> 384 1.1 christos 385 1.1 christos KECCAK 512 Digest 386 1.1 christos 387 1.1 christos =item B<shake128> 388 1.1 christos 389 1.1 christos SHA-3 SHAKE128 Digest 390 1.1 christos 391 1.1 christos =item B<shake256> 392 1.1 christos 393 1.1 christos SHA-3 SHAKE256 Digest 394 1.1 christos 395 1.1 christos =item B<sm3> 396 1.1 christos 397 1.1 christos SM3 Digest 398 1.1 christos 399 1.1 christos =back 400 1.1 christos 401 1.1 christos =head2 Encryption, Decryption, and Encoding Commands 402 1.1 christos 403 1.1 christos The following aliases provide convenient access to the most used encodings 404 1.1 christos and ciphers. 405 1.1 christos 406 1.1 christos Depending on how OpenSSL was configured and built, not all ciphers listed 407 1.1 christos here may be present. See L<openssl-enc(1)> for more information. 408 1.1 christos 409 1.1 christos =over 4 410 1.1 christos 411 1.1 christos =item B<aes128>, B<aes-128-cbc>, B<aes-128-cfb>, B<aes-128-ctr>, B<aes-128-ecb>, B<aes-128-ofb> 412 1.1 christos 413 1.1 christos AES-128 Cipher 414 1.1 christos 415 1.1 christos =item B<aes192>, B<aes-192-cbc>, B<aes-192-cfb>, B<aes-192-ctr>, B<aes-192-ecb>, B<aes-192-ofb> 416 1.1 christos 417 1.1 christos AES-192 Cipher 418 1.1 christos 419 1.1 christos =item B<aes256>, B<aes-256-cbc>, B<aes-256-cfb>, B<aes-256-ctr>, B<aes-256-ecb>, B<aes-256-ofb> 420 1.1 christos 421 1.1 christos AES-256 Cipher 422 1.1 christos 423 1.1 christos =item B<aria128>, B<aria-128-cbc>, B<aria-128-cfb>, B<aria-128-ctr>, B<aria-128-ecb>, B<aria-128-ofb> 424 1.1 christos 425 1.1 christos Aria-128 Cipher 426 1.1 christos 427 1.1 christos =item B<aria192>, B<aria-192-cbc>, B<aria-192-cfb>, B<aria-192-ctr>, B<aria-192-ecb>, B<aria-192-ofb> 428 1.1 christos 429 1.1 christos Aria-192 Cipher 430 1.1 christos 431 1.1 christos =item B<aria256>, B<aria-256-cbc>, B<aria-256-cfb>, B<aria-256-ctr>, B<aria-256-ecb>, B<aria-256-ofb> 432 1.1 christos 433 1.1 christos Aria-256 Cipher 434 1.1 christos 435 1.1 christos =item B<base64> 436 1.1 christos 437 1.1 christos Base64 Encoding 438 1.1 christos 439 1.1 christos =item B<bf>, B<bf-cbc>, B<bf-cfb>, B<bf-ecb>, B<bf-ofb> 440 1.1 christos 441 1.1 christos Blowfish Cipher 442 1.1 christos 443 1.1 christos =item B<camellia128>, B<camellia-128-cbc>, B<camellia-128-cfb>, B<camellia-128-ctr>, B<camellia-128-ecb>, B<camellia-128-ofb> 444 1.1 christos 445 1.1 christos Camellia-128 Cipher 446 1.1 christos 447 1.1 christos =item B<camellia192>, B<camellia-192-cbc>, B<camellia-192-cfb>, B<camellia-192-ctr>, B<camellia-192-ecb>, B<camellia-192-ofb> 448 1.1 christos 449 1.1 christos Camellia-192 Cipher 450 1.1 christos 451 1.1 christos =item B<camellia256>, B<camellia-256-cbc>, B<camellia-256-cfb>, B<camellia-256-ctr>, B<camellia-256-ecb>, B<camellia-256-ofb> 452 1.1 christos 453 1.1 christos Camellia-256 Cipher 454 1.1 christos 455 1.1 christos =item B<cast>, B<cast-cbc> 456 1.1 christos 457 1.1 christos CAST Cipher 458 1.1 christos 459 1.1 christos =item B<cast5-cbc>, B<cast5-cfb>, B<cast5-ecb>, B<cast5-ofb> 460 1.1 christos 461 1.1 christos CAST5 Cipher 462 1.1 christos 463 1.1 christos =item B<chacha20> 464 1.1 christos 465 1.1 christos Chacha20 Cipher 466 1.1 christos 467 1.1 christos =item B<des>, B<des-cbc>, B<des-cfb>, B<des-ecb>, B<des-ede>, B<des-ede-cbc>, B<des-ede-cfb>, B<des-ede-ofb>, B<des-ofb> 468 1.1 christos 469 1.1 christos DES Cipher 470 1.1 christos 471 1.1 christos =item B<des3>, B<desx>, B<des-ede3>, B<des-ede3-cbc>, B<des-ede3-cfb>, B<des-ede3-ofb> 472 1.1 christos 473 1.1 christos Triple-DES Cipher 474 1.1 christos 475 1.1 christos =item B<idea>, B<idea-cbc>, B<idea-cfb>, B<idea-ecb>, B<idea-ofb> 476 1.1 christos 477 1.1 christos IDEA Cipher 478 1.1 christos 479 1.1 christos =item B<rc2>, B<rc2-cbc>, B<rc2-cfb>, B<rc2-ecb>, B<rc2-ofb> 480 1.1 christos 481 1.1 christos RC2 Cipher 482 1.1 christos 483 1.1 christos =item B<rc4> 484 1.1 christos 485 1.1 christos RC4 Cipher 486 1.1 christos 487 1.1 christos =item B<rc5>, B<rc5-cbc>, B<rc5-cfb>, B<rc5-ecb>, B<rc5-ofb> 488 1.1 christos 489 1.1 christos RC5 Cipher 490 1.1 christos 491 1.1 christos =item B<seed>, B<seed-cbc>, B<seed-cfb>, B<seed-ecb>, B<seed-ofb> 492 1.1 christos 493 1.1 christos SEED Cipher 494 1.1 christos 495 1.1 christos =item B<sm4>, B<sm4-cbc>, B<sm4-cfb>, B<sm4-ctr>, B<sm4-ecb>, B<sm4-ofb> 496 1.1 christos 497 1.1 christos SM4 Cipher 498 1.1 christos 499 1.1 christos =back 500 1.1 christos 501 1.1 christos =head1 OPTIONS 502 1.1 christos 503 1.1 christos Details of which options are available depend on the specific command. 504 1.1 christos This section describes some common options with common behavior. 505 1.1 christos 506 1.1 christos =head2 Program Options 507 1.1 christos 508 1.1 christos These options can be specified without a command specified to get help 509 1.1 christos or version information. 510 1.1 christos 511 1.1 christos =over 4 512 1.1 christos 513 1.1 christos =item B<-help> 514 1.1 christos 515 1.1 christos Provides a terse summary of all options. 516 1.1 christos For more detailed information, each command supports a B<-help> option. 517 1.1 christos Accepts B<--help> as well. 518 1.1 christos 519 1.1 christos =item B<-version> 520 1.1 christos 521 1.1 christos Provides a terse summary of the B<openssl> program version. 522 1.1 christos For more detailed information see L<openssl-version(1)>. 523 1.1 christos Accepts B<--version> as well. 524 1.1 christos 525 1.1 christos =back 526 1.1 christos 527 1.1 christos =head2 Common Options 528 1.1 christos 529 1.1 christos =over 4 530 1.1 christos 531 1.1 christos =item B<-help> 532 1.1 christos 533 1.1 christos If an option takes an argument, the "type" of argument is also given. 534 1.1 christos 535 1.1 christos =item B<--> 536 1.1 christos 537 1.1 christos This terminates the list of options. It is mostly useful if any filename 538 1.1 christos parameters start with a minus sign: 539 1.1 christos 540 1.1 christos openssl verify [flags...] -- -cert1.pem... 541 1.1 christos 542 1.1 christos =back 543 1.1 christos 544 1.1 christos =head2 Format Options 545 1.1 christos 546 1.1 christos See L<openssl-format-options(1)> for manual page. 547 1.1 christos 548 1.1 christos =head2 Pass Phrase Options 549 1.1 christos 550 1.1 christos See the L<openssl-passphrase-options(1)> manual page. 551 1.1 christos 552 1.1 christos =head2 Random State Options 553 1.1 christos 554 1.1 christos Prior to OpenSSL 1.1.1, it was common for applications to store information 555 1.1 christos about the state of the random-number generator in a file that was loaded 556 1.1 christos at startup and rewritten upon exit. On modern operating systems, this is 557 1.1 christos generally no longer necessary as OpenSSL will seed itself from a trusted 558 1.1 christos entropy source provided by the operating system. These flags are still 559 1.1 christos supported for special platforms or circumstances that might require them. 560 1.1 christos 561 1.1 christos It is generally an error to use the same seed file more than once and 562 1.1 christos every use of B<-rand> should be paired with B<-writerand>. 563 1.1 christos 564 1.1 christos =over 4 565 1.1 christos 566 1.1 christos =item B<-rand> I<files> 567 1.1 christos 568 1.1 christos A file or files containing random data used to seed the random number 569 1.1 christos generator. 570 1.1 christos Multiple files can be specified separated by an OS-dependent character. 571 1.1 christos The separator is C<;> for MS-Windows, C<,> for OpenVMS, and C<:> for 572 1.1 christos all others. Another way to specify multiple files is to repeat this flag 573 1.1 christos with different filenames. 574 1.1 christos 575 1.1 christos =item B<-writerand> I<file> 576 1.1 christos 577 1.1 christos Writes the seed data to the specified I<file> upon exit. 578 1.1 christos This file can be used in a subsequent command invocation. 579 1.1 christos 580 1.1 christos =back 581 1.1 christos 582 1.1 christos =head2 Certificate Verification Options 583 1.1 christos 584 1.1 christos See the L<openssl-verification-options(1)> manual page. 585 1.1 christos 586 1.1 christos =head2 Name Format Options 587 1.1 christos 588 1.1 christos See the L<openssl-namedisplay-options(1)> manual page. 589 1.1 christos 590 1.1 christos =head2 TLS Version Options 591 1.1 christos 592 1.1 christos Several commands use SSL, TLS, or DTLS. By default, the commands use TLS and 593 1.1 christos clients will offer the lowest and highest protocol version they support, 594 1.1 christos and servers will pick the highest version that the client offers that is also 595 1.1 christos supported by the server. 596 1.1 christos 597 1.1 christos The options below can be used to limit which protocol versions are used, 598 1.1 christos and whether TCP (SSL and TLS) or UDP (DTLS) is used. 599 1.1 christos Note that not all protocols and flags may be available, depending on how 600 1.1 christos OpenSSL was built. 601 1.1 christos 602 1.1 christos =over 4 603 1.1 christos 604 1.1 christos =item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>, B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3> 605 1.1 christos 606 1.1 christos These options require or disable the use of the specified SSL or TLS protocols. 607 1.1 christos When a specific TLS version is required, only that version will be offered or 608 1.1 christos accepted. 609 1.1 christos Only one specific protocol can be given and it cannot be combined with any of 610 1.1 christos the B<no_> options. 611 1.1 christos The B<no_*> options do not work with B<s_time> and B<ciphers> commands but work with 612 1.1 christos B<s_client> and B<s_server> commands. 613 1.1 christos 614 1.1 christos =item B<-dtls>, B<-dtls1>, B<-dtls1_2> 615 1.1 christos 616 1.1 christos These options specify to use DTLS instead of TLS. 617 1.1 christos With B<-dtls>, clients will negotiate any supported DTLS protocol version. 618 1.1 christos Use the B<-dtls1> or B<-dtls1_2> options to support only DTLS1.0 or DTLS1.2, 619 1.1 christos respectively. 620 1.1 christos 621 1.1 christos =back 622 1.1 christos 623 1.1 christos =head2 Engine Options 624 1.1 christos 625 1.1 christos =over 4 626 1.1 christos 627 1.1 christos =item B<-engine> I<id> 628 1.1 christos 629 1.1 christos Load the engine identified by I<id> and use all the methods it implements 630 1.1 christos (algorithms, key storage, etc.), unless specified otherwise in the 631 1.1 christos command-specific documentation or it is configured to do so, as described in 632 1.1 christos L<config(5)/Engine Configuration>. 633 1.1 christos 634 1.1 christos The engine will be used for key ids specified with B<-key> and similar 635 1.1 christos options when an option like B<-keyform engine> is given. 636 1.1 christos 637 1.1 christos A special case is the C<loader_attic> engine, which 638 1.1 christos is meant just for internal OpenSSL testing purposes and 639 1.1 christos supports loading keys, parameters, certificates, and CRLs from files. 640 1.1 christos When this engine is used, files with such credentials are read via this engine. 641 1.1 christos Using the C<file:> schema is optional; a plain file (path) name will do. 642 1.1 christos 643 1.1 christos =back 644 1.1 christos 645 1.1 christos Options specifying keys, like B<-key> and similar, can use the generic 646 1.1 christos OpenSSL engine key loading URI scheme C<org.openssl.engine:> to retrieve 647 1.1 christos private keys and public keys. The URI syntax is as follows, in simplified 648 1.1 christos form: 649 1.1 christos 650 1.1 christos org.openssl.engine:{engineid}:{keyid} 651 1.1 christos 652 1.1 christos Where C<{engineid}> is the identity/name of the engine, and C<{keyid}> is a 653 1.1 christos key identifier that's acceptable by that engine. For example, when using an 654 1.1 christos engine that interfaces against a PKCS#11 implementation, the generic key URI 655 1.1 christos would be something like this (this happens to be an example for the PKCS#11 656 1.1 christos engine that's part of OpenSC): 657 1.1 christos 658 1.1 christos -key org.openssl.engine:pkcs11:label_some-private-key 659 1.1 christos 660 1.1 christos As a third possibility, for engines and providers that have implemented 661 1.1 christos their own L<OSSL_STORE_LOADER(3)>, C<org.openssl.engine:> should not be 662 1.1 christos necessary. For a PKCS#11 implementation that has implemented such a loader, 663 1.1 christos the PKCS#11 URI as defined in RFC 7512 should be possible to use directly: 664 1.1 christos 665 1.1 christos -key pkcs11:object=some-private-key;pin-value=1234 666 1.1 christos 667 1.1 christos =head2 Provider Options 668 1.1 christos 669 1.1 christos =over 4 670 1.1 christos 671 1.1 christos =item B<-provider> I<name> 672 1.1 christos 673 1.1 christos Load and initialize the provider identified by I<name>. The I<name> 674 1.1 christos can be also a path to the provider module. In that case the provider name 675 1.1 christos will be the specified path and not just the provider module name. 676 1.1 christos Interpretation of relative paths is platform specific. The configured 677 1.1 christos "MODULESDIR" path, B<OPENSSL_MODULES> environment variable, or the path 678 1.1 christos specified by B<-provider-path> is prepended to relative paths. 679 1.1 christos See L<provider(7)> for a more detailed description. 680 1.1 christos 681 1.1 christos =item B<-provider-path> I<path> 682 1.1 christos 683 1.1 christos Specifies the search path that is to be used for looking for providers. 684 1.1 christos Equivalently, the B<OPENSSL_MODULES> environment variable may be set. 685 1.1 christos 686 1.1 christos =item B<-provparam> I<[name:]key=value> 687 1.1 christos 688 1.1 christos Set configuration parameter I<key> to value I<val> in provider I<name> 689 1.1 christos (optional), if I<name> is not specified, the setting will be applied to all 690 1.1 christos loaded providers. 691 1.1 christos This option can be specified multiple times, to set multiple parameters. 692 1.1 christos Options that specify nondefault providers to load should precede this option 693 1.1 christos if the setting is intended to apply to the to be loaded providers. 694 1.1 christos Parameters that only affect provider initialisation must, for now, be set in 695 1.1 christos the configuration file, only parameters that are also queried as needed later 696 1.1 christos have any affect when set via this interface. 697 1.1 christos Only UTF8-string-valued parameters are supported. 698 1.1 christos See the documentation of the specific provider and associated algorithms for 699 1.1 christos any supported parameters. 700 1.1 christos 701 1.1 christos =item B<-propquery> I<propq> 702 1.1 christos 703 1.1 christos Specifies the I<property query clause> to be used when fetching algorithms 704 1.1 christos from the loaded providers. 705 1.1 christos See L<property(7)> for a more detailed description. 706 1.1 christos 707 1.1 christos =back 708 1.1 christos 709 1.1 christos =head1 ENVIRONMENT 710 1.1 christos 711 1.1 christos The OpenSSL libraries can take some configuration parameters from the 712 1.1 christos environment. 713 1.1 christos 714 1.1 christos For information about all environment variables used by the OpenSSL libraries, 715 1.1 christos such as B<OPENSSL_CONF>, B<OPENSSL_MODULES>, and B<OPENSSL_TRACE>, 716 1.1 christos see L<openssl-env(7)>. 717 1.1 christos 718 1.1 christos For information about the use of environment variables in configuration, 719 1.1 christos see L<config(5)/ENVIRONMENT>. 720 1.1 christos 721 1.1 christos For information about specific commands, see L<openssl-engine(1)>, 722 1.1 christos L<openssl-rehash(1)>, and L<tsget(1)>. 723 1.1 christos 724 1.1 christos For information about querying or specifying CPU architecture flags, see 725 1.1.1.2 christos L<OPENSSL_ia32cap(3)>, L<OPENSSL_ppccap(3)>, L<OPENSSL_s390xcap(3)>, 726 1.1.1.2 christos and L<OPENSSL_riscvcap(3)>. 727 1.1 christos 728 1.1 christos =head1 SEE ALSO 729 1.1 christos 730 1.1 christos L<openssl-asn1parse(1)>, 731 1.1 christos L<openssl-ca(1)>, 732 1.1 christos L<openssl-ciphers(1)>, 733 1.1 christos L<openssl-cms(1)>, 734 1.1 christos L<openssl-crl(1)>, 735 1.1 christos L<openssl-crl2pkcs7(1)>, 736 1.1 christos L<openssl-dgst(1)>, 737 1.1 christos L<openssl-dhparam(1)>, 738 1.1 christos L<openssl-dsa(1)>, 739 1.1 christos L<openssl-dsaparam(1)>, 740 1.1 christos L<openssl-ec(1)>, 741 1.1 christos L<openssl-ecparam(1)>, 742 1.1 christos L<openssl-enc(1)>, 743 1.1 christos L<openssl-engine(1)>, 744 1.1 christos L<openssl-errstr(1)>, 745 1.1 christos L<openssl-gendsa(1)>, 746 1.1 christos L<openssl-genpkey(1)>, 747 1.1 christos L<openssl-genrsa(1)>, 748 1.1 christos L<openssl-kdf(1)>, 749 1.1 christos L<openssl-list(1)>, 750 1.1 christos L<openssl-mac(1)>, 751 1.1 christos L<openssl-nseq(1)>, 752 1.1 christos L<openssl-ocsp(1)>, 753 1.1 christos L<openssl-passwd(1)>, 754 1.1 christos L<openssl-pkcs12(1)>, 755 1.1 christos L<openssl-pkcs7(1)>, 756 1.1 christos L<openssl-pkcs8(1)>, 757 1.1 christos L<openssl-pkey(1)>, 758 1.1 christos L<openssl-pkeyparam(1)>, 759 1.1 christos L<openssl-pkeyutl(1)>, 760 1.1 christos L<openssl-prime(1)>, 761 1.1 christos L<openssl-rand(1)>, 762 1.1 christos L<openssl-rehash(1)>, 763 1.1 christos L<openssl-req(1)>, 764 1.1 christos L<openssl-rsa(1)>, 765 1.1 christos L<openssl-rsautl(1)>, 766 1.1 christos L<openssl-s_client(1)>, 767 1.1 christos L<openssl-s_server(1)>, 768 1.1 christos L<openssl-s_time(1)>, 769 1.1 christos L<openssl-sess_id(1)>, 770 1.1 christos L<openssl-smime(1)>, 771 1.1 christos L<openssl-speed(1)>, 772 1.1 christos L<openssl-spkac(1)>, 773 1.1 christos L<openssl-srp(1)>, 774 1.1 christos L<openssl-storeutl(1)>, 775 1.1 christos L<openssl-ts(1)>, 776 1.1 christos L<openssl-verify(1)>, 777 1.1 christos L<openssl-version(1)>, 778 1.1 christos L<openssl-x509(1)>, 779 1.1 christos L<config(5)>, 780 1.1 christos L<crypto(7)>, 781 1.1 christos L<openssl-env(7)>. 782 1.1 christos L<ssl(7)>, 783 1.1 christos L<x509v3_config(5)> 784 1.1 christos 785 1.1 christos 786 1.1 christos =head1 HISTORY 787 1.1 christos 788 1.1 christos The B<list> -I<XXX>B<-algorithms> options were added in OpenSSL 1.0.0; 789 1.1 christos For notes on the availability of other commands, see their individual 790 1.1 christos manual pages. 791 1.1 christos 792 1.1 christos The B<-issuer_checks> option is deprecated as of OpenSSL 1.1.0 and 793 1.1 christos is silently ignored. 794 1.1 christos 795 1.1 christos The B<-xcertform> and B<-xkeyform> options 796 1.1 christos are obsolete since OpenSSL 3.0 and have no effect. 797 1.1 christos 798 1.1 christos The interactive mode, which could be invoked by running C<openssl> 799 1.1 christos with no further arguments, was removed in OpenSSL 3.0, and running 800 1.1 christos that program with no arguments is now equivalent to C<openssl help>. 801 1.1 christos 802 1.1 christos =head1 COPYRIGHT 803 1.1 christos 804 1.1 christos Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved. 805 1.1 christos 806 1.1 christos Licensed under the Apache License 2.0 (the "License"). You may not use 807 1.1 christos this file except in compliance with the License. You can obtain a copy 808 1.1 christos in the file LICENSE in the source distribution or at 809 1.1 christos L<https://www.openssl.org/source/license.html>. 810 1.1 christos 811 1.1 christos =cut 812