diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/asschk.c | 10 | ||||
-rw-r--r-- | tests/gpgme/gpgme-defs.scm | 3 | ||||
-rw-r--r-- | tests/gpgscm/scheme.c | 33 | ||||
-rw-r--r-- | tests/gpgsm/gpgsm-defs.scm | 5 | ||||
-rwxr-xr-x | tests/inittests | 1 | ||||
-rw-r--r-- | tests/openpgp/defs.scm | 5 | ||||
-rwxr-xr-x | tests/openpgp/ecc.scm | 2 | ||||
-rw-r--r-- | tests/openpgp/samplekeys/README | 12 | ||||
-rw-r--r-- | tests/openpgp/samplekeys/pgp-desktop-skr.asc | 56 | ||||
-rwxr-xr-x | tests/pkits/inittests | 1 |
10 files changed, 96 insertions, 32 deletions
diff --git a/tests/asschk.c b/tests/asschk.c index 65828e5b2..c77fd7c23 100644 --- a/tests/asschk.c +++ b/tests/asschk.c @@ -30,7 +30,7 @@ expanded once and non existing macros expand to the empty string. A macro is dereferenced by prefixing its name with a dollar sign; the end of the name is currently indicated by a white space, a - dollar sign or a slash. To use a dollor sign verbatim, double it. + dollar sign or a slash. To use a dollar sign verbatim, double it. A macro is assigned by prefixing a statement with the macro name and an equal sign. The value is assigned verbatim if it does not @@ -47,7 +47,7 @@ [<name> =] <statement> [<args>] - If NAME is not specifed but the statement returns a value it is + If NAME is not specified but the statement returns a value it is assigned to the name "?" so that it can be referenced using "$?". The following commands are implemented: @@ -274,7 +274,7 @@ writen (int fd, const char *buffer, size_t length) type and store that in recv_type. The function terminates on a communication error. Returns a pointer into the inputline to the first byte of the arguments. The parsing is very strict to match - exaclty what we want to send. */ + exactly what we want to send. */ static char * read_assuan (int fd) { @@ -397,7 +397,7 @@ write_assuan (int fd, const char *line) /* Start the server with path PGMNAME and connect its stdout and strerr to a newly created pipes; the file descriptors are then - store in the gloabl variables SERVER_SEND_FD and + store in the global variables SERVER_SEND_FD and SERVER_RECV_FD. The initial handcheck is performed.*/ static void start_server (const char *pgmname) @@ -468,7 +468,7 @@ start_server (const char *pgmname) -/* Script intepreter. */ +/* Script interpreter. */ static void unset_var (const char *name) diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm index 0de589ffe..bc40b3c76 100644 --- a/tests/gpgme/gpgme-defs.scm +++ b/tests/gpgme/gpgme-defs.scm @@ -67,8 +67,7 @@ (create-file "gpg-agent.conf" (string-append "pinentry-program " (tool 'pinentry)) - (string-append "scdaemon-program " (tool 'scdaemon)) - ) + "disable-scdaemon") (start-agent) diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c index 4384841a7..a8191657d 100644 --- a/tests/gpgscm/scheme.c +++ b/tests/gpgscm/scheme.c @@ -872,7 +872,7 @@ gc_reservation_failure(struct scheme *sc) { #ifdef NDEBUG fprintf(stderr, - "insufficient reservation\n") + "insufficient reservation\n"); #else fprintf(stderr, "insufficient %s reservation in line %d\n", @@ -2990,13 +2990,23 @@ _Error_1(scheme *sc, const char *s, pointer a) { /* Define a label OP and emit a case statement for OP. For use in the * dispatch function. The slightly peculiar goto that is never * executed avoids warnings about unused labels. */ +#if __GNUC__ > 6 +#define CASE(OP) OP: __attribute__((unused)); case OP +#else #define CASE(OP) case OP: if (0) goto OP; OP +#endif #else /* USE_THREADED_CODE */ #define s_thread_to(sc, a) s_goto(sc, a) #define CASE(OP) case OP #endif /* USE_THREADED_CODE */ +#if __GNUC__ > 6 +#define FALLTHROUGH __attribute__ ((fallthrough)) +#else +#define FALLTHROUGH /* fallthrough */ +#endif + /* Return to the previous frame on the dump stack, setting the current * value to A. */ #define s_return(sc, a) s_goto(sc, _s_return(sc, a, 0)) @@ -3557,7 +3567,7 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { putstr(sc,"\nEval: "); s_thread_to(sc,OP_P0LIST); } - /* fall through */ + FALLTHROUGH; CASE(OP_REAL_EVAL): #endif if (is_symbol(sc->code)) { /* symbol */ @@ -3635,7 +3645,7 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { free_cons(sc, sc->args, &callsite, &sc->args); sc->code = car(sc->args); sc->args = cdr(sc->args); - /* Fallthrough. */ + FALLTHROUGH; CASE(OP_APPLY): /* apply 'code' to 'args' */ #if USE_TRACING @@ -3646,7 +3656,7 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { putstr(sc,"\nApply to: "); s_thread_to(sc,OP_P0LIST); } - /* fall through */ + FALLTHROUGH; CASE(OP_REAL_APPLY): #endif #if USE_HISTORY @@ -3727,12 +3737,11 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { s_thread_to(sc,OP_APPLY); } } - /* Fallthrough. */ #else CASE(OP_LAMBDA): /* lambda */ sc->value = sc->code; - /* Fallthrough. */ #endif + FALLTHROUGH; CASE(OP_LAMBDA1): gc_disable(sc, 1); @@ -4655,13 +4664,9 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { CASE(OP_NULLP): /* null? */ s_retbool(car(sc->args) == sc->NIL); CASE(OP_NUMEQ): /* = */ - /* Fallthrough. */ CASE(OP_LESS): /* < */ - /* Fallthrough. */ CASE(OP_GRE): /* > */ - /* Fallthrough. */ CASE(OP_LEQ): /* <= */ - /* Fallthrough. */ CASE(OP_GEQ): /* >= */ switch(op) { case OP_NUMEQ: comp_func=num_eq; break; @@ -4750,9 +4755,7 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { s_return(sc,sc->value); CASE(OP_WRITE): /* write */ - /* Fallthrough. */ CASE(OP_DISPLAY): /* display */ - /* Fallthrough. */ CASE(OP_WRITE_CHAR): /* write-char */ if(is_pair(cdr(sc->args))) { if(cadr(sc->args)!=sc->outport) { @@ -4900,9 +4903,7 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { s_return(sc,sc->outport); CASE(OP_OPEN_INFILE): /* open-input-file */ - /* Fallthrough. */ CASE(OP_OPEN_OUTFILE): /* open-output-file */ - /* Fallthrough. */ CASE(OP_OPEN_INOUTFILE): /* open-input-output-file */ { int prop=0; pointer p; @@ -4922,7 +4923,6 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { #if USE_STRING_PORTS CASE(OP_OPEN_INSTRING): /* open-input-string */ - /* Fallthrough. */ CASE(OP_OPEN_INOUTSTRING): /* open-input-output-string */ { int prop=0; pointer p; @@ -5003,7 +5003,6 @@ Eval_Cycle(scheme *sc, enum scheme_opcodes op) { s_thread_to(sc,OP_READ_INTERNAL); CASE(OP_READ_CHAR): /* read-char */ - /* Fallthrough. */ CASE(OP_PEEK_CHAR): /* peek-char */ { int c; if(is_pair(sc->args)) { @@ -5615,7 +5614,9 @@ int scheme_init_custom_alloc(scheme *sc, func_alloc malloc, func_dealloc free) { sc->fcells = 0; sc->inhibit_gc = GC_ENABLED; sc->reserved_cells = 0; +#ifndef NDEBUG sc->reserved_lineno = 0; +#endif sc->no_memory=0; sc->inport=sc->NIL; sc->outport=sc->NIL; diff --git a/tests/gpgsm/gpgsm-defs.scm b/tests/gpgsm/gpgsm-defs.scm index f11864201..848bc7581 100644 --- a/tests/gpgsm/gpgsm-defs.scm +++ b/tests/gpgsm/gpgsm-defs.scm @@ -67,10 +67,7 @@ "faked-system-time 1008241200") (create-file "gpg-agent.conf" (string-append "pinentry-program " (tool 'pinentry)) - (if (assoc "scdaemon" gpg-components) - (string-append "scdaemon-program " (tool 'scdaemon)) - "# No scdaemon available") - ) + "disable-scdaemon") (start-agent) (create-file "trustlist.txt" diff --git a/tests/inittests b/tests/inittests index 6fbccfb0f..9090674e3 100755 --- a/tests/inittests +++ b/tests/inittests @@ -85,6 +85,7 @@ EOF cat > gpg-agent.conf <<EOF no-grab pinentry-program /home/wk/work/pinentry/gtk/pinentry-gtk +disable-scdaemon EOF cat > trustlist.txt <<EOF diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm index 186efe0ca..85a013366 100644 --- a/tests/openpgp/defs.scm +++ b/tests/openpgp/defs.scm @@ -356,10 +356,7 @@ (if (flag "--extended-key-format" *args*) "enable-extended-key-format" "#enable-extended-key-format") (string-append "pinentry-program " (tool 'pinentry)) - (if (assoc "scdaemon" gpg-components) - (string-append "scdaemon-program " (tool 'scdaemon)) - "# No scdaemon available") - )) + "disable-scdaemon")) ;; Initialize the test environment, install appropriate configuration ;; and start the agent, without any keys. diff --git a/tests/openpgp/ecc.scm b/tests/openpgp/ecc.scm index d7c02a5e2..a63ec45bd 100755 --- a/tests/openpgp/ecc.scm +++ b/tests/openpgp/ecc.scm @@ -175,7 +175,7 @@ Rg== (display "This is one line\n" (fdopen fd "wb"))) (for-each-p - "Checking ECDSA decryption" + "Checking ECDH decryption" (lambda (test) (lettmp (x y) (call-with-output-file diff --git a/tests/openpgp/samplekeys/README b/tests/openpgp/samplekeys/README index 6f2399fd9..f8a7e9ed7 100644 --- a/tests/openpgp/samplekeys/README +++ b/tests/openpgp/samplekeys/README @@ -14,8 +14,20 @@ whats-new-in-2.1.asc Collection of sample keys. e2e-p256-1-clr.asc Google End-end-End test key (no protection) e2e-p256-1-prt.asc Ditto, but protected with passphrase "a". E657FB607BB4F21C90BB6651BC067AF28BC90111.asc Key with subkeys (no protection) +pgp-desktop-skr.asc Secret key with subkeys w/o signatures rsa-rsa-sample-1.asc RSA+RSA sample key (no passphrase) ed25519-cv25519-sample-1.asc Ed25519+CV25519 sample key (no passphrase) silent-running.asc Collection of sample secret keys (no passphrases) rsa-primary-auth-only.pub.asc rsa2408 primary only, usage: cert,auth rsa-primary-auth-only.sec.asc Ditto but the secret keyblock. + + +Notes: + +- pgp-desktop-skr.asc is a secret keyblock without the uid and subkey + binding signatures. When exporting a secret key from PGP desktop + such a file is created which is then directly followed by a separate + armored public key block. To create such a sample concatenate + pgp-desktop-skr.asc and E657FB607BB4F21C90BB6651BC067AF28BC90111.asc +- ecc-sample-2-sec.asc and ecc-sample-3-sec.asc do not have and + binding signatures either. ecc-sample-1-sec.asc has them, though. diff --git a/tests/openpgp/samplekeys/pgp-desktop-skr.asc b/tests/openpgp/samplekeys/pgp-desktop-skr.asc new file mode 100644 index 000000000..58f384caf --- /dev/null +++ b/tests/openpgp/samplekeys/pgp-desktop-skr.asc @@ -0,0 +1,56 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- +Version: Made up as if from PGP Encryption Desktop 10.3.2 + +lQHYBFZfWcgBBAC+RQIbTFhpMiRmJPB3XAJQXxpDb5h2sEaNJ/MLIHwPNs+jNgDb +144BrIOD1G56xAYhKYVDphFIg2wCiB019mYq7yNUyn/aZFBHqd5xbg4qR212cAjw +HpBqP9yUEm333RFqFdytcbXd9rSfvZOlFvGZRSxjgpGlsJGbjitH0ABY+wARAQAB +AAP+IvI/yc3C60dXYh9kvzd6AVMGWt5zTVFhE+oDfMaxooW5q0tu6vHzViFeYmcx +B4FbctnSbTNiN0RUIT7oxpGEAAumKRejGAaMwiKZz3bMV05l0LI0Yn10GzXsLtRx ++iKzpUxThZETRU43BJeMqP5/rVqdQAu47pClgTwQWn6bXNkCANe2+XwJgMv9D72p +kMLIi0TmPtfjBFV6f3f190N6m5gCCwstzvKqcNQ7NqNdbLHo/HKCmdGzlzCajbNu +1nLJYoUCAOHNiNhWU/IEC5fRNyxfE5AQAmc7Bm/7d5gVIWDUjWe1ukfwJGQESyNy +GTraOcYQa8X0GskSEktjwZN/dM9yZX8B/02prLprc1+8GjTM7q7ePJJbiOWcvYrB +qcHhqadU/uC/g4lzDAG4RVutIHaqqOPr85J9jPzP/AT6ygsNU5Q5902gYbQjQmFy +cmV0dCBCcm93biA8YmFycmV0dEBleGFtcGxlLm9yZz6dAdgEVl9ZyAEEAMfR5EvR +HsEQXjKwf+LvMD2qXZerKRJYv+Ok6O1nJgYZrxGSXRtGUGrWDb4JERKjmnbIHePa +J42GgpAUibaya0lDkvjKOehX/+dno06Bcn7mbOistFBpvbbyhCcN2mYhjQGeT8r6 +fiX/sSw8L49MRxwI/JRBITkqyKxr6uMsf/p1ABEBAAEAA/wN9hFQZs0SSjV6rzBQ +R8wEEvo1FaVp/b9yhVws8i8K8BJ2VNaiiDgoLsqJA5MozTuGnxbPi7eFwOcwb+7r +T+4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0q2tjrAt/+ZfTcWAT5huQh9OZ4Hq0N/hFhtcJjIokQH+OcGoGiG3 +pNBeU0bZqnVZNcHhJP9F13chv5jSAOJf6rfyx3HbgTeOqh2BCpyocgzAgQ8JUkX+ +OeRRvDotcfiTGKBc +=VlTT +-----END PGP PRIVATE KEY BLOCK----- diff --git a/tests/pkits/inittests b/tests/pkits/inittests index 4bff0a8b8..deb185439 100755 --- a/tests/pkits/inittests +++ b/tests/pkits/inittests @@ -94,6 +94,7 @@ EOF # Fixme: we need to write a dummy pinentry program cat > gpg-agent.conf <<EOF no-grab +disable-scdaemon EOF # Mark the root CA trusted |