leonardb edited a comment on issue #52:
URL: https://github.com/apache/couchdb-erlfdb/issues/52#issuecomment-1023351526
Hi @kocolosk
This was testing with 6.2.28-1 (and now with 6.3.23 as well)
Noticed that in fact `tls_ca_path` is currently not supported, only
`tls_ca_bytes`. erlfdb will error when trying to use path.
In erlfdb_nif the following tls ca/key/cert options are types for
`network_option()`
```
| tls_cert_bytes
| tls_cert_path
| tls_key_bytes
| tls_key_path
| tls_ca_bytes
| tls_ca_path
```
But, `tls_ca_path` does not exist in `erlfdb_network_set_option` in main.c,
while all the others are.
^^ This is probably an oversight. The following patch adds it to network
options handling
```diff --git a/c_src/main.c b/c_src/main.c
index 8cb03b0..fc27e00 100644
--- a/c_src/main.c
+++ b/c_src/main.c
@@ -488,6 +488,8 @@ erlfdb_network_set_option(ErlNifEnv* env, int argc,
const ERL_NIF_TERM argv[])
option = FDB_NET_OPTION_CLIENT_BUGGIFY_SECTION_FIRED_PROBABILITY;
} else if(IS_ATOM(argv[0], tls_ca_bytes)) {
option = FDB_NET_OPTION_TLS_CA_BYTES;
+ } else if(IS_ATOM(argv[0], tls_ca_path)) {
+ option = FDB_NET_OPTION_TLS_CA_PATH;
} else if(IS_ATOM(argv[0], tls_password)) {
option = FDB_NET_OPTION_TLS_PASSWORD;
```
I've also had a look at a few of the 'blessed' language bindings at
https://github.com/apple/foundationdb/tree/main/bindings and they all seem to
support the `bytes` options. Also seems they're all there in the native api
code.
https://github.com/apple/foundationdb/blob/1800259d7cb35be79541b848ddb83fd62d1ddd15/fdbclient/NativeAPI.actor.cpp#L2031-L2063
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]