Skip to content

VerifyPKCS1v15 fails indeterministicly #30

Closed
@2bitProgammer

Description

@2bitProgammer

This is probably related to issue #19

I have the following method:

func (s myConf) Verify(data []byte, sig []byte) (bool, error) {
    digest, err := openssl.SHA256(data)
    if err != nil {
        return false, err
    }

    if err := (*(s.public)).VerifyPKCS1v15(openssl.SHA256_Method, digest[:], signature); err != nil {
        return false, err
    } else {
        return true, nil
    }
}

I just recently noticed that my unit tests usually pass, though occasionally they will fail with the error:

verifypkcs1v15: failed to finalize verify

Maybe every 3rd or 4th time I run it is fails. If I click run again, it will pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions