diff options
Diffstat (limited to 'src/com/isode/stroke/tls/CertificateVerificationError.java')
-rw-r--r-- | src/com/isode/stroke/tls/CertificateVerificationError.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/com/isode/stroke/tls/CertificateVerificationError.java b/src/com/isode/stroke/tls/CertificateVerificationError.java new file mode 100644 index 0000000..a8309ca --- /dev/null +++ b/src/com/isode/stroke/tls/CertificateVerificationError.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010 Remko Tron¨on + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ +/* + * Copyright (c) 2011, 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; +}; + |