in src/main/java/software/amazon/encryption/s3/materials/PartialRsaKeyPair.java [32:45]
private void validateKeyPair() {
if (_privateKey == null && _publicKey == null) {
throw new S3EncryptionClientException("The public key and private cannot both be null. You must provide a " +
"public key, or a private key, or both.");
}
if (_privateKey != null && !_privateKey.getAlgorithm().equals(RSA_KEY_ALGORITHM)) {
throw new S3EncryptionClientException("%s is not a supported algorithm. Only RSA keys are supported. Please reconfigure your client with an RSA key.");
}
if (_publicKey != null && !_publicKey.getAlgorithm().equals(RSA_KEY_ALGORITHM)) {
throw new S3EncryptionClientException("%s is not a supported algorithm. Only RSA keys are supported. Please reconfigure your client with an RSA key.");
}
}