lexe-app / lexe-public

Lexe's public monorepo including the node, mobile apps, and shared libraries
Other
38 stars 1 forks source link

ed25519: refactor to support signing, signatures, pubkeys, key pairs. #41

Closed phlip9 closed 2 years ago

MaxFangX commented 2 years ago

SGX build fails:

error[E0599]: no method named `as_bytes` found for reference `&ed25519::PublicKey` in the current scope
   --> common/src/attest/quote.rs:286:50
    |
286 |             report_data[..32].copy_from_slice(pk.as_bytes());
    |                                                  ^^^^^^^^ method not found in `&ed25519::PublicKey`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `as_bytes`, perhaps you need to implement one of them:
            candidate #1: `OsStrExt`
            candidate #2: `AsBytes`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `common` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `common` due to previous error

Changing as_bytes() to as_slice() fixes it, but there are other errors as well. Looks like the refactor was incomplete.