summaryrefslogtreecommitdiff
path: root/csharp/src/IceSSL/Instance.cs
blob: 40b3b146b40b028d131bf86f720f1e792d225653 (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
69
70
71
72
73
74
75
76
77
78
// **********************************************************************
//
// 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.
//
// **********************************************************************

namespace IceSSL
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.IO;
    using System.Security;
    using System.Security.Authentication;
    using System.Security.Cryptography;
    using System.Security.Cryptography.X509Certificates;
    using System.Text;
    using System.Globalization;

    internal class Instance : IceInternal.ProtocolInstance
    {
        internal Instance(SSLEngine engine, short type, string protocol) :
            base(engine.communicator(), type, protocol, true)
        {
            _engine = engine;
        }

        internal SSLEngine engine()
        {
            return _engine;
        }

        internal int securityTraceLevel()
        {
            return _engine.securityTraceLevel();
        }

        internal string securityTraceCategory()
        {
            return _engine.securityTraceCategory();
        }

        internal bool initialized()
        {
            return _engine.initialized();
        }

        internal X509Certificate2Collection certs()
        {
            return _engine.certs();
        }

        internal SslProtocols protocols()
        {
            return _engine.protocols();
        }

        internal int checkCRL()
        {
            return _engine.checkCRL();
        }

        internal void traceStream(System.Net.Security.SslStream stream, string connInfo)
        {
            _engine.traceStream(stream, connInfo);
        }

        internal void verifyPeer(NativeConnectionInfo info, System.Net.Sockets.Socket fd, string address)
        {
            _engine.verifyPeer(info, fd, address);
        }

        private SSLEngine _engine;
    }
}