Class AttestationSigningKey

java.lang.Object
com.azure.security.attestation.models.AttestationSigningKey

public final class AttestationSigningKey extends Object
Signing Key used to sign requests to the attestation service.
  • Constructor Details

    • AttestationSigningKey

      public AttestationSigningKey(X509Certificate certificate, PrivateKey privateKey)
      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

      public X509Certificate getCertificate()
      Returns:
      Returns the X.509 certificate associated with this Signing Key.
    • getPrivateKey

      public PrivateKey getPrivateKey()
      Returns:
      Returns the private key associated with this signing key.
    • setWeakKeyAllowed

      public AttestationSigningKey setWeakKeyAllowed(boolean weakKeyAllowed)
      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.