blob: 25ae7fc64b1639a144775ce3805193bfd89dc72a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// **********************************************************************
//
// Copyright (c) 2001
// ZeroC, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************
#ifndef ICE_SSL_BASE_CERTS_H
#define ICE_SSL_BASE_CERTS_H
#include <IceSSL/CertificateDesc.h>
namespace IceSSL
{
class BaseCertificates
{
public:
BaseCertificates();
BaseCertificates(CertificateDesc&, CertificateDesc&, DiffieHellmanParamsFile&);
BaseCertificates(BaseCertificates&);
const CertificateDesc& getRSACert() const;
const CertificateDesc& getDSACert() const;
const DiffieHellmanParamsFile& getDHParams() const;
protected:
CertificateDesc _rsaCert;
CertificateDesc _dsaCert;
DiffieHellmanParamsFile _dhParams;
};
template<class Stream>
inline Stream& operator << (Stream& target, const BaseCertificates& baseCerts)
{
if(baseCerts.getRSACert().getKeySize() != 0)
{
target << "RSA\n{\n";
IceSSL::operator<<(target, baseCerts.getRSACert());
target << "}\n\n";
}
if(baseCerts.getDSACert().getKeySize() != 0)
{
target << "DSA\n{\n";
IceSSL::operator<<(target, baseCerts.getDSACert());
target << "}\n\n";
}
if(baseCerts.getDHParams().getKeySize() != 0)
{
target << "DH\n{\n";
IceSSL::operator<<(target, baseCerts.getDHParams());
target << "}\n\n";
}
return target;
}
}
#endif
|