Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL CA cert error #122

Open
dsanleo opened this issue Mar 18, 2020 · 4 comments
Open

SSL CA cert error #122

dsanleo opened this issue Mar 18, 2020 · 4 comments

Comments

@dsanleo
Copy link

dsanleo commented Mar 18, 2020

With the last version in linux (2.3.3) I have an error when I try to search in https://synbiohub.org/
For example with the following code extracted from your examples:

igem = PartShop('https://synbiohub.org')
records = igem.search("plasmid")

I have this error

RuntimeError: Attempt to validate online failed with Problem with the SSL CA cert (path? access rights?)

Do you know why it is happening?

@tcmitchell
Copy link
Collaborator

Hi @dsanleo,

Depending on the exact version of pySBOL, you may have to upgrade. You may also have to set a config option.

If you're already running pysbol-2.3.3.post6 please post what Linux distribution and version you are running, as well as the specific version of pySBOL.

References:

@dsanleo
Copy link
Author

dsanleo commented Mar 23, 2020

Hi @tcmitchell ,
I downloaded the last version, 2.3.3.post7 and I'm running into a Ubuntu 18.04 machine, about the python version I'm using the 3.7.5 version (I checked it with python 3.6 and 2.3.3.post6 too).
I read before the conversations you send me, but I have the same error after using Config.setOption('ca-path','/etc/ssl/certs/ca-certificates.crt')

@tcmitchell
Copy link
Collaborator

tcmitchell commented Mar 23, 2020

I can repeat this problem in a fresh Ubuntu 18.04 docker image with pySBOL 2.3.3.post7:

Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sbol
>>> sbol.Config.getOption('ca-path')
'/etc/ssl/certs/ca-certificates.crt'
>>> igem = sbol.PartShop('https://synbiohub.org')
>>> records = igem.search('plasmid')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/sbol/libsbol.py", line 14683, in search
    return _libsbol.PartShop_search(self, *args)
RuntimeError: Attempt to validate online failed with Problem with the SSL CA cert (path? access rights?)
>>> 

I have confirmed that the root certificate for https://synbiohub.org, "DST Root CA X3", is in /etc/ssl/certs/ca-certificates.crt with a matching fingerprints.

@tcmitchell
Copy link
Collaborator

  • I think "Attempt to validate online failed" is a red herring. The code in question is not contacting the online validator. This is probably a copy/paste error.
  • The C++ code invoked here does not set CURLOPT_CAINFO, which seems the likely culprit in this case. Other PartShop methods do set this option. Perhaps it got missed in this case? Or perhaps there is a reason why it is not set?
  • While there, it sure seems like the query string is not being formed correctly, although it does seem to work at SynBioHub.
    • encode_url(search_text); comes after search_text is appended to parameters. Shouldn't it come before?
    • The addition of /?offest= comes after some URL parameters, like objectType are set. That feels wrong, but it does seem to work when typed manually at https://synbiohub.org

@bbartley do you have thoughts? Or is there a workaround for @dsanleo ?

bbartley pushed a commit to SynBioDex/libSBOL that referenced this issue Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants