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

Compatibility of LogonManager with OpenSSL 1.1.1e #55

Closed
chuaxr opened this issue Mar 24, 2020 · 4 comments
Closed

Compatibility of LogonManager with OpenSSL 1.1.1e #55

chuaxr opened this issue Mar 24, 2020 · 4 comments
Assignees
Labels

Comments

@chuaxr
Copy link

chuaxr commented Mar 24, 2020

The following issue occurs with OpenSSL 1.1.1e but goes away if I downgrade to 1.1.1d. It seems that other users of OpenSSL are reporting similar issues (e.g. openssl/openssl#11381).

As an interim measure, I suggest that specifying a dependency on OpenSSL=1.1.1d.

from pyesgf.logon import LogonManager

lm = LogonManager()

# Error trace: 
      4 openid = "MY_OPENID"
      5 password = "MY_PASSWORD"
----> 6 lm.logon_with_openid(openid=openid, password=password, bootstrap=True)
      7 lm.is_logged_on()

~/.conda/envs/research/lib/python3.8/site-packages/pyesgf/logon.py in logon_with_openid(self, openid, password, bootstrap, update_trustroots, interactive)
    144         """
    145         username, myproxy = self._get_logon_details(openid)
--> 146         return self.logon(username, password, myproxy,
    147                           bootstrap=bootstrap,
    148                           update_trustroots=update_trustroots,

~/.conda/envs/research/lib/python3.8/site-packages/pyesgf/logon.py in logon(self, username, password, hostname, bootstrap, update_trustroots, interactive)
    181         c = MyProxyClient(hostname=hostname, caCertDir=self.esgf_certs_dir)
    182 
--> 183         creds = c.logon(username, password,
    184                         bootstrap=bootstrap,
    185                         updateTrustRoots=update_trustroots)

~/.conda/envs/research/lib/python3.8/site-packages/myproxy/client/__init__.py in logon(self, username, passphrase, credname, lifetime, keyPair, certReq, nBitsForKey, bootstrap, updateTrustRoots, authnGetTrustRootsCall, sslCertFile, sslKeyFile, sslKeyFilePassphrase)
   1451                 getTrustRootsKw = {}
   1452 
-> 1453             self.getTrustRoots(writeToCACertDir=True,
   1454                                bootstrap=bootstrap,
   1455                                **getTrustRootsKw)

~/.conda/envs/research/lib/python3.8/site-packages/myproxy/client/__init__.py in getTrustRoots(self, username, passphrase, writeToCACertDir, bootstrap)
   1622         try:
   1623             for tries in range(self.MAX_RECV_TRIES):
-> 1624                 dat += conn.recv(self.SERVER_RESP_BLK_SIZE)
   1625         except SSL.SysCallError:
   1626             # Expect this exception when response content exhausted

~/.conda/envs/research/lib/python3.8/site-packages/OpenSSL/SSL.py in recv(self, bufsiz, flags)
   1807         else:
   1808             result = _lib.SSL_read(self._ssl, buf, bufsiz)
-> 1809         self._raise_ssl_error(self._ssl, result)
   1810         return _ffi.buffer(buf, result)[:]
   1811     read = recv

~/.conda/envs/research/lib/python3.8/site-packages/OpenSSL/SSL.py in _raise_ssl_error(self, ssl, result)
   1669             pass
   1670         else:
-> 1671             _raise_current_error()
   1672 
   1673     def get_context(self):

~/.conda/envs/research/lib/python3.8/site-packages/OpenSSL/_util.py in exception_from_error_queue(exception_type)
     52             text(lib.ERR_reason_error_string(error))))
     53 
---> 54     raise exception_type(errors)
     55 
     56 

Error: [('SSL routines', 'ssl3_read_n', 'unexpected eof while reading')]
@chuaxr
Copy link
Author

chuaxr commented Sep 21, 2020

@saeedvzf that appears to be a separate issue, your os.environ['HOME'] is probably defined differently from what you expect.

@agstephens
Copy link
Contributor

@alaniwi: please take a look at this one when you are back.

@saeedvzf
Copy link

Thank you very much for your helps.

I fixed it easily.

Cheers

@valeriupredoi
Copy link
Collaborator

this is a fairly ye olde issue, openssl is now at 3.2.0 as you can see from the CI https://github.com/ESGF/esgf-pyclient/actions/runs/7028497325/job/19124541152 so it's safe to close. Please do re-open if need be 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants