~ubuntu-branches/ubuntu/natty/libgcrypt11/natty-proposed

« back to all changes in this revision

Viewing changes to tests/tsexp.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2009-02-21 13:46:58 UTC
  • mto: (1.1.6 upstream) (2.1.3 squeeze)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20090221134658-855twvcr4ezk2ron
ImportĀ upstreamĀ versionĀ 1.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
          if (!gcry_is_secure (sexp))
131
131
            fail ("gcry_sexp_build did not switch to secure memory\n");
132
132
          break;
 
133
 
 
134
        case 3:
 
135
          {
 
136
            gcry_sexp_t help_sexp;
 
137
 
 
138
            if (gcry_sexp_new (&help_sexp,
 
139
                               "(foobar-parms (xp #1234#)(xq #03#))", 0, 1))
 
140
              {
 
141
                fail (" scanning fixed string failed\n");
 
142
                return;
 
143
              }
 
144
 
 
145
            string = ("(public-key (dsa (p #41424344#) (parm %S) "
 
146
                      "(y dummy)(q %b) (g %m)))");
 
147
            if ( gcry_sexp_build (&sexp, NULL, string, help_sexp,
 
148
                                  secure_buffer_len, secure_buffer,
 
149
                                  gcry_mpi_set_ui (NULL, 17)) )
 
150
              {
 
151
                fail (" scanning `%s' failed\n", string);
 
152
                return;
 
153
              }
 
154
            gcry_sexp_release (help_sexp);
 
155
          }
 
156
          break;
 
157
          
133
158
          
134
159
        default:
135
160
          return; /* Ready. */
416
441
int
417
442
main (int argc, char **argv)
418
443
{
419
 
  if (argc > 1 && !strcmp (argv[1], "-v"))
 
444
  if (argc > 1 && !strcmp (argv[1], "--verbose"))
420
445
    verbose = 1;
421
446
 
422
447
  gcry_control (GCRYCTL_DISABLE_SECMEM_WARN);