[bssl] Retrieve error code from BoringSSL

This cl retrieves the error code from BoringSSL when an operation
fails and returns it to the users.

Test: atest rialto_test
Bug: 302527194
Change-Id: I36da67c2ff9e7f45aea8db659d400c347d9705ca
diff --git a/libs/bssl/src/hmac.rs b/libs/bssl/src/hmac.rs
index 1e09315..ddbbe4a 100644
--- a/libs/bssl/src/hmac.rs
+++ b/libs/bssl/src/hmac.rs
@@ -15,7 +15,8 @@
 //! Wrappers of the HMAC functions in BoringSSL hmac.h.
 
 use crate::digest::Digester;
-use bssl_avf_error::{ApiName, Error, Result};
+use crate::util::to_call_failed_error;
+use bssl_avf_error::{ApiName, Result};
 use bssl_ffi::{HMAC, SHA256_DIGEST_LENGTH};
 
 const SHA256_LEN: usize = SHA256_DIGEST_LENGTH as usize;
@@ -53,6 +54,6 @@
     if !ret.is_null() && out_len == (out.len() as u32) {
         Ok(out)
     } else {
-        Err(Error::CallFailed(ApiName::HMAC))
+        Err(to_call_failed_error(ApiName::HMAC))
     }
 }