{"id":290,"date":"2011-10-21T12:03:23","date_gmt":"2011-10-21T10:03:23","guid":{"rendered":"http:\/\/www.zerfallskonstante.de\/?p=290"},"modified":"2015-03-09T14:10:09","modified_gmt":"2015-03-09T13:10:09","slug":"openssl","status":"publish","type":"post","link":"https:\/\/www.zerfallskonstante.de\/?p=290","title":{"rendered":"man &#8211; openssl, genrsa, req, ca, x509, pkcs12"},"content":{"rendered":"<p>In OpenSSL sind mehrere Anwendungen zusammengefasst, die im Weiteren als COMMANDS bezeichnet werden. Im Folgenden sind einige COMMANDS aufgef\u00fchrt, die beim Betrieb einer RootCA Verwendung gefunden haben.<\/p>\n<p>openssl &#8211; OpenSSL command line tool<\/p>\n<p>openssl command [ command_opts ] [ command_args ]<br \/>\n<!--more--><br \/>\nSTANDARD COMMANDS:<br \/>\ngenrsa Generation of RSA Parameters.<br \/>\nreq X.509 Certificate Signing Request (CSR) Management.<br \/>\nca Certificate Authority (CA) Management.<br \/>\nx509 X.509 Certificate Data Management.<br \/>\npkcs12 PKCS#12 Data Management.<\/p>\n<p><strong>genrsa &#8211; generate an RSA private key<\/strong><\/p>\n<p>SYNOPSIS<br \/>\nopenssl genrsa [-out filename] [-passout arg] [-des] [-des3] [-idea] [-f4] [-3] [-rand file(s)] [-engine id] [numbits]<\/p>\n<p>DESCRIPTION<br \/>\nThe genrsa command generates an RSA private key.<\/p>\n<p>OPTIONS<br \/>\n-out filename<br \/>\nthe output filename. If this argument is not specified then standard output is used.<\/p>\n<p>-passout arg<br \/>\nthe output file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl(1).<\/p>\n<p>-des|-des3|-idea<br \/>\nThese options encrypt the private key with the DES, triple DES, or the IDEA ciphers respectively before outputting it. If none of these options is specified no encryption is<br \/>\nused. If encryption is used a pass phrase is prompted for if it is not supplied via the -passout argument.<\/p>\n<p>-F4|-3<br \/>\nthe public exponent to use, either 65537 or 3. The default is 65537.<\/p>\n<p>-rand file(s)<br \/>\na file or files containing random data used to seed the random number generator, or an EGD socket (see RAND_egd(3)). Multiple files can be specified separated by a OS-<br \/>\ndependent character. The separator is ; for MS-Windows, , for OpenVMS, and : for all others.<\/p>\n<p>-engine id<br \/>\nspecifying an engine (by it&#8217;s unique id string) will cause req to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine<br \/>\nwill then be set as the default for all available algorithms.<\/p>\n<p>numbits<br \/>\nthe size of the private key to generate in bits. This must be the last option specified. The default is 512.<\/p>\n<p><strong>req &#8211; PKCS#10 certificate request and certificate generating utility.<\/strong><\/p>\n<p>SYNOPSIS<br \/>\nopenssl req [-inform PEM|DER] [-outform PEM|DER] [-out filename] [-verify] [-new] [-key filename]<br \/>\n[-configfilename] [-x509] [-days n] [-set_serial n] [-extensions section] [-reqexts section] [verbose]<\/p>\n<p>DESCRIPTION<br \/>\nThe req command primarily creates and processes certificate requests in PKCS#10 format. It can additionally create self signed certificates for use as root CAs for example.<\/p>\n<p>COMMAND OPTIONS<br \/>\n-inform DER|PEM<br \/>\nThis specifies the input format. The DER option uses an ASN1 DER encoded form compatible with the PKCS#10. The PEM form is the default format: it consists of the DER format<br \/>\nbase64 encoded with additional header and footer lines.<\/p>\n<p>-outform DER|PEM<br \/>\nThis specifies the output format, the options have the same meaning as the -inform option.<\/p>\n<p>-in filename<br \/>\nThis specifies the input filename to read a request from or standard input if this option is not specified. A request is only read if the creation options (-new and -newkey)<br \/>\nare not specified.<\/p>\n<p>-verify<br \/>\nverifies the signature on the request.<\/p>\n<p>-new<br \/>\nthis option generates a new certificate request. It will prompt the user for the relevant field values. The actual fields prompted for and their maximum and minimum sizes are<br \/>\nspecified in the configuration file and any requested extensions.<\/p>\n<p>If the -key option is not used it will generate a new RSA private key using information specified in the configuration file.<\/p>\n<p>-key filename<br \/>\nThis specifies the file to read the private key from. It also accepts PKCS#8 format private keys for PEM format files.<\/p>\n<p>-keyform PEM|DER<br \/>\nthe format of the private key file specified in the -key argument. PEM is the default.<\/p>\n<p>-x509<br \/>\nthis option outputs a self signed certificate instead of a certificate request. This is typically used to generate a test certificate or a self signed root CA. The extensions<br \/>\nadded to the certificate (if any) are specified in the configuration file. Unless specified using the set_serial option 0 will be used for the serial number.<\/p>\n<p>-days n<br \/>\nwhen the -x509 option is being used this specifies the number of days to certify the certificate for. The default is 30 days.<\/p>\n<p>-set_serial n<br \/>\nserial number to use when outputting a self signed certificate. This may be specified as a decimal value or a hex value if preceded by 0x. It is possible to use negative<br \/>\nserial numbers but this is not recommended.<\/p>\n<p>-verbose<br \/>\nprint extra details about the operations being performed.<\/p>\n<p><strong>ca &#8211; sample minimal CA application<\/strong><\/p>\n<p>SYNOPSIS<br \/>\nopenssl ca [-verbose] [-config filename] [-name section] [-gencrl] [-revoke file] [-crl_reason reason] [-crl_hold instruction] [-crl_compromise time] [-crl_CA_compromise time]<br \/>\n[-crldays days] [-crlhours hours] [-crlexts section] [-startdate date] [-enddate date] [-days arg] [-md arg] [-policy arg] [-keyfile arg] [-key arg] [-passin arg] [-cert file]<br \/>\n[-selfsign] [-in file] [-out file] [-notext] [-outdir dir] [-infiles] [-spkac file] [-ss_cert file] [-preserveDN] [-noemailDN] [-batch] [-msie_hack] [-extensions section]<br \/>\n[-extfile section] [-engine id] [-subj arg] [-utf8] [-multivalue-rdn]<\/p>\n<p>DESCRIPTION<br \/>\nThe ca command is a minimal CA application. It can be used to sign certificate requests in a variety of forms and generate CRLs it also maintains a text database of issued<br \/>\ncertificates and their status.<\/p>\n<p>The options descriptions will be divided into each purpose.<\/p>\n<p><strong>x509 &#8211; Certificate display and signing utility<\/strong><\/p>\n<p>SYNOPSIS<\/p>\n<p>openssl x509 [-in filename] [-out filename] [-purpose] [-dates] [-noout] [-inform DER|PEM] [-outform DER|PEM]<\/p>\n<p>DESCRIPTION<br \/>\nThe x509(1) command is a multi purpose certificate utility. It can be used<br \/>\nto display certificate information, convert certificates to various<br \/>\nforms, sign certificate requests like a &#8222;mini CA&#8220; or edit certificate<br \/>\ntrust settings.<\/p>\n<p>Since there are a large number of options they will split up into<br \/>\nvarious sections.<\/p>\n<p>OPTIONS<br \/>\nINPUT, OUTPUT AND GENERAL PURPOSE OPTIONS<br \/>\n-inform DER|PEM|NET<br \/>\nThis specifies the input format normally the command will expect an<br \/>\nX509 certificate but this can change if other options such as -req<br \/>\nare present. The DER format is the DER encoding of the certificate<br \/>\nand PEM is the base64 encoding of the DER encoding with header and<br \/>\nfooter lines added. The NET option is an obscure Netscape server<br \/>\nformat that is now obsolete.<\/p>\n<p>-outform DER|PEM|NET<br \/>\nThis specifies the output format, the options have the same meaning<br \/>\nas the -inform option.<\/p>\n<p>-in filename<br \/>\nThis specifies the input filename to read a certificate from or<br \/>\nstandard input if this option is not specified.<\/p>\n<p>-out filename<br \/>\nThis specifies the output filename to write to or standard output<br \/>\nby default.<br \/>\nDISPLAY OPTIONS<br \/>\nNote: the -alias and -purpose options are also display options but are<br \/>\ndescribed in the TRUST SETTINGS section.<\/p>\n<p>-text<br \/>\nprints out the certificate in text form. Full details are output<br \/>\nincluding the public key, signature algorithms, issuer and subject<br \/>\nnames, serial number any extensions present and any trust settings.<\/p>\n<p>-noout<br \/>\nthis option prevents output of the encoded version of the request.<\/p>\n<p>-dates<br \/>\nprints out the start and expiry dates of a certificate.<\/p>\n<p><strong>pkcs12 &#8211; PKCS#12 file utility<\/strong><\/p>\n<p>SYNOPSIS<br \/>\nopenssl pkcs12 [-export] [-chain] [-inkey filename] [-certfile<br \/>\nfilename] [-name name] [-caname name] [-in filename] [-out filename]<br \/>\n[-noout] [-nomacver] [-nocerts] [-clcerts] [-cacerts] [-nokeys] [-info]<br \/>\n[-des | -des3 | -idea | -aes128 | -aes192 | -aes256 | -camellia128 |<br \/>\n-camellia192 | -camellia256 | -nodes] [-noiter] [-maciter | -nomaciter<br \/>\n| -nomac] [-twopass] [-descert] [-certpbe cipher] [-keypbe cipher]<br \/>\n[-macalg digest] [-keyex] [-keysig] [-password arg] [-passin arg]<br \/>\n[-passout arg] [-rand file(s)] [-CAfile file] [-CApath dir] [-CSP name]<\/p>\n<p>DESCRIPTION<br \/>\nThe pkcs12 command allows PKCS#12 files (sometimes referred to as PFX<br \/>\nfiles) to be created and parsed. PKCS#12 files are used by several<br \/>\nprograms including Netscape, MSIE and MS Outlook.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In OpenSSL sind mehrere Anwendungen zusammengefasst, die im Weiteren als COMMANDS bezeichnet werden. Im Folgenden sind einige COMMANDS aufgef\u00fchrt, die beim Betrieb einer RootCA Verwendung gefunden haben. openssl &#8211; OpenSSL command line tool openssl command [ command_opts ] [ command_args &hellip; <a href=\"https:\/\/www.zerfallskonstante.de\/?p=290\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,13],"tags":[],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-linux","category-openssl"],"_links":{"self":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290"}],"version-history":[{"count":14,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":657,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=\/wp\/v2\/posts\/290\/revisions\/657"}],"wp:attachment":[{"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zerfallskonstante.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}