1c19800e8SDoug Rabson\input texinfo @c -*- texinfo -*- 2c19800e8SDoug Rabson@c %**start of header 3*ae771770SStanislav Sedov@c $Id$ 4c19800e8SDoug Rabson@setfilename hx509.info 5c19800e8SDoug Rabson@settitle HX509 6c19800e8SDoug Rabson@iftex 7c19800e8SDoug Rabson@afourpaper 8c19800e8SDoug Rabson@end iftex 9c19800e8SDoug Rabson@c some sensible characters, please? 10c19800e8SDoug Rabson@tex 11c19800e8SDoug Rabson\input latin1.tex 12c19800e8SDoug Rabson@end tex 13c19800e8SDoug Rabson@setchapternewpage on 14c19800e8SDoug Rabson@syncodeindex pg cp 15c19800e8SDoug Rabson@c %**end of header 16c19800e8SDoug Rabson 17*ae771770SStanislav Sedov@include vars.texi 18*ae771770SStanislav Sedov 19*ae771770SStanislav Sedov@set VERSION @value{PACKAGE_VERSION} 20c19800e8SDoug Rabson@set EDITION 1.0 21c19800e8SDoug Rabson 22c19800e8SDoug Rabson@ifinfo 23c19800e8SDoug Rabson@dircategory Security 24c19800e8SDoug Rabson@direntry 25c19800e8SDoug Rabson* hx509: (hx509). The X.509 distribution from KTH 26c19800e8SDoug Rabson@end direntry 27c19800e8SDoug Rabson@end ifinfo 28c19800e8SDoug Rabson 29c19800e8SDoug Rabson@c title page 30c19800e8SDoug Rabson@titlepage 31c19800e8SDoug Rabson@title HX509 32c19800e8SDoug Rabson@subtitle X.509 distribution from KTH 33c19800e8SDoug Rabson@subtitle Edition @value{EDITION}, for version @value{VERSION} 34*ae771770SStanislav Sedov@subtitle 2008 35*ae771770SStanislav Sedov@author Love Hörnquist Åstrand 36c19800e8SDoug Rabson 37*ae771770SStanislav Sedov@def@copynext{@vskip 20pt plus 1fil} 38c19800e8SDoug Rabson@def@copyrightstart{} 39c19800e8SDoug Rabson@def@copyrightend{} 40c19800e8SDoug Rabson@page 41c19800e8SDoug Rabson@copyrightstart 42*ae771770SStanislav SedovCopyright (c) 1994-2008 Kungliga Tekniska Högskolan 43c19800e8SDoug Rabson(Royal Institute of Technology, Stockholm, Sweden). 44c19800e8SDoug RabsonAll rights reserved. 45c19800e8SDoug Rabson 46c19800e8SDoug RabsonRedistribution and use in source and binary forms, with or without 47c19800e8SDoug Rabsonmodification, are permitted provided that the following conditions 48c19800e8SDoug Rabsonare met: 49c19800e8SDoug Rabson 50c19800e8SDoug Rabson1. Redistributions of source code must retain the above copyright 51c19800e8SDoug Rabson notice, this list of conditions and the following disclaimer. 52c19800e8SDoug Rabson 53c19800e8SDoug Rabson2. Redistributions in binary form must reproduce the above copyright 54c19800e8SDoug Rabson notice, this list of conditions and the following disclaimer in the 55c19800e8SDoug Rabson documentation and/or other materials provided with the distribution. 56c19800e8SDoug Rabson 57c19800e8SDoug Rabson3. Neither the name of the Institute nor the names of its contributors 58c19800e8SDoug Rabson may be used to endorse or promote products derived from this software 59c19800e8SDoug Rabson without specific prior written permission. 60c19800e8SDoug Rabson 61c19800e8SDoug RabsonTHIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 62c19800e8SDoug RabsonANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 63c19800e8SDoug RabsonIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 64c19800e8SDoug RabsonARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 65c19800e8SDoug RabsonFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 66c19800e8SDoug RabsonDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 67c19800e8SDoug RabsonOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 68c19800e8SDoug RabsonHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 69c19800e8SDoug RabsonLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 70c19800e8SDoug RabsonOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 71c19800e8SDoug RabsonSUCH DAMAGE. 72c19800e8SDoug Rabson 73c19800e8SDoug Rabson@copynext 74c19800e8SDoug Rabson 75c19800e8SDoug RabsonCopyright (c) 1988, 1990, 1993 76c19800e8SDoug Rabson The Regents of the University of California. All rights reserved. 77c19800e8SDoug Rabson 78c19800e8SDoug RabsonRedistribution and use in source and binary forms, with or without 79c19800e8SDoug Rabsonmodification, are permitted provided that the following conditions 80c19800e8SDoug Rabsonare met: 81c19800e8SDoug Rabson 82c19800e8SDoug Rabson1. Redistributions of source code must retain the above copyright 83c19800e8SDoug Rabson notice, this list of conditions and the following disclaimer. 84c19800e8SDoug Rabson 85c19800e8SDoug Rabson2. Redistributions in binary form must reproduce the above copyright 86c19800e8SDoug Rabson notice, this list of conditions and the following disclaimer in the 87c19800e8SDoug Rabson documentation and/or other materials provided with the distribution. 88c19800e8SDoug Rabson 89c19800e8SDoug Rabson3. Neither the name of the University nor the names of its contributors 90c19800e8SDoug Rabson may be used to endorse or promote products derived from this software 91c19800e8SDoug Rabson without specific prior written permission. 92c19800e8SDoug Rabson 93c19800e8SDoug RabsonTHIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 94c19800e8SDoug RabsonANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 95c19800e8SDoug RabsonIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 96c19800e8SDoug RabsonARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 97c19800e8SDoug RabsonFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 98c19800e8SDoug RabsonDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 99c19800e8SDoug RabsonOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 100c19800e8SDoug RabsonHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 101c19800e8SDoug RabsonLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 102c19800e8SDoug RabsonOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 103c19800e8SDoug RabsonSUCH DAMAGE. 104c19800e8SDoug Rabson 105c19800e8SDoug Rabson@copynext 106c19800e8SDoug Rabson 107c19800e8SDoug RabsonCopyright 1992 Simmule Turner and Rich Salz. All rights reserved. 108c19800e8SDoug Rabson 109c19800e8SDoug RabsonThis software is not subject to any license of the American Telephone 110c19800e8SDoug Rabsonand Telegraph Company or of the Regents of the University of California. 111c19800e8SDoug Rabson 112c19800e8SDoug RabsonPermission is granted to anyone to use this software for any purpose on 113c19800e8SDoug Rabsonany computer system, and to alter it and redistribute it freely, subject 114c19800e8SDoug Rabsonto the following restrictions: 115c19800e8SDoug Rabson 116c19800e8SDoug Rabson1. The authors are not responsible for the consequences of use of this 117c19800e8SDoug Rabson software, no matter how awful, even if they arise from flaws in it. 118c19800e8SDoug Rabson 119c19800e8SDoug Rabson2. The origin of this software must not be misrepresented, either by 120c19800e8SDoug Rabson explicit claim or by omission. Since few users ever read sources, 121c19800e8SDoug Rabson credits must appear in the documentation. 122c19800e8SDoug Rabson 123c19800e8SDoug Rabson3. Altered versions must be plainly marked as such, and must not be 124c19800e8SDoug Rabson misrepresented as being the original software. Since few users 125c19800e8SDoug Rabson ever read sources, credits must appear in the documentation. 126c19800e8SDoug Rabson 127c19800e8SDoug Rabson4. This notice may not be removed or altered. 128c19800e8SDoug Rabson 129c19800e8SDoug Rabson@copynext 130c19800e8SDoug Rabson 131c19800e8SDoug RabsonIMath is Copyright 2002-2005 Michael J. Fromberger 132c19800e8SDoug RabsonYou may use it subject to the following Licensing Terms: 133c19800e8SDoug Rabson 134c19800e8SDoug RabsonPermission is hereby granted, free of charge, to any person obtaining 135c19800e8SDoug Rabsona copy of this software and associated documentation files (the 136c19800e8SDoug Rabson"Software"), to deal in the Software without restriction, including 137c19800e8SDoug Rabsonwithout limitation the rights to use, copy, modify, merge, publish, 138c19800e8SDoug Rabsondistribute, sublicense, and/or sell copies of the Software, and to 139c19800e8SDoug Rabsonpermit persons to whom the Software is furnished to do so, subject to 140c19800e8SDoug Rabsonthe following conditions: 141c19800e8SDoug Rabson 142c19800e8SDoug RabsonThe above copyright notice and this permission notice shall be 143c19800e8SDoug Rabsonincluded in all copies or substantial portions of the Software. 144c19800e8SDoug Rabson 145c19800e8SDoug RabsonTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 146c19800e8SDoug RabsonEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 147c19800e8SDoug RabsonMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 148c19800e8SDoug RabsonIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 149c19800e8SDoug RabsonCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 150c19800e8SDoug RabsonTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 151c19800e8SDoug RabsonSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 152c19800e8SDoug Rabson 153c19800e8SDoug Rabson@copyrightend 154c19800e8SDoug Rabson@end titlepage 155c19800e8SDoug Rabson 156c19800e8SDoug Rabson@macro manpage{man, section} 157c19800e8SDoug Rabson@cite{\man\(\section\)} 158c19800e8SDoug Rabson@end macro 159c19800e8SDoug Rabson 160c19800e8SDoug Rabson@c Less filling! Tastes great! 161c19800e8SDoug Rabson@iftex 162c19800e8SDoug Rabson@parindent=0pt 163c19800e8SDoug Rabson@global@parskip 6pt plus 1pt 164c19800e8SDoug Rabson@global@chapheadingskip = 15pt plus 4pt minus 2pt 165c19800e8SDoug Rabson@global@secheadingskip = 12pt plus 3pt minus 2pt 166c19800e8SDoug Rabson@global@subsecheadingskip = 9pt plus 2pt minus 2pt 167c19800e8SDoug Rabson@end iftex 168c19800e8SDoug Rabson@ifinfo 169c19800e8SDoug Rabson@paragraphindent 0 170c19800e8SDoug Rabson@end ifinfo 171c19800e8SDoug Rabson 172c19800e8SDoug Rabson@ifnottex 173c19800e8SDoug Rabson@node Top, Introduction, (dir), (dir) 174c19800e8SDoug Rabson@top Heimdal 175c19800e8SDoug Rabson@end ifnottex 176c19800e8SDoug Rabson 177*ae771770SStanislav SedovThis manual is for version @value{VERSION} of hx509. 178c19800e8SDoug Rabson 179c19800e8SDoug Rabson@menu 180c19800e8SDoug Rabson* Introduction:: 181c19800e8SDoug Rabson* What is X.509 ?:: 182c19800e8SDoug Rabson* Setting up a CA:: 183c19800e8SDoug Rabson* CMS signing and encryption:: 184*ae771770SStanislav Sedov* Certificate matching:: 185*ae771770SStanislav Sedov* Software PKCS 11 module:: 186c19800e8SDoug Rabson 187c19800e8SDoug Rabson@detailmenu 188c19800e8SDoug Rabson --- The Detailed Node Listing --- 189c19800e8SDoug Rabson 190c19800e8SDoug RabsonSetting up a CA 191c19800e8SDoug Rabson 192c19800e8SDoug Rabson@c * Issuing certificates:: 193c19800e8SDoug Rabson* Creating a CA certificate:: 194c19800e8SDoug Rabson* Issuing certificates:: 195c19800e8SDoug Rabson* Issuing CRLs:: 196c19800e8SDoug Rabson@c * Issuing a proxy certificate:: 197c19800e8SDoug Rabson@c * Creating a user certificate:: 198c19800e8SDoug Rabson@c * Validating a certificate:: 199c19800e8SDoug Rabson@c * Validating a certificate path:: 200c19800e8SDoug Rabson* Application requirements:: 201c19800e8SDoug Rabson 202c19800e8SDoug RabsonCMS signing and encryption 203c19800e8SDoug Rabson 204c19800e8SDoug Rabson* CMS background:: 205c19800e8SDoug Rabson 206*ae771770SStanislav SedovCertificate matching 207*ae771770SStanislav Sedov 208*ae771770SStanislav Sedov* Matching syntax:: 209*ae771770SStanislav Sedov 210*ae771770SStanislav SedovSoftware PKCS 11 module 211*ae771770SStanislav Sedov 212*ae771770SStanislav Sedov* How to use the PKCS11 module:: 213*ae771770SStanislav Sedov 214c19800e8SDoug Rabson@end detailmenu 215c19800e8SDoug Rabson@end menu 216c19800e8SDoug Rabson 217c19800e8SDoug Rabson@node Introduction, What is X.509 ?, Top, Top 218c19800e8SDoug Rabson@chapter Introduction 219c19800e8SDoug Rabson 220*ae771770SStanislav SedovThe goals of a PKI infrastructure (as defined in 221*ae771770SStanislav Sedov<a href="http://www.ietf.org/rfc/rfc3280.txt">RFC 3280</a>) is to meet 222*ae771770SStanislav Sedov@emph{the needs of deterministic, automated identification, authentication, access control, and authorization}. 223c19800e8SDoug Rabson 224*ae771770SStanislav Sedov 225*ae771770SStanislav SedovThe administrator should be aware of certain terminologies as explained by the aforementioned 226*ae771770SStanislav SedovRFC before attemping to put in place a PKI infrastructure. Briefly, these are: 227*ae771770SStanislav Sedov 228*ae771770SStanislav Sedov@itemize @bullet 229*ae771770SStanislav Sedov@item CA 230*ae771770SStanislav SedovCertificate Authority 231*ae771770SStanislav Sedov@item RA 232*ae771770SStanislav SedovRegistration Authority, i.e., an optional system to which a CA delegates certain management functions. 233*ae771770SStanislav Sedov@item CRL Issuer 234*ae771770SStanislav SedovAn optional system to which a CA delegates the publication of certificate revocation lists. 235*ae771770SStanislav Sedov@item Repository 236*ae771770SStanislav SedovA system or collection of distributed systems that stores certificates and CRLs 237*ae771770SStanislav Sedovand serves as a means of distributing these certificates and CRLs to end entities 238*ae771770SStanislav Sedov@end itemize 239*ae771770SStanislav Sedov 240*ae771770SStanislav Sedovhx509 (Heimdal x509 support) is a near complete X.509 stack that can 241*ae771770SStanislav Sedovhandle CMS messages (crypto system used in S/MIME and Kerberos PK-INIT) 242*ae771770SStanislav Sedovand basic certificate processing tasks, path construction, path 243*ae771770SStanislav Sedovvalidation, OCSP and CRL validation, PKCS10 message construction, CMS 244*ae771770SStanislav SedovEncrypted (shared secret encrypted), CMS SignedData (certificate 245*ae771770SStanislav Sedovsigned), and CMS EnvelopedData (certificate encrypted). 246*ae771770SStanislav Sedov 247*ae771770SStanislav Sedovhx509 can use PKCS11 tokens, PKCS12 files, PEM files, and/or DER encoded 248*ae771770SStanislav Sedovfiles. 249c19800e8SDoug Rabson 250c19800e8SDoug Rabson@node What is X.509 ?, Setting up a CA, Introduction, Top 251c19800e8SDoug Rabson@chapter What is X.509, PKIX, PKCS7 and CMS ? 252c19800e8SDoug Rabson 253*ae771770SStanislav SedovX.509 was created by CCITT (later ITU) for the X.500 directory 254*ae771770SStanislav Sedovservice. Today, X.509 discussions and implementations commonly reference 255*ae771770SStanislav Sedovthe IETF's PKIX Certificate and CRL Profile of the X.509 v3 certificate 256*ae771770SStanislav Sedovstandard, as specified in RFC 3280. 257c19800e8SDoug Rabson 258*ae771770SStanislav SedovITU continues to develop the X.509 standard together with the IETF in a 259*ae771770SStanislav Sedovrather complicated dance. 260c19800e8SDoug Rabson 261*ae771770SStanislav SedovX.509 is a public key based security system that has associated data 262*ae771770SStanislav Sedovstored within a so called certificate. Initially, X.509 was a strict 263*ae771770SStanislav Sedovhierarchical system with one root. However, ever evolving requiments and 264*ae771770SStanislav Sedovtechnology advancements saw the inclusion of multiple policy roots, 265*ae771770SStanislav Sedovbridges and mesh solutions. 266*ae771770SStanislav Sedov 267*ae771770SStanislav Sedovx.509 can also be used as a peer to peer system, though often seen as a 268*ae771770SStanislav Sedovcommon scenario. 269c19800e8SDoug Rabson 270c19800e8SDoug Rabson@section Type of certificates 271c19800e8SDoug Rabson 272c19800e8SDoug RabsonThere are several flavors of certificate in X.509. 273c19800e8SDoug Rabson 274c19800e8SDoug Rabson@itemize @bullet 275c19800e8SDoug Rabson 276c19800e8SDoug Rabson@item Trust anchors 277c19800e8SDoug Rabson 278*ae771770SStanislav SedovTrust anchors are strictly not certificates, but commonly stored in a 279*ae771770SStanislav Sedovcertificate format as they become easier to manage. Trust anchors are 280*ae771770SStanislav Sedovthe keys that an end entity would trust to validate other certificates. 281*ae771770SStanislav SedovThis is done by building a path from the certificate you want to 282*ae771770SStanislav Sedovvalidate to to any of the trust anchors you have. 283c19800e8SDoug Rabson 284c19800e8SDoug Rabson@item End Entity (EE) certificates 285c19800e8SDoug Rabson 286*ae771770SStanislav SedovEnd entity certificates are the most common types of certificates. End 287*ae771770SStanislav Sedoventity certificates cannot issue (sign) certificate themselves and are generally 288*ae771770SStanislav Sedovused to authenticate and authorize users and services. 289c19800e8SDoug Rabson 290c19800e8SDoug Rabson@item Certification Authority (CA) certificates 291c19800e8SDoug Rabson 292*ae771770SStanislav SedovCertificate authority certificates have the right to issue additional 293*ae771770SStanislav Sedovcertificates (be it sub-ordinate CA certificates to build an trust anchors 294*ae771770SStanislav Sedovor end entity certificates). There is no limit to how many certificates a CA 295c19800e8SDoug Rabsonmay issue, but there might other restrictions, like the maximum path 296c19800e8SDoug Rabsondepth. 297c19800e8SDoug Rabson 298c19800e8SDoug Rabson@item Proxy certificates 299c19800e8SDoug Rabson 300*ae771770SStanislav SedovRemember the statement "End Entity certificates cannot issue 301*ae771770SStanislav Sedovcertificates"? Well that statement is not entirely true. There is an 302*ae771770SStanislav Sedovextension called proxy certificates defined in RFC3820, that allows 303*ae771770SStanislav Sedovcertificates to be issued by end entity certificates. The service that 304*ae771770SStanislav Sedovreceives the proxy certificates must have explicitly turned on support 305*ae771770SStanislav Sedovfor proxy certificates, so their use is somewhat limited. 306c19800e8SDoug Rabson 307*ae771770SStanislav SedovProxy certificates can be limited by policies stored in the certificate to 308c19800e8SDoug Rabsonwhat they can be used for. This allows users to delegate the proxy 309c19800e8SDoug Rabsoncertificate to services (by sending over the certificate and private 310c19800e8SDoug Rabsonkey) so the service can access services on behalf of the user. 311c19800e8SDoug Rabson 312c19800e8SDoug RabsonOne example of this would be a print service. The user wants to print a 313c19800e8SDoug Rabsonlarge job in the middle of the night when the printer isn't used that 314c19800e8SDoug Rabsonmuch, so the user creates a proxy certificate with the policy that it 315c19800e8SDoug Rabsoncan only be used to access files related to this print job, creates the 316c19800e8SDoug Rabsonprint job description and send both the description and proxy 317*ae771770SStanislav Sedovcertificate with key over to print service. Later at night when the 318*ae771770SStanislav Sedovprint service initializes (without any user intervention), access to the files 319*ae771770SStanislav Sedovfor the print job is granted via the proxy certificate. As a result of (in-place) 320*ae771770SStanislav Sedovpolicy limitations, the certificate cannot be used for any other purposes. 321c19800e8SDoug Rabson 322c19800e8SDoug Rabson@end itemize 323c19800e8SDoug Rabson 324c19800e8SDoug Rabson@section Building a path 325c19800e8SDoug Rabson 326*ae771770SStanislav SedovBefore validating a certificate path (or chain), the path needs to be 327*ae771770SStanislav Sedovconstructed. Given a certificate (EE, CA, Proxy, or any other type), 328*ae771770SStanislav Sedovthe path construction algorithm will try to find a path to one of the 329*ae771770SStanislav Sedovtrust anchors. 330c19800e8SDoug Rabson 331*ae771770SStanislav SedovThe process starts by looking at the issuing CA of the certificate, by 332*ae771770SStanislav SedovName or Key Identifier, and tries to find that certificate while at the 333*ae771770SStanislav Sedovsame time evaluting any policies in-place. 334c19800e8SDoug Rabson 335c19800e8SDoug Rabson@node Setting up a CA, Creating a CA certificate, What is X.509 ?, Top 336c19800e8SDoug Rabson@chapter Setting up a CA 337c19800e8SDoug Rabson 338*ae771770SStanislav SedovDo not let information overload scare you off! If you are simply testing 339*ae771770SStanislav Sedovor getting started with a PKI infrastructure, skip all this and go to 340*ae771770SStanislav Sedovthe next chapter (see: @pxref{Creating a CA certificate}). 341c19800e8SDoug Rabson 342c19800e8SDoug RabsonCreating a CA certificate should be more the just creating a 343*ae771770SStanislav Sedovcertificate, CA's should define a policy. Again, if you are simply 344*ae771770SStanislav Sedovtesting a PKI, policies do not matter so much. However, when it comes to 345*ae771770SStanislav Sedovtrust in an organisation, it will probably matter more whom your users 346*ae771770SStanislav Sedovand sysadmins will find it acceptable to trust. 347c19800e8SDoug Rabson 348*ae771770SStanislav SedovAt the same time, try to keep things simple, it's not very hard to run a 349*ae771770SStanislav SedovCertificate authority and the process to get new certificates should be simple. 350c19800e8SDoug Rabson 351*ae771770SStanislav SedovYou may find it helpful to answer the following policy questions for 352*ae771770SStanislav Sedovyour organization at a later stage: 353c19800e8SDoug Rabson 354*ae771770SStanislav Sedov@itemize @bullet 355*ae771770SStanislav Sedov@item How do you trust your CA. 356*ae771770SStanislav Sedov@item What is the CA responsibility. 357*ae771770SStanislav Sedov@item Review of CA activity. 358*ae771770SStanislav Sedov@item How much process should it be to issue certificate. 359*ae771770SStanislav Sedov@item Who is allowed to issue certificates. 360*ae771770SStanislav Sedov@item Who is allowed to requests certificates. 361*ae771770SStanislav Sedov@item How to handle certificate revocation, issuing CRLs and maintain OCSP services. 362*ae771770SStanislav Sedov@end itemize 363c19800e8SDoug Rabson 364c19800e8SDoug Rabson@node Creating a CA certificate, Issuing certificates, Setting up a CA, Top 365c19800e8SDoug Rabson@section Creating a CA certificate 366c19800e8SDoug Rabson 367c19800e8SDoug RabsonThis section describes how to create a CA certificate and what to think 368c19800e8SDoug Rabsonabout. 369c19800e8SDoug Rabson 370c19800e8SDoug Rabson@subsection Lifetime CA certificate 371c19800e8SDoug Rabson 372c19800e8SDoug RabsonYou probably want to create a CA certificate with a long lifetime, 10 373*ae771770SStanislav Sedovyears at the very minimum. This is because you don't want to push out the 374*ae771770SStanislav Sedovcertificate (as a trust anchor) to all you users again when the old 375*ae771770SStanislav SedovCA certificate expires. Although a trust anchor can't really expire, not all 376*ae771770SStanislav Sedovsoftware works in accordance with published standards. 377c19800e8SDoug Rabson 378c19800e8SDoug RabsonKeep in mind the security requirements might be different 10-20 years 379c19800e8SDoug Rabsoninto the future. For example, SHA1 is going to be withdrawn in 2010, so 380c19800e8SDoug Rabsonmake sure you have enough buffering in your choice of digest/hash 381c19800e8SDoug Rabsonalgorithms, signature algorithms and key lengths. 382c19800e8SDoug Rabson 383c19800e8SDoug Rabson@subsection Create a CA certificate 384c19800e8SDoug Rabson 385*ae771770SStanislav SedovThis command below can be used to generate a self-signed CA certificate. 386c19800e8SDoug Rabson 387c19800e8SDoug Rabson@example 388c19800e8SDoug Rabsonhxtool issue-certificate \ 389c19800e8SDoug Rabson --self-signed \ 390c19800e8SDoug Rabson --issue-ca \ 391c19800e8SDoug Rabson --generate-key=rsa \ 392c19800e8SDoug Rabson --subject="CN=CertificateAuthority,DC=test,DC=h5l,DC=se" \ 393c19800e8SDoug Rabson --lifetime=10years \ 394c19800e8SDoug Rabson --certificate="FILE:ca.pem" 395c19800e8SDoug Rabson@end example 396c19800e8SDoug Rabson 397*ae771770SStanislav Sedov@subsection Extending the lifetime of a CA certificate 398c19800e8SDoug Rabson 399c19800e8SDoug RabsonYou just realised that your CA certificate is going to expire soon and 400*ae771770SStanislav Sedovthat you need replace it with a new CA. The easiest way to do that 401*ae771770SStanislav Sedovis to extend the lifetime of your existing CA certificate. 402c19800e8SDoug Rabson 403*ae771770SStanislav SedovThe example below will extend the CA certificate's lifetime by 10 years. 404*ae771770SStanislav SedovYou should compare this new certificate if it contains all the 405c19800e8SDoug Rabsonspecial tweaks as the old certificate had. 406c19800e8SDoug Rabson 407c19800e8SDoug Rabson@example 408c19800e8SDoug Rabsonhxtool issue-certificate \ 409c19800e8SDoug Rabson --self-signed \ 410c19800e8SDoug Rabson --issue-ca \ 411c19800e8SDoug Rabson --lifetime="10years" \ 412c19800e8SDoug Rabson --template-certificate="FILE:ca.pem" \ 413c19800e8SDoug Rabson --template-fields="serialNumber,notBefore,subject,SPKI" \ 414c19800e8SDoug Rabson --ca-private-key=FILE:ca.pem \ 415c19800e8SDoug Rabson --certificate="FILE:new-ca.pem" 416c19800e8SDoug Rabson@end example 417c19800e8SDoug Rabson 418c19800e8SDoug Rabson@subsection Subordinate CA 419c19800e8SDoug Rabson 420*ae771770SStanislav SedovThis example below creates a new subordinate certificate authority. 421c19800e8SDoug Rabson 422c19800e8SDoug Rabson@example 423c19800e8SDoug Rabsonhxtool issue-certificate \ 424c19800e8SDoug Rabson --ca-certificate=FILE:ca.pem \ 425c19800e8SDoug Rabson --issue-ca \ 426c19800e8SDoug Rabson --generate-key=rsa \ 427c19800e8SDoug Rabson --subject="CN=CertificateAuthority,DC=dev,DC=test,DC=h5l,DC=se" \ 428c19800e8SDoug Rabson --certificate="FILE:dev-ca.pem" 429c19800e8SDoug Rabson@end example 430c19800e8SDoug Rabson 431c19800e8SDoug Rabson 432c19800e8SDoug Rabson@node Issuing certificates, Issuing CRLs, Creating a CA certificate, Top 433c19800e8SDoug Rabson@section Issuing certificates 434c19800e8SDoug Rabson 435c19800e8SDoug RabsonFirst you'll create a CA certificate, after that you have to deal with 436*ae771770SStanislav Sedovyour users and servers and issue certificates to them. 437c19800e8SDoug Rabson 438*ae771770SStanislav Sedov@c I think this section needs a bit of clarity. Can I add a separate 439*ae771770SStanislav Sedov@c section which explains CSRs as well? 440c19800e8SDoug Rabson 441*ae771770SStanislav Sedov 442*ae771770SStanislav Sedov@itemize @bullet 443*ae771770SStanislav Sedov 444*ae771770SStanislav Sedov@item Do all the work themself 445*ae771770SStanislav Sedov 446*ae771770SStanislav SedovGenerate the key for the user. This has the problme that the the CA 447*ae771770SStanislav Sedovknows the private key of the user. For a paranoid user this might leave 448*ae771770SStanislav Sedovfeeling of disconfort. 449*ae771770SStanislav Sedov 450*ae771770SStanislav Sedov@item Have the user do part of the work 451*ae771770SStanislav Sedov 452*ae771770SStanislav SedovReceive PKCS10 certificate requests fromusers. PKCS10 is a request for a 453*ae771770SStanislav Sedovcertificate. The user may specify what DN they want as well as provide 454*ae771770SStanislav Sedova certificate signing request (CSR). To prove the user have the key, 455*ae771770SStanislav Sedovthe whole request is signed by the private key of the user. 456*ae771770SStanislav Sedov 457*ae771770SStanislav Sedov@end itemize 458c19800e8SDoug Rabson 459c19800e8SDoug Rabson@subsection Name space management 460c19800e8SDoug Rabson 461*ae771770SStanislav Sedov@c The explanation given below is slightly unclear. I will re-read the 462*ae771770SStanislav Sedov@c RFC and document accordingly 463*ae771770SStanislav Sedov 464c19800e8SDoug RabsonWhat people might want to see. 465c19800e8SDoug Rabson 466c19800e8SDoug RabsonRe-issue certificates just because people moved within the organization. 467c19800e8SDoug Rabson 468c19800e8SDoug RabsonExpose privacy information. 469c19800e8SDoug Rabson 470c19800e8SDoug RabsonUsing Sub-component name (+ notation). 471c19800e8SDoug Rabson 472c19800e8SDoug Rabson@subsection Certificate Revocation, CRL and OCSP 473c19800e8SDoug Rabson 474*ae771770SStanislav SedovCertificates that a CA issues may need to be revoked at some stage. As 475*ae771770SStanislav Sedovan example, an employee leaves the organization and does not bother 476*ae771770SStanislav Sedovhanding in his smart card (or even if the smart card is handed back -- 477*ae771770SStanislav Sedovthe certificate on it must no longer be acceptable to services; the 478*ae771770SStanislav Sedovemployee has left). 479c19800e8SDoug Rabson 480*ae771770SStanislav SedovYou may also want to revoke a certificate for a service which is no 481*ae771770SStanislav Sedovlonger being offered on your network. Overlooking these scenarios can 482*ae771770SStanislav Sedovlead to security holes which will quickly become a nightmare to deal 483*ae771770SStanislav Sedovwith. 484c19800e8SDoug Rabson 485*ae771770SStanislav SedovThere are two primary protocols for dealing with certificate 486*ae771770SStanislav Sedovrevokation. Namely: 487*ae771770SStanislav Sedov 488*ae771770SStanislav Sedov@itemize @bullet 489*ae771770SStanislav Sedov@item Certificate Revocation List (CRL) 490*ae771770SStanislav Sedov@item Online Certificate Status Protocol (OCSP) 491*ae771770SStanislav Sedov@end itemize 492*ae771770SStanislav Sedov 493*ae771770SStanislav SedovIf however the certificate in qeustion has been destroyed, there is no 494*ae771770SStanislav Sedovneed to revoke the certificate because it can not be used by someone 495*ae771770SStanislav Sedovelse. This matter since for each certificate you add to CRL, the 496*ae771770SStanislav Sedovdownload time and processing time for clients are longer. 497*ae771770SStanislav Sedov 498*ae771770SStanislav SedovCRLs and OCSP responders however greatly help manage compatible services 499*ae771770SStanislav Sedovwhich may authenticate and authorize users (or services) on an on-going 500*ae771770SStanislav Sedovbasis. As an example, VPN connectivity established via certificates for 501*ae771770SStanislav Sedovconnecting clients would require your VPN software to make use of a CRL 502*ae771770SStanislav Sedovor an OCSP service to ensure revoked certificates belonging to former 503*ae771770SStanislav Sedovclients are not allowed access to (formerly subscribed) network 504*ae771770SStanislav Sedovservices. 505*ae771770SStanislav Sedov 506c19800e8SDoug Rabson 507c19800e8SDoug Rabson@node Issuing CRLs, Application requirements, Issuing certificates, Top 508c19800e8SDoug Rabson@section Issuing CRLs 509c19800e8SDoug Rabson 510*ae771770SStanislav SedovCreate an empty CRL with no certificates revoked. Default expiration 511c19800e8SDoug Rabsonvalue is one year from now. 512c19800e8SDoug Rabson 513c19800e8SDoug Rabson@example 514c19800e8SDoug Rabsonhxtool crl-sign \ 515c19800e8SDoug Rabson --crl-file=crl.der \ 516c19800e8SDoug Rabson --signer=FILE:ca.pem 517c19800e8SDoug Rabson@end example 518c19800e8SDoug Rabson 519c19800e8SDoug RabsonCreate a CRL with all certificates in the directory 520c19800e8SDoug Rabson@file{/path/to/revoked/dir} included in the CRL as revoked. Also make 521c19800e8SDoug Rabsonit expire one month from now. 522c19800e8SDoug Rabson 523c19800e8SDoug Rabson@example 524c19800e8SDoug Rabsonhxtool crl-sign \ 525c19800e8SDoug Rabson --crl-file=crl.der \ 526c19800e8SDoug Rabson --signer=FILE:ca.pem \ 527c19800e8SDoug Rabson --lifetime='1 month' \ 528c19800e8SDoug Rabson DIR:/path/to/revoked/dir 529c19800e8SDoug Rabson@end example 530c19800e8SDoug Rabson 531c19800e8SDoug Rabson@node Application requirements, CMS signing and encryption, Issuing CRLs, Top 532c19800e8SDoug Rabson@section Application requirements 533c19800e8SDoug Rabson 534*ae771770SStanislav SedovApplication place different requirements on certificates. This section 535c19800e8SDoug Rabsontries to expand what they are and how to use hxtool to generate 536c19800e8SDoug Rabsoncertificates for those services. 537c19800e8SDoug Rabson 538c19800e8SDoug Rabson@subsection HTTPS - server 539c19800e8SDoug Rabson 540c19800e8SDoug Rabson@example 541c19800e8SDoug Rabsonhxtool issue-certificate \ 542c19800e8SDoug Rabson --subject="CN=www.test.h5l.se,DC=test,DC=h5l,DC=se" \ 543c19800e8SDoug Rabson --type="https-server" \ 544c19800e8SDoug Rabson --hostname="www.test.h5l.se" \ 545c19800e8SDoug Rabson --hostname="www2.test.h5l.se" \ 546c19800e8SDoug Rabson ... 547c19800e8SDoug Rabson@end example 548c19800e8SDoug Rabson 549c19800e8SDoug Rabson@subsection HTTPS - client 550c19800e8SDoug Rabson 551c19800e8SDoug Rabson@example 552c19800e8SDoug Rabsonhxtool issue-certificate \ 553c19800e8SDoug Rabson --subject="UID=testus,DC=test,DC=h5l,DC=se" \ 554c19800e8SDoug Rabson --type="https-client" \ 555c19800e8SDoug Rabson ... 556c19800e8SDoug Rabson@end example 557c19800e8SDoug Rabson 558c19800e8SDoug Rabson@subsection S/MIME - email 559c19800e8SDoug Rabson 560c19800e8SDoug RabsonThere are two things that should be set in S/MIME certificates, one or 561c19800e8SDoug Rabsonmore email addresses and an extended eku usage (EKU), emailProtection. 562c19800e8SDoug Rabson 563c19800e8SDoug RabsonThe email address format used in S/MIME certificates is defined in 564c19800e8SDoug RabsonRFC2822, section 3.4.1 and it should be an ``addr-spec''. 565c19800e8SDoug Rabson 566c19800e8SDoug RabsonThere are two ways to specifify email address in certificates. The old 567*ae771770SStanislav Sedovway is in the subject distinguished name, @emph{this should not be used}. The 568c19800e8SDoug Rabsonnew way is using a Subject Alternative Name (SAN). 569c19800e8SDoug Rabson 570*ae771770SStanislav SedovEven though the email address is stored in certificates, they don't need 571*ae771770SStanislav Sedovto be, email reader programs are required to accept certificates that 572*ae771770SStanislav Sedovdoesn't have either of the two methods of storing email in certificates 573*ae771770SStanislav Sedov-- in which case, the email client will try to protect the user by 574*ae771770SStanislav Sedovprinting the name of the certificate instead. 575c19800e8SDoug Rabson 576c19800e8SDoug RabsonS/MIME certificate can be used in another special way. They can be 577c19800e8SDoug Rabsonissued with a NULL subject distinguished name plus the email in SAN, 578c19800e8SDoug Rabsonthis is a valid certificate. This is used when you wont want to share 579c19800e8SDoug Rabsonmore information then you need to. 580c19800e8SDoug Rabson 581c19800e8SDoug Rabsonhx509 issue-certificate supports adding the email SAN to certificate by 582c19800e8SDoug Rabsonusing the --email option, --email also gives an implicit emailProtection 583c19800e8SDoug Rabsoneku. If you want to create an certificate without an email address, the 584c19800e8SDoug Rabsonoption --type=email will add the emailProtection EKU. 585c19800e8SDoug Rabson 586c19800e8SDoug Rabson@example 587c19800e8SDoug Rabsonhxtool issue-certificate \ 588c19800e8SDoug Rabson --subject="UID=testus-email,DC=test,DC=h5l,DC=se" \ 589c19800e8SDoug Rabson --type=email \ 590c19800e8SDoug Rabson --email="testus@@test.h5l.se" \ 591c19800e8SDoug Rabson ... 592c19800e8SDoug Rabson@end example 593c19800e8SDoug Rabson 594c19800e8SDoug RabsonAn example of an certificate without and subject distinguished name with 595c19800e8SDoug Rabsonan email address in a SAN. 596c19800e8SDoug Rabson 597c19800e8SDoug Rabson@example 598c19800e8SDoug Rabsonhxtool issue-certificate \ 599c19800e8SDoug Rabson --subject="" \ 600c19800e8SDoug Rabson --type=email \ 601c19800e8SDoug Rabson --email="testus@@test.h5l.se" \ 602c19800e8SDoug Rabson ... 603c19800e8SDoug Rabson@end example 604c19800e8SDoug Rabson 605c19800e8SDoug Rabson@subsection PK-INIT 606c19800e8SDoug Rabson 607*ae771770SStanislav SedovA PK-INIT infrastructure allows users and services to pick up kerberos 608*ae771770SStanislav Sedovcredentials (tickets) based on their certificate. This, for example, 609*ae771770SStanislav Sedovallows users to authenticate to their desktops using smartcards while 610*ae771770SStanislav Sedovacquiring kerberos tickets in the process. 611*ae771770SStanislav Sedov 612*ae771770SStanislav SedovAs an example, an office network which offers centrally controlled 613*ae771770SStanislav Sedovdesktop logins, mail, messaging (xmpp) and openafs would give users 614*ae771770SStanislav Sedovsingle sign-on facilities via smartcard based logins. Once the kerberos 615*ae771770SStanislav Sedovticket has been acquired, all kerberized services would immediately 616*ae771770SStanislav Sedovbecome accessible based on deployed security policies. 617*ae771770SStanislav Sedov 618*ae771770SStanislav SedovLet's go over the process of initializing a demo PK-INIT framework: 619c19800e8SDoug Rabson 620c19800e8SDoug Rabson@example 621c19800e8SDoug Rabsonhxtool issue-certificate \ 622c19800e8SDoug Rabson --type="pkinit-kdc" \ 623c19800e8SDoug Rabson --pk-init-principal="krbtgt/TEST.H5L.SE@@TEST.H5L.SE" \ 624*ae771770SStanislav Sedov --hostname=kerberos.test.h5l.se \ 625*ae771770SStanislav Sedov --ca-certificate="FILE:ca.pem,ca.key" \ 626*ae771770SStanislav Sedov --generate-key=rsa \ 627*ae771770SStanislav Sedov --certificate="FILE:kdc.pem" \ 628*ae771770SStanislav Sedov --subject="cn=kdc" 629c19800e8SDoug Rabson@end example 630c19800e8SDoug Rabson 631c19800e8SDoug RabsonHow to create a certificate for a user. 632c19800e8SDoug Rabson 633c19800e8SDoug Rabson@example 634c19800e8SDoug Rabsonhxtool issue-certificate \ 635c19800e8SDoug Rabson --type="pkinit-client" \ 636c19800e8SDoug Rabson --pk-init-principal="user@@TEST.H5L.SE" \ 637*ae771770SStanislav Sedov --ca-certificate="FILE:ca.pem,ca.key" \ 638*ae771770SStanislav Sedov --generate-key=rsa \ 639*ae771770SStanislav Sedov --subject="cn=Test User" \ 640*ae771770SStanislav Sedov --certificate="FILE:user.pem" 641c19800e8SDoug Rabson@end example 642c19800e8SDoug Rabson 643*ae771770SStanislav SedovThe --type field can be specified multiple times. The same certificate 644*ae771770SStanislav Sedovcan hence house extensions for both pkinit-client as well as S/MIME. 645*ae771770SStanislav Sedov 646*ae771770SStanislav SedovTo use the PKCS11 module, please see the section: 647*ae771770SStanislav Sedov@pxref{How to use the PKCS11 module}. 648*ae771770SStanislav Sedov 649*ae771770SStanislav SedovMore about how to configure the KDC, see the documentation in the 650*ae771770SStanislav SedovHeimdal manual to set up the KDC. 651*ae771770SStanislav Sedov 652c19800e8SDoug Rabson@subsection XMPP/Jabber 653c19800e8SDoug Rabson 654c19800e8SDoug RabsonThe jabber server certificate should have a dNSname that is the same as 655c19800e8SDoug Rabsonthe user entered into the application, not the same as the host name of 656c19800e8SDoug Rabsonthe machine. 657c19800e8SDoug Rabson 658c19800e8SDoug Rabson@example 659c19800e8SDoug Rabsonhxtool issue-certificate \ 660c19800e8SDoug Rabson --subject="CN=xmpp1.test.h5l.se,DC=test,DC=h5l,DC=se" \ 661c19800e8SDoug Rabson --hostname="xmpp1.test.h5l.se" \ 662c19800e8SDoug Rabson --hostname="test.h5l.se" \ 663c19800e8SDoug Rabson ... 664c19800e8SDoug Rabson@end example 665c19800e8SDoug Rabson 666c19800e8SDoug RabsonThe certificate may also contain a jabber identifier (JID) that, if the 667c19800e8SDoug Rabsonreceiver allows it, authorises the server or client to use that JID. 668c19800e8SDoug Rabson 669c19800e8SDoug RabsonWhen storing a JID inside the certificate, both for server and client, 670c19800e8SDoug Rabsonit's stored inside a UTF8String within an otherName entity inside the 671c19800e8SDoug RabsonsubjectAltName, using the OID id-on-xmppAddr (1.3.6.1.5.5.7.8.5). 672c19800e8SDoug Rabson 673c19800e8SDoug RabsonTo read more about the requirements, see RFC3920, Extensible Messaging 674c19800e8SDoug Rabsonand Presence Protocol (XMPP): Core. 675c19800e8SDoug Rabson 676c19800e8SDoug Rabsonhxtool issue-certificate have support to add jid to the certificate 677c19800e8SDoug Rabsonusing the option @kbd{--jid}. 678c19800e8SDoug Rabson 679c19800e8SDoug Rabson@example 680c19800e8SDoug Rabsonhxtool issue-certificate \ 681c19800e8SDoug Rabson --subject="CN=Love,DC=test,DC=h5l,DC=se" \ 682c19800e8SDoug Rabson --jid="lha@@test.h5l.se" \ 683c19800e8SDoug Rabson ... 684c19800e8SDoug Rabson@end example 685c19800e8SDoug Rabson 686c19800e8SDoug Rabson 687c19800e8SDoug Rabson@node CMS signing and encryption, CMS background, Application requirements, Top 688c19800e8SDoug Rabson@chapter CMS signing and encryption 689c19800e8SDoug Rabson 690c19800e8SDoug RabsonCMS is the Cryptographic Message System that among other, is used by 691c19800e8SDoug RabsonS/MIME (secure email) and Kerberos PK-INIT. It's an extended version of 692c19800e8SDoug Rabsonthe RSA, Inc standard PKCS7. 693c19800e8SDoug Rabson 694*ae771770SStanislav Sedov@node CMS background, Certificate matching, CMS signing and encryption, Top 695c19800e8SDoug Rabson@section CMS background 696c19800e8SDoug Rabson 697c19800e8SDoug Rabson 698*ae771770SStanislav Sedov@node Certificate matching, Matching syntax, CMS background, Top 699*ae771770SStanislav Sedov@chapter Certificate matching 700*ae771770SStanislav Sedov 701*ae771770SStanislav SedovTo match certificates hx509 have a special query language to match 702*ae771770SStanislav Sedovcertifictes in queries and ACLs. 703*ae771770SStanislav Sedov 704*ae771770SStanislav Sedov@node Matching syntax, Software PKCS 11 module, Certificate matching, Top 705*ae771770SStanislav Sedov@section Matching syntax 706*ae771770SStanislav Sedov 707*ae771770SStanislav SedovThis is the language definitions somewhat slopply descriped: 708*ae771770SStanislav Sedov 709*ae771770SStanislav Sedov@example 710*ae771770SStanislav Sedov 711*ae771770SStanislav Sedovexpr = TRUE, 712*ae771770SStanislav Sedov FALSE, 713*ae771770SStanislav Sedov ! expr, 714*ae771770SStanislav Sedov expr AND expr, 715*ae771770SStanislav Sedov expr OR expr, 716*ae771770SStanislav Sedov ( expr ) 717*ae771770SStanislav Sedov compare 718*ae771770SStanislav Sedov 719*ae771770SStanislav Sedovcompare = 720*ae771770SStanislav Sedov word == word, 721*ae771770SStanislav Sedov word != word, 722*ae771770SStanislav Sedov word IN ( word [, word ...]) 723*ae771770SStanislav Sedov word IN %@{variable.subvariable@} 724*ae771770SStanislav Sedov 725*ae771770SStanislav Sedovword = 726*ae771770SStanislav Sedov STRING, 727*ae771770SStanislav Sedov %@{variable@} 728*ae771770SStanislav Sedov 729*ae771770SStanislav Sedov@end example 730*ae771770SStanislav Sedov 731*ae771770SStanislav Sedov@node Software PKCS 11 module, How to use the PKCS11 module, Matching syntax, Top 732*ae771770SStanislav Sedov@chapter Software PKCS 11 module 733*ae771770SStanislav Sedov 734*ae771770SStanislav SedovPKCS11 is a standard created by RSA, Inc to support hardware and 735*ae771770SStanislav Sedovsoftware encryption modules. It can be used by smartcard to expose the 736*ae771770SStanislav Sedovcrypto primitives inside without exposing the crypto keys. 737*ae771770SStanislav Sedov 738*ae771770SStanislav SedovHx509 includes a software implementation of PKCS11 that runs within the 739*ae771770SStanislav Sedovmemory space of the process and thus exposes the keys to the 740*ae771770SStanislav Sedovapplication. 741*ae771770SStanislav Sedov 742*ae771770SStanislav Sedov@node How to use the PKCS11 module, , Software PKCS 11 module, Top 743*ae771770SStanislav Sedov@section How to use the PKCS11 module 744*ae771770SStanislav Sedov 745*ae771770SStanislav Sedov@example 746*ae771770SStanislav Sedov$ cat > ~/.soft-pkcs11.rc <<EOF 747*ae771770SStanislav Sedovmycert cert User certificate FILE:/Users/lha/Private/pkinit.pem 748*ae771770SStanislav Sedovapp-fatal true 749*ae771770SStanislav SedovEOF 750*ae771770SStanislav Sedov$ kinit -C PKCS11:/usr/heimdal/lib/hx509.so lha@@EXAMPLE.ORG 751*ae771770SStanislav Sedov@end example 752*ae771770SStanislav Sedov 753*ae771770SStanislav Sedov 754c19800e8SDoug Rabson@c @shortcontents 755c19800e8SDoug Rabson@contents 756c19800e8SDoug Rabson 757c19800e8SDoug Rabson@bye 758