~ubuntu-branches/ubuntu/trusty/gnutls26/trusty

« back to all changes in this revision

Viewing changes to tests/crq_apis.c

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 */
22
22
 
23
23
#ifdef HAVE_CONFIG_H
24
 
# include <config.h>
 
24
#include <config.h>
25
25
#endif
26
26
 
27
27
#include <stdlib.h>
133
133
  ret = gnutls_x509_crq_get_challenge_password (crq, smallbuf, &s);
134
134
  if (ret != 0 || s != 3 || strcmp (smallbuf, "foo") != 0)
135
135
    fail ("gnutls_x509_crq_get_challenge_password3 %d/%d/%s\n",
136
 
          ret, (int) s, smallbuf);
 
136
          ret, (int) s, smallbuf);
137
137
 
138
138
  s = 0;
139
139
  ret = gnutls_x509_crq_get_extension_info (crq, 0, NULL, &s, NULL);
146
146
    fail ("gnutls_x509_crq_get_extension_data\n");
147
147
 
148
148
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
149
 
                                              "foo", 3, 1);
150
 
  if (ret != 0)
151
 
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
152
 
 
153
 
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
154
 
                                              "bar", 3, 1);
155
 
  if (ret != 0)
156
 
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
157
 
 
158
 
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
159
 
                                              "apa", 3, 0);
160
 
  if (ret != 0)
161
 
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
162
 
 
163
 
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
164
 
                                              "foo", 3, 1);
 
149
                                              "foo", 3, 1);
 
150
  if (ret != 0)
 
151
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
 
152
 
 
153
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
 
154
                                              "bar", 3, 1);
 
155
  if (ret != 0)
 
156
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
 
157
 
 
158
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
 
159
                                              "apa", 3, 0);
 
160
  if (ret != 0)
 
161
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
 
162
 
 
163
  ret = gnutls_x509_crq_set_subject_alt_name (crq, GNUTLS_SAN_DNSNAME,
 
164
                                              "foo", 3, 1);
165
165
  if (ret != 0)
166
166
    fail ("gnutls_x509_crq_set_subject_alt_name\n");
167
167