diff options
author | Jose <jose@zeroc.com> | 2017-03-16 16:11:24 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-03-16 16:11:24 +0100 |
commit | c6f4057a8975e2312d82f22af59f2069d2b5e8ab (patch) | |
tree | 1312f2c5798821dd8b4c583f30983542d9528790 /cpp/include/IceSSL/SecureTransport.h | |
parent | Removed C# Ice.BatchRequestInterceptor (ICE-7662) (diff) | |
download | ice-c6f4057a8975e2312d82f22af59f2069d2b5e8ab.tar.bz2 ice-c6f4057a8975e2312d82f22af59f2069d2b5e8ab.tar.xz ice-c6f4057a8975e2312d82f22af59f2069d2b5e8ab.zip |
Fixed (ICE-7621) - Refactor IceSSL API to support multiple implementations
Diffstat (limited to 'cpp/include/IceSSL/SecureTransport.h')
-rw-r--r-- | cpp/include/IceSSL/SecureTransport.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/cpp/include/IceSSL/SecureTransport.h b/cpp/include/IceSSL/SecureTransport.h new file mode 100644 index 00000000000..9be2d30868c --- /dev/null +++ b/cpp/include/IceSSL/SecureTransport.h @@ -0,0 +1,66 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICESSL_SECURE_TRANSPORT_H +#define ICESSL_SECURE_TRANSPORT_H + +#include <IceSSL/Plugin.h> +#include <Security/Security.h> + +namespace IceSSL +{ + +namespace SecureTransport +{ + +class Certificate; +ICE_DEFINE_PTR(CertificatePtr, Certificate); + +class ICESSL_API Certificate : public virtual IceSSL::Certificate +{ +public: + + // + // Construct a certificate using a native certificate. + // + // The Certificate class assumes ownership of the given native + // certificate. + // + static CertificatePtr create(SecCertificateRef); + + // + // Load the certificate from a file. The certificate must use the + // PEM encoding format. Raises CertificateReadException if the + // file cannot be read. + // + static CertificatePtr load(const std::string&); + + // + // Decode a certificate from a string that uses the PEM encoding + // format. Raises CertificateEncodingException if an error + // occurs. + // + static CertificatePtr decode(const std::string&); + + // + // Retrieve the native X509 certificate value wrapped by this + // object. + // + // The returned reference is only valid for the lifetime of this + // object. You can increment the reference count of the returned + // object with CFRetain. + // + virtual SecCertificateRef getCert() const = 0; +}; + +} // SecureTransport namespace end + +} // IceSSL namespace end + +#endif |