Fixed erroneous checks and sloppy return values in certificate selection.
commit10d8110588533e91d67960e058d696f12ee1065c
authorLudovic Courtès <ludo@gnu.org>
Wed, 1 Aug 2007 21:18:58 +0000 (1 23:18 +0200)
committerSimon Josefsson <simon@josefsson.org>
Thu, 2 Aug 2007 18:35:57 +0000 (2 20:35 +0200)
treeae42d5295e64dbefda57b4cf854e5e3bc765a91b
parentd86f140d8547e32a7ada6a6d55de2f836e9b694c
Fixed erroneous checks and sloppy return values in certificate selection.

* lib/auth_cert.c (_gnutls_get_selected_cert): Dereference
  APR_CERT_LIST_LENGTH, APR_PKEY and APR_CERT_LIST when validating their
  value.
  (_gnutls_server_select_cert): When IDX < 0, set RET to
  `GNUTLS_E_INSUFFICIENT_CREDENTIALS'.

Signed-off-by: Simon Josefsson <simon@josefsson.org>
lib/auth_cert.c