Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding sslContext support to elasticache configuration. #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

import java.util.Collection;

import javax.net.ssl.SSLContext;

import lombok.Data;
import lombok.EqualsAndHashCode;
import net.spy.memcached.ConnectionFactoryBuilder;
Expand Down Expand Up @@ -152,4 +154,10 @@ public class ElastiCacheConfiguration extends CacheConfiguration {
*/
private MetricCollector metricCollector;

private SSLContext sslContext;

private String hostnameForTlsVerification;

private Boolean skipTlsHostnameVerification;

}
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ private void setProviderSpecificSettings(final ConnectionFactoryBuilder builder,
if (conf.getMetricCollector() != null) {
builder.setMetricCollector(conf.getMetricCollector());
}

if (conf.getSslContext() != null) {
builder.setSSLContext(conf.getSslContext());
}

if (conf.getHostnameForTlsVerification() != null) {
builder.setHostnameForTlsVerification(conf.getHostnameForTlsVerification());
}

if (conf.getSkipTlsHostnameVerification() != null) {
builder.setSkipTlsHostnameVerification(conf.getSkipTlsHostnameVerification());
}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@
import java.util.Collections;
import java.util.List;

import net.spy.memcached.FailureMode;

import org.junit.Before;
import org.junit.Test;

import com.google.code.ssm.providers.CacheClient;
import com.google.code.ssm.providers.CacheConfiguration;
import com.google.code.ssm.providers.elasticache.MemcacheClientFactoryImpl;
import com.google.code.ssm.providers.elasticache.ElastiCacheConfiguration;

import net.spy.memcached.FailureMode;

/**
*
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<jackson.version>2.9.9</jackson.version>
<spymemcached.version>2.12.3</spymemcached.version>
<xmemcached.version>2.4.6</xmemcached.version>
<elasticache.version>1.1.1</elasticache.version>
<elasticache.version>1.2.0</elasticache.version>
<slf4j.version>1.6.4</slf4j.version>
<apiviz.version>1.3.4</apiviz.version>
<lombok.version>1.16.18</lombok.version>
Expand Down