From: Nikos Mavrogiannopoulos Date: Wed, 26 May 2010 21:58:35 +0000 (+0200) Subject: make example more compact by removing error checking. X-Git-Tag: gnutls_2_11_3~241 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28fd4114ef1c88d5d7ca5510d99e76f6f20dc4c9;p=thirdparty%2Fgnutls.git make example more compact by removing error checking. --- diff --git a/doc/cha-cert-auth.texi b/doc/cha-cert-auth.texi index 89b53c6686..68999e1d80 100644 --- a/doc/cha-cert-auth.texi +++ b/doc/cha-cert-auth.texi @@ -376,8 +376,8 @@ URLs as described in @code{draft-pechanec-pkcs11uri-01}. For example a public key on a smart card may be referenced as: @example -pkcs11:token=Nikos;serial=307521161601031;model=PKCS%2315;manufacturer=EnterSafe;\ -object=test1;objecttype=public;\ +pkcs11:token=Nikos;serial=307521161601031;model=PKCS%2315; \ +manufacturer=EnterSafe;object=test1;objecttype=public;\ id=32:f1:53:f3:e3:79:90:b0:86:24:14:10:77:ca:5d:ec:2d:15:fa:ed @end example @@ -458,29 +458,20 @@ int i; if (ret < 0 && ret != GNUTLS_E_SHORT_MEMORY_BUFFER) exit(1); + /* no error checking from now on */ obj_list = malloc(sizeof(*obj_list)*obj_list_size); - if (obj_list == NULL) - exit(1); - ret = gnutls_pkcs11_obj_list_import_url( obj_list, &obj_list_size, url, flags); - if (ret < 0) - exit(1); + gnutls_pkcs11_obj_list_import_url( obj_list, &obj_list_size, url, flags); /* now all certificates are in obj_list */ for (i=0;i