aboutsummaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/NullCryptoEngine.java
blob: f078b66cc4e03573115b97df197d0a6f0e82b8fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;


import java.nio.channels.SocketChannel;


/**
 * CryptoEngine implementation that performs no encryption.
 **/
public class NullCryptoEngine implements CryptoEngine {
    @Override public CryptoSocket createClientCryptoSocket(SocketChannel channel, Spec spec) {
        return new NullCryptoSocket(channel, false);
    }
    @Override public CryptoSocket createServerCryptoSocket(SocketChannel channel) {
        return new NullCryptoSocket(channel, true);
    }
}