mirror of
https://gitlab.kit.edu/kit/scc/sys/mail/exim-encrypt-dlfunc.git
synced 2025-12-06 07:53:56 +01:00
Fixed complaints from Jetbrains Clion :-)
This commit is contained in:
@ -46,7 +46,7 @@ typedef enum {
|
|||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
char *prog_basename = basename(argv[0]);
|
char *prog_basename = basename(argv[0]);
|
||||||
int opt = 0;
|
int opt;
|
||||||
unsigned char *secretkey, *publickey;
|
unsigned char *secretkey, *publickey;
|
||||||
size_t secretkey_len = 0, publickey_len = 0;
|
size_t secretkey_len = 0, publickey_len = 0;
|
||||||
char *b64cipherstring;
|
char *b64cipherstring;
|
||||||
@ -133,7 +133,6 @@ int main(int argc, char *argv[]) {
|
|||||||
case 'h':
|
case 'h':
|
||||||
print_usage(prog_basename);
|
print_usage(prog_basename);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,6 @@ int main(int argc, char *argv[]) {
|
|||||||
case 'h':
|
case 'h':
|
||||||
print_usage(prog_basename);
|
print_usage(prog_basename);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +128,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if (base64_decode_string(cipherstring, &ciphertext, &ciphertext_len) != 0) {
|
if (base64_decode_string(cipherstring, &ciphertext, &ciphertext_len) != 0) {
|
||||||
fprintf(stderr, "[ERROR] Unable to base64-decode ciphertext.\n\n");
|
fprintf(stderr, "[ERROR] Unable to base64-decode ciphertext.\n\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
};
|
}
|
||||||
|
|
||||||
// extract nonce
|
// extract nonce
|
||||||
unsigned char nonce[crypto_secretbox_NONCEBYTES];
|
unsigned char nonce[crypto_secretbox_NONCEBYTES];
|
||||||
|
|||||||
@ -64,7 +64,7 @@ int sodium_crypto_secretbox_encrypt_password(uschar **yield, int argc, uschar *a
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Derive a key from the password using a generic hash.
|
* Derive a key from the password using a generic hash.
|
||||||
* This operations needs to be fast (exim holds no state, this might be called multiple times per email).
|
* This operation needs to be fast (exim holds no state, this might be called multiple times per email).
|
||||||
* Collisions avoidance or brute force attacks are not a concern here.
|
* Collisions avoidance or brute force attacks are not a concern here.
|
||||||
*/
|
*/
|
||||||
unsigned char keybytes[crypto_secretbox_KEYBYTES];
|
unsigned char keybytes[crypto_secretbox_KEYBYTES];
|
||||||
|
|||||||
Reference in New Issue
Block a user