Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/spongycastle/crypto/tls/TlsAuthentication.java')
-rwxr-xr-xcore/src/main/java/org/spongycastle/crypto/tls/TlsAuthentication.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/src/main/java/org/spongycastle/crypto/tls/TlsAuthentication.java b/core/src/main/java/org/spongycastle/crypto/tls/TlsAuthentication.java
new file mode 100755
index 00000000..8783dd75
--- /dev/null
+++ b/core/src/main/java/org/spongycastle/crypto/tls/TlsAuthentication.java
@@ -0,0 +1,26 @@
+package org.spongycastle.crypto.tls;
+
+import java.io.IOException;
+
+public interface TlsAuthentication
+{
+ /**
+ * Called by the protocol handler to report the server certificate
+ * Note: this method is responsible for certificate verification and validation
+ *
+ * @param serverCertificate the server certificate received
+ * @throws IOException
+ */
+ void notifyServerCertificate(Certificate serverCertificate)
+ throws IOException;
+
+ /**
+ * Return client credentials in response to server's certificate request
+ *
+ * @param certificateRequest details of the certificate request
+ * @return a TlsCredentials object or null for no client authentication
+ * @throws IOException
+ */
+ TlsCredentials getClientCredentials(CertificateRequest certificateRequest)
+ throws IOException;
+}