[MacPorts] #58835: gajim 0.16.8_0 OpenSSL.rand.load_file(str(RNG_SEED)) AttributeError: 'module' object has no attribute 'load_file'

MacPorts noreply at macports.org
Wed Aug 14 08:03:49 UTC 2019


#58835: gajim  0.16.8_0 OpenSSL.rand.load_file(str(RNG_SEED)) AttributeError:
'module' object has no attribute 'load_file'
----------------------------------+--------------------
  Reporter:  vm4866571246066832v  |      Owner:  (none)
      Type:  defect               |     Status:  new
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:  2.5.4
Resolution:                       |   Keywords:
      Port:  gajim                |
----------------------------------+--------------------
Description changed by vm4866571246066832v:

Old description:

> starting gajim, I get:
> {{{
> Traceback (most recent call last):
>   File "gajim.py", line 307, in <module>
>     OpenSSL.rand.load_file(str(RNG_SEED))
> AttributeError: 'module' object has no attribute 'load_file'
> }}}
>
> installed ports:
> {{{
>   gajim @0.16.8_0 (active)
>   openssl @1.0.2s_0 (active)
>   py27-openssl @19.0.0_0 (active)
>   libgcrypt @1.8.4_0 (active)
>   py27-asn1crypto @0.24.0_0 (active)
>   py27-crypto @2.6.1_1 (active)
>   py27-cryptography @2.7_0 (active)
> }}}
>
> A net search has several hits about this topic, some say it's an issue in
> an OpenSSL Python module, then there is a Gajim fix mentioned.
>
> Because the code block regarding the rand seed is optional anyway, I
> added a catch of the exception to work around the problem.
>
> {{{
> /opt/local/share/gajim/src/gajim.py
> 310 except ImportError:
> 311     log.info("PyOpenSSL PRNG not available")
> 312 except AttributeError:
> 313     log.info("PyOpenSSL PRNG not available")
> }}}

New description:

 starting gajim, I get:
 {{{
 Traceback (most recent call last):
   File "gajim.py", line 307, in <module>
     OpenSSL.rand.load_file(str(RNG_SEED))
 AttributeError: 'module' object has no attribute 'load_file'
 }}}

 installed ports:
 {{{
   gajim @0.16.8_0 (active)
   openssl @1.0.2s_0 (active)
   py27-openssl @19.0.0_0 (active)
   libgcrypt @1.8.4_0 (active)
   py27-asn1crypto @0.24.0_0 (active)
   py27-crypto @2.6.1_1 (active)
   py27-cryptography @2.7_0 (active)
 }}}

 A net search has several hits about this topic, some say it's an issue in
 an OpenSSL Python module, then there is a Gajim fix mentioned.

 Because the code block regarding the rand seed is optional anyway, I added
 a catch of the exception to work around the problem.

 {{{
 /opt/local/share/gajim/src/gajim.py
 try:
     import OpenSSL.rand
     from common import crypto
     # Seed from file
     OpenSSL.rand.load_file(str(RNG_SEED))
     crypto.add_entropy_sources_OpenSSL()
     OpenSSL.rand.write_file(str(RNG_SEED))
     PYOPENSSL_PRNG_PRESENT = True
 310 except ImportError:
 311     log.info("PyOpenSSL PRNG not available")
 312 except AttributeError:
 313     log.info("PyOpenSSL PRNG not available")
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/58835#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list