Closed fedelake closed 3 years ago
First of all: you cannot generate a valid greenpass as you don't have the private keys for signing it You can reencode the decoded QR code back If you want to sign your own certifiate, check here for an example
First of all: you cannot generate a valid greenpass as you don't have the private keys for signing it You can reencode the decoded QR code back If you want to sign your own certifiate, check here for an example
ok tnx, but when i lunch the command: qrdecode photo.jpg | python3 ./hc1_verify -v -U - i get this error on linux:
Command 'qrdecode' not found
what could be?
you don't have qrdecode
installed, i used zbarimg --raw -q --noxml
instead of qrdecode
you may need to install some package depending on your distro
you don't have
qrdecode
installed, i usedzbarimg --raw -q --noxml
instead ofqrdecode
you may need to install some package depending on your distro
wow perfect! ok now i got the KID! And now what i can do to reencode it correctly?
I'm sorry i don't understand, what do you mean by KID?
I'm sorry i don't understand, what do you mean by KID?
Is the signature key
So, if you have a cose
object with the signing key (as you get after CoseMessage.decode(cose_document)
and assigning it a key, as at greenpass.py#L155 you can manually encode the certificate
message = [
cose.phdr_encoded,
cose.uhdr_encoded,
cose.payload,
cose.signature
]
encoded_message = cbor2.dumps(cbor2.CBORTag(cose.cbor_tag, message), default=cose._custom_cbor_encoder)
certificate = b45encode(zlib.compress(encoded_message))
Ok tnx 👍
Hi, I want try to generate the same QR code of a valid Greenpass but once decoded the info, when recoded the QR generated is different... I have the header and the signature.