summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-19 11:47:59 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-02-19 11:58:44 +0100
commitec0dc46032440b415e0154f848517d27c154c967 (patch)
treeb497cb329455fb80133240d0309b24baf15a9c05
parent3c47d777dedfb76fc9c488e553337e4854f98dd6 (diff)
downloadgnutls-ec0dc46032440b415e0154f848517d27c154c967.tar.gz
removed false warnings
-rw-r--r--lib/x509/output.c2
-rw-r--r--tests/cert-tests/template-nc.tmpl76
2 files changed, 77 insertions, 1 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c
index 77d095d225..60c4fcefb5 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -836,7 +836,7 @@ print_altname(gnutls_buffer_st * str, const char *prefix,
if (err == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
break;
- if (err != GNUTLS_E_SHORT_MEMORY_BUFFER) {
+ if (err < 0 && err != GNUTLS_E_SHORT_MEMORY_BUFFER) {
addf(str,
"error: get_subject/issuer_alt_name: %s\n",
gnutls_strerror(err));
diff --git a/tests/cert-tests/template-nc.tmpl b/tests/cert-tests/template-nc.tmpl
new file mode 100644
index 0000000000..89b500cc37
--- /dev/null
+++ b/tests/cert-tests/template-nc.tmpl
@@ -0,0 +1,76 @@
+# X.509 Certificate options
+#
+# DN options
+
+dn = "cn=Nik,st=Attiki,C=GR,surName=Mavrogiannopoulos,2.5.4.9=Arkadias"
+
+# The serial number of the certificate
+serial = 7
+
+# In how many days, counting from today, this certificate will expire.
+expiration_days = 2590
+
+# X.509 v3 extensions
+
+# A dnsname in case of a WWW server.
+dns_name = "www.none.org"
+dns_name = "www.morethanone.org"
+
+# An IP address in case of a server.
+ip_address = "192.168.1.1"
+
+dns_name = "www.evenmorethanone.org"
+
+# An email in case of a person
+email = "none@none.org"
+
+# An URL that has CRLs (certificate revocation lists)
+# available. Needed in CA certificates.
+crl_dist_points = "http://www.getcrl.crl/getcrl/"
+
+email = "where@none.org"
+
+# Whether this is a CA certificate or not
+ca
+
+# Whether this certificate will be used for a TLS client
+#tls_www_client
+
+# Whether this certificate will be used for a TLS server
+#tls_www_server
+
+# Whether this certificate will be used to sign data (needed
+# in TLS DHE ciphersuites).
+signing_key
+
+# Whether this certificate will be used to encrypt data (needed
+# in TLS RSA ciphersuites). Note that it is preferred to use different
+# keys for encryption and signing.
+#encryption_key
+
+nc_permit[dns] = example.com
+nc_permit[dns] = .example.com
+nc_exclude[dns] = net
+nc_exclude[dns] = org
+
+nc_permit[email] = nmav@example.com
+nc_exclude[email] = example.net
+nc_exclude[email] = example.li
+
+# Whether this key will be used to sign other certificates.
+cert_signing_key
+
+# Whether this key will be used to sign CRLs.
+#crl_signing_key
+
+# Whether this key will be used to sign code.
+#code_signing_key
+
+# Whether this key will be used to sign OCSP data.
+ocsp_signing_key
+
+# Whether this key will be used for time stamping.
+#time_stamping_key
+
+# Whether this key will be used for IPsec IKE operations.
+#ipsec_ike_key