Skip to content

SDK creates policyBinding that does not conform to the Spec #3578

Description

@EmberPlot

The spec says here about the hash field: "A Base64 encoding of HMAC(KEY, POLICY)". What the SDK actually does is:

policyBindingHash := hex.EncodeToString(ocrypto.CalculateSHA256Hmac(symKey, base64PolicyObject))
pbstring := string(ocrypto.Base64Encode([]byte(policyBindingHash)))

Note the call to hex.EncodeToString. Because of this, the resulting hash is incompatible with independent 3rd party implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions