summaryrefslogtreecommitdiff
path: root/csharp/test/IceSSL/configuration/CertificateVerifierI.cs
blob: ff5a2c6818212ac5426efa96e9d31636436ed996 (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
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

using System;

public class CertificateVerifierI : IceSSL.CertificateVerifier
{
    public CertificateVerifierI()
    {
        reset();
    }

    public bool verify(IceSSL.ConnectionInfo info)
    {
        _hadCert = info.certs != null;
        _invoked = true;
        return _returnValue;
    }

    internal void reset()
    {
        _returnValue = true;
        _invoked = false;
        _hadCert = false;
    }

    internal void returnValue(bool b)
    {
        _returnValue = b;
    }

    internal bool invoked()
    {
        return _invoked;
    }

    internal bool hadCert()
    {
        return _hadCert;
    }

    private bool _returnValue;
    private bool _invoked;
    private bool _hadCert;
}