* Throws {@link IllegalArgumentException} if SSE customer key is in use
* without https.
*/
private void checkHttps(AmazonWebServiceRequest req) {
if (req instanceof SSECustomerKeyProvider) {
SSECustomerKeyProvider p = (SSECustomerKeyProvider) req;
if (p.getSSECustomerKey() != null)
assertHttps();
} else if (req instanceof CopyObjectRequest) {
CopyObjectRequest cor = (CopyObjectRequest) req;
if (cor.getSourceSSECustomerKey() != null
|| cor.getDestinationSSECustomerKey() != null) {
assertHttps();
}
} else if (req instanceof CopyPartRequest) {
CopyPartRequest cpr = (CopyPartRequest) req;
if (cpr.getSourceSSECustomerKey() != null
|| cpr.getDestinationSSECustomerKey() != null) {
assertHttps();
}
}
if (req instanceof SSEAwsKeyManagementParamsProvider) {
SSEAwsKeyManagementParamsProvider p = (SSEAwsKeyManagementParamsProvider) req;
if (p.getSSEAwsKeyManagementParams() != null)
assertHttps();
}
}