summaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/SecurityContext.java
blob: 4eef99cb93fe6d469ee6fc8f29d33d2b5687e3e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Yahoo. 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;
    }
}