Interface RpcCryptoFileAnalyzer
- All Superinterfaces:
RpcHandler, Serializable
Service for analyzing cryptographic files and data on the master server.
- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
Method Summary
Modifier and TypeMethodDescription@NotNull ECryptoFileFormatdetectFileFormat(SerializableInputStreamContainer is, char[] password) Detects the file format of a file containing cryptographic credentials.Based on the defined extensions for an X.509 certificate, this method will return the details of a file based certificate, including a comprehensive summary of the certificate's usage information.getKeyStoreLayout(SerializableInputStreamContainer is, char[] keyStorePassword, KeyStoreScope scope) Provides a map of the KeyStore layout, i.e. the aliases and types of the entries in the KeyStore.validateKeyStoreEntryPasswords(SerializableInputStreamContainer is, char[] keyStorePassword, Map<String, char[]> keyStoreEntryPasswords) Checks the passwords of the keystore entries in the provided keystore file.
-
Method Details
-
detectFileFormat
@NotNull @NotNull ECryptoFileFormat detectFileFormat(SerializableInputStreamContainer is, char[] password) throws IOException Detects the file format of a file containing cryptographic credentials.- Parameters:
is- the input stream containing the file datapassword- the password to decrypt the file (if applicable, could be null)- Returns:
- the detected file format
- Throws:
IOException- if an I/O error occurs during detection
-
getCertificateFileDetails
CertificateDetails getCertificateFileDetails(SerializableInputStreamContainer is, KeyStoreScope scope) throws IOException, FcCertificateManagementException Based on the defined extensions for an X.509 certificate, this method will return the details of a file based certificate, including a comprehensive summary of the certificate's usage information. This includes the certificate's key usage and extended key usage.- Parameters:
is- the input stream containing the certificate datascope- The keystore scope the user is operating at.- Returns:
- a
CertificateDetailsobject containing the details of the certificate - Throws:
IOException- if an I/O error occurs during processingFcCertificateManagementException- if an error occurs while processing the certificate (e.g., invalid format provided)
-
getKeyStoreLayout
List<KeyStoreEntryDetails> getKeyStoreLayout(SerializableInputStreamContainer is, char[] keyStorePassword, KeyStoreScope scope) throws IOException, FcCertificateManagementException Provides a map of the KeyStore layout, i.e. the aliases and types of the entries in the KeyStore.- Parameters:
is- The input stream to load the KeyStore fromkeyStorePassword- The password for the KeyStorescope- The keystore scope the user is operating at.- Returns:
- A list of
KeyStoreEntryDetailsobjects representing the layout of the KeyStore. - Throws:
FcCertificateManagementException- If an error occurs while loading the KeyStoreIOException
-
validateKeyStoreEntryPasswords
Map<String,Boolean> validateKeyStoreEntryPasswords(SerializableInputStreamContainer is, char[] keyStorePassword, Map<String, char[]> keyStoreEntryPasswords) throws FcCertificateManagementExceptionChecks the passwords of the keystore entries in the provided keystore file.- Parameters:
is- the input stream containing the keystore datakeyStorePassword- the password for the keystorekeyStoreEntryPasswords- a map of entry aliases to their respective passwords- Returns:
- a map of entry aliases to boolean values indicating whether the password is correct
- Throws:
FcCertificateManagementException- if an error occurs while validating the passwords
-