summaryrefslogtreecommitdiffstats
blob: 0aca0279f7275d542fcd2ed8e758c44ec87ec019 (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
/*
 * Copyright (c) 2010 Remko Tronçon
 * All rights reserved.
 */
/*
 * Copyright (c) 2011-2012, Isode Limited, London, England.
 * All rights reserved.
 */
package com.isode.stroke.tls;

import com.isode.stroke.base.Error;

public class CertificateVerificationError implements Error {

    public enum Type {

        UnknownError,
        Expired,
        NotYetValid,
        SelfSigned,
        Rejected,
        Untrusted,
        InvalidPurpose,
        PathLengthExceeded,
        InvalidSignature,
        InvalidCA,
        InvalidServerIdentity,
    }

    public CertificateVerificationError(Type type) {
        if (type == null) {
            throw new IllegalStateException();
        }
        this.type = type;
    }
    public final Type type;
}