Closed JohnPatel23 closed 6 years ago
Hello,
sigtool is a standalone tool and has no relationship or compatibility with openssl.
1) Use sigtool to first generate keys: sigtool generate -p test-sign
This generates two files: test-sign.pub and test-sign.key;
2) Sign any file using test-sign.key: sigtool sign test-sign.key testfile1.txt
This signs testfile1.txt and write signature to testfile1.txt.sig
Hope this helps,
Sigtool cannot use openssl key to sign file.
Steps to reproduce
From shell.... openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout test-sign.key -out testsys.crt
Then, using test-sign.key, try to sign a file sigtool sign test-sign.key testfile1.txt
Returns this error.... "can't parse YAML: yaml: unmarshal errors: line 1: cannot unmarshal !!str '.....BE..' into sign.serialPrivKey'
but if I generate a key with sigtool, it's fine. Need to be able to generate and verify with openssl but sign with sigtool (or vice versa) without errors.
Not sure if this is a bug or I am missing steps. Thank you.
Env: CentOS7 sigtool build with Go 1.11