| 550 | */ |
| 551 | |
| 552 | const char *ssl_cmd_SSLPassPhraseDialog(cmd_parms *cmd, |
| 553 | void *dcfg, |
| 554 | const char *arg) |
| 555 | { |
| 556 | SSLSrvConfigRec *sc = mySrvConfig(cmd->server); |
| 557 | const char *err; |
| 558 | int arglen = strlen(arg); |
| 559 | |
| 560 | if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) { |
| 561 | return err; |
| 562 | } |
| 563 | |
| 564 | if (strcEQ(arg, "builtin")) { |
| 565 | sc->server->pphrase_dialog_type = SSL_PPTYPE_BUILTIN; |
| 566 | sc->server->pphrase_dialog_path = NULL; |
| 567 | } |
| 568 | else if ((arglen > 5) && strEQn(arg, "exec:", 5)) { |
| 569 | sc->server->pphrase_dialog_type = SSL_PPTYPE_FILTER; |
| 570 | sc->server->pphrase_dialog_path = |
| 571 | ap_server_root_relative(cmd->pool, arg+5); |
| 572 | if (!sc->server->pphrase_dialog_path) { |
| 573 | return apr_pstrcat(cmd->pool, |
| 574 | "Invalid SSLPassPhraseDialog exec: path ", |
| 575 | arg+5, NULL); |
| 576 | } |
| 577 | if (!ssl_util_path_check(SSL_PCM_EXISTS, |
| 578 | sc->server->pphrase_dialog_path, |
| 579 | cmd->pool)) |
| 580 | { |
| 581 | return apr_pstrcat(cmd->pool, |
| 582 | "SSLPassPhraseDialog: file '", |
| 583 | sc->server->pphrase_dialog_path, |
| 584 | "' does not exist", NULL); |
| 585 | } |
| 586 | |
| 587 | } |
| 588 | else if ((arglen > 1) && (arg[0] == '|')) { |
| 589 | sc->server->pphrase_dialog_type = SSL_PPTYPE_PIPE; |
| 590 | sc->server->pphrase_dialog_path = arg + 1; |
| 591 | } |
| 592 | else { |
| 593 | return "SSLPassPhraseDialog: Invalid argument"; |
| 594 | } |
| 595 | |
| 596 | return NULL; |
| 597 | } |
| 598 | |
| 599 | const char *ssl_cmd_SSLCryptoDevice(cmd_parms *cmd, |
| 600 | void *dcfg, |
nothing calls this directly
no test coverage detected