diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-12-31 13:31:02 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-12-31 13:31:02 -0800 |
| commit | 7df0165712bb6ca623830ac55c548696c83e8647 (patch) | |
| tree | 397de6a93a7d638331b71d1c40c9b89b21487b39 /src/nng.h | |
| parent | 772e16dd93d61d8cb9bce2d2e8b88ab42366f725 (diff) | |
| download | nng-7df0165712bb6ca623830ac55c548696c83e8647.tar.gz nng-7df0165712bb6ca623830ac55c548696c83e8647.tar.bz2 nng-7df0165712bb6ca623830ac55c548696c83e8647.zip | |
Rename config init/fini to alloc/free, add documentation for them.
Diffstat (limited to 'src/nng.h')
| -rw-r--r-- | src/nng.h | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -598,12 +598,14 @@ typedef enum nng_tls_auth_mode { NNG_TLS_AUTH_MODE_REQUIRED = 2, // Verify cert, close if invalid } nng_tls_auth_mode; -// nng_tls_config init creates a TLS configuration using +// nng_tls_config_alloc creates a TLS configuration using // reasonable defaults. This configuration can be shared // with multiple pipes or services/servers. NNG_DECL int nng_tls_config_init(nng_tls_config **, nng_tls_mode); -NNG_DECL void nng_tls_config_fini(nng_tls_config *); +// nng_tls_config_free drops the reference count on the TLS +// configuration object, and if zero, deallocates it. +NNG_DECL void nng_tls_config_free(nng_tls_config *); // nng_tls_config_server_name sets the server name. This is // called by clients to set the name that the server supplied @@ -619,7 +621,7 @@ NNG_DECL int nng_tls_config_server_name(nng_tls_config *, const char *); // format. NNG_DECL int nng_tls_config_ca_cert(nng_tls_config *, const uint8_t *, size_t); -// nng_tls_config_clr loads a certificate revocation list. Again, these +// nng_tls_config_crl loads a certificate revocation list. Again, these // are in X.509 format (either PEM or DER). NNG_DECL int nng_tls_config_crl(nng_tls_config *, const uint8_t *, size_t); @@ -636,11 +638,6 @@ NNG_DECL int nng_tls_config_key(nng_tls_config *, const uint8_t *, size_t); // private keys that are encrypted. NNG_DECL int nng_tls_config_pass(nng_tls_config *, const char *); -// nng_tls_config_validate_peer is used to enable validation of the peer -// and it's certificate. If disabled, the peer's certificate will still -// be available, but may not be valid. -NNG_DECL int nng_tls_config_validate_peer(nng_tls_config *, bool); - // nng_tls_config_auth_mode is used to configure the authentication mode use. // The default is that servers have this off (i.e. no client authentication) // and clients have it on (they verify the server), which matches typical |
