RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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:
Embargoed:


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.