diff options
author | Anthony Neal <aneal@zeroc.com> | 2001-11-13 16:55:24 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2001-11-13 16:55:24 +0000 |
commit | 97253d6338f7f6f774b177c7a833f0160b5a6d99 (patch) | |
tree | 315319dee4c103b1a442a75b733abfaa8f508fee /cpp/src/Ice/SslConfigErrorReporter.cpp | |
parent | Incorporates SSL, with all Ice tests running under SSL. (diff) | |
download | ice-97253d6338f7f6f774b177c7a833f0160b5a6d99.tar.bz2 ice-97253d6338f7f6f774b177c7a833f0160b5a6d99.tar.xz ice-97253d6338f7f6f774b177c7a833f0160b5a6d99.zip |
Re-added all my SSL code.
Diffstat (limited to 'cpp/src/Ice/SslConfigErrorReporter.cpp')
-rw-r--r-- | cpp/src/Ice/SslConfigErrorReporter.cpp | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/cpp/src/Ice/SslConfigErrorReporter.cpp b/cpp/src/Ice/SslConfigErrorReporter.cpp new file mode 100644 index 00000000000..492ef3b7ed2 --- /dev/null +++ b/cpp/src/Ice/SslConfigErrorReporter.cpp @@ -0,0 +1,82 @@ +// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <iostream>
+#include <sstream>
+
+#include <sax/SAXParseException.hpp>
+#include <Ice/SslConfigErrorReporter.h>
+#include <stdlib.h>
+#include <string.h>
+#include <Ice/Security.h>
+
+using namespace std;
+
+void
+IceSecurity::Ssl::ErrorReporter::warning(const SAXParseException& toCatch)
+{
+ if (_traceLevels->security >= SECURITY_PARSE_WARNINGS)
+ {
+ ostringstream s;
+
+ s << "Xerces-c Init Exception: "<< "Warning at file \""
+ << DOMString(toCatch.getSystemId())
+ << "\", line " << toCatch.getLineNumber()
+ << ", column " << toCatch.getColumnNumber()
+ << "\n Message: " << DOMString(toCatch.getMessage()) << endl;
+
+ _logger->trace(_traceLevels->securityCat, s.str());
+ }
+}
+
+void
+IceSecurity::Ssl::ErrorReporter::error(const SAXParseException& toCatch)
+{
+ _sawErrors = true;
+
+ if (_traceLevels->security >= SECURITY_PARSE_WARNINGS)
+ {
+ ostringstream s;
+
+ s << "Xerces-c Init Exception: "<< "Error at file \""
+ << DOMString(toCatch.getSystemId())
+ << "\", line " << toCatch.getLineNumber()
+ << ", column " << toCatch.getColumnNumber()
+ << "\n Message: " << DOMString(toCatch.getMessage()) << endl;
+
+ _logger->trace(_traceLevels->securityCat, s.str());
+ }
+}
+
+void
+IceSecurity::Ssl::ErrorReporter::fatalError(const SAXParseException& toCatch)
+{
+ _sawErrors = true;
+
+ if (_traceLevels->security >= SECURITY_PARSE_WARNINGS)
+ {
+ ostringstream s;
+
+ s << "Xerces-c Init Exception: "<< "Fatal error at file \""
+ << DOMString(toCatch.getSystemId())
+ << "\", line " << toCatch.getLineNumber()
+ << ", column " << toCatch.getColumnNumber()
+ << "\n Message: " << DOMString(toCatch.getMessage()) << endl;
+
+ _logger->trace(_traceLevels->securityCat, s.str());
+ }
+}
+
+void
+IceSecurity::Ssl::ErrorReporter::resetErrors()
+{
+ // No-op in this case
+}
+
|