-#ifndef GSS_CONTEXT_HH
-#define GSS_CONTEXT_HH
+/*
+ * This file is part of PowerDNS or dnsdist.
+ * Copyright -- PowerDNS.COM B.V. and its contributors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * In addition, for the avoidance of any doubt, permission is granted to
+ * link this program with OpenSSL and to (re)distribute the binaries
+ * produced as the result of such linking.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#pragma once
#ifdef ENABLE_GSS_TSIG
setName("");
};
- //! Initilize using specific name
+ //! Initialize using specific name
GssName(const std::string& name) {
setName(name);
};
};
//! Compare two Gss Names, if no gss support is compiled in, returns false always
- //! This is not necessarely same as string comparison between two non-parsed names
+ //! This is not necessarily same as string comparison between two non-parsed names
bool operator==(const GssName& rhs) {
#ifdef ENABLE_GSS_TSIG
OM_uint32 maj,min;
}
//! Compare two Gss Names, if no gss support is compiled in, returns false always
- //! This is not necessarely same as string comparison between two non-parsed names
+ //! This is not necessarily same as string comparison between two non-parsed names
bool match(const std::string& name) {
#ifdef ENABLE_GSS_TSIG
OM_uint32 maj,min;
void setLocalPrincipal(const std::string& name); //<! Set our gss name
bool getLocalPrincipal(std::string& name); //<! Get our name
void setPeerPrincipal(const std::string& name); //<! Set remote name (do not use after negotiation)
- bool getPeerPrincipal(std::string &name); //<! Return remote name, returns actual name after negotatioan
+ bool getPeerPrincipal(std::string &name); //<! Return remote name, returns actual name after negotiation
void generateLabel(const std::string& suffix); //<! Generate random context name using suffix (such as mydomain.com)
void setLabel(const DNSName& label); //<! Set context name to this label
const DNSName& getLabel() { return d_label; } //<! Return context name
bool init(const std::string &input, std::string& output); //<! Perform GSS Initiate Security Context handshake
- bool accept(const std::string &input, std::string& output); //<! Perform GSS Acccept Security Context handshake
+ bool accept(const std::string &input, std::string& output); //<! Perform GSS Accept Security Context handshake
bool destroy(); //<! Release the cached context
bool expired(); //<! Check if context is expired
bool valid(); //<! Check if context is valid
bool gss_add_signature(const DNSName& context, const std::string& message, std::string& mac); //<! Create signature
bool gss_verify_signature(const DNSName& context, const std::string& message, const std::string& mac); //<! Validate signature
-
-#endif