You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/02/27 20:51:33 UTC
cvs commit: httpd-2.0/modules/ssl ssl_engine_config.c mod_ssl.h mod_ssl.c
wrowe 02/02/27 11:51:33
Modified: modules/ssl ssl_engine_config.c mod_ssl.h mod_ssl.c
Log:
Introduce the PassPhraseDialog 'pipe' mechanism.
This is the directive handling commit only, the mechanics patch will
follow. PassPhraseDialog "|/path/to/pipe" will use the bidirectional
pipe to have a 'conversation', along the lines of the tty dialog with
PassPhraseDialog 'builtin'. This is entirely different than the 'exec'
method, which simply runs once for each passphrase, and doesn't allow
for failure/retries, and certainly doesn't offer any sensible 'dialog'.
Revision Changes Path
1.22 +6 -1 httpd-2.0/modules/ssl/ssl_engine_config.c
Index: ssl_engine_config.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ssl_engine_config.c 27 Feb 2002 03:21:09 -0000 1.21
+++ ssl_engine_config.c 27 Feb 2002 19:51:33 -0000 1.22
@@ -334,8 +334,9 @@
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
const char *err;
- if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL)
+ if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL) {
return err;
+ }
if (strcEQ(arg, "builtin")) {
sc->nPassPhraseDialogType = SSL_PPTYPE_BUILTIN;
sc->szPassPhraseDialogPath = NULL;
@@ -347,6 +348,10 @@
if (!ssl_util_path_check(SSL_PCM_EXISTS, sc->szPassPhraseDialogPath, cmd->pool))
return ((const char *)apr_pstrcat(cmd->pool, "SSLPassPhraseDialog: file '",
sc->szPassPhraseDialogPath, "' does not exist",NULL));
+ }
+ else if (strlen(arg) > 1 && (arg[0] == '|')) {
+ sc->nPassPhraseDialogType = SSL_PPTYPE_PIPE;
+ sc->szPassPhraseDialogPath = arg + 1;
}
else
return "SSLPassPhraseDialog: Invalid argument";
1.59 +2 -2 httpd-2.0/modules/ssl/mod_ssl.h
Index: mod_ssl.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- mod_ssl.h 27 Feb 2002 03:21:09 -0000 1.58
+++ mod_ssl.h 27 Feb 2002 19:51:33 -0000 1.59
@@ -395,7 +395,8 @@
typedef enum {
SSL_PPTYPE_UNSET = UNSET,
SSL_PPTYPE_BUILTIN = 0,
- SSL_PPTYPE_FILTER = 1
+ SSL_PPTYPE_FILTER = 1,
+ SSL_PPTYPE_PIPE = 2
} ssl_pphrase_t;
/*
@@ -721,7 +722,6 @@
/* Pass Phrase Support */
void ssl_pphrase_Handle(server_rec *, apr_pool_t *);
-int ssl_pphrase_Handle_CB(char *, int, int, void *);
/* Diffie-Hellman Parameter Support */
DH *ssl_dh_GetTmpParam(int);
1.45 +1 -1 httpd-2.0/modules/ssl/mod_ssl.c
Index: mod_ssl.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- mod_ssl.c 5 Feb 2002 22:18:49 -0000 1.44
+++ mod_ssl.c 27 Feb 2002 19:51:33 -0000 1.45
@@ -83,7 +83,7 @@
"(`none', `file:/path/to/file')")
SSL_CMD_SRV(PassPhraseDialog, TAKE1,
"SSL dialog mechanism for the pass phrase query "
- "(`builtin', `exec:/path/to/program')")
+ "(`builtin', `|/path/to/pipe_program`, or `exec:/path/to/cgi_program')")
SSL_CMD_SRV(SessionCache, TAKE1,
"SSL Session Cache storage "
"(`none', `dbm:/path/to/file')")