* Support for external a Crypto Device ("engine"), usually * a hardware accelerator card for crypto operations. */
| 593 | * a hardware accelerator card for crypto operations. |
| 594 | */ |
| 595 | apr_status_t ssl_init_Engine(server_rec *s, apr_pool_t *p) |
| 596 | { |
| 597 | #if MODSSL_HAVE_ENGINE_API |
| 598 | SSLModConfigRec *mc = myModConfig(s); |
| 599 | ENGINE *e; |
| 600 | |
| 601 | if (mc->szCryptoDevice) { |
| 602 | if (!(e = ENGINE_by_id(mc->szCryptoDevice))) { |
| 603 | ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01888) |
| 604 | "Init: Failed to load Crypto Device API `%s'", |
| 605 | mc->szCryptoDevice); |
| 606 | ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s); |
| 607 | return ssl_die(s); |
| 608 | } |
| 609 | |
| 610 | #ifdef ENGINE_CTRL_CHIL_SET_FORKCHECK |
| 611 | if (strEQ(mc->szCryptoDevice, "chil")) { |
| 612 | ENGINE_ctrl(e, ENGINE_CTRL_CHIL_SET_FORKCHECK, 1, 0, 0); |
| 613 | } |
| 614 | #endif |
| 615 | |
| 616 | if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { |
| 617 | ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01889) |
| 618 | "Init: Failed to enable Crypto Device API `%s'", |
| 619 | mc->szCryptoDevice); |
| 620 | ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s); |
| 621 | return ssl_die(s); |
| 622 | } |
| 623 | ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01890) |
| 624 | "Init: loaded Crypto Device API `%s'", |
| 625 | mc->szCryptoDevice); |
| 626 | |
| 627 | ENGINE_free(e); |
| 628 | } |
| 629 | #endif |
| 630 | return APR_SUCCESS; |
| 631 | } |
| 632 | |
| 633 | #ifdef HAVE_TLSEXT |
| 634 | static apr_status_t ssl_init_ctx_tls_extensions(server_rec *s, |
no test coverage detected