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 846666 - Print distinct errors when there is no CA cert provided or server cert isn't signed by it
Summary: Print distinct errors when there is no CA cert provided or server cert isn't ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: ---
Assignee: Marc-Andre Lureau
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-08 11:45 UTC by David Jaša
Modified: 2013-07-03 12:01 UTC (History)
7 users (show)

Fixed In Version: spice-gtk-0.14-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:48:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0343 0 normal SHIPPED_LIVE spice-gtk bug fix and enhancement update 2013-02-20 20:53:54 UTC

Description David Jaša 2012-08-08 11:45:28 UTC
Description of problem:
This is and extension/clarification of Bug 834504. The error code:
main-1:0: SSL_connect: error:00000001:lib(0):func(0):reason(1)

is the same for all three scenarios:
1) host subject mismatch ($SUBJ of bug 834504)
2) server certificate not being signed by the provided CA
3) no CA cert provided

This makes debugging of connection failures needlesly difficult, especially when the client is run via RHEV/oVirt Portals.

Version-Release number of selected component (if applicable):
spice-gtk-0.11-11.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Christophe Fergeau 2012-08-10 14:51:49 UTC
Would you happen to have the error messages displayed for case 2) and 3)?

Comment 2 David Jaša 2012-08-10 15:02:05 UTC
Something like:

2) "Spice server certificate is not signed by provided CA certificate"
3) "Secure connection requested but no trust store provided. Please use --spice-ca-file option"

Comment 3 Christophe Fergeau 2012-08-10 15:29:53 UTC
I mean, what happens now? In particular what is the cryptic SSL error?

Comment 4 David Jaša 2012-08-17 10:58:07 UTC
(In reply to comment #3)
> I mean, what happens now? In particular what is the cryptic SSL error?

the one in comment 0, it's the same for all three scenarios mentioned there.

Comment 5 Christophe Fergeau 2012-08-17 11:17:19 UTC
Oh never mind, the warning I was interested in is 

        if (!preverify_ok) {
            spice_warning("openssl verify:num=%d:%s:depth=%d:%s", err,
                          X509_verify_cert_error_string(err), depth, buf);

but it's not printed in all cases :(

Comment 7 David Blechter 2012-10-05 12:26:06 UTC
out of time for 6.4

Comment 8 Marc-Andre Lureau 2012-10-18 13:42:35 UTC
With spice-gtk git, I get the following:

1) ssl_verify.c:484:openssl_verify: ssl: subject 'C=IL,L=Raanana,O=Red Hat,CN=my foo' verification failed

2) ssl_verify.c:428:openssl_verify: openssl verify:num=19:self signed certificate in certificate chain:depth=1:/C=IL/L=Raanana/O=Red Hat/CN=my CA

3) GSpice-WARNING **: loading ca certs from /home/elmarco/.spicec/spice_truststore.pem failed

I guess we could improve the messages a bit, but it seems to be mostly resolved now, agree?

Comment 9 David Jaša 2012-10-18 13:57:57 UTC
(In reply to comment #8)
> I guess we could improve the messages a bit, but it seems to be mostly
> resolved now, agree?

I think so but I'd prefer to keep the bug open till the messages are polished to final state.

Comment 10 Marc-Andre Lureau 2012-10-18 14:12:55 UTC
1) and 3) look fine to me, 2) is the official openssl error: 

19 X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in certificate chain
    the certificate chain could be built up using the untrusted certificates but the root could not be found locally.

We can also print: "server certificate not being signed by the provided CA" (but I am not sure this is correct)

Comment 11 David Jaša 2012-10-18 14:40:47 UTC
(In reply to comment #10)
> 1) and 3) look fine to me,

agreed.

> 2) is the official openssl error: 
> 
> 19 X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in
> certificate chain
>     the certificate chain could be built up using the untrusted certificates
> but the root could not be found locally.
> 
> We can also print: "server certificate not being signed by the provided CA"
> (but I am not sure this is correct)

I think this wording is good to make it in.

Comment 12 Marc-Andre Lureau 2012-10-18 19:23:28 UTC
patch sent to ML

Comment 14 Marc-Andre Lureau 2012-12-10 13:06:51 UTC
Fixed in spice-gtk-0.14-5.el6

Comment 18 errata-xmlrpc 2013-02-21 08:48:17 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-2013-0343.html


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