Skip to content

Commit

Permalink
Fix enclave check
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeydi committed Nov 10, 2021
1 parent 3d2d99e commit d6e6ec6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fog.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"math"
"net/url"
"strings"
"unsafe"

"github.com/bwesterb/go-ristretto"
Expand Down Expand Up @@ -198,7 +199,11 @@ func GetFogPubkeyRust(recipient *account.PublicAddress) (*FogFullyValidatedPubke
"fog://service.fog.mob.staging.namda.net": "a4764346f91979b4906d4ce26102228efe3aba39216dec1e7d22e6b06f919f11",
}

mr_enclave_hex, ok := fog_url_to_mr_enclave_hex[string(recipient.FogReportUrl)]
host := recipient.FogReportUrl
if uri.Port() != "" {
host = strings.ReplaceAll(host, ":"+uri.Port(), "")
}
mr_enclave_hex, ok := fog_url_to_mr_enclave_hex[host]
if !ok {
return nil, errors.New("No enclave hex for Address' fog url")
}
Expand Down

0 comments on commit d6e6ec6

Please sign in to comment.