summaryrefslogtreecommitdiff
path: root/java/ssl/jdk1.5/IceSSL/X509TrustManagerI.java
blob: 0bbdf896b7e7e2780b0b9ac2082450692891e794 (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
// **********************************************************************
//
// Copyright (c) 2003-2007 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.
//
// **********************************************************************

package IceSSL;

final class X509TrustManagerI implements javax.net.ssl.X509TrustManager
{
    X509TrustManagerI(javax.net.ssl.X509TrustManager delegate)
    {
	_delegate = delegate;
    }

    public void
    checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType)
	throws java.security.cert.CertificateException
    {
	if(!authType.equals("DH_anon") && _delegate != null)
	{
	    _delegate.checkClientTrusted(chain, authType);
	}
    }

    public void
    checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType)
	throws java.security.cert.CertificateException
    {
	if(!authType.equals("DH_anon") && _delegate != null)
	{
	    _delegate.checkServerTrusted(chain, authType);
	}
    }

    public java.security.cert.X509Certificate[]
    getAcceptedIssuers()
    {
	if(_delegate != null)
	{
	    return _delegate.getAcceptedIssuers();
	}
	return null;
    }

    private javax.net.ssl.X509TrustManager _delegate;
}