Home | History | Annotate | Download | only in crypto

Lines Matching full:engine

24 #include <openssl/engine.h>
93 ENGINE *engine; /* functional reference to the engine */
94 EVP_PKEY *private_key; /* the private key if using engine */
590 * tls_engine_load_dynamic_generic - load any openssl engine
591 * @pre: an array of commands and values that load an engine initialized
592 * in the engine specific function
594 * engine (or %NULL if not required)
595 * @id: the engine id of the engine to load (only required if post is not %NULL
597 * This function is a generic function that loads any openssl engine.
604 ENGINE *engine;
607 engine = ENGINE_by_id(id);
608 if (engine) {
609 ENGINE_free(engine);
610 wpa_printf(MSG_DEBUG, "ENGINE: engine '%s' is already "
616 engine = ENGINE_by_id(dynamic_id);
617 if (engine == NULL) {
618 wpa_printf(MSG_INFO, "ENGINE: Can't find engine %s [%s]",
624 /* Perform the pre commands. This will load the engine. */
626 wpa_printf(MSG_DEBUG, "ENGINE: '%s' '%s'", pre[0], pre[1]);
627 if (ENGINE_ctrl_cmd_string(engine, pre[0], pre[1], 0) == 0) {
628 wpa_printf(MSG_INFO, "ENGINE: ctrl cmd_string failed: "
631 ENGINE_free(engine);
638 * Free the reference to the "dynamic" engine. The loaded engine can
641 ENGINE_free(engine);
643 engine = ENGINE_by_id(id);
644 if (engine == NULL) {
645 wpa_printf(MSG_INFO, "ENGINE: Can't find engine %s [%s]",
651 wpa_printf(MSG_DEBUG, "ENGINE: '%s' '%s'", post[0], post[1]);
652 if (ENGINE_ctrl_cmd_string(engine, post[0], post[1], 0) == 0) {
653 wpa_printf(MSG_DEBUG, "ENGINE: ctrl cmd_string failed:"
656 ENGINE_remove(engine);
657 ENGINE_free(engine);
662 ENGINE_free(engine);
669 * tls_engine_load_dynamic_pkcs11 - load the pkcs11 engine provided by opensc
697 wpa_printf(MSG_DEBUG, "ENGINE: Loading pkcs11 Engine from %s",
705 * tls_engine_load_dynamic_opensc - load the opensc engine provided by opensc
725 wpa_printf(MSG_DEBUG, "ENGINE: Loading OpenSC Engine from %s",
819 wpa_printf(MSG_DEBUG, "ENGINE: Loading dynamic engine");
870 wpa_printf(MSG_ERROR, "ENGINE: Engine ID not set");
875 wpa_printf(MSG_ERROR, "ENGINE: Smartcard PIN not set");
880 wpa_printf(MSG_ERROR, "ENGINE: Key Id not set");
888 conn->engine = ENGINE_by_id(engine_id);
889 if (!conn->engine) {
890 wpa_printf(MSG_ERROR, "ENGINE: engine %s not available [%s]",
894 if (ENGINE_init(conn->engine) != 1) {
895 wpa_printf(MSG_ERROR, "ENGINE: engine init failed "
896 "(engine: %s) [%s]", engine_id,
900 wpa_printf(MSG_DEBUG, "ENGINE: engine initialized");
903 if (ENGINE_ctrl_cmd_string(conn->engine, "PIN", pin, 0) == 0) {
904 wpa_printf(MSG_ERROR, "ENGINE: cannot set pin [%s]",
910 conn->private_key = ENGINE_load_private_key(conn->engine,
913 wpa_printf(MSG_ERROR, "ENGINE: cannot load private key with id"
924 /* test if the engine supports a LOAD_CERT_CTRL */
925 if (!ENGINE_ctrl(conn->engine, ENGINE_CTRL_GET_CMD_FROM_NAME,
927 wpa_printf(MSG_ERROR, "ENGINE: engine does not support"
937 if (conn->engine) {
938 ENGINE_free(conn->engine);
939 conn->engine = NULL;
957 wpa_printf(MSG_DEBUG, "ENGINE: engine deinit");
962 if (conn->engine) {
963 ENGINE_finish(conn->engine);
964 conn->engine = NULL;
1924 if (!ENGINE_ctrl_cmd(conn->engine, "LOAD_CERT_CTRL",
1926 wpa_printf(MSG_ERROR, "ENGINE: cannot load client cert with id"
1932 wpa_printf(MSG_ERROR, "ENGINE: did not properly cert with id"
1958 wpa_printf(MSG_DEBUG, "ENGINE: SSL_use_certificate --> "
1991 "Failed to add CA certificate from engine "
2004 wpa_printf(MSG_DEBUG, "OpenSSL: %s - added CA certificate from engine "
2022 "ENGINE: cannot use private key for TLS");
2032 wpa_printf(MSG_ERROR, "SSL: Configuration uses engine, but "
2033 "engine support was not compiled in");
2960 if (params->engine) {
2961 wpa_printf(MSG_DEBUG, "SSL: Initializing TLS engine");
2973 if (params->engine && params->ca_cert_id) {
2983 if (params->engine && params->cert_id) {
2991 if (params->engine && params->key_id) {
2992 wpa_printf(MSG_DEBUG, "TLS: Using private key from engine");