pure-certd.8.in 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .TH "pure-certd" "8" "@VERSION@" "Frank Denis" "Pure-FTPd"
  2. .SH "NAME"
  3. .LP
  4. pure\-certd \- TLS certificate agent for Pure\-FTPd.
  5. .SH "SYNTAX"
  6. .LP
  7. pure\-certd [\fI\-p\fP <\fI/path/to/pidfile\fP>] [\fI\-u\fP uid] [\fI\-g\fP gid] [\fI\-B\fP] <\fI\-s\fP /path/to/socket> \fI\-r\fP /program/to/run
  8. .SH "DESCRIPTION"
  9. .LP
  10. pure\-certd is a daemon that forks an authentication program, waits for a certificate path as a reply, and returns it to an application server.
  11. .LP
  12. pure\-certd listens to a local Unix socket. A new connection to that socket should send pure\-authd the following structure:
  13. .IP
  14. sni_name:xxx
  15. end
  16. .LP
  17. These content is passed to the authentication program, as an environment variable:
  18. .IP
  19. CERTD_SNI_NAME
  20. .LP
  21. The authentication program should take appropriate actions to select a TLS certificate, and reply to the standard output with the following format:
  22. .IP
  23. action:strict
  24. cert_file:/path/to/cert.pem
  25. key_file:/path/to/cert.pem
  26. end
  27. .TP
  28. \fBcert_file:\fRxxx
  29. Absolute path to the certificate in PEM format.
  30. .TP
  31. \fBkey_file:\fRxxx
  32. This is optional, as a certificate and its key can be concatenated in the same file.
  33. .TP
  34. \fBaction:\fRxxx
  35. If action is "deny", a certificate for that name was not found and access is denied.
  36. If xxx is "default", the default certificate will be used.
  37. If xxx is "strict", the certificate whose path is indicated in "cert_path" will be used. If absent or invalid, access will be denied.
  38. If xxx is "fallback", the certificate whose path is indicated in "cert_path" will be used. If absent or invalid, the default certificate will be used instead.
  39. .TP
  40. \fBuid:\fRxxx
  41. The system uid to be assigned to that user. Must be > 0.
  42. .TP
  43. \fBgid:\fRxxx
  44. The primary system gid. Must be > 0.
  45. .TP
  46. \fBdir:\fRxxx
  47. The absolute path to the home directory. Can contain /./ for a chroot jail.
  48. .LP
  49. \fIOnly one authentication program is forked at a time. It must return quickly.\fR
  50. .SH "OPTIONS"
  51. .TP
  52. \fB\-u\fR <\fIuid\fP>
  53. Have the daemon run with that uid.
  54. .TP
  55. \fB\-g\fR <\fIgid\fP>
  56. Have the daemon run with that gid.
  57. .TP
  58. \fB\-B\fR
  59. Fork in background (daemonization).
  60. .TP
  61. \fB\-s\fR <\fI/path/to/socket\fP>
  62. Set the full path to the local Unix socket.
  63. .TP
  64. \fB\-r\fR <\fI/path/to/program\fP>
  65. Set the full path to the authentication program.
  66. .TP
  67. \fB\-h\fR
  68. Output help information and exit.
  69. .SH "EXAMPLES"
  70. .LP
  71. To run this program the standard way type:
  72. .LP
  73. pure\-certd \-s @LOCALSTATEDIR@/run/certd.sock \-r /usr/bin/my\-cert\-program &
  74. .LP
  75. pure\-ftpd \-lextauth:@LOCALSTATEDIR@/run/certd.sock &
  76. .TP
  77. /usr/bin/my\-cert\-program can be as simple as:
  78. #! /bin/sh
  79. echo 'action:strict'
  80. echo 'cert_file:/etc/ssl/private/pure-ftpd/cert.pem'
  81. echo 'end'
  82. .SH "AUTHORS"
  83. .LP
  84. Frank DENIS <j at pureftpd dot org>
  85. .SH "SEE ALSO"
  86. .BR "ftp(1)" ,
  87. .BR "pure-ftpd(8)"
  88. .BR "pure-ftpwho(8)"
  89. .BR "pure-mrtginfo(8)"
  90. .BR "pure-uploadscript(8)"
  91. .BR "pure-statsdecode(8)"
  92. .BR "pure-pw(8)"
  93. .BR "pure-quotacheck(8)"
  94. .BR "pure-authd(8)"