Class AttestationSigningKey
java.lang.Object
com.azure.security.attestation.models.AttestationSigningKey
Signing Key used to sign requests to the attestation service.
-
Constructor Summary
ConstructorDescriptionAttestationSigningKey
(X509Certificate certificate, PrivateKey privateKey) Creates a new instance of an AttestationSigningKey. -
Method Summary
Modifier and TypeMethodDescriptionboolean
setWeakKeyAllowed
(boolean weakKeyAllowed) Sets whether the privateKey is allowed to be a weak key (less than or equal to 1024 bits).void
verify()
Verifies that the provided privateKey can sign a buffer which is verified by certificate.
-
Constructor Details
-
AttestationSigningKey
Creates a new instance of an AttestationSigningKey.- Parameters:
privateKey
- The asymmetric key used to sign the request to be sent to the server.certificate
- An X.509 Certificate wrapping the public key associated with `privateKey`. This certificate will be sent to the attestation service to allow the service to validate the certificate.
-
-
Method Details
-
getCertificate
- Returns:
- Returns the X.509 certificate associated with this Signing Key.
-
getPrivateKey
- Returns:
- Returns the private key associated with this signing key.
-
setWeakKeyAllowed
Sets whether the privateKey is allowed to be a weak key (less than or equal to 1024 bits).- Parameters:
weakKeyAllowed
- - boolean indicating if weak keys should be allowed (default False).- Returns:
- Returns the AttestationSigningKey.
-
isWeakKeyAllowed
public boolean isWeakKeyAllowed()- Returns:
- Returns if a weak key is allowed on this signing key.
-
verify
public void verify()Verifies that the provided privateKey can sign a buffer which is verified by certificate.
-