use of org.opensmartgridplatform.shared.security.RsaEncrypter in project open-smart-grid-platform by OSGP.
the class SoapClientConfig method encrypterForSecretManagement.
// RsaEncrypter for encrypting secrets to be sent to Secret Management.
@Bean(name = "encrypterForSecretManagement")
public RsaEncrypter encrypterForSecretManagement() {
try {
final File publicKeySecretManagementFile = this.rsaPublicKeySecretManagement.getFile();
final RsaEncrypter rsaEncrypter = new RsaEncrypter();
rsaEncrypter.setPublicKeyStore(publicKeySecretManagementFile);
return rsaEncrypter;
} catch (final IOException e) {
throw new IllegalStateException("Could not initialize encrypterForSecretManagement", e);
}
}
use of org.opensmartgridplatform.shared.security.RsaEncrypter in project open-smart-grid-platform by OSGP.
the class SoapClientConfig method encrypterForGxfSmartMetering.
// RsaEncrypter for encrypting secrets to be sent to other GXF components.
@Bean(name = "encrypterForGxfSmartMetering")
public RsaEncrypter encrypterForGxfSmartMetering() {
try {
final File publicKeyGxfSmartMeteringFile = this.rsaPublicKeyGxfSmartMetering.getFile();
final RsaEncrypter rsaEncrypter = new RsaEncrypter();
rsaEncrypter.setPublicKeyStore(publicKeyGxfSmartMeteringFile);
return rsaEncrypter;
} catch (final IOException e) {
throw new IllegalStateException("Could not initialize encrypterForGxfSmartMetering", e);
}
}
use of org.opensmartgridplatform.shared.security.RsaEncrypter in project open-smart-grid-platform by OSGP.
the class SoapClientConfig method decrypterForProtocolAdapterDlms.
// RsaEncrypter for decrypting secrets from Secret Management received by the DLMS protocol
// adapter.
@Bean(name = "decrypterForProtocolAdapterDlms")
public RsaEncrypter decrypterForProtocolAdapterDlms() {
try {
final File privateKeyProtocolAdapterFile = this.rsaPrivateKeyProtocolAdapterDlms.getFile();
final RsaEncrypter rsaEncrypter = new RsaEncrypter();
rsaEncrypter.setPrivateKeyStore(privateKeyProtocolAdapterFile);
return rsaEncrypter;
} catch (final IOException e) {
throw new IllegalStateException("Could not initialize decrypterForProtocolAdapterDlms", e);
}
}
use of org.opensmartgridplatform.shared.security.RsaEncrypter in project open-smart-grid-platform by OSGP.
the class SecurityConfig method decrypterForGxfSmartMetering.
// RsaEncrypter for decrypting secrets from other GXF components.
@Bean(name = "decrypterForGxfSmartMetering")
public RsaEncrypter decrypterForGxfSmartMetering() {
try {
final File privateRsaKeyFile = this.rsaPrivateKeyGxfSmartMetering.getFile();
final RsaEncrypter rsaEncrypter = new RsaEncrypter();
rsaEncrypter.setPrivateKeyStore(privateRsaKeyFile);
return rsaEncrypter;
} catch (final IOException e) {
throw new IllegalStateException("Could not initialize decrypterForGxfSmartMetering", e);
}
}
use of org.opensmartgridplatform.shared.security.RsaEncrypter in project open-smart-grid-platform by OSGP.
the class SecurityConfig method encrypterForSecretManagementClient.
// RsaEncrypter for encrypting secrets to be sent to the client of Secret Management.
@Bean(name = "encrypterForSecretManagementClient")
public RsaEncrypter encrypterForSecretManagementClient() {
try {
final File publicKeySecretManagementFile = this.rsaPublicKeySecretManagementClient.getFile();
final RsaEncrypter rsaEncrypter = new RsaEncrypter();
rsaEncrypter.setPublicKeyStore(publicKeySecretManagementFile);
return rsaEncrypter;
} catch (final IOException e) {
throw new IllegalStateException("Could not initialize encrypterForSecretManagementClient", e);
}
}
Aggregations