Bug 723567 - virtual smardcard support doesn't work
Summary: virtual smardcard support doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-client
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Alon Levy
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-20 15:26 UTC by Gerd Hoffmann
Modified: 2011-12-06 15:22 UTC (History)
7 users (show)

Fixed In Version: spice-client-0.8.2-1.el6 spicec-win-0.1-5
Doc Type: Bug Fix
Doc Text:
Cause The --smartcard-db client command line option was not handled. Consequence Using --smartcard-db on the client results in an error message Error: unhandled exception: cmd line error. Fix Handle the --smartcard-db option Result "--smartcard-db" is now handled.
Clone Of:
Environment:
Last Closed: 2011-12-06 15:22:37 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1518 0 normal SHIPPED_LIVE libcacard and spice-client bug fix and enhancement update 2011-12-06 00:50:43 UTC

Description Gerd Hoffmann 2011-07-20 15:26:27 UTC
Description of problem:
smardcard support doesn't work

Version-Release number of selected component (if applicable):
spice-client-0.8.0-2.el6.x86_64

How reproducible:
spicec -h localhost -p 5900 --smartcard --smartcard-db /home/kraxel/projects/ccid/db/ --smartcard-cert fedora,test1,test2

Actual results:
get an error message:
Error: unhandled exception: cmd line error

Expected results:
Works.

Additional info:
Tried to build from latest spice git tree instead.
spicec accepts the command line then, but crashes.

Comment 1 Gerd Hoffmann 2011-07-20 15:34:03 UTC
script which creates the certificate db:

#!/bin/sh

DB="$(pwd)/db"

echo "### reinit $DB"
rm -rf "$DB"
mkdir "$DB"

set -ex
certutil -d "$DB" -N
certutil -d "$DB" -t "CT,C,C" -n test1   -S -s "CN=test1" -x -v 24
certutil -d "$DB" -t "CT,C,C" -n test2   -S -s "CN=test2" -x -v 24
certutil -d "$DB" -t "CT,C,C" -n test3   -S -s "CN=test3" -x -v 24
certutil -d "$DB" -t "CT,C,C" -n fedora  -A -i ~/.fedora.cert
certutil -d "$DB" -L

Comment 4 Alon Levy 2011-07-20 18:28:03 UTC
Fixed by upstream commit e1ec222.

commit e1ec222e8bdf4b02f511666656ce1d6bd60d0988
Author: Alon Levy <alevy>
Date:   Fri Mar 4 09:36:49 2011 +0200

    client/smartcard: handle the --smartcard-db option

diff --git a/client/application.cpp b/client/application.cpp
index ea88dc5..9257eb2 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -2271,7 +2271,7 @@ bool Application::process_cmd_line(int argc, char** argv, bool &full_screen)
     parser.add(SPICE_OPT_SMARTCARD_CERT, "smartcard-cert", "Use virtual reader+card with given cert(s)",
         "smartcard-cert", true);
     parser.set_multi(SPICE_OPT_SMARTCARD_CERT, ',');
-    parser.add(SPICE_OPT_SMARTCARD_DB, "smartcard-db", "Use given db for smartcard certs");
+    parser.add(SPICE_OPT_SMARTCARD_DB, "smartcard-db", "Use given db for smartcard certs", "smartcard-db", true);
 #endif
 
     for (int i = SPICE_CHANNEL_MAIN; i < SPICE_END_CHANNEL; i++) {
@@ -2395,6 +2395,9 @@ bool Application::process_cmd_line(int argc, char** argv, bool &full_screen)
                     _smartcard_options->certs.end(), std::string(val));
             } while ((val=parser.next_argument()));
             break;
+        case SPICE_OPT_SMARTCARD_DB:
+            _smartcard_options->dbname = val;
+            break;
 #endif
         case CmdLineParser::OPTION_HELP:
             parser.show_help();

Comment 10 David Jaša 2011-10-19 12:14:39 UTC
VERIFIED in spice-client-0.8.2-7.el6.x86_64

Comment 11 Alon Levy 2011-11-21 10:27:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    The --smartcard-db client command line option was not handled.
Consequence
    Using --smartcard-db on the client results in an error message Error: unhandled exception: cmd line error.
Fix
    Handle the --smartcard-db option
Result
    "--smartcard-db" is now handled.

Comment 12 errata-xmlrpc 2011-12-06 15:22:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1518.html


Note You need to log in before you can comment on or make changes to this bug.