mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
Remove trailing whitespace (#3668)
This commit is contained in:
@@ -26,7 +26,7 @@ use a binary (prebuild) release, for example the
|
||||
one from Shining Light Productions that comes with
|
||||
a Windows installer.
|
||||
|
||||
1. Download OpenSSL (at least v0.98a) from:
|
||||
1. Download OpenSSL (at least v0.98a) from:
|
||||
http://www.slproweb.com/products/Win32OpenSSL.html
|
||||
2. Install OpenSSL (we assume you install to c:\OpenSSL)
|
||||
3. Start Visual Studio, go to Tools->Options, under Projects->VC++ Directories
|
||||
|
@@ -32,7 +32,7 @@ class NetSSL_API CertificateHandlerFactory
|
||||
/// A CertificateHandlerFactory is responsible for creating InvalidCertificateHandlers.
|
||||
///
|
||||
/// You don't need to access this class directly. Use the macro
|
||||
/// POCO_REGISTER_CHFACTORY(namespace, InvalidCertificateHandlerName)
|
||||
/// POCO_REGISTER_CHFACTORY(namespace, InvalidCertificateHandlerName)
|
||||
/// instead (see the documentation of InvalidCertificateHandler for an example).
|
||||
{
|
||||
public:
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
class NetSSL_API CertificateHandlerFactoryRegistrar
|
||||
/// Registrar class which automatically registers CertificateHandlerFactory at the CertificateHandlerFactoryMgr.
|
||||
/// You don't need to access this class directly. Use the macro
|
||||
/// POCO_REGISTER_CHFACTORY(namespace, InvalidCertificateHandlerName)
|
||||
/// POCO_REGISTER_CHFACTORY(namespace, InvalidCertificateHandlerName)
|
||||
/// instead (see the documentation of InvalidCertificateHandler for an example).
|
||||
{
|
||||
public:
|
||||
|
@@ -28,7 +28,7 @@ namespace Net {
|
||||
|
||||
class NetSSL_API ConsoleCertificateHandler: public InvalidCertificateHandler
|
||||
/// A ConsoleCertificateHandler is invoked whenever an error occurs verifying the certificate.
|
||||
///
|
||||
///
|
||||
/// The certificate is printed to stdout and the user is asked via console if he wants to accept it.
|
||||
{
|
||||
public:
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
{
|
||||
HTTPS_PORT = 443
|
||||
};
|
||||
|
||||
|
||||
HTTPSClientSession();
|
||||
/// Creates an unconnected HTTPSClientSession.
|
||||
|
||||
@@ -122,25 +122,25 @@ public:
|
||||
~HTTPSClientSession();
|
||||
/// Destroys the HTTPSClientSession and closes
|
||||
/// the underlying socket.
|
||||
|
||||
|
||||
bool secure() const;
|
||||
/// Return true iff the session uses SSL or TLS,
|
||||
/// or false otherwise.
|
||||
|
||||
|
||||
X509Certificate serverCertificate();
|
||||
/// Returns the server's certificate.
|
||||
///
|
||||
/// The certificate is available after the first request has been sent.
|
||||
|
||||
|
||||
Session::Ptr sslSession();
|
||||
/// Returns the SSL Session object for the current
|
||||
/// Returns the SSL Session object for the current
|
||||
/// connection, if session caching has been enabled for
|
||||
/// the HTTPSClientSession's Context. A null pointer is
|
||||
/// the HTTPSClientSession's Context. A null pointer is
|
||||
/// returned otherwise.
|
||||
///
|
||||
/// The Session object can be obtained after the first request has
|
||||
/// been sent.
|
||||
|
||||
|
||||
// HTTPSession
|
||||
void abort();
|
||||
|
||||
@@ -153,7 +153,7 @@ protected:
|
||||
private:
|
||||
HTTPSClientSession(const HTTPSClientSession&);
|
||||
HTTPSClientSession& operator = (const HTTPSClientSession&);
|
||||
|
||||
|
||||
Context::Ptr _pContext;
|
||||
Session::Ptr _pSession;
|
||||
};
|
||||
|
@@ -49,27 +49,27 @@ public:
|
||||
|
||||
~HTTPSStreamFactory();
|
||||
/// Destroys the HTTPSStreamFactory.
|
||||
|
||||
|
||||
std::istream* open(const Poco::URI& uri);
|
||||
/// Creates and opens a HTTPS stream for the given URI.
|
||||
/// The URI must be a https://... URI.
|
||||
///
|
||||
/// Throws a NetException if anything goes wrong.
|
||||
|
||||
|
||||
static void registerFactory();
|
||||
/// Registers the HTTPSStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
static void unregisterFactory();
|
||||
/// Unregisters the HTTPSStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
MAX_REDIRECTS = 10
|
||||
};
|
||||
|
||||
|
||||
std::string _proxyHost;
|
||||
Poco::UInt16 _proxyPort;
|
||||
std::string _proxyUsername;
|
||||
|
@@ -27,7 +27,7 @@ namespace Net {
|
||||
|
||||
|
||||
class NetSSL_API KeyFileHandler: public PrivateKeyPassphraseHandler
|
||||
/// An implementation of PrivateKeyPassphraseHandler that
|
||||
/// An implementation of PrivateKeyPassphraseHandler that
|
||||
/// reads the key for a certificate from a configuration file
|
||||
/// under the path "openSSL.privateKeyPassphraseHandler.options.password".
|
||||
{
|
||||
|
@@ -71,7 +71,7 @@ void NetSSL_API initializeSSL();
|
||||
/// libraries, by calling Poco::Crypto::OpenSSLInitializer::initialize().
|
||||
///
|
||||
/// Should be called before using any class from the NetSSL library.
|
||||
/// The NetSSL will be initialized automatically, through
|
||||
/// The NetSSL will be initialized automatically, through
|
||||
/// Poco::Crypto::OpenSSLInitializer instances or similar mechanisms
|
||||
/// when creating Context or SSLManager instances.
|
||||
/// However, it is recommended to call initializeSSL()
|
||||
@@ -80,10 +80,10 @@ void NetSSL_API initializeSSL();
|
||||
/// Can be called multiple times; however, for every call to
|
||||
/// initializeSSL(), a matching call to uninitializeSSL()
|
||||
/// must be performed.
|
||||
|
||||
|
||||
|
||||
void NetSSL_API uninitializeSSL();
|
||||
/// Uninitializes the NetSSL library by calling
|
||||
/// Uninitializes the NetSSL library by calling
|
||||
/// Poco::Crypto::OpenSSLInitializer::uninitialize() and
|
||||
/// shutting down the SSLManager.
|
||||
|
||||
|
@@ -32,7 +32,7 @@ class NetSSL_API PrivateKeyFactory
|
||||
/// A PrivateKeyFactory is responsible for creating PrivateKeyPassphraseHandlers.
|
||||
///
|
||||
/// You don't need to access this class directly. Use the macro
|
||||
/// POCO_REGISTER_KEYFACTORY(namespace, PrivateKeyPassphraseHandlerName)
|
||||
/// POCO_REGISTER_KEYFACTORY(namespace, PrivateKeyPassphraseHandlerName)
|
||||
/// instead (see the documentation of PrivateKeyPassphraseHandler for an example).
|
||||
{
|
||||
public:
|
||||
@@ -51,7 +51,7 @@ class NetSSL_API PrivateKeyFactoryRegistrar
|
||||
/// Registrar class which automatically registers PrivateKeyFactories at the PrivateKeyFactoryMgr.
|
||||
///
|
||||
/// You don't need to access this class directly. Use the macro
|
||||
/// POCO_REGISTER_KEYFACTORY(namespace, PrivateKeyPassphraseHandlerName)
|
||||
/// POCO_REGISTER_KEYFACTORY(namespace, PrivateKeyPassphraseHandlerName)
|
||||
/// instead (see the documentation of PrivateKeyPassphraseHandler for an example).
|
||||
|
||||
{
|
||||
|
@@ -29,9 +29,9 @@ class NetSSL_API PrivateKeyPassphraseHandler
|
||||
/// A passphrase handler is needed whenever the private key of a certificate is loaded and the certificate is protected
|
||||
/// by a passphrase. The PrivateKeyPassphraseHandler's task is to provide that passphrase.
|
||||
/// One can install one's own PrivateKeyPassphraseHandler by implementing this interface. Note that
|
||||
/// in the implementation file of the subclass the following code must be present (assuming you use the namespace My_API
|
||||
/// in the implementation file of the subclass the following code must be present (assuming you use the namespace My_API
|
||||
/// and the name of your handler class is MyGuiHandler):
|
||||
///
|
||||
///
|
||||
/// #include "Poco/Net/PrivateKeyFactory.h"
|
||||
/// ...
|
||||
/// POCO_REGISTER_KEYFACTORY(My_API, MyGuiHandler)
|
||||
@@ -42,7 +42,7 @@ class NetSSL_API PrivateKeyPassphraseHandler
|
||||
///
|
||||
/// or in case one's application extends Poco::Util::Application one can use an XML configuration and put the following entry
|
||||
/// under the path openSSL.privateKeyPassphraseHandler:
|
||||
///
|
||||
///
|
||||
/// <privateKeyPassphraseHandler>
|
||||
/// <name>MyGuiHandler</name>
|
||||
/// <options>
|
||||
|
@@ -27,7 +27,7 @@ namespace Net {
|
||||
|
||||
|
||||
class NetSSL_API RejectCertificateHandler: public InvalidCertificateHandler
|
||||
/// A RejectCertificateHandler is invoked whenever an error
|
||||
/// A RejectCertificateHandler is invoked whenever an error
|
||||
/// occurs verifying the certificate. It always rejects
|
||||
/// the certificate.
|
||||
{
|
||||
|
@@ -91,7 +91,7 @@ public:
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
StreamSocket acceptConnection(SocketAddress& clientAddr);
|
||||
/// Get the next completed connection from the
|
||||
|
@@ -34,7 +34,7 @@ class NetSSL_API SecureStreamSocket: public StreamSocket
|
||||
///
|
||||
/// A few notes about nonblocking IO:
|
||||
/// sendBytes() and receiveBytes() can return a
|
||||
/// negative value when using a nonblocking socket, which means
|
||||
/// negative value when using a nonblocking socket, which means
|
||||
/// a SSL handshake is currently in progress and more data
|
||||
/// needs to be read or written for the handshake to continue.
|
||||
/// If sendBytes() or receiveBytes() return ERR_SSL_WANT_WRITE,
|
||||
@@ -43,7 +43,7 @@ class NetSSL_API SecureStreamSocket: public StreamSocket
|
||||
/// ERR_SSL_WANT_READ is returned, receiveBytes() must be called
|
||||
/// as soon as data is available for reading (indicated by select()).
|
||||
///
|
||||
/// The SSL handshake is delayed until the first sendBytes() or
|
||||
/// The SSL handshake is delayed until the first sendBytes() or
|
||||
/// receiveBytes() operation is performed on the socket. No automatic
|
||||
/// post connection check (checking the peer certificate for a valid
|
||||
/// hostname) is performed when using nonblocking I/O. To manually
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
ERR_SSL_WANT_READ = -1,
|
||||
ERR_SSL_WANT_WRITE = -2
|
||||
};
|
||||
|
||||
|
||||
SecureStreamSocket();
|
||||
/// Creates an unconnected secure stream socket
|
||||
/// using the default client SSL context.
|
||||
@@ -83,17 +83,17 @@ public:
|
||||
/// agrees to reuse the session).
|
||||
|
||||
explicit SecureStreamSocket(const SocketAddress& address);
|
||||
/// Creates a secure stream socket using the default
|
||||
/// Creates a secure stream socket using the default
|
||||
/// client SSL context and connects it to
|
||||
/// the socket specified by address.
|
||||
|
||||
SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext);
|
||||
/// Creates a secure stream socket using the given
|
||||
/// Creates a secure stream socket using the given
|
||||
/// client SSL context and connects it to
|
||||
/// the socket specified by address.
|
||||
|
||||
SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext, Session::Ptr pSession);
|
||||
/// Creates a secure stream socket using the given
|
||||
/// Creates a secure stream socket using the given
|
||||
/// client SSL context and connects it to
|
||||
/// the socket specified by address.
|
||||
///
|
||||
@@ -102,21 +102,21 @@ public:
|
||||
/// agrees to reuse the session).
|
||||
|
||||
SecureStreamSocket(const SocketAddress& address, const std::string& hostName);
|
||||
/// Creates a secure stream socket using the default
|
||||
/// Creates a secure stream socket using the default
|
||||
/// client SSL context and connects it to
|
||||
/// the socket specified by address.
|
||||
///
|
||||
/// The given host name is used for certificate verification.
|
||||
|
||||
SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext);
|
||||
/// Creates a secure stream socket using the given
|
||||
/// Creates a secure stream socket using the given
|
||||
/// client SSL context and connects it to
|
||||
/// the socket specified by address.
|
||||
///
|
||||
/// The given host name is used for certificate verification.
|
||||
|
||||
SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession);
|
||||
/// Creates a secure stream socket using the given
|
||||
/// Creates a secure stream socket using the given
|
||||
/// client SSL context and connects it to
|
||||
/// the socket specified by address.
|
||||
///
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
bool havePeerCertificate() const;
|
||||
/// Returns true iff the peer has presented a
|
||||
/// certificate.
|
||||
@@ -151,10 +151,10 @@ public:
|
||||
///
|
||||
/// Throws a SSLException if the peer did not
|
||||
/// present a certificate.
|
||||
|
||||
|
||||
void setPeerHostName(const std::string& hostName);
|
||||
/// Sets the peer's host name used for certificate validation.
|
||||
|
||||
|
||||
const std::string& getPeerHostName() const;
|
||||
/// Returns the peer's host name used for certificate validation.
|
||||
|
||||
@@ -198,15 +198,15 @@ public:
|
||||
|
||||
Context::Ptr context() const;
|
||||
/// Returns the SSL context used by this socket.
|
||||
|
||||
|
||||
void setLazyHandshake(bool flag = true);
|
||||
/// Enable lazy SSL handshake. If enabled, the SSL handshake
|
||||
/// will be performed the first time date is sent or
|
||||
/// received over the connection.
|
||||
|
||||
|
||||
bool getLazyHandshake() const;
|
||||
/// Returns true if setLazyHandshake(true) has been called.
|
||||
|
||||
|
||||
void verifyPeerCertificate();
|
||||
/// Performs post-connect (or post-accept) peer certificate validation,
|
||||
/// using the peer host name set with setPeerHostName(), or the peer's
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
///
|
||||
/// Should only be used for non-blocking connections, after the
|
||||
/// initial SSL handshake has been performed (see completeHandshake()).
|
||||
|
||||
|
||||
int completeHandshake();
|
||||
/// Completes the SSL handshake.
|
||||
///
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
/// is enabled).
|
||||
///
|
||||
/// If no connection is established, returns null.
|
||||
|
||||
|
||||
void useSession(Session::Ptr pSession);
|
||||
/// Sets the SSL session to use for the next
|
||||
/// connection. Setting a previously saved Session
|
||||
@@ -250,15 +250,15 @@ public:
|
||||
/// can be given.
|
||||
///
|
||||
/// Must be called before connect() to be effective.
|
||||
|
||||
|
||||
bool sessionWasReused();
|
||||
/// Returns true iff a reused session was negotiated during
|
||||
/// the handshake.
|
||||
|
||||
|
||||
void abort();
|
||||
/// Aborts the SSL connection by closing the underlying
|
||||
/// TCP connection. No orderly SSL shutdown is performed.
|
||||
|
||||
|
||||
protected:
|
||||
SecureStreamSocket(SocketImpl* pImpl);
|
||||
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
/// Throws a Poco::InvalidAccessException.
|
||||
|
||||
void connect(const SocketAddress& address);
|
||||
/// Initializes the socket and establishes a connection to
|
||||
/// Initializes the socket and establishes a connection to
|
||||
/// the TCP server at the given address.
|
||||
///
|
||||
/// Can also be used for UDP sockets. In this case, no
|
||||
@@ -53,19 +53,19 @@ public:
|
||||
/// packets are restricted to the specified address.
|
||||
|
||||
void connect(const SocketAddress& address, const Poco::Timespan& timeout);
|
||||
/// Initializes the socket, sets the socket timeout and
|
||||
/// Initializes the socket, sets the socket timeout and
|
||||
/// establishes a connection to the TCP server at the given address.
|
||||
|
||||
void connectNB(const SocketAddress& address);
|
||||
/// Initializes the socket and establishes a connection to
|
||||
/// Initializes the socket and establishes a connection to
|
||||
/// the TCP server at the given address. Prior to opening the
|
||||
/// connection the socket is set to nonblocking mode.
|
||||
|
||||
|
||||
void bind(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Not supported by a SecureStreamSocket.
|
||||
///
|
||||
/// Throws a Poco::InvalidAccessException.
|
||||
|
||||
|
||||
void listen(int backlog = 64);
|
||||
/// Not supported by a SecureStreamSocket.
|
||||
///
|
||||
@@ -73,30 +73,30 @@ public:
|
||||
|
||||
void close();
|
||||
/// Close the socket.
|
||||
|
||||
|
||||
int sendBytes(const void* buffer, int length, int flags = 0);
|
||||
/// Sends the contents of the given buffer through
|
||||
/// the socket. Any specified flags are ignored.
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
|
||||
|
||||
int receiveBytes(void* buffer, int length, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
/// in buffer. Up to length bytes are received.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
|
||||
|
||||
int sendTo(const void* buffer, int length, const SocketAddress& address, int flags = 0);
|
||||
/// Not supported by a SecureStreamSocket.
|
||||
///
|
||||
/// Throws a Poco::InvalidAccessException.
|
||||
|
||||
|
||||
int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0);
|
||||
/// Not supported by a SecureStreamSocket.
|
||||
///
|
||||
/// Throws a Poco::InvalidAccessException.
|
||||
|
||||
|
||||
void sendUrgent(unsigned char data);
|
||||
/// Not supported by a SecureStreamSocket.
|
||||
///
|
||||
@@ -115,27 +115,27 @@ public:
|
||||
///
|
||||
/// Since SSL does not support a half shutdown, this does
|
||||
/// nothing.
|
||||
|
||||
|
||||
void shutdownSend();
|
||||
/// Shuts down the receiving part of the socket connection.
|
||||
///
|
||||
/// Since SSL does not support a half shutdown, this does
|
||||
/// nothing.
|
||||
|
||||
|
||||
void shutdown();
|
||||
/// Shuts down the SSL connection.
|
||||
|
||||
|
||||
void abort();
|
||||
/// Aborts the connection by closing the underlying
|
||||
/// TCP connection. No orderly SSL shutdown is performed.
|
||||
|
||||
|
||||
bool secure() const;
|
||||
/// Returns true iff the socket's connection is secure
|
||||
/// (using SSL or TLS).
|
||||
|
||||
void setPeerHostName(const std::string& hostName);
|
||||
/// Sets the peer host name for certificate validation purposes.
|
||||
|
||||
|
||||
const std::string& getPeerHostName() const;
|
||||
/// Returns the peer host name.
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
///
|
||||
/// Throws a SSLException if the peer did not
|
||||
/// present a certificate.
|
||||
|
||||
|
||||
Context::Ptr context() const;
|
||||
/// Returns the SSL context used by this socket.
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
/// Enable lazy SSL handshake. If enabled, the SSL handshake
|
||||
/// will be performed the first time date is sent or
|
||||
/// received over the connection.
|
||||
|
||||
|
||||
bool getLazyHandshake() const;
|
||||
/// Returns true if setLazyHandshake(true) has been called.
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
///
|
||||
/// If the SSL connection was the result of an accept(),
|
||||
/// the server-side handshake is completed, otherwise
|
||||
/// a client-side handshake is performed.
|
||||
/// a client-side handshake is performed.
|
||||
|
||||
Session::Ptr currentSession();
|
||||
/// Returns the SSL session of the current connection,
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
/// is enabled).
|
||||
///
|
||||
/// If no connection is established, returns null.
|
||||
|
||||
|
||||
void useSession(Session::Ptr pSession);
|
||||
/// Sets the SSL session to use for the next
|
||||
/// connection. Setting a previously saved Session
|
||||
@@ -191,18 +191,18 @@ public:
|
||||
/// can be given.
|
||||
///
|
||||
/// Must be called before connect() to be effective.
|
||||
|
||||
|
||||
bool sessionWasReused();
|
||||
/// Returns true iff a reused session was negotiated during
|
||||
/// the handshake.
|
||||
|
||||
|
||||
protected:
|
||||
void acceptSSL();
|
||||
/// Performs a SSL server-side handshake.
|
||||
|
||||
|
||||
void connectSSL();
|
||||
/// Performs a SSL client-side handshake on an already connected TCP socket.
|
||||
|
||||
|
||||
~SecureStreamSocketImpl();
|
||||
/// Destroys the SecureStreamSocketImpl.
|
||||
|
||||
@@ -250,13 +250,13 @@ inline Session::Ptr SecureStreamSocketImpl::currentSession()
|
||||
return _impl.currentSession();
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void SecureStreamSocketImpl::useSession(Session::Ptr pSession)
|
||||
{
|
||||
_impl.useSession(pSession);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline bool SecureStreamSocketImpl::sessionWasReused()
|
||||
{
|
||||
return _impl.sessionWasReused();
|
||||
|
@@ -48,13 +48,13 @@ public:
|
||||
|
||||
explicit X509Certificate(X509* pCert);
|
||||
/// Creates the X509Certificate from an existing
|
||||
/// OpenSSL certificate. Ownership is taken of
|
||||
/// OpenSSL certificate. Ownership is taken of
|
||||
/// the certificate.
|
||||
|
||||
X509Certificate(X509* pCert, bool shared);
|
||||
/// Creates the X509Certificate from an existing
|
||||
/// OpenSSL certificate. Ownership is taken of
|
||||
/// the certificate. If shared is true, the
|
||||
/// OpenSSL certificate. Ownership is taken of
|
||||
/// the certificate. If shared is true, the
|
||||
/// certificate's reference count is incremented.
|
||||
|
||||
X509Certificate(const Poco::Crypto::X509Certificate& cert);
|
||||
@@ -84,9 +84,9 @@ public:
|
||||
/// For this check to be successful, the certificate must contain
|
||||
/// a domain name that matches the domain name
|
||||
/// of the host.
|
||||
///
|
||||
///
|
||||
/// Returns true if verification succeeded, or false otherwise.
|
||||
|
||||
|
||||
static bool verify(const Poco::Crypto::X509Certificate& cert, const std::string& hostName);
|
||||
/// Verifies the validity of the certificate against the host name.
|
||||
///
|
||||
@@ -95,11 +95,11 @@ public:
|
||||
/// of the host.
|
||||
///
|
||||
/// Returns true if verification succeeded, or false otherwise.
|
||||
|
||||
|
||||
protected:
|
||||
static bool containsWildcards(const std::string& commonName);
|
||||
static bool matchWildcard(const std::string& alias, const std::string& hostName);
|
||||
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
|
@@ -66,11 +66,11 @@ class TimeRequestHandler: public HTTPRequestHandler
|
||||
/// Return a HTML document with the current date and time.
|
||||
{
|
||||
public:
|
||||
TimeRequestHandler(const std::string& format):
|
||||
TimeRequestHandler(const std::string& format):
|
||||
_format(format)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
|
||||
{
|
||||
Application& app = Application::instance();
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
{
|
||||
app.logger().information("No client certificate available.");
|
||||
}
|
||||
|
||||
|
||||
Timestamp now;
|
||||
std::string dt(DateTimeFormatter::format(now, _format));
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
ostr << dt;
|
||||
ostr << "</p></body></html>";
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::string _format;
|
||||
};
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::string _format;
|
||||
};
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
{
|
||||
Poco::Net::initializeSSL();
|
||||
}
|
||||
|
||||
|
||||
~HTTPSTimeServer()
|
||||
{
|
||||
Poco::Net::uninitializeSSL();
|
||||
@@ -163,7 +163,7 @@ protected:
|
||||
loadConfiguration(); // load default configuration files, if present
|
||||
ServerApplication::initialize(self);
|
||||
}
|
||||
|
||||
|
||||
void uninitialize()
|
||||
{
|
||||
ServerApplication::uninitialize();
|
||||
@@ -172,7 +172,7 @@ protected:
|
||||
void defineOptions(OptionSet& options)
|
||||
{
|
||||
ServerApplication::defineOptions(options);
|
||||
|
||||
|
||||
options.addOption(
|
||||
Option("help", "h", "display help information on command line arguments")
|
||||
.required(false)
|
||||
@@ -207,7 +207,7 @@ protected:
|
||||
// get parameters from configuration file
|
||||
unsigned short port = (unsigned short) config().getInt("HTTPSTimeServer.port", 9443);
|
||||
std::string format(config().getString("HTTPSTimeServer.format", DateTimeFormat::SORTABLE_FORMAT));
|
||||
|
||||
|
||||
// set-up a server socket
|
||||
SecureServerSocket svs(port);
|
||||
// set-up a HTTPServer instance
|
||||
@@ -221,7 +221,7 @@ protected:
|
||||
}
|
||||
return Application::EXIT_OK;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
bool _helpRequested;
|
||||
};
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
{
|
||||
Poco::Net::initializeSSL();
|
||||
}
|
||||
|
||||
|
||||
~SSLInitializer()
|
||||
{
|
||||
Poco::Net::uninitializeSSL();
|
||||
@@ -72,16 +72,16 @@ int main(int argc, char** argv)
|
||||
std::cerr << " using a secure connection to the SMTP server at <mailhost>." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
std::string mailhost(argv[1]);
|
||||
std::string sender(argv[2]);
|
||||
std::string recipient(argv[3]);
|
||||
std::string username(argc >= 5 ? argv[4] : "");
|
||||
std::string password(argc >= 6 ? argv[5] : "");
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Note: we must create the passphrase handler prior Context
|
||||
// Note: we must create the passphrase handler prior Context
|
||||
SharedPtr<InvalidCertificateHandler> pCert = new ConsoleCertificateHandler(false); // ask the user via console
|
||||
Context::Ptr pContext = new Context(Context::CLIENT_USE, "", "", "", Context::VERIFY_RELAXED, 9, true, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
|
||||
SSLManager::instance().initializeClient(0, pCert, pContext);
|
||||
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
|
||||
std::string logo(reinterpret_cast<const char*>(PocoLogo), sizeof(PocoLogo));
|
||||
message.addContent(new StringPartSource(content));
|
||||
message.addAttachment("logo", new StringPartSource(logo, "image/gif"));
|
||||
|
||||
|
||||
SecureSMTPClientSession session(mailhost);
|
||||
session.login();
|
||||
session.startTLS(pContext);
|
||||
|
@@ -1,134 +1,134 @@
|
||||
// The C++ Portable Components logo in GIF format
|
||||
|
||||
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0xa0, 0x00, 0x85, 0x00, 0xa2, 0x00, 0x00, 0xd1, 0xdd, 0xe4,
|
||||
0x45, 0x9b, 0xca, 0x41, 0x55, 0x61, 0x8a, 0x96, 0x9e, 0xa2, 0xbc, 0xcc, 0x00, 0x1b, 0x2c, 0x00,
|
||||
0x75, 0xb6, 0xff, 0xff, 0xff, 0x21, 0xf9, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
|
||||
0x00, 0x00, 0xa0, 0x00, 0x85, 0x00, 0x00, 0x03, 0xff, 0x78, 0xba, 0xdc, 0xfe, 0x30, 0xca, 0x49,
|
||||
0xab, 0xbd, 0x38, 0xeb, 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x64, 0x69, 0x9e, 0x68, 0xaa, 0xae,
|
||||
0x6c, 0xeb, 0xbe, 0x70, 0x2c, 0xcf, 0x2b, 0x40, 0xdc, 0x78, 0xae, 0xef, 0x04, 0xe0, 0xda, 0xbc,
|
||||
0xe0, 0x0e, 0xe0, 0xeb, 0x00, 0x06, 0xc5, 0xc5, 0x6d, 0x72, 0x4b, 0x76, 0x08, 0x01, 0x83, 0x74,
|
||||
0x4a, 0xad, 0x5a, 0xab, 0x01, 0x27, 0x09, 0x10, 0xbd, 0x7a, 0xbf, 0x86, 0x40, 0x6f, 0x33, 0x28,
|
||||
0x10, 0x1a, 0x85, 0x82, 0x44, 0x90, 0x2e, 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c, 0xb8, 0x0d, 0xff, 0x83, 0x21, 0x11, 0xfa, 0xbc, 0x88, 0x21,
|
||||
0x48, 0xb2, 0x24, 0x91, 0x1b, 0x21, 0xaf, 0x38, 0x7b, 0xf8, 0xa5, 0x87, 0xc9, 0x97, 0x04, 0xa1,
|
||||
0x44, 0xbc, 0x20, 0x4d, 0xe3, 0x90, 0x09, 0xfc, 0x3e, 0x7c, 0xa2, 0x93, 0xf1, 0x80, 0x9e, 0x9e,
|
||||
0x18, 0x36, 0xf2, 0xa4, 0xa9, 0xa6, 0x81, 0x38, 0x79, 0x35, 0x1b, 0x08, 0x05, 0x23, 0xb1, 0x58,
|
||||
0x9e, 0x07, 0x2c, 0xad, 0x34, 0x75, 0x3a, 0xa7, 0xdf, 0x84, 0x9a, 0xe2, 0x06, 0x68, 0xdd, 0x8a,
|
||||
0x28, 0x42, 0x54, 0x2a, 0x53, 0xf3, 0x0d, 0x6d, 0x90, 0x72, 0x4a, 0x58, 0xaa, 0x4c, 0x2d, 0xd4,
|
||||
0x3c, 0x94, 0xa1, 0xac, 0x01, 0xa0, 0x1d, 0xdc, 0x5a, 0xf5, 0x39, 0x07, 0x2e, 0x87, 0xa5, 0x5e,
|
||||
0xec, 0x2a, 0x00, 0xb0, 0xf6, 0x12, 0x06, 0xb7, 0x67, 0xd5, 0x7d, 0x51, 0x5a, 0x15, 0xc5, 0x57,
|
||||
0x29, 0x73, 0x01, 0x71, 0x1d, 0x70, 0xef, 0x9c, 0xdf, 0x0b, 0x85, 0x4f, 0xb8, 0x25, 0x0c, 0x66,
|
||||
0xae, 0x08, 0xbc, 0x7b, 0x1c, 0x1c, 0x45, 0x1a, 0x90, 0x9a, 0xe0, 0x3a, 0x28, 0x00, 0xbb, 0x8a,
|
||||
0x2c, 0xb9, 0xb2, 0x03, 0x02, 0x86, 0x52, 0x0b, 0x08, 0xe4, 0x58, 0xef, 0x68, 0x30, 0xae, 0x13,
|
||||
0xcd, 0x71, 0x82, 0xb9, 0x4a, 0x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x87, 0xbd, 0x93, 0xd1, 0x91, 0xff, 0x51, 0x31, 0xd7, 0x66, 0xe4, 0x11, 0x98,
|
||||
0x1c, 0x89, 0x07, 0x28, 0xe8, 0x4d, 0x32, 0x4c, 0xee, 0x07, 0x9d, 0x52, 0x30, 0x35, 0x40, 0xc0,
|
||||
0x3c, 0xa9, 0x99, 0x73, 0x20, 0x95, 0x56, 0x32, 0xd3, 0x53, 0x96, 0x26, 0x08, 0x79, 0x97, 0x6a,
|
||||
0xe5, 0x94, 0xc7, 0xa0, 0x86, 0x0a, 0x94, 0xa9, 0x8b, 0x71, 0x68, 0x06, 0xc9, 0xa2, 0x87, 0x6c,
|
||||
0x7e, 0xa4, 0x93, 0x73, 0x72, 0x9a, 0x02, 0x57, 0x9d, 0x09, 0xde, 0xf9, 0x22, 0x91, 0x32, 0x1a,
|
||||
0xc1, 0x27, 0x47, 0xc6, 0xed, 0x05, 0x64, 0xa0, 0xb9, 0xc1, 0x47, 0xcf, 0x11, 0x05, 0x20, 0x51,
|
||||
0x0f, 0x3d, 0xe7, 0x74, 0xf5, 0x23, 0x99, 0x17, 0x25, 0xaa, 0x28, 0x95, 0x5a, 0x82, 0xe6, 0x9d,
|
||||
0x23, 0x65, 0x58, 0x1a, 0x62, 0x40, 0x49, 0x35, 0x87, 0xe9, 0x3f, 0xb7, 0x4c, 0x00, 0xe8, 0x08,
|
||||
0x6a, 0x7a, 0xe8, 0x57, 0xa8, 0x0f, 0x50, 0x63, 0xc8, 0x26, 0x6e, 0x9a, 0xba, 0x5d, 0x9f, 0x3f,
|
||||
0x7d, 0x06, 0x27, 0x0a, 0xa4, 0xb9, 0x0a, 0x6a, 0xa4, 0xb1, 0xc6, 0x47, 0x2b, 0x7e, 0x87, 0xae,
|
||||
0x93, 0xea, 0x88, 0x8d, 0xa2, 0xd7, 0x6b, 0x8b, 0xff, 0xaf, 0x02, 0xeb, 0x00, 0x3a, 0xc3, 0x88,
|
||||
0x79, 0xe9, 0x76, 0x37, 0xf2, 0x68, 0xed, 0xb5, 0x62, 0x8c, 0xa1, 0x41, 0x7e, 0x9a, 0x3e, 0xb1,
|
||||
0xec, 0x01, 0x85, 0xf4, 0x10, 0xea, 0x35, 0xa3, 0x56, 0x43, 0xcc, 0x98, 0xdb, 0xd1, 0x60, 0xeb,
|
||||
0x60, 0x27, 0x8c, 0xe5, 0x0a, 0xa1, 0xe5, 0x1d, 0x52, 0x9f, 0x0d, 0xd2, 0x3a, 0xb0, 0xea, 0x0c,
|
||||
0xee, 0x8e, 0x90, 0xa4, 0x01, 0xc9, 0xa0, 0x66, 0x5f, 0x79, 0x50, 0xb6, 0x21, 0x6a, 0x86, 0xb6,
|
||||
0xa9, 0x4b, 0x56, 0xbe, 0x20, 0xe4, 0x17, 0x86, 0x04, 0x26, 0x9d, 0x96, 0xe7, 0xc0, 0x04, 0xff,
|
||||
0x66, 0xb0, 0x12, 0x79, 0x50, 0xe7, 0x55, 0x1e, 0x2a, 0xee, 0xc9, 0xe9, 0xc4, 0x74, 0x21, 0xbc,
|
||||
0xc1, 0xbe, 0x52, 0x38, 0x73, 0x44, 0x9e, 0xb5, 0x7a, 0xb2, 0xa8, 0xba, 0x20, 0x23, 0x86, 0xed,
|
||||
0xca, 0x38, 0x2e, 0xa2, 0x5b, 0x7d, 0xff, 0xda, 0xcb, 0x18, 0x9b, 0x10, 0xaf, 0xdb, 0x20, 0xc7,
|
||||
0x0b, 0xe0, 0xca, 0x51, 0x4f, 0x85, 0x48, 0x34, 0x28, 0x91, 0xc4, 0x6e, 0xcc, 0x71, 0xca, 0x1c,
|
||||
0x21, 0x46, 0x08, 0x8d, 0xd1, 0x71, 0x32, 0x80, 0x62, 0x5a, 0x01, 0x75, 0xaf, 0xba, 0x3a, 0xa3,
|
||||
0x1a, 0x8f, 0x5e, 0x14, 0xd6, 0x28, 0x34, 0xc7, 0x0a, 0x17, 0xcd, 0xef, 0xd4, 0x14, 0x54, 0xad,
|
||||
0xea, 0xc9, 0x13, 0x13, 0xbd, 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, 0xe5, 0xaf, 0x66, 0xfb, 0xc8, 0x79, 0x82, 0xcf, 0xc0, 0xf3, 0xbd, 0x05, 0xcc, 0xfe,
|
||||
0xfd, 0x40, 0x77, 0x60, 0x3f, 0xfe, 0xe7, 0xb7, 0x5e, 0xc2, 0xef, 0x48, 0xa2, 0x9f, 0xaa, 0xd6,
|
||||
0xc7, 0xbf, 0x02, 0x96, 0xaa, 0x22, 0x04, 0x34, 0xe0, 0xf9, 0xf0, 0x16, 0x94, 0x81, 0x24, 0x64,
|
||||
0x70, 0xe5, 0x80, 0x1b, 0x13, 0x14, 0x48, 0x41, 0xa4, 0x6c, 0x2b, 0x81, 0x15, 0x34, 0x5f, 0xcd,
|
||||
0x12, 0x42, 0xbb, 0x9a, 0xf9, 0x4b, 0x1e, 0x1b, 0x8c, 0x47, 0x06, 0x33, 0x28, 0xba, 0x11, 0x52,
|
||||
0xd0, 0x35, 0x30, 0x43, 0xca, 0x06, 0x09, 0xb2, 0x01, 0x0c, 0x9a, 0xf0, 0x7c, 0x7d, 0x78, 0x61,
|
||||
0x05, 0xc5, 0xe7, 0xaa, 0x47, 0x11, 0xa1, 0x10, 0x26, 0x70, 0xa1, 0x0c, 0xcb, 0x27, 0xbc, 0x1d,
|
||||
0x52, 0x90, 0x86, 0xb9, 0x23, 0x15, 0xf1, 0x90, 0x64, 0x3d, 0x0d, 0xec, 0xcf, 0x87, 0x30, 0xac,
|
||||
0xc0, 0x97, 0x90, 0x78, 0x42, 0xae, 0xcd, 0x6f, 0x88, 0xe3, 0x61, 0xa0, 0x12, 0x99, 0xa8, 0xc0,
|
||||
0xe3, 0x50, 0xb1, 0x82, 0x08, 0x71, 0x1b, 0x2c, 0xff, 0x88, 0x17, 0xae, 0xc6, 0x5c, 0x40, 0x87,
|
||||
0x57, 0x94, 0x07, 0x2f, 0xc2, 0xa8, 0x40, 0xf1, 0x69, 0xb1, 0x3e, 0xf2, 0x13, 0x20, 0x7c, 0xc8,
|
||||
0x78, 0x3f, 0x20, 0x1e, 0x20, 0x85, 0x6c, 0xc4, 0xdf, 0x06, 0x7b, 0x77, 0x03, 0x2f, 0xce, 0xc8,
|
||||
0x11, 0x7a, 0xaa, 0x08, 0xff, 0x0a, 0xe4, 0x12, 0x98, 0xf8, 0xb1, 0x4b, 0x5d, 0xc3, 0xdf, 0x6a,
|
||||
0xfa, 0xf8, 0xc7, 0x98, 0x30, 0x86, 0x7f, 0x05, 0x21, 0x52, 0x67, 0x74, 0xe7, 0xc6, 0x69, 0xb4,
|
||||
0xf1, 0x7a, 0x20, 0x58, 0x22, 0xfb, 0x42, 0xd8, 0x43, 0xf6, 0x01, 0x65, 0x66, 0x86, 0xf0, 0x9f,
|
||||
0x23, 0x1d, 0x71, 0x40, 0xa5, 0x3c, 0xd2, 0x60, 0x3a, 0x94, 0xa2, 0x07, 0x3e, 0xa8, 0x41, 0x0f,
|
||||
0xdc, 0x83, 0x08, 0xb3, 0x22, 0xd7, 0x03, 0x17, 0xa8, 0x36, 0xf6, 0x89, 0x12, 0x04, 0x2e, 0xa4,
|
||||
0xa1, 0x2a, 0xa1, 0x02, 0x2f, 0x11, 0xb6, 0x0f, 0x6b, 0x96, 0x34, 0x81, 0x24, 0xcb, 0xd7, 0x2f,
|
||||
0x81, 0x29, 0x83, 0x7c, 0x34, 0x3c, 0x62, 0x1a, 0x28, 0xe9, 0x82, 0x5d, 0x12, 0xa9, 0x91, 0x2d,
|
||||
0x3c, 0x1f, 0x45, 0xea, 0x63, 0x10, 0x62, 0x66, 0xc0, 0x85, 0x90, 0x14, 0x81, 0x31, 0xed, 0xe3,
|
||||
0x4c, 0x0e, 0x08, 0xd3, 0x59, 0x10, 0x42, 0x04, 0x1a, 0x47, 0x00, 0x4d, 0x8e, 0x5d, 0xb3, 0x9a,
|
||||
0xdd, 0xeb, 0x5f, 0x80, 0x1c, 0xf9, 0x4b, 0xc2, 0x45, 0xc0, 0x85, 0x38, 0xfb, 0x66, 0x0a, 0x58,
|
||||
0xf9, 0x29, 0x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0xab, 0xc3, 0xc3, 0xad, 0x02, 0x75, 0xa8, 0x3b, 0xfd, 0xea, 0x53, 0x95, 0xb2, 0xc4, 0x26, 0xd8,
|
||||
0x8b, 0x64, 0xf1, 0x9c, 0x6b, 0x57, 0xe3, 0x7a, 0x07, 0xb5, 0x1a, 0x54, 0x85, 0x21, 0x30, 0xe9,
|
||||
0x59, 0x09, 0x25, 0x53, 0x4f, 0xf8, 0xf5, 0x90, 0x91, 0xd2, 0x64, 0x56, 0xb9, 0x8a, 0x3a, 0xbe,
|
||||
0x5e, 0xc6, 0xaf, 0x5b, 0xc4, 0x0f, 0x26, 0x07, 0x99, 0x37, 0xf3, 0x51, 0x95, 0xb0, 0x86, 0x81,
|
||||
0x2c, 0xb8, 0x36, 0x38, 0xcd, 0x55, 0x94, 0xd5, 0x3e, 0xd1, 0x0c, 0x81, 0x57, 0x47, 0x30, 0xda,
|
||||
0x84, 0xe2, 0x0d, 0x52, 0x79, 0x35, 0x5f, 0x68, 0x23, 0xa9, 0xd9, 0x0e, 0xb8, 0x90, 0x98, 0xb3,
|
||||
0x2c, 0xde, 0x5e, 0xd4, 0x58, 0xda, 0x18, 0x74, 0x16, 0xab, 0x4e, 0x55, 0x6d, 0xde, 0x9a, 0x47,
|
||||
0x23, 0xda, 0xb2, 0x6f, 0xb5, 0xe9, 0xfb, 0xad, 0x09, 0xae, 0xa9, 0x4f, 0x57, 0xec, 0x2e, 0x58,
|
||||
0xa4, 0xa2, 0xe1, 0x6d, 0xc9, 0x03, 0xdc, 0x0e, 0xff, 0xb8, 0xb2, 0xb9, 0x0e, 0x71, 0x65, 0x59,
|
||||
0x49, 0xfa, 0x2e, 0x59, 0xe2, 0x0f, 0xba, 0x46, 0xbc, 0x1f, 0x70, 0x89, 0xab, 0xd5, 0xbf, 0x0e,
|
||||
0x6e, 0x91, 0x7c, 0xac, 0x23, 0x36, 0x79, 0x7b, 0xbf, 0xc2, 0x96, 0x60, 0xb9, 0xe4, 0xc1, 0x9c,
|
||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 0x32,
|
||||
0x98, 0x8f, 0xd3, 0xb8, 0x02, 0xbd, 0x33, 0xbd, 0x77, 0x00, 0x82, 0x10, 0xe6, 0x4c, 0x67, 0xe0,
|
||||
0x9e, 0x84, 0xce, 0x42, 0x70, 0x60, 0xf2, 0xf6, 0xcc, 0xe7, 0x3e, 0xfb, 0xf9, 0xcf, 0x80, 0x0e,
|
||||
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0xa0, 0x00, 0x85, 0x00, 0xa2, 0x00, 0x00, 0xd1, 0xdd, 0xe4,
|
||||
0x45, 0x9b, 0xca, 0x41, 0x55, 0x61, 0x8a, 0x96, 0x9e, 0xa2, 0xbc, 0xcc, 0x00, 0x1b, 0x2c, 0x00,
|
||||
0x75, 0xb6, 0xff, 0xff, 0xff, 0x21, 0xf9, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
|
||||
0x00, 0x00, 0xa0, 0x00, 0x85, 0x00, 0x00, 0x03, 0xff, 0x78, 0xba, 0xdc, 0xfe, 0x30, 0xca, 0x49,
|
||||
0xab, 0xbd, 0x38, 0xeb, 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x64, 0x69, 0x9e, 0x68, 0xaa, 0xae,
|
||||
0x6c, 0xeb, 0xbe, 0x70, 0x2c, 0xcf, 0x2b, 0x40, 0xdc, 0x78, 0xae, 0xef, 0x04, 0xe0, 0xda, 0xbc,
|
||||
0xe0, 0x0e, 0xe0, 0xeb, 0x00, 0x06, 0xc5, 0xc5, 0x6d, 0x72, 0x4b, 0x76, 0x08, 0x01, 0x83, 0x74,
|
||||
0x4a, 0xad, 0x5a, 0xab, 0x01, 0x27, 0x09, 0x10, 0xbd, 0x7a, 0xbf, 0x86, 0x40, 0x6f, 0x33, 0x28,
|
||||
0x10, 0x1a, 0x85, 0x82, 0x44, 0x90, 0x2e, 0x68, 0x2f, 0xb6, 0x2e, 0x78, 0x7e, 0x15, 0x8f, 0xe2,
|
||||
0xf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||||
0x48, 0xb2, 0x24, 0x91, 0x1b, 0x21, 0xaf, 0x38, 0x7b, 0xf8, 0xa5, 0x87, 0xc9, 0x97, 0x04, 0xa1,
|
||||
0x44, 0xbc, 0x20, 0x4d, 0xe3, 0x90, 0x09, 0xfc, 0x3e, 0x7c, 0xa2, 0x93, 0xf1, 0x80, 0x9e, 0x9e,
|
||||
0x18, 0x36, 0xf2, 0xa4, 0xa9, 0xa6, 0x81, 0x38, 0x79, 0x35, 0x1b, 0x08, 0x05, 0x23, 0xb1, 0x58,
|
||||
0x9e, 0x07, 0x2c, 0xad, 0x34, 0x75, 0x3a, 0xa7, 0xdf, 0x84, 0x9a, 0xe2, 0x06, 0x68, 0xdd, 0x8a,
|
||||
0x28, 0x42, 0x54, 0x2a, 0x53, 0xf3, 0x0d, 0x6d, 0x90, 0x72, 0x4a, 0x58, 0xaa, 0x4c, 0x2d, 0xd4,
|
||||
0x3c, 0x94, 0xa1, 0xac, 0x01, 0xa0, 0x1d, 0xdc, 0x5a, 0xf5, 0x39, 0x07, 0x2e, 0x87, 0xa5, 0x5e,
|
||||
0xec, 0x2a, 0x00, 0xb0, 0xf6, 0x12, 0x06, 0xb7, 0x67, 0xd5, 0x7d, 0x51, 0x5a, 0x15, 0xc5, 0x57,
|
||||
0x29, 0x73, 0x01, 0x71, 0x1d, 0x70, 0xef, 0x9c, 0xdf, 0x0b, 0x85, 0x4f, 0xb8, 0x25, 0x0c, 0x66,
|
||||
0xae, 0x08, 0xbc, 0x7b, 0x1c, 0x1c, 0x45, 0x1a, 0x90, 0x9a, 0xe0, 0x3a, 0x28, 0x00, 0xbb, 0x8a,
|
||||
0x2c, 0xb9, 0xb2, 0x03, 0x02, 0x86, 0x52, 0x0b, 0x08, 0xe4, 0x58, 0xef, 0x68, 0x30, 0xae, 0x13,
|
||||
0xcd, 0x71, 0x82, 0xb9, 0x4a, 0x6c, 0xd9, 0x5f, 0x2c, 0x5b, 0xf0, 0x6c, 0xa1, 0x76, 0xa3, 0x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x11, 0x98,
|
||||
0x1c, 0x89, 0x07, 0x28, 0xe8, 0x4d, 0x32, 0x4c, 0xee, 0x07, 0x9d, 0x52, 0x30, 0x35, 0x40, 0xc0,
|
||||
0x3c, 0xa9, 0x99, 0x73, 0x20, 0x95, 0x56, 0x32, 0xd3, 0x53, 0x96, 0x26, 0x08, 0x79, 0x97, 0x6a,
|
||||
0xe5, 0x94, 0xc7, 0xa0, 0x86, 0x0a, 0x94, 0xa9, 0x8b, 0x71, 0x68, 0x06, 0xc9, 0xa2, 0x87, 0x6c,
|
||||
0x7e, 0xa4, 0x93, 0x73, 0x72, 0x9a, 0x02, 0x57, 0x9d, 0x09, 0xde, 0xf9, 0x22, 0x91, 0x32, 0x1a,
|
||||
0xc1, 0x27, 0x47, 0xc6, 0xed, 0x05, 0x64, 0xa0, 0xb9, 0xc1, 0x47, 0xcf, 0x11, 0x05, 0x20, 0x51,
|
||||
0x0f, 0x3d, 0xe7, 0x74, 0xf5, 0x23, 0x99, 0x17, 0x25, 0xaa, 0x28, 0x95, 0x5a, 0x82, 0xe6, 0x9d,
|
||||
0x23, 0x65, 0x58, 0x1a, 0x62, 0x40, 0x49, 0x35, 0x87, 0xe9, 0x3f, 0xb7, 0x4c, 0x00, 0xe8, 0x08,
|
||||
0x6a, 0x7a, 0xe8, 0x57, 0xa8, 0x0f, 0x50, 0x63, 0xc8, 0x26, 0x6e, 0x9a, 0xba, 0x5d, 0x9f, 0x3f,
|
||||
0x7d, 0x06, 0x27, 0x0a, 0xa4, 0xb9, 0x0a, 0x6a, 0xa4, 0xb1, 0xc6, 0x47, 0x2b, 0x7e, 0x87, 0xae,
|
||||
0x93, 0xea, 0x88, 0x8d, 0xa2, 0xd7, 0x6b, 0x8b, 0xff, 0xaf, 0x02, 0xeb, 0x00, 0x3a, 0xc3, 0x88,
|
||||
0x79, 0xe9, 0x76, 0x37, 0xf2, 0x68, 0xed, 0xb5, 0x62, 0x8c, 0xa1, 0x41, 0x7e, 0x9a, 0x3e, 0xb1,
|
||||
0xec, 0x01, 0x85, 0xf4, 0x10, 0xea, 0x35, 0xa3, 0x56, 0x43, 0xcc, 0x98, 0xdb, 0xd1, 0x60, 0xeb,
|
||||
0x60, 0x27, 0x8c, 0xe5, 0x0a, 0xa1, 0xe5, 0x1d, 0x52, 0x9f, 0x0d, 0xd2, 0x3a, 0xb0, 0xea, 0x0c,
|
||||
0xee, 0x8e, 0x90, 0xa4, 0x01, 0xc9, 0xa0, 0x66, 0x5f, 0x79, 0x50, 0xb6, 0x21, 0x6a, 0x86, 0xb6,
|
||||
0xa9, 0x4b, 0x56, 0xbe, 0x20, 0xe4, 0x17, 0x86, 0x04, 0x26, 0x9d, 0x96, 0xe7, 0xc0, 0x04, 0xff,
|
||||
0x66, 0xb0, 0x12, 0x79, 0x50, 0xe7, 0x55, 0x1e, 0x2a, 0xee, 0xc9, 0xe9, 0xc4, 0x74, 0x21, 0xbc,
|
||||
0xc1, 0xbe, 0x52, 0x38, 0x73, 0x44, 0x9e, 0xb5, 0x7a, 0xb2, 0xa8, 0xba, 0x20, 0x23, 0x86, 0xed,
|
||||
0xca, 0x38, 0x2e, 0xa2, 0x5b, 0x7d, 0xff, 0xda, 0xcb, 0x18, 0x9b, 0x10, 0xaf, 0xdb, 0x20, 0xc7,
|
||||
0x0b, 0xe0, 0xca, 0x51, 0x4f, 0x85, 0x48, 0x34, 0x28, 0x91, 0xc4, 0x6e, 0xcc, 0x71, 0xca, 0x1c,
|
||||
0x21, 0x46, 0x08, 0x8d, 0xd1, 0x71, 0x32, 0x80, 0x62, 0x5a, 0x01, 0x75, 0xaf, 0xba, 0x3a, 0xa3,
|
||||
0x1a, 0x8f, 0x5e, 0x14, 0xd6, 0x28, 0x34, 0xc7, 0x0a, 0x17, 0xcd, 0xef, 0xd4, 0x14, 0x54, 0xad,
|
||||
0xea, 0xc9, 0x13, 0x13, 0xbd, 0x90, 0xa6, 0x95, 0x4c, 0xe0, 0x35, 0xc3, 0x60, 0x4f, 0x9c, 0xf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0xbd, 0x05, 0xcc, 0xfe,
|
||||
0xfd, 0x40, 0x77, 0x60, 0x3f, 0xfe, 0xe7, 0xb7, 0x5e, 0xc2, 0xef, 0x48, 0xa2, 0x9f, 0xaa, 0xd6,
|
||||
0xc7, 0xbf, 0x02, 0x96, 0xaa, 0x22, 0x04, 0x34, 0xe0, 0xf9, 0xf0, 0x16, 0x94, 0x81, 0x24, 0x64,
|
||||
0x70, 0xe5, 0x80, 0x1b, 0x13, 0x14, 0x48, 0x41, 0xa4, 0x6c, 0x2b, 0x81, 0x15, 0x34, 0x5f, 0xcd,
|
||||
0x12, 0x42, 0xbb, 0x9a, 0xf9, 0x4b, 0x1e, 0x1b, 0x8c, 0x47, 0x06, 0x33, 0x28, 0xba, 0x11, 0x52,
|
||||
0xd0, 0x35, 0x30, 0x43, 0xca, 0x06, 0x09, 0xb2, 0x01, 0x0c, 0x9a, 0xf0, 0x7c, 0x7d, 0x78, 0x61,
|
||||
0x05, 0xc5, 0xe7, 0xaa, 0x47, 0x11, 0xa1, 0x10, 0x26, 0x70, 0xa1, 0x0c, 0xcb, 0x27, 0xbc, 0x1d,
|
||||
0x52, 0x90, 0x86, 0xb9, 0x23, 0x15, 0xf1, 0x90, 0x64, 0x3d, 0x0d, 0xec, 0xcf, 0x87, 0x30, 0xac,
|
||||
0xc0, 0x97, 0x90, 0x78, 0x42, 0xae, 0xcd, 0x6f, 0x88, 0xe3, 0x61, 0xa0, 0x12, 0x99, 0xa8, 0xc0,
|
||||
0xe3, 0x50, 0xb1, 0x82, 0x08, 0x71, 0x1b, 0x2c, 0xff, 0x88, 0x17, 0xae, 0xc6, 0x5c, 0x40, 0x87,
|
||||
0x57, 0x94, 0x07, 0x2f, 0xc2, 0xa8, 0x40, 0xf1, 0x69, 0xb1, 0x3e, 0xf2, 0x13, 0x20, 0x7c, 0xc8,
|
||||
0x78, 0x3f, 0x20, 0x1e, 0x20, 0x85, 0x6c, 0xc4, 0xdf, 0x06, 0x7b, 0x77, 0x03, 0x2f, 0xce, 0xc8,
|
||||
0x11, 0x7a, 0xaa, 0x08, 0xff, 0x0a, 0xe4, 0x12, 0x98, 0xf8, 0xb1, 0x4b, 0x5d, 0xc3, 0xdf, 0x6a,
|
||||
0xfa, 0xf8, 0xc7, 0x98, 0x30, 0x86, 0x7f, 0x05, 0x21, 0x52, 0x67, 0x74, 0xe7, 0xc6, 0x69, 0xb4,
|
||||
0xf1, 0x7a, 0x20, 0x58, 0x22, 0xfb, 0x42, 0xd8, 0x43, 0xf6, 0x01, 0x65, 0x66, 0x86, 0xf0, 0x9f,
|
||||
0x23, 0x1d, 0x71, 0x40, 0xa5, 0x3c, 0xd2, 0x60, 0x3a, 0x94, 0xa2, 0x07, 0x3e, 0xa8, 0x41, 0x0f,
|
||||
0xdc, 0x83, 0x08, 0xb3, 0x22, 0xd7, 0x03, 0x17, 0xa8, 0x36, 0xf6, 0x89, 0x12, 0x04, 0x2e, 0xa4,
|
||||
0xa1, 0x2a, 0xa1, 0x02, 0x2f, 0x11, 0xb6, 0x0f, 0x6b, 0x96, 0x34, 0x81, 0x24, 0xcb, 0xd7, 0x2f,
|
||||
0x81, 0x29, 0x83, 0x7c, 0x34, 0x3c, 0x62, 0x1a, 0x28, 0xe9, 0x82, 0x5d, 0x12, 0xa9, 0x91, 0x2d,
|
||||
0x3c, 0x1f, 0x45, 0xea, 0x63, 0x10, 0x62, 0x66, 0xc0, 0x85, 0x90, 0x14, 0x81, 0x31, 0xed, 0xe3,
|
||||
0x4c, 0x0e, 0x08, 0xd3, 0x59, 0x10, 0x42, 0x04, 0x1a, 0x47, 0x00, 0x4d, 0x8e, 0x5d, 0xb3, 0x9a,
|
||||
0xdd, 0xeb, 0x5f, 0x80, 0x1c, 0xf9, 0x4b, 0xc2, 0x45, 0xc0, 0x85, 0x38, 0xfb, 0x66, 0x0a, 0x58,
|
||||
0xf9, 0x29, 0x72, 0x0a, 0x64, 0x7d, 0x34, 0xc4, 0x20, 0x32, 0x57, 0xa0, 0x4e, 0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 0x95, 0xb2, 0xc4, 0x26, 0xd8,
|
||||
0x8b, 0x64, 0xf1, 0x9c, 0x6b, 0x57, 0xe3, 0x7a, 0x07, 0xb5, 0x1a, 0x54, 0x85, 0x21, 0x30, 0xe9,
|
||||
0x59, 0x09, 0x25, 0x53, 0x4f, 0xf8, 0xf5, 0x90, 0x91, 0xd2, 0x64, 0x56, 0xb9, 0x8a, 0x3a, 0xbe,
|
||||
0x5e, 0xc6, 0xaf, 0x5b, 0xc4, 0x0f, 0x26, 0x07, 0x99, 0x37, 0xf3, 0x51, 0x95, 0xb0, 0x86, 0x81,
|
||||
0x2c, 0xb8, 0x36, 0x38, 0xcd, 0x55, 0x94, 0xd5, 0x3e, 0xd1, 0x0c, 0x81, 0x57, 0x47, 0x30, 0xda,
|
||||
0x84, 0xe2, 0x0d, 0x52, 0x79, 0x35, 0x5f, 0x68, 0x23, 0xa9, 0xd9, 0x0e, 0xb8, 0x90, 0x98, 0xb3,
|
||||
0x2c, 0xde, 0x5e, 0xd4, 0x58, 0xda, 0x18, 0x74, 0x16, 0xab, 0x4e, 0x55, 0x6d, 0xde, 0x9a, 0x47,
|
||||
0x23, 0xda, 0xb2, 0x6f, 0xb5, 0xe9, 0xfb, 0xad, 0x09, 0xae, 0xa9, 0x4f, 0x57, 0xec, 0x2e, 0x58,
|
||||
0xa4, 0xa2, 0xe1, 0x6d, 0xc9, 0x03, 0xdc, 0x0e, 0xff, 0xb8, 0xb2, 0xb9, 0x0e, 0x71, 0x65, 0x59,
|
||||
0x49, 0xfa, 0x2e, 0x59, 0xe2, 0x0f, 0xba, 0x46, 0xbc, 0x1f, 0x70, 0x89, 0xab, 0xd5, 0xbf, 0x0e,
|
||||
0x6e, 0x91, 0x7c, 0xac, 0x23, 0x36, 0x79, 0x7b, 0xbf, 0xc2, 0x96, 0x60, 0xb9, 0xe4, 0xc1, 0x9c,
|
||||
0x46, 0xb8, 0x3b, 0x8c, 0xab, 0x14, 0xf7, 0xaa, 0x76, 0x41, 0x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, 0x00, 0x82, 0x10, 0xe6, 0x4c, 0x67, 0xe0,
|
||||
0x9e, 0x84, 0xce, 0x42, 0x70, 0x60, 0xf2, 0xf6, 0xcc, 0xe7, 0x3e, 0xfb, 0xf9, 0xcf, 0x80, 0x0e,
|
||||
0xb4, 0xa0, 0x07, 0x4d, 0xe8, 0x42, 0x97, 0x20, 0x01, 0x01, 0x00, 0x3b
|
||||
|
@@ -33,8 +33,8 @@ public:
|
||||
TweetApp()
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
void defineOptions(OptionSet& options)
|
||||
{
|
||||
Application::defineOptions(options);
|
||||
@@ -51,14 +51,14 @@ protected:
|
||||
.repeatable(false)
|
||||
.argument("message")
|
||||
.callback(OptionCallback<TweetApp>(this, &TweetApp::handleMessage)));
|
||||
|
||||
|
||||
options.addOption(
|
||||
Option("ckey", "c", "Specify the Twitter consumer key.")
|
||||
.required(true)
|
||||
.repeatable(false)
|
||||
.argument("consumer key")
|
||||
.callback(OptionCallback<TweetApp>(this, &TweetApp::handleConsumerKey)));
|
||||
|
||||
|
||||
options.addOption(
|
||||
Option("csecret", "s", "Specify the Twitter consumer secret.")
|
||||
.required(true)
|
||||
@@ -80,18 +80,18 @@ protected:
|
||||
.argument("access token secret")
|
||||
.callback(OptionCallback<TweetApp>(this, &TweetApp::handleAccessTokenSecret)));
|
||||
}
|
||||
|
||||
|
||||
void handleHelp(const std::string& name, const std::string& value)
|
||||
{
|
||||
displayHelp();
|
||||
stopOptionsProcessing();
|
||||
}
|
||||
|
||||
|
||||
void handleConsumerKey(const std::string& name, const std::string& value)
|
||||
{
|
||||
_consumerKey = value;
|
||||
}
|
||||
|
||||
|
||||
void handleConsumerSecret(const std::string& name, const std::string& value)
|
||||
{
|
||||
_consumerSecret = value;
|
||||
@@ -106,12 +106,12 @@ protected:
|
||||
{
|
||||
_accessTokenSecret = value;
|
||||
}
|
||||
|
||||
|
||||
void handleMessage(const std::string& name, const std::string& value)
|
||||
{
|
||||
_message = value;
|
||||
}
|
||||
|
||||
|
||||
void displayHelp()
|
||||
{
|
||||
HelpFormatter helpFormatter(options());
|
||||
@@ -120,7 +120,7 @@ protected:
|
||||
helpFormatter.setHeader("A simple Twitter command line client for posting status updates.");
|
||||
helpFormatter.format(std::cout);
|
||||
}
|
||||
|
||||
|
||||
int main(const std::vector<std::string>& args)
|
||||
{
|
||||
try
|
||||
|
@@ -29,13 +29,13 @@ Twitter::Twitter():
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
Twitter::Twitter(const std::string& twitterURI):
|
||||
_uri(twitterURI)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
Twitter::~Twitter()
|
||||
{
|
||||
}
|
||||
@@ -49,7 +49,7 @@ void Twitter::login(const std::string& consumerKey, const std::string& consumerS
|
||||
_tokenSecret = tokenSecret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Poco::Int64 Twitter::update(const std::string& status)
|
||||
{
|
||||
Poco::Net::HTMLForm form;
|
||||
@@ -64,23 +64,23 @@ Poco::AutoPtr<Poco::Util::AbstractConfiguration> Twitter::invoke(const std::stri
|
||||
// Create the request URI.
|
||||
// We use the JSON version of the Twitter API.
|
||||
Poco::URI uri(_uri + twitterMethod + ".json");
|
||||
|
||||
|
||||
Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort());
|
||||
Poco::Net::HTTPRequest req(httpMethod, uri.getPath(), Poco::Net::HTTPMessage::HTTP_1_1);
|
||||
|
||||
|
||||
// Sign request
|
||||
Poco::Net::OAuth10Credentials creds(_consumerKey, _consumerSecret, _token, _tokenSecret);
|
||||
creds.authenticate(req, uri, form);
|
||||
|
||||
|
||||
// Send the request.
|
||||
form.prepareSubmit(req);
|
||||
std::ostream& ostr = session.sendRequest(req);
|
||||
form.write(ostr);
|
||||
|
||||
|
||||
// Receive the response.
|
||||
Poco::Net::HTTPResponse res;
|
||||
std::istream& rs = session.receiveResponse(res);
|
||||
|
||||
|
||||
Poco::AutoPtr<Poco::Util::JSONConfiguration> pResult = new Poco::Util::JSONConfiguration(rs);
|
||||
|
||||
// If everything went fine, return the JSON document.
|
||||
|
@@ -23,23 +23,23 @@
|
||||
class Twitter
|
||||
/// A simple implementation of a Twitter API client
|
||||
/// (see <http://dev.twitter.com> for more information).
|
||||
///
|
||||
///
|
||||
/// Currently, only the update message is supported.
|
||||
{
|
||||
public:
|
||||
Twitter();
|
||||
/// Creates the Twitter object, using
|
||||
/// the default Twitter API URI (<http://api.twitter.com/1.1/statuses/>).
|
||||
|
||||
|
||||
Twitter(const std::string& twitterURI);
|
||||
/// Creates the Twitter object using the given Twitter API URI.
|
||||
|
||||
|
||||
~Twitter();
|
||||
/// Destroys the Twitter object.
|
||||
|
||||
|
||||
void login(const std::string& consumerKey, const std::string& consumerSecret, const std::string& token, const std::string& tokenSecret);
|
||||
/// Specifies the OAuth authentication information used in all API calls.
|
||||
|
||||
|
||||
Poco::Int64 update(const std::string& status);
|
||||
/// Updates the user's status.
|
||||
///
|
||||
@@ -53,13 +53,13 @@ public:
|
||||
/// Returns a Poco::Util::JSONConfiguration with the server's response if the
|
||||
/// server's HTTP response status code is 200 (OK).
|
||||
/// Otherwise, throws a Poco::ApplicationException.
|
||||
|
||||
|
||||
static const std::string TWITTER_URI;
|
||||
|
||||
private:
|
||||
Twitter(const Twitter&);
|
||||
Twitter& operator = (const Twitter&);
|
||||
|
||||
|
||||
std::string _uri;
|
||||
std::string _consumerKey;
|
||||
std::string _consumerSecret;
|
||||
|
@@ -1,3 +1,3 @@
|
||||
The password for the example certificates used is always >secret<.
|
||||
The working directory for the download sample is "samples/download",
|
||||
trying to start it in "bin" will lead to errors (any.pem, rootcert.pem not found).
|
||||
The working directory for the download sample is "samples/download",
|
||||
trying to start it in "bin" will lead to errors (any.pem, rootcert.pem not found).
|
||||
|
@@ -42,14 +42,14 @@ void CertificateHandlerFactoryMgr::setFactory(const std::string& name, Certifica
|
||||
delete pFactory;
|
||||
poco_assert(success);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool CertificateHandlerFactoryMgr::hasFactory(const std::string& name) const
|
||||
{
|
||||
return _factories.find(name) != _factories.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const CertificateHandlerFactory* CertificateHandlerFactoryMgr::getFactory(const std::string& name) const
|
||||
{
|
||||
FactoriesMap::const_iterator it = _factories.find(name);
|
||||
|
@@ -80,7 +80,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
int redirects = 0;
|
||||
std::string username;
|
||||
std::string password;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
if (!pSession)
|
||||
@@ -110,7 +110,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
std::string path = resolvedURI.getPathAndQuery();
|
||||
if (path.empty()) path = "/";
|
||||
HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
|
||||
|
||||
|
||||
if (authorize)
|
||||
{
|
||||
HTTPCredentials::extractCredentials(uri, username, password);
|
||||
@@ -118,7 +118,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
cred.authenticate(req, res);
|
||||
}
|
||||
|
||||
req.set("User-Agent", Poco::format("poco/%d.%d.%d",
|
||||
req.set("User-Agent", Poco::format("poco/%d.%d.%d",
|
||||
(POCO_VERSION >> 24) & 0xFF,
|
||||
(POCO_VERSION >> 16) & 0xFF,
|
||||
(POCO_VERSION >> 8) & 0xFF));
|
||||
@@ -126,8 +126,8 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
|
||||
pSession->sendRequest(req);
|
||||
std::istream& rs = pSession->receiveResponse(res);
|
||||
bool moved = (res.getStatus() == HTTPResponse::HTTP_MOVED_PERMANENTLY ||
|
||||
res.getStatus() == HTTPResponse::HTTP_FOUND ||
|
||||
bool moved = (res.getStatus() == HTTPResponse::HTTP_MOVED_PERMANENTLY ||
|
||||
res.getStatus() == HTTPResponse::HTTP_FOUND ||
|
||||
res.getStatus() == HTTPResponse::HTTP_SEE_OTHER ||
|
||||
res.getStatus() == HTTPResponse::HTTP_TEMPORARY_REDIRECT);
|
||||
if (moved)
|
||||
@@ -138,7 +138,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
resolvedURI.setUserInfo(username + ":" + password);
|
||||
authorize = false;
|
||||
}
|
||||
delete pSession;
|
||||
delete pSession;
|
||||
pSession = 0;
|
||||
++redirects;
|
||||
retry = true;
|
||||
@@ -149,13 +149,13 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
}
|
||||
else if (res.getStatus() == HTTPResponse::HTTP_USEPROXY && !retry)
|
||||
{
|
||||
// The requested resource MUST be accessed through the proxy
|
||||
// given by the Location field. The Location field gives the
|
||||
// URI of the proxy. The recipient is expected to repeat this
|
||||
// The requested resource MUST be accessed through the proxy
|
||||
// given by the Location field. The Location field gives the
|
||||
// URI of the proxy. The recipient is expected to repeat this
|
||||
// single request via the proxy. 305 responses MUST only be generated by origin servers.
|
||||
// only use for one single request!
|
||||
proxyUri.resolve(res.get("Location"));
|
||||
delete pSession;
|
||||
delete pSession;
|
||||
pSession = 0;
|
||||
retry = true; // only allow useproxy once
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ void KeyFileHandler::onPrivateKeyRequested(const void* pSender, std::string& pri
|
||||
std::string prefix = serverSide() ? SSLManager::CFG_SERVER_PREFIX : SSLManager::CFG_CLIENT_PREFIX;
|
||||
if (!config.hasProperty(prefix + CFG_PRIV_KEY_FILE))
|
||||
throw Poco::Util::EmptyOptionException(std::string("Missing Configuration Entry: ") + prefix + CFG_PRIV_KEY_FILE);
|
||||
|
||||
|
||||
privateKey = config.getString(prefix + CFG_PRIV_KEY_FILE);
|
||||
}
|
||||
catch (Poco::NullPointerException&)
|
||||
|
@@ -40,14 +40,14 @@ void PrivateKeyFactoryMgr::setFactory(const std::string& name, PrivateKeyFactory
|
||||
delete pFactory;
|
||||
poco_assert(success);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool PrivateKeyFactoryMgr::hasFactory(const std::string& name) const
|
||||
{
|
||||
return _factories.find(name) != _factories.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const PrivateKeyFactory* PrivateKeyFactoryMgr::getFactory(const std::string& name) const
|
||||
{
|
||||
FactoriesMap::const_iterator it = _factories.find(name);
|
||||
|
@@ -26,7 +26,7 @@ namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket():
|
||||
SecureServerSocket::SecureServerSocket():
|
||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||
{
|
||||
}
|
||||
@@ -38,7 +38,7 @@ SecureServerSocket::SecureServerSocket(Context::Ptr pContext):
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(const Socket& socket):
|
||||
SecureServerSocket::SecureServerSocket(const Socket& socket):
|
||||
ServerSocket(socket)
|
||||
{
|
||||
if (!dynamic_cast<SecureServerSocketImpl*>(impl()))
|
||||
@@ -46,7 +46,7 @@ SecureServerSocket::SecureServerSocket(const Socket& socket):
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog):
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog):
|
||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||
{
|
||||
impl()->bind(address, true);
|
||||
@@ -54,7 +54,7 @@ SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog, Context::Ptr pContext):
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog, Context::Ptr pContext):
|
||||
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
||||
{
|
||||
impl()->bind(address, true);
|
||||
@@ -62,7 +62,7 @@ SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||
{
|
||||
IPAddress wildcardAddr;
|
||||
@@ -71,7 +71,7 @@ SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
||||
impl()->listen(backlog);
|
||||
}
|
||||
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog, Context::Ptr pContext):
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog, Context::Ptr pContext):
|
||||
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
||||
{
|
||||
IPAddress wildcardAddr;
|
||||
|
@@ -26,33 +26,33 @@ namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket():
|
||||
SecureStreamSocket::SecureStreamSocket():
|
||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext):
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext, Session::Ptr pSession):
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext, Session::Ptr pSession):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
useSession(pSession);
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address):
|
||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||
{
|
||||
connect(address);
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName):
|
||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
@@ -60,14 +60,14 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
connect(address);
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext, Session::Ptr pSession):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext, Session::Ptr pSession):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
useSession(pSession);
|
||||
@@ -75,7 +75,7 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Pt
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
@@ -83,7 +83,7 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
@@ -92,7 +92,7 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const Socket& socket):
|
||||
SecureStreamSocket::SecureStreamSocket(const Socket& socket):
|
||||
StreamSocket(socket)
|
||||
{
|
||||
if (!dynamic_cast<SecureStreamSocketImpl*>(impl()))
|
||||
@@ -100,7 +100,7 @@ SecureStreamSocket::SecureStreamSocket(const Socket& socket):
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(SocketImpl* pImpl):
|
||||
SecureStreamSocket::SecureStreamSocket(SocketImpl* pImpl):
|
||||
StreamSocket(pImpl)
|
||||
{
|
||||
if (!dynamic_cast<SecureStreamSocketImpl*>(impl()))
|
||||
@@ -140,7 +140,7 @@ void SecureStreamSocket::setPeerHostName(const std::string& hostName)
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const std::string& SecureStreamSocket::getPeerHostName() const
|
||||
{
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->getPeerHostName();
|
||||
@@ -235,7 +235,7 @@ void SecureStreamSocket::setLazyHandshake(bool flag)
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setLazyHandshake(flag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SecureStreamSocket::getLazyHandshake() const
|
||||
{
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->getLazyHandshake();
|
||||
@@ -265,13 +265,13 @@ Session::Ptr SecureStreamSocket::currentSession()
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->currentSession();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocket::useSession(Session::Ptr pSession)
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->useSession(pSession);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SecureStreamSocket::sessionWasReused()
|
||||
{
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->sessionWasReused();
|
||||
|
@@ -74,7 +74,7 @@ void SecureStreamSocketImpl::connect(const SocketAddress& address, const Poco::T
|
||||
_impl.connect(address, timeout, !_lazyHandshake);
|
||||
reset(_impl.sockfd());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::connectNB(const SocketAddress& address)
|
||||
{
|
||||
@@ -87,19 +87,19 @@ void SecureStreamSocketImpl::connectSSL()
|
||||
{
|
||||
_impl.connectSSL(!_lazyHandshake);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::bind(const SocketAddress& address, bool reuseAddress)
|
||||
{
|
||||
throw Poco::InvalidAccessException("Cannot bind() a SecureStreamSocketImpl");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::listen(int backlog)
|
||||
{
|
||||
throw Poco::InvalidAccessException("Cannot listen() on a SecureStreamSocketImpl");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::close()
|
||||
{
|
||||
@@ -155,12 +155,12 @@ void SecureStreamSocketImpl::shutdownReceive()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::shutdownSend()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::shutdown()
|
||||
{
|
||||
_impl.shutdown();
|
||||
@@ -200,7 +200,7 @@ void SecureStreamSocketImpl::setLazyHandshake(bool flag)
|
||||
_lazyHandshake = flag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SecureStreamSocketImpl::getLazyHandshake() const
|
||||
{
|
||||
return _lazyHandshake;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#if defined(__APPLE__)
|
||||
// Some OpenSSL functions are deprecated in OS X 10.7
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -72,7 +72,7 @@ void handleDataSSLrequest(DialogSocket& ds, bool ssl, Session::Ptr& sslSession)
|
||||
ds = sss;
|
||||
}
|
||||
}
|
||||
catch (Exception& exc)
|
||||
catch (Exception& exc)
|
||||
{
|
||||
std::cout << exc.displayText() << std::endl;
|
||||
}
|
||||
|
@@ -37,10 +37,10 @@ public:
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port the echo server is
|
||||
/// listening on.
|
||||
|
||||
|
||||
void run();
|
||||
/// Does the work.
|
||||
|
||||
|
||||
const std::string& lastCommand() const;
|
||||
/// Returns the last command received by the server.
|
||||
|
||||
@@ -53,22 +53,22 @@ public:
|
||||
|
||||
const std::vector<std::string>& lastCommands() const;
|
||||
/// Returns the last command received by the server.
|
||||
|
||||
|
||||
void addResponse(const std::string& response);
|
||||
/// Sets the next response returned by the server.
|
||||
|
||||
|
||||
void clearCommands();
|
||||
/// Clears all commands.
|
||||
|
||||
|
||||
void clearResponses();
|
||||
/// Clears all responses.
|
||||
|
||||
|
||||
void log(bool flag);
|
||||
/// Enables or disables logging to stdout.
|
||||
|
||||
Poco::Net::Session::Ptr getSslSession();
|
||||
void setSslSession(Poco::Net::Session::Ptr cSession);
|
||||
|
||||
|
||||
private:
|
||||
Poco::Net::ServerSocket _socket;
|
||||
Poco::Thread _thread;
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
CppUnitPocoExceptionText (exc);
|
||||
return runner.run(_targs, exc) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
void setup(int argc, char** argv)
|
||||
{
|
||||
init(1, argv);
|
||||
@@ -54,7 +54,7 @@ protected:
|
||||
loadConfiguration(); // load default configuration files, if present
|
||||
Poco::Util::Application::initialize(self);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::vector<std::string> _targs;
|
||||
};
|
||||
|
@@ -112,7 +112,7 @@ void HTTPSTestServer::run()
|
||||
|
||||
bool HTTPSTestServer::requestComplete() const
|
||||
{
|
||||
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
|
||||
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
|
||||
(_lastRequest.find("\r\n\r\n") != std::string::npos)) ||
|
||||
(_lastRequest.find("\r\n0\r\n") != std::string::npos);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ std::string HTTPSTestServer::handleRequest() const
|
||||
std::string body(SMALL_BODY);
|
||||
response.append("HTTP/1.0 200 OK\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
response.append("Connection: Close\r\n");
|
||||
@@ -143,7 +143,7 @@ std::string HTTPSTestServer::handleRequest() const
|
||||
std::string body(LARGE_BODY);
|
||||
response.append("HTTP/1.0 200 OK\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
response.append("Connection: Close\r\n");
|
||||
@@ -171,7 +171,7 @@ std::string HTTPSTestServer::handleRequest() const
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
if (_lastRequest.find("Content-Length") != std::string::npos)
|
||||
{
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
}
|
||||
@@ -192,13 +192,13 @@ std::string HTTPSTestServer::handleRequest() const
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: keep-alive\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n\r\n");
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: Keep-Alive\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n\r\n");
|
||||
response.append(body);
|
||||
@@ -214,7 +214,7 @@ std::string HTTPSTestServer::handleRequest() const
|
||||
response.append("HTTP/1.1 200 OK\r\n");
|
||||
response.append("Connection: close\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n\r\n");
|
||||
}
|
||||
@@ -235,7 +235,7 @@ std::string HTTPSTestServer::handleRequest() const
|
||||
std::string body(SMALL_BODY);
|
||||
response.append("HTTP/1.0 200 OK\r\n");
|
||||
response.append("Content-Type: text/plain\r\n");
|
||||
response.append("Content-Length: ");
|
||||
response.append("Content-Length: ");
|
||||
response.append(NumberFormatter::format((int) body.size()));
|
||||
response.append("\r\n");
|
||||
response.append("Connection: Close\r\n");
|
||||
|
@@ -36,15 +36,15 @@ public:
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port the echo server is
|
||||
/// listening on.
|
||||
|
||||
|
||||
void run();
|
||||
/// Does the work.
|
||||
|
||||
|
||||
const std::string& lastRequest() const;
|
||||
/// Returns the last request.
|
||||
|
||||
static const std::string SMALL_BODY;
|
||||
static const std::string LARGE_BODY;
|
||||
static const std::string LARGE_BODY;
|
||||
|
||||
protected:
|
||||
bool requestComplete() const;
|
||||
|
@@ -39,14 +39,14 @@ public:
|
||||
runner.addTest("NetSSLTestSuite", NetSSLTestSuite::suite());
|
||||
return runner.run(_targs) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
void setup(const std::vector<std::string>& args)
|
||||
{
|
||||
char* argv[] =
|
||||
{
|
||||
const_cast<char*>(args[0].c_str())
|
||||
};
|
||||
|
||||
|
||||
init(1, argv);
|
||||
for (std::size_t i = 0; i < args.size(); ++i)
|
||||
_targs.push_back(args[i]);
|
||||
@@ -58,7 +58,7 @@ protected:
|
||||
loadConfiguration(); // load default configuration files, if present
|
||||
Poco::Util::Application::initialize(self);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::vector<std::string> _targs;
|
||||
};
|
||||
|
@@ -39,14 +39,14 @@ public:
|
||||
runner.run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
void initialize(Poco::Util::Application& self)
|
||||
{
|
||||
loadConfiguration(); // load default configuration files, if present
|
||||
Poco::Util::Application::initialize(self);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::vector<std::string> _targs;
|
||||
};
|
||||
|
Reference in New Issue
Block a user