tests,json: Add sig-notations test

* tests/json/t-sig-notations.in.json,
tests/json/t-sig-notations.out.json: New
* tests/json/Makefile.am (EXTRA_DIST): Add files.
* tests/json/t-json.c: Register it.
This commit is contained in:
Andre Heinecke 2018-11-14 17:56:23 +01:00
parent def030e843
commit d3dae4a445
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C
4 changed files with 62 additions and 1 deletions

View File

@ -59,6 +59,7 @@ EXTRA_DIST = initial.test final.test \
t-keylist.in.json t-keylist.out.json \
t-keylist-secret.in.json t-keylist-secret.out.json \
t-sign.in.json t-sign.out.json \
t-sig-notations.in.json t-sig-notations.out.json \
t-verify.in.json t-verify.out.json \
t-version.in.json t-version.out.json

View File

@ -40,7 +40,7 @@ static const char*tests[] = { "t-config", "t-version",
"t-keylist", "t-keylist-secret", "t-decrypt", "t-config-opt",
"t-encrypt", "t-encrypt-sign", "t-sign", "t-verify",
"t-decrypt-verify", "t-export", "t-createkey",
"t-export-secret-info", "t-chunking",
"t-export-secret-info", "t-chunking", "t-sig-notations",
/* For these two the order is important
* as t-import imports the deleted key from t-delete */
"t-delete", "t-import",

View File

@ -0,0 +1,4 @@
{
"op": "verify",
"data": "-----BEGIN PGP MESSAGE-----\n\nowGbwMvMwCSoW1RzPCOz3ITxtFASQ/SbgPceiTk5+Qo+qaUlqVwd51kYBJkY+sUU\nWRb8d52wO1Hp7fs8mxCYHlYmkAaDKQ0MQKDAwF5QlJqWWlSUmqKbmpuYmaObmpec\nn5KZl+5QkF6gl5yfC6RyM3NTlUXAGrgZ+HMSS9MzQApyU71Ki0sUggtLU1OrUhV8\nU2WkMkpKCoqt9PXLy8v10vNK9fKL0vUL8nMykyv1Gbg4BWBuYP7OMN9VdOep8HTD\nKQLOd+7+Cshs6jVTfsMwT3sje7Pmui779IU/657Lb575u9z/LgA=\n=iqJ/\n-----END PGP MESSAGE-----\n\n"
}

View File

@ -0,0 +1,56 @@
{
"info": {
"is_mime": false,
"signatures": [{
"summary": {
"sigsum": [],
"valid": false,
"green": false,
"red": false,
"revoked": false,
"key-expired": false,
"sig-expired": false,
"key-missing": false,
"crl-missing": false,
"crl-too-old": false,
"bad-policy": false,
"sys-error": false
},
"wrong_key_usage": false,
"chain_model": false,
"is_de_vs": false,
"status_string": "Success",
"fingerprint": "A0FF4590BB6122EDEF6E3C542D727CC768697734",
"validity_string": "unknown",
"pubkey_algo_name": "DSA",
"hash_algo_name": "SHA1",
"status_code": 0,
"timestamp": 1542213871,
"exp_timestamp": 0,
"pka_trust": 0,
"validity": 0,
"validity_reason": 0,
"notations": [{
"human_readable": false,
"critical": false,
"value": "https://www.gnu.org/policy/",
"flags": 0
}, {
"human_readable": true,
"critical": false,
"name": "laughing@me",
"value": "Just Squeeze Me",
"flags": 1
}, {
"human_readable": true,
"critical": true,
"name": "preferred-email-encoding@pgp.com",
"value": "pgpmime",
"flags": 3
}]
}]
},
"type": "plaintext",
"base64": false,
"data": "Hallo Leute\n"
}