X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=a57f354d99afdfe7ace32dbb77cde893de03a0db;hb=fed4c59a3c26f04ba3764947aa2f7ecdd9b46889;hp=3eae707c3869f489a761351426448a94723ba834;hpb=5381b2f81bb793e364cd5b2a910e026ce84d9d05;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 3eae707..a57f354 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.203 2003-07-18 19:54:30 mike Exp $ + * $Id: client.c,v 1.205 2003-07-23 12:57:22 mike Exp $ */ #include @@ -343,10 +343,8 @@ static int process_initResponse(Z_InitResponse *res) { printf("Guessing visiblestring:\n"); printf("'%s'\n", uif->u. octet_aligned->buf); - } else if (uif->which == Z_External_single -// && oid_is(uif->direct_reference, "1.2.840.10003.10.1000.17.1") - ) { - /* FirstSearch's crappy private init-diagnostic OID */ + } else if (uif->which == Z_External_single) { + /* Peek at any private Init-diagnostic APDUs */ Odr_any *sat = uif->u.single_ASN1_type; printf("### NAUGHTY: External is '%s'\n", sat->buf); } @@ -592,9 +590,14 @@ int cmd_authentication(const char *arg) if (r == 1) { auth = &au; - au.which = Z_IdAuthentication_open; - au.u.open = user; - printf("Authentication set to Open (%s)\n", user); + if (!strcmp(user, "-")) { + au.which = Z_IdAuthentication_anonymous; + printf("Authentication set to Anonymous\n"); + } else { + au.which = Z_IdAuthentication_open; + au.u.open = user; + printf("Authentication set to Open (%s)\n", user); + } } if (r == 2) {