)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"fb81fc7fdf4c2cbe82621c00c4a47aba00358e41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0a2f3d8c_0dcc8895","updated":"2024-08-28 14:42:52.000000000","message":"So I actually tried to use this in a test scenario. After lots of trials and tribulations I actually managed to let this load a RSA key via pkcs11-provider and GoogleCloud KMS pkcs11 library. So basic functionality seems to be okay. But where I have hit a brick wall right now is that when I add hook scripts openvpn just hangs completely. AFAICT this is because pkcs11 provider actually uses a thread pool to do its work and that interacts really badly with fork(). Not completely sure, yet. Might try to do some more tests with different backends to see whether it is a generic pkcs11-provider problem. If anyone has any ideas on how to work-around this issue, that would be welcome.","commit_id":"e1dd0ff276c8656067ec210ede3122a93b58e5c8"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"d2dac7984e1fb599b35a51cb935503fd5ab815db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"31e05633_ad4eb7f8","updated":"2024-08-29 21:01:27.000000000","message":"Testing google KMS library with pkcs11-helper shows that there also we need to set `GRPC_ENABLE_FORK_SUPPORT\u003d1` for fork to not lockup. So this is not specific to the current patch or pkcs11-provider.","commit_id":"e1dd0ff276c8656067ec210ede3122a93b58e5c8"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"656103ad9ffc432e0074f099070149b3440c408a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c0fe2d74_64c6efb9","in_reply_to":"0a2f3d8c_0dcc8895","updated":"2024-08-28 17:56:56.000000000","message":"The way I tested this using a soft token is described in this gist: https://gist.github.com/selvanair/323ccadbef5ae16df2b7ffb80e2d038b\n\nFor softhsm2 token I had to set `pkcs11-module-quirks \u003d no-operation-state` in provider config (see openssl.cnf in the above link). Without this I got an error:\n\n```OpenSSL: error:40800054:pkcs11::reason(84):Error returned by C_GetOperationState```\n\nwhich may be a softhsm2 quirk. Also, for this reason I opted to configure providers in openssl.cnf instead of using our `--providers` option which is limited in functionality.\n\nWith these settings both server and client worked using pkcs11 URI. As for hooks, I only tried a simple `tls-verify` script on server-side which does work for me. What kind of hooks caused openvpn to hang?","commit_id":"e1dd0ff276c8656067ec210ede3122a93b58e5c8"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"7968ce1cf2536106eb62c295f54e68991ea3056a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a7991dfe_a4f29b9f","in_reply_to":"31e05633_ad4eb7f8","updated":"2024-09-05 09:55:24.000000000","message":"Thanks, can confirm.","commit_id":"e1dd0ff276c8656067ec210ede3122a93b58e5c8"},{"author":{"_account_id":1000001,"name":"Frank Lichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"f0674b2ecbefce7e67a214adac5b019c79e060c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ff79992d_83f32c13","in_reply_to":"c0fe2d74_64c6efb9","updated":"2024-08-28 19:24:22.000000000","message":"I tried running t_client.sh with a key in KMS. That uses an --up script which is hanging for me. I will try it with softhsm as well, to see whether that experiences the same behavior or whether that is something which might be dependent on the actual pkcs11 module. With Google PKCS11 library I also needed to use \"pkcs11-module-quirks \u003d no-operation-state\", so that is definitely not softhsm-only.","commit_id":"e1dd0ff276c8656067ec210ede3122a93b58e5c8"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"46d9897b6ad4a69fe797e01448d93c7e8c2b3685","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0f7296b2_bb72607a","in_reply_to":"ff79992d_83f32c13","updated":"2024-08-29 15:27:29.000000000","message":"After several failures I finally managed to use a key in google KMS and reproduce the hang on fork. \nSetting the following env variable fixes it for me.\nGRPC_ENABLE_FORK_SUPPORT\u003d1\nas mentioned here:\nhttps://cloud.google.com/kms/docs/reference/pkcs11-apache\n\nFor softhsm2, fork appears to work without issues -- I tested only the latest pkcs11-provider module though.","commit_id":"e1dd0ff276c8656067ec210ede3122a93b58e5c8"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"ff336fd128b6cd500ef44da91faaee5d00378efe","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"17c9726b_fc4303fd","updated":"2024-09-05 19:08:42.000000000","message":"No changes -- only resubmitted with #730 as it depends on this. Unsure why this now shows as \"not ready\".","commit_id":"39a641000e01d1634c60d2888723fee2d6a12fbc"}]}
