Dirty fix for the OpenVPN #538 "no PIN prompt with PKCS11 when systemd is enabled" bug
https://community.openvpn.net/openvpn/ticket/538
|
|
query_user_SINGLE(char *prompt, size_t prompt_len, |
117 | 117 | return query_user_exec(); |
118 | 118 | } |
119 | 119 | |
| 120 | /* A plain "make Gert happy" wrapper over built-in user querying method. |
| 121 | * Same arguments as @query_user_add |
| 122 | * |
| 123 | * Allows to use built-in method for PKCS11 PIN prompt regardless of |
| 124 | * the systemd support status and presence, |
| 125 | * see https://community.openvpn.net/openvpn/ticket/538 for details. |
| 126 | */ |
| 127 | static inline bool |
| 128 | query_user_builtin_SINGLE(char *prompt, size_t prompt_len, |
| 129 | char *resp, size_t resp_len, |
| 130 | bool echo) |
| 131 | { |
| 132 | query_user_clear(); |
| 133 | query_user_add(prompt, prompt_len, resp, resp_len, echo); |
| 134 | return query_user_exec_builtin(); |
| 135 | } |
| 136 | |
120 | 137 | #endif /* ifndef CONSOLE_H */ |