projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for OpenSSL 3.0+
[tinc]
/
src
/
openssl
/
cipher.c
diff --git
a/src/openssl/cipher.c
b/src/openssl/cipher.c
index
6b2affc
..
77747f1
100644
(file)
--- a/
src/openssl/cipher.c
+++ b/
src/openssl/cipher.c
@@
-19,10
+19,10
@@
#include "../system.h"
#include "../system.h"
-#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/evp.h>
+#include "log.h"
#include "cipher.h"
#include "../cipher.h"
#include "../logger.h"
#include "cipher.h"
#include "../cipher.h"
#include "../logger.h"
@@
-120,7
+120,7
@@
bool cipher_set_key(cipher_t *cipher, void *key, bool encrypt) {
return true;
}
return true;
}
-
logger(DEBUG_ALWAYS, LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL)
);
+
openssl_err("set key"
);
return false;
}
return false;
}
@@
-137,7
+137,7
@@
bool cipher_set_key_from_rsa(cipher_t *cipher, void *key, size_t len, bool encry
return true;
}
return true;
}
-
logger(DEBUG_ALWAYS, LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL)
);
+
openssl_err("set key"
);
return false;
}
return false;
}
@@
-166,7
+166,7
@@
bool cipher_encrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou
}
}
}
}
-
logger(DEBUG_ALWAYS, LOG_ERR, "Error while encrypting: %s", ERR_error_string(ERR_get_error(), NULL)
);
+
openssl_err("encrypt data"
);
return false;
}
return false;
}
@@
-195,7
+195,7
@@
bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou
}
}
}
}
-
logger(DEBUG_ALWAYS, LOG_ERR, "Error while decrypting: %s", ERR_error_string(ERR_get_error(), NULL)
);
+
openssl_err("decrypt data"
);
return false;
}
return false;
}