diff options
Diffstat (limited to 'receiver.cpp')
-rw-r--r-- | receiver.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/receiver.cpp b/receiver.cpp index aaf9673..6064694 100644 --- a/receiver.cpp +++ b/receiver.cpp | |||
@@ -262,7 +262,7 @@ static void import_sessions(const char *root_dir) { | |||
262 | closedir(dirp); | 262 | closedir(dirp); |
263 | } | 263 | } |
264 | 264 | ||
265 | int main() { | 265 | int main(int args, char **argv) { |
266 | mbedtls_ctr_drbg_context ctr_drbg; | 266 | mbedtls_ctr_drbg_context ctr_drbg; |
267 | mbedtls_entropy_context entropy; | 267 | mbedtls_entropy_context entropy; |
268 | mbedtls_pk_context pk; | 268 | mbedtls_pk_context pk; |
@@ -271,7 +271,9 @@ int main() { | |||
271 | unsigned char input[256]; | 271 | unsigned char input[256]; |
272 | size_t inputlen = 0; | 272 | size_t inputlen = 0; |
273 | 273 | ||
274 | chdir("sessions"); | 274 | if (args != 2) |
275 | errx(-1, "Syntax: %s [sessionlogdir]", argv[0]); | ||
276 | chdir(argv[1]); | ||
275 | 277 | ||
276 | mbedtls_pk_init( &pk ); | 278 | mbedtls_pk_init( &pk ); |
277 | mbedtls_entropy_init( &entropy ); | 279 | mbedtls_entropy_init( &entropy ); |