aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 7210a5d727..74c50f6fa1 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1402,9 +1402,7 @@ options_validate(or_options_t *options)
}
if (options->HashedControlPassword) {
- char buf[S2K_SPECIFIER_LEN+DIGEST_LEN];
- if (base64_decode(buf,sizeof(buf),options->HashedControlPassword,
- strlen(options->HashedControlPassword)!=sizeof(buf))) {
+ if (decode_hashed_password(NULL, options->HashedControlPassword)<0) {
log_fn(LOG_WARN,"Bad HashedControlPassword: wrong length or bad base64");
result = -1;
}