SecurityProviderDiceEmulator Class
- java.
lang. Object - SecurityProvider
- SecurityProviderX509
- com.
microsoft. azure. sdk. iot. provisioning. security. hsm. SecurityProviderDiceEmulator
- com.
public class SecurityProviderDiceEmulator extends SecurityProviderX509
Constructor Summary
Constructor | Description |
---|---|
SecurityProviderDiceEmulator() |
Constructor to build the DICE certs from the simulator |
SecurityProviderDiceEmulator(String commonNameAlias, String commonNameSigner, String commonNameRoot) |
Constructor to build DICE certs from the simulator |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
generateLeafCert(String uniqueId)
Generates leaf certificate with the unique id as common name |
String |
getAliasCertPem()
Getter for the Alias cert in PEM format |
String |
getAliasCertPrivateKeyPem()
Getter for the Alias cert in PEM format |
X509Certificate |
getClientCertificate()
Getter for the Alias certificate |
String |
getClientCertificateCommonName()
Getter for the common name |
Key |
getClientPrivateKey()
Getter for Alias key |
Collection<X509Certificate> | getIntermediateCertificatesChain() |
String |
getRootCertPem()
Getter for the Root cert in PEM format |
String |
getSignerCertPem()
Getter for the Signer cert in PEM format |
Inherited Members
Constructor Details
SecurityProviderDiceEmulator
public SecurityProviderDiceEmulator()
Constructor to build the DICE certs from the simulator
SecurityProviderDiceEmulator
public SecurityProviderDiceEmulator(String commonNameAlias, String commonNameSigner, String commonNameRoot)
Constructor to build DICE certs from the simulator
Parameters:
A string value for the common name of alias cert. Cannot benull
</code> or empty </p>
commonNameSigner
- A string value for the common name of signer cert. Cannot benull
</code> or empty </p>
commonNameRoot
- A string value for the common name of root cert. cannot benull
</code> or empty </p>
Throws:
SecurityProviderException
- This exception is thrown if any of the input values are invalid
Method Details
generateLeafCert
public String generateLeafCert(String uniqueId)
Generates leaf certificate with the unique id as common name
Parameters:
uniqueId
- Unique ID to be used in common name. Cannot benull
</code> or empty </p>
Returns:
A PEM formatted leaf cert with unique ID as common name
getAliasCertPem
public String getAliasCertPem()
Getter for the Alias cert in PEM format
Returns:
Alias cert in PEM format
getAliasCertPrivateKeyPem
public String getAliasCertPrivateKeyPem()
Getter for the Alias cert in PEM format
Returns:
Alias cert in PEM format
getClientCertificate
public X509Certificate getClientCertificate()
Getter for the Alias certificate
Returns:
Alias certificate
getClientCertificateCommonName
public String getClientCertificateCommonName()
Getter for the common name
Returns:
The common name for the root cert
getClientPrivateKey
public Key getClientPrivateKey()
Getter for Alias key
Returns:
Alias private key
getIntermediateCertificatesChain
public Collection getIntermediateCertificatesChain()
getRootCertPem
public String getRootCertPem()
Getter for the Root cert in PEM format
Returns:
Root cert in PEM format
getSignerCertPem
public String getSignerCertPem()
Getter for the Signer cert in PEM format
Returns:
Signer cert in PEM format
Applies to
Azure SDK for Java