Lines Matching defs:engine
28 #include <openssl/engine.h>
62 ENGINE *engine; /* functional reference to the engine */
63 EVP_PKEY *private_key; /* the private key if using engine */
586 * tls_engine_load_dynamic_generic - load any openssl engine
587 * @pre: an array of commands and values that load an engine initialized
588 * in the engine specific function
590 * engine (or %NULL if not required)
591 * @id: the engine id of the engine to load (only required if post is not %NULL
593 * This function is a generic function that loads any openssl engine.
600 ENGINE *engine;
603 engine = ENGINE_by_id(id);
604 if (engine) {
605 ENGINE_free(engine);
606 wpa_printf(MSG_DEBUG, "ENGINE: engine '%s' is already "
612 engine = ENGINE_by_id(dynamic_id);
613 if (engine == NULL) {
614 wpa_printf(MSG_INFO, "ENGINE: Can't find engine %s [%s]",
620 /* Perform the pre commands. This will load the engine. */
622 wpa_printf(MSG_DEBUG, "ENGINE: '%s' '%s'", pre[0], pre[1]);
623 if (ENGINE_ctrl_cmd_string(engine, pre[0], pre[1], 0) == 0) {
624 wpa_printf(MSG_INFO, "ENGINE: ctrl cmd_string failed: "
627 ENGINE_free(engine);
634 * Free the reference to the "dynamic" engine. The loaded engine can
637 ENGINE_free(engine);
639 engine = ENGINE_by_id(id);
640 if (engine == NULL) {
641 wpa_printf(MSG_INFO, "ENGINE: Can't find engine %s [%s]",
647 wpa_printf(MSG_DEBUG, "ENGINE: '%s' '%s'", post[0], post[1]);
648 if (ENGINE_ctrl_cmd_string(engine, post[0], post[1], 0) == 0) {
649 wpa_printf(MSG_DEBUG, "ENGINE: ctrl cmd_string failed:"
652 ENGINE_remove(engine);
653 ENGINE_free(engine);
658 ENGINE_free(engine);
665 * tls_engine_load_dynamic_pkcs11 - load the pkcs11 engine provided by opensc
693 wpa_printf(MSG_DEBUG, "ENGINE: Loading pkcs11 Engine from %s",
701 * tls_engine_load_dynamic_opensc - load the opensc engine provided by opensc
721 wpa_printf(MSG_DEBUG, "ENGINE: Loading OpenSC Engine from %s",
756 wpa_printf(MSG_DEBUG, "ENGINE: Loading dynamic engine");
795 wpa_printf(MSG_ERROR, "ENGINE: Engine ID not set");
799 wpa_printf(MSG_ERROR, "ENGINE: Smartcard PIN not set");
803 wpa_printf(MSG_ERROR, "ENGINE: Key Id not set");
808 conn->engine = ENGINE_by_id(engine_id);
809 if (!conn->engine) {
810 wpa_printf(MSG_ERROR, "ENGINE: engine %s not available [%s]",
814 if (ENGINE_init(conn->engine) != 1) {
815 wpa_printf(MSG_ERROR, "ENGINE: engine init failed "
816 "(engine: %s) [%s]", engine_id,
820 wpa_printf(MSG_DEBUG, "ENGINE: engine initialized");
822 if (ENGINE_ctrl_cmd_string(conn->engine, "PIN", pin, 0) == 0) {
823 wpa_printf(MSG_ERROR, "ENGINE: cannot set pin [%s]",
827 conn->private_key = ENGINE_load_private_key(conn->engine,
830 wpa_printf(MSG_ERROR, "ENGINE: cannot load private key with id"
839 if (conn->engine) {
840 ENGINE_free(conn->engine);
841 conn->engine = NULL;
859 wpa_printf(MSG_DEBUG, "ENGINE: engine deinit");
864 if (conn->engine) {
865 ENGINE_finish(conn->engine);
866 conn->engine = NULL;
1559 "ENGINE: cannot use private key for TLS");
1569 wpa_printf(MSG_ERROR, "SSL: Configuration uses engine, but "
1570 "engine support was not compiled in");
2301 if (params->engine) {
2302 wpa_printf(MSG_DEBUG, "SSL: Initializing TLS engine");