⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instructions

📁 simpleca 比起正式的CA来说功能简单
💻
字号:
                         SimpleCA InstructionsSimpleCA is an easy-to-use program that gives a typical sysadmin whoneeds to create certificates an easy interface. It has fewer featuresand options than many CA packages. It allows all options on thecommand-line and in a config file, and comes with a default config filethat has (hopefully) sensible defaults so that the sysadmin can startwriting certs without knowing much.1. Installing SimpleCASimpleCA comes both pre-compiled and as source code. In its pre-compiledversion for Unix-like systems, it is an executable called "simpleca-type",such as "simpleca-linux". For Windows, it is called "simpleca.exe"; you mustalso have the file "cl32.dll" in the same directory as "simpleca.exe". Inthis document, the program name is just shown as "simpleca". For informationon how to build SimpleCA from source code, see the file in the distributioncalled "Building".2. SimpleCA BasicsSimpleCA is a command-line program: it has no graphical user interface.You run the program each time you want to start a certificate authority,to issue a certificate, to view a certificate request, or to viewan already-issued certificate.2.1 Specifying optionsThe options are almost all in the form option=value. There are noleading hyphens on the option names. A typical command line might be:	simpleca create-cert=thecert.out subj-alt=dnsname:example.comMost options take arguments of filenames, directory names, strings, ordates. Some options take no values.- Filenames are OS-specific; the string "STDOUT" can be used to indicate thestandard output stream.- Strings are assumed to be in UTF-8.- Dates are strings and can be given as either YYYYMMDDHHMMSSZ ornnn{h|d|m|y}. For instance "5d" means five days from now.SimpleCA has some restrictions on the data entered that are based onrestrictions on cryplib, the underlying toolking SimpleCA relies on.For example, email addresses must be eight characters long, andpasswords must be at least two characters long.2.2 Config files and command linesSimpleCA allows any option to be put either on the command line or inconfig files. Values of options are overwritten if there are multipleinstances of the option.It is possible to invoke more than one config file by having more thanone "config" option on the command line or in a config file. The optionsare processed in order, starting with the default config file, thenfollowed by the command line. Config files are read from top to bottom;command lines from left to right.Command line options are just like config file options except:- command lines need OS-specific quoting- new lines in config files act as spaces on the command line.- config files can have lines starting with "#" to indicate that theentire line is a commentFor string values that need spaces, the command-line quoting mechanismof the shell must be used but does not need to be used in config files(although it is allowed in config files).The program has only one default value: a built-in default for the"config" option that is set at compile time. On Unix-like systems, thedefault config file is "/etc/simpleca.conf".2.3 Notes on PKIX for SimpleCA usersThis section explains a few PKIX terms as they are used in SimpleCA. Itis not a substitute for understanding the general concepts behind CAsand how PKIX works. The book "Planning for PKI" by Russ Housley and TimPolk (ISBN 0471397024) gives much more detail in a very readablefashion. Serious users might want to read the actual PKIX specifications(although this is usually not necessary); see<http://www.ietf.org/rfc/rfc3280.txt> for more information.2.3.1 EnrollmentIn the PKIX world, "enrollment" means "responding to a request for acertificate". In SimpleCA, the request is always in the form of a file,and the file has to be in PKCS 10 format. These files are sometimescalled "PKCS10 files", "certificate requests", and "certificationrequests". There are a few online enrollment protocols for PKIX, butthey are not heavily used. Instead, most systems use PKCS10 files,sometimes copied-and-pasted in web forms.Basically, the end entity generates a certificate request file, gets itto the SimpleCA system, the SimpleCA adminstrator generates acertificate from it, and gets the certificate back to the user. Gettingthe certificate request file into the SimpleCA system, and getting thegenerated certificate back to the end entity, is done outside ofSimpleCA.2.3.2 Names in certificatesNaming is by far one of the most difficult parts of the PKIXspecification. Different groups have interpreted the PKIX specificationsdifferently for how names should and should not be used. Basically, it'sa mess.PKIX certificates have end entity names in four places: the issuerfield, the issuerAltName field, the subject field, and thesubjectAltName field. (The capitalization of these varies with theiruse.) The issuer is the organization that creates the certificates. Thesubject of a certificate is the entity that the certificate identifies.Each field has one or more values. For example, a certificate mighthave a subject field whose values say that "organization name is ExampleCorportation, city is Anytown, country is US". Or it might havea null subject name, but a subjectAltName field that says "emailaddress is chris@example.com".3. General optionsconfig=filenameLocation of a config file to read. Can be used many times.show-valuesShows the values for all options after processing all config files. Thisdoes not stop processing of the rest of the commands; it just showsthe final value for all the values.help, -help, --help, -?Displays a list of all options, plus a bit of other explanatory text.Causes all other options to be ignored. The value for this option (ifany is given) is ignored.valuesDisplays all the values that can be used with options such as subj andalt, even those defined in config file. Processes all options in orderto read all config files, but doesn't execute any commands. The valuefor this option (if any is given) is ignored.versionShows the version of the program. Causes all other options to beignored.view=filenameShows the contents of a certificate, a certificate request, a key file,or a certificate revocation list (CRL), in human-readable form. Thisoption cannot be given with options in the other sections.cert-dup-dir=directorynameSpecifies a directory to write copies of all certificates and CRLsthat are created. If the directoryname is null, no writing isdone. This directory is useful because you need a copy of eachcertificate that is to be included in a CRL.4. Creating a CAcreate-new-ca=filenameThis creates a new self-signed CA certificate to the file named in theoption. It also creates a key file and an empty certificate revocationlist file, the names of which are prompted for. This option requires apassword that will be used for the new key file. If the password optionis not given, the password is prompted for; if the key-size option isnot given, it is assumed to be 1024 bits.password=textSpecifies the password to be used for protecting the key file. Thisoption is also used in other commands to give the password for anexisting key file when needed.key-size=numberSpecifies the size of the key to be generated. If it is not given,the default is 1024 bits.crldp=stringThe URL that is to go into the crlDistributionPoint field in the CAcertificate.5. Issuing certificatesNote that some of these options involve strings that have punctuationlike semicolons, colons, and so on. If you are entering these options from the command line of an operating system that uses these punctuation marks as special, you will need to use command-linequoting.create-cert=filenameCreates a certificate at the given location. The priv-keyand request options must be set. If a file already exists at thatlocation, it is first backed-up with a time-stamped name.priv-key=filenameLocation of the CA's private key.request=filenameLocation of the PKCS10 certificate request used in the create-certoption.subj=stringSets the subject field of the cert. The format is"subj=[+]abbr:value;abbr:value...", where "abbr" is one of thefollowing:   c   cn   l   o   ou   spIf the first character of the value is "+", the fields are added tothose already given in other options.subj-alt=stringSets the subjectAltName field of the cert. The format is"subj-alt=[+]abbr:value;abbr:value...", where "abbr" is one of thefollowing:   dns   email   ipIf the first character of the value is "+", the fields are added tothose already given in other options.start-date=dateDate used for notBefore. This date must not be before the presenttime.end-date=dateDate used for notAfter.key-usage=stringTurns on bits in the KeyUsage field. The format is"key-usage=usagename;usagename...". The allowable usagenames are:        digitalSignature        nonRepudiation        keyEncipherment        dataEncipherment        keyAgreement        keyCertSign        cRLSign        encipherOnly        decipherOnlyCapitalization is ignored in the usagenames. Not all of these can beused in all certificates.ext-key-usage=stringTurns on bits in the ExtKeyUsageSyntax field. The format is"ext-key-usage=usagename;usagename...". The allowable usagenames are:        codeSigning        directoryService        emailProtection        ipsecEndSystem        ipsecTunnel        ipsecUser        msCertTrustListSigning        msTimestampSigning        msEncryptedFilesystem        msIndividualCodeSigning        msCommercialCodeSigning        msServerGatedCrypto        nsServerGatedCrypto        vsServerGatedCryptoCa        serverAuth        clientAuth        timestampingCapitalization is ignored in the usagenames. Not all of these can beused in all certificates.6. Updating a CRLcreate-crl=filenameCreates a CRL file. The crl-contents and priv-keyoptions must be set. Thcrl-contents=filenameLocation of a file that lists the certificates to be included in a CRL.The format of the file is:   cerificate-filename <tab> revocation datecrl-next-update=dateDate to be used for the nextUpdate value.7. Utilitiescreate-keys=filenameCreates a file (in PKCS 15 format) that contains a public-private keypair.This is useful for testing SimpleCA or other CA products. It is *not*to be used for starting a CA. This option requires a password that willbe used for the new key file. If the password option is not given,the password is prompted for; if the key-size option is not given, itis assumed to be 1024 bits.create-request=filenameCreates a certificate request in PKCS 10 format. This option requiresthe name of the key file (in PKCS 15 format) that contains the publickey to be used in the certificate request. If the password option is notgiven, the password is prompted for; if the key-size option is notgiven, it is assumed to be 1024 bits.8. Putting together certificatesAfter processing all the command line options and config files,SimpleCA marshalls the items needed for a certificate. The following describesdecisions that it makes as it does this marshalling.If the request option is given, the subject and all attributes are readfrom the PKCS10 request. Later subj and alt options will overwrite thevalues from the PKCS10 request.If the start-date option is not set (even in the default config file),the certificate is issued with notBefore set to the current time. If theend-date option is not set (even in the default config file), thecertificate is issued with notAfter set to the current time plus fiveyears.9. Default config filekey-usage=digitalSignature;dataEnciphermentstart-date=0hend-date=5ycrl-next-update=1d10. Other notesAs one might imagine, the name "SimpleCA" has been used before for otherprojects. For example, the Globus Project (the folks creating openspecifications for grid computing) have a front-end for OpenSSL called"Simple CA"; see <http://www-fp.globus.org/security/simple-ca.html>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -