Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPML] Implement verifyQuote in QuoteVerifier.scala #5495

Merged
merged 9 commits into from
Aug 25, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,25 @@

package com.intel.analytics.bigdl.ppml.attestation

import org.apache.logging.log4j.LogManager

abstract class QuoteVerifier {

This comment was marked as resolved.


val logger = LogManager.getLogger(getClass)

def verifyQuote(quote: Array[Byte]): Int = {
1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments for main code block.

try {
val verifyQuoteResult = Attestation.sdkVerifyQuote(quote)
return verifyQuoteResult
} catch {
case e: Exception =>
logger.error(s"Failed to verify quote, ${e}")
throw new AttestationRuntimeException("Failed " +
"to verify quote", e)
}

throw new AttestationRuntimeException("Unexpected workflow when verifying Quote!")
}

def verifyQuote(quote: Array[Byte], policy: Policy): Int = {
Expand Down