diff options
author | George Kadianakis <desnacked@riseup.net> | 2019-06-03 15:43:54 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-11-18 19:18:49 +0200 |
commit | 8330b4dc2a18befa0eda8e48abb7f6e151596562 (patch) | |
tree | c9310b17d5755ccd34a5120f3d3d26df430fd982 /src/feature/hs/hs_client.h | |
parent | 46f441502227665c25aa0ad8710bdf8487193904 (diff) | |
download | tor-8330b4dc2a18befa0eda8e48abb7f6e151596562.tar.gz tor-8330b4dc2a18befa0eda8e48abb7f6e151596562.zip |
control-port: Implement ONION_CLIENT_AUTH_REMOVE.
Diffstat (limited to 'src/feature/hs/hs_client.h')
-rw-r--r-- | src/feature/hs/hs_client.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/feature/hs/hs_client.h b/src/feature/hs/hs_client.h index ea726e2370..459c19db58 100644 --- a/src/feature/hs/hs_client.h +++ b/src/feature/hs/hs_client.h @@ -41,6 +41,16 @@ typedef enum { REGISTER_FAIL_BAD_ADDRESS, } hs_client_register_auth_status_t; +/* Status code of client auth credential removal */ +typedef enum { + /* We successfuly removed these credentials */ + REMOVAL_SUCCESS, + /* No need to remove those credentials, because they were not there. */ + REMOVAL_SUCCESS_NOT_FOUND, + /* We failed to register these credentials, because of a bad HS address. */ + REMOVAL_BAD_ADDRESS, +} hs_client_removal_auth_status_t; + /** Flag to set when a client auth is permanent (saved on disk). */ #define CLIENT_AUTH_FLAG_IS_PERMANENT (1<<0) @@ -63,6 +73,9 @@ typedef struct hs_client_service_authorization_t { hs_client_register_auth_status_t hs_client_register_auth_credentials(hs_client_service_authorization_t *creds); +hs_client_removal_auth_status_t +hs_client_remove_auth_credentials(const char *hsaddress); + #define client_service_authorization_free(auth) \ FREE_AND_NULL(hs_client_service_authorization_t, \ client_service_authorization_free_, (auth)) |