]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/gss_context.hh
Wishy-washy
[thirdparty/pdns.git] / pdns / gss_context.hh
index 7cc4ff396690a999a68955b616727e340f6d3bb1..a5d3160707be10f77ca4e2aa5aff3d3c0a24db49 100644 (file)
@@ -1,5 +1,24 @@
-#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
@@ -37,7 +56,7 @@ public:
     setName("");
   };
 
-  //! Initilize using specific name
+  //! Initialize using specific name
   GssName(const std::string& name) {
     setName(name);
   };
@@ -68,7 +87,7 @@ public:
   };
 
   //! 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;
@@ -80,7 +99,7 @@ public:
   }
 
   //! 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;
@@ -125,14 +144,14 @@ public:
   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
@@ -159,5 +178,3 @@ public:
 
 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