From: bert hubert Date: Thu, 15 Feb 2018 12:51:24 +0000 (+0100) Subject: rename ipcrypt/ipcipher X-Git-Tag: dnsdist-1.4.0-alpha1~27^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d5d8c2ed7b94385a851519c60b159131333730d;p=pdns rename ipcrypt/ipcipher --- diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 2f3feae43..23a71deeb 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -312,7 +312,7 @@ pdnsutil_SOURCES = \ ednsoptions.cc ednsoptions.hh \ ednssubnet.cc \ gss_context.cc gss_context.hh \ - ipcrypt.cc ipcrypt.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ + ipcipher.cc ipcipher.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ iputils.cc iputils.hh \ json.cc \ logger.cc \ @@ -1273,7 +1273,7 @@ testrunner_SOURCES = \ ednssubnet.cc \ gettime.cc gettime.hh \ gss_context.cc gss_context.hh \ - ipcrypt.cc ipcrypt.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ + ipcipher.cc ipcipher.hh ../ext/ipcrypt/ipcrypt.c ../ext/ipcrypt/ipcrypt.h \ iputils.cc \ ixfr.cc ixfr.hh \ logger.cc \ diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index 5095a71a3..5cf15d153 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -31,7 +31,7 @@ #include "dolog.hh" #include "fstrm_logger.hh" #include "remote_logger.hh" -#include "ipcrypt.hh" +#include "ipcipher.hh" void setupLuaBindings(bool client) { diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index b38656ea2..030e0b22a 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -177,7 +177,7 @@ endif if HAVE_LIBSSL dnsdist_LDADD += $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) -dnsdist_SOURCES += ipcrypt.cc ipcrypt.hh ext/ipcrypt/ipcrypt.c ext/ipcrypt/ipcrypt.h +dnsdist_SOURCES += ipcipher.cc ipcipher.hh ext/ipcrypt/ipcrypt.c ext/ipcrypt/ipcrypt.h endif if !HAVE_LUA_HPP diff --git a/pdns/dnsdistdist/ipcipher.cc b/pdns/dnsdistdist/ipcipher.cc new file mode 120000 index 000000000..794b273e5 --- /dev/null +++ b/pdns/dnsdistdist/ipcipher.cc @@ -0,0 +1 @@ +../ipcipher.cc \ No newline at end of file diff --git a/pdns/dnsdistdist/ipcipher.hh b/pdns/dnsdistdist/ipcipher.hh new file mode 120000 index 000000000..e8d5917d8 --- /dev/null +++ b/pdns/dnsdistdist/ipcipher.hh @@ -0,0 +1 @@ +../ipcipher.hh \ No newline at end of file diff --git a/pdns/dnsdistdist/ipcrypt.cc b/pdns/dnsdistdist/ipcrypt.cc deleted file mode 120000 index a0507b081..000000000 --- a/pdns/dnsdistdist/ipcrypt.cc +++ /dev/null @@ -1 +0,0 @@ -../ipcrypt.cc \ No newline at end of file diff --git a/pdns/dnsdistdist/ipcrypt.hh b/pdns/dnsdistdist/ipcrypt.hh deleted file mode 120000 index 19ffbb748..000000000 --- a/pdns/dnsdistdist/ipcrypt.hh +++ /dev/null @@ -1 +0,0 @@ -../ipcrypt.hh \ No newline at end of file diff --git a/pdns/ipcrypt.cc b/pdns/ipcipher.cc similarity index 97% rename from pdns/ipcrypt.cc rename to pdns/ipcipher.cc index 173ec4d69..963f11509 100644 --- a/pdns/ipcrypt.cc +++ b/pdns/ipcipher.cc @@ -1,4 +1,4 @@ -#include "ipcrypt.hh" +#include "ipcipher.hh" #include "ext/ipcrypt/ipcrypt.h" #include #include @@ -8,7 +8,7 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, int keylen, unsigned char *out); */ -std::string makeIPCryptKey(const std::string& password) +std::string makeIPCipherKey(const std::string& password) { static const char* salt="ipcryptipcrypt"; unsigned char out[16]; diff --git a/pdns/ipcrypt.hh b/pdns/ipcipher.hh similarity index 67% rename from pdns/ipcrypt.hh rename to pdns/ipcipher.hh index cbb8dc538..cbb932d8f 100644 --- a/pdns/ipcrypt.hh +++ b/pdns/ipcipher.hh @@ -2,6 +2,8 @@ #include "iputils.hh" #include +// see https://powerdns.org/ipcipher + ComboAddress encryptCA(const ComboAddress& ca, const std::string& key); ComboAddress decryptCA(const ComboAddress& ca, const std::string& key); -std::string makeIPCryptKey(const std::string& password); +std::string makeIPCipherKey(const std::string& password); diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 8bd356204..b73bbf39b 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -20,7 +20,7 @@ #include "zoneparser-tng.hh" #include "signingpipe.hh" #include "dns_random.hh" -#include "ipcrypt.hh" +#include "ipcipher.hh" #include #include //termios, TCSANOW, ECHO, ICANON #include "opensslsigners.hh" @@ -1005,7 +1005,7 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { static int xcryptIP(const std::string& cmd, const std::string& ip, const std::string& key) { - string rkey = makeIPCryptKey(key); + string rkey = makeIPCipherKey(key); ComboAddress ca(ip), ret; if(cmd=="ipencrypt")