summaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/SecurityContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'jrt/src/com/yahoo/jrt/SecurityContext.java')
-rw-r--r--jrt/src/com/yahoo/jrt/SecurityContext.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/jrt/src/com/yahoo/jrt/SecurityContext.java b/jrt/src/com/yahoo/jrt/SecurityContext.java
new file mode 100644
index 00000000000..0ac49013f2d
--- /dev/null
+++ b/jrt/src/com/yahoo/jrt/SecurityContext.java
@@ -0,0 +1,24 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.jrt;
+
+import java.security.cert.X509Certificate;
+import java.util.List;
+
+/**
+ * @author bjorncs
+ */
+public class SecurityContext {
+
+ private final List<X509Certificate> peerCertificateChain;
+
+ public SecurityContext(List<X509Certificate> peerCertificateChain) {
+ this.peerCertificateChain = peerCertificateChain;
+ }
+
+ /**
+ * @return the peer certificate chain if the peer was authenticated, empty list if not.
+ */
+ public List<X509Certificate> peerCertificateChain() {
+ return peerCertificateChain;
+ }
+}