makecert.1 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. .\"
  2. .\" makecert manual page.
  3. .\" Copyright 2003 Motus Technologies
  4. .\" Copyright 2004-2005 Novell
  5. .\" Author:
  6. .\" Sebastien Pouliot ([email protected])
  7. .\"
  8. .TH Mono "MakeCert"
  9. .SH NAME
  10. MakeCert \- Create X.509 certificates for test purposes
  11. .SH SYNOPSIS
  12. .PP
  13. .B makecert [options] certificate
  14. .SH DESCRIPTION
  15. Create an X.509 certificate using the provided informations. This
  16. is useful for testing Authenticode signatures, SSL and S/MIME
  17. technologies.
  18. .SH PARAMETERS
  19. .TP
  20. .I "-# num"
  21. Specify the certificate serial number.
  22. .TP
  23. .I "-n dn"
  24. Specify the subject Distinguished Name (DN).
  25. .TP
  26. .I "-in dn"
  27. Specify the issuer Distinguished Name (DN).
  28. .TP
  29. .I "-r"
  30. Create a self-signed, also called root, certificate.
  31. .TP
  32. .I "-iv pvkfile"
  33. Specify the private key file (.PVK) for the issuer. The private key in the
  34. specified file will be used to sign the new certificate.
  35. .TP
  36. .I "-ic certfile"
  37. Extract the issuer's name from the specified certificate file - i.e. the
  38. subject name of the specified certificate becomes the issuer name of the
  39. new certificate.
  40. .TP
  41. .I "-in name"
  42. Use the issuer's name from the specified parameter.
  43. .TP
  44. .I "-ik container"
  45. Specify the key container name to be used for the issuer.
  46. .TP
  47. .I "-iky [signature | exchange | #]"
  48. Specify the key number to be used in the provider (when used with -ik).
  49. .TP
  50. .I "-ip provider"
  51. Specify the cryptographic provider to be used for the issuer.
  52. .TP
  53. .I "-ir [localmachine | currentuser]"
  54. Specify the provider will search the user or the machine keys containers for
  55. the issuer.
  56. .TP
  57. .I "-iy number"
  58. Specify the provider type to be used for the issuer.
  59. .TP
  60. .I "-sv pkvfile"
  61. Specify the private key file (.PVK) for the subject. The public part of the
  62. key will be inserted into the created certificate. If non-existant the
  63. specified file will be created with a new key pair (default to 1024 bits RSA
  64. key pair).
  65. .TP
  66. .I "-sk container"
  67. Specify the key container name to be used for the subject.
  68. .TP
  69. .I "-sky [signature | exchange | #]"
  70. Specify the key number to be used in the provider (when used with -sk).
  71. .TP
  72. .I "-sp provider"
  73. Specify the cryptographic provider to be used for the subject.
  74. .TP
  75. .I "-sr [localmachine | currentuser]"
  76. Specify the provider will search the user or the machine keys containers for
  77. the subject.
  78. .TP
  79. .I "-sy number"
  80. Specify the provider type to be used for the issuer.
  81. .TP
  82. .I "-a hash"
  83. Select hash algorithm. Only MD5 and SHA1 algorithms are supported.
  84. .TP
  85. .I "-b date"
  86. The date since when the certificate is valid (notBefore).
  87. .TP
  88. .I "-e date"
  89. The date until when the certificate is valid (notAfter).
  90. .TP
  91. .I "-m number"
  92. Specify the certificate validity period in months. This is added to the
  93. notBefore validity date which can be set with -b or will default to the
  94. current date/time.
  95. .TP
  96. .I "-cy [authority|end]"
  97. Basic constraints. Select Authority or End-Entity certificate. Only Authority
  98. certificates can be used to sign other certificates (-ic). End-Entity can
  99. be used by clients (e.g. Authenticode, S/MIME) or servers (e.g. SSL).
  100. .TP
  101. .I "-h number"
  102. Add a path length restriction to the certificate chain. This is only
  103. applicable for certificates that have BasicConstraint set to Authority (-cy
  104. authority). This is used to limit the chain of certificates than can be
  105. issued under this authority.
  106. .TP
  107. .I "-eku oid[,oid]"
  108. Add some extended key usage OID to the certificate.
  109. .TP
  110. .I "-p12 pkcs12file password"
  111. Create a new PKCS#12 file containing both the certificates (the subject and
  112. possibly the issuer's) and the private key. The PKCS#12 file is protected
  113. with the specified password. This option is
  114. .B mono exclusive.
  115. .TP
  116. .I "-?"
  117. Help (display this help message)
  118. .TP
  119. .I "-!"
  120. Extended help (for advanced options)
  121. .SH EXAMPLES
  122. .PP
  123. To create a SSL test (i.e. non trusted) certificate is easy
  124. once your know your host's name. The following command will create a
  125. test certificate for an SSL server:
  126. .nf
  127. $ hostname
  128. pollux
  129. $ makecert -r -eku 1.3.6.1.5.5.7.3.1 -n "CN=pollux" -sv pollux.pvk pollux.cer
  130. Success
  131. .fi
  132. .PP
  133. In particular in the above example, the parameters used to build this
  134. test certificate were:
  135. .TP
  136. .I "-r"
  137. Create a self-signed certificate (i.e. without an hierarchy).
  138. .TP
  139. .I "-eku 1.3.6.1.5.5.7.3.1"
  140. Optional (as sadly most client don't require it). This indicates that
  141. your certificate is intended for server-side authentication.
  142. .TP
  143. .I "-n \"CN=pollux\""
  144. Common Name (CN) = Host name. This is verified the SSL client and must
  145. match the connected host (or else you'll get a warning or error or
  146. *gasp* nothing).
  147. .TP
  148. .I "-sv private.key"
  149. The private key file. The key (1024 bits RSA key pair) will be
  150. automatically generated if the specified file isn't present.
  151. .TP
  152. .I "pollux.cer"
  153. The SSL certificate to be created for your host.
  154. .SH KNOWN RESTRICTIONS
  155. Compared to the Windows version some options aren't supported (-$, -d, -l,
  156. -nscp, -is, -sc, -ss). Also PVK files with passwords aren't supported.
  157. .SH AUTHOR
  158. Written by Sebastien Pouliot
  159. .SH COPYRIGHT
  160. Copyright (C) 2003 Motus Technologies.
  161. Copyright (C) 2004-2005 Novell.
  162. Released under BSD license.
  163. .SH MAILING LISTS
  164. Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
  165. .SH WEB SITE
  166. Visit http://www.mono-project.com for details
  167. .SH SEE ALSO
  168. .BR signcode(1)