Skip to content

Commit

Permalink
bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)
Browse files Browse the repository at this point in the history
  • Loading branch information
pxinwr authored and vstinner committed Apr 15, 2019
1 parent 2430d53 commit 236d0b7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Doc/library/crypt.rst
Expand Up @@ -30,6 +30,8 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any
extensions available on the current implementation will also be available on
this module.

.. availability:: Unix. Not available on VxWorks.

Hashing Methods
---------------

Expand Down
@@ -0,0 +1 @@
Don't build the ``_crypt`` extension on VxWorks.
13 changes: 7 additions & 6 deletions setup.py
Expand Up @@ -973,17 +973,18 @@ def detect_readline_curses(self):

def detect_crypt(self):
# crypt module.
if VXWORKS:
# bpo-31904: crypt() function is not provided by VxWorks.
# DES_crypt() OpenSSL provides is too weak to implement
# the encryption.
return

if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
libs = ['crypt']
else:
libs = []

if not VXWORKS:
self.add(Extension('_crypt', ['_cryptmodule.c'],
libraries=libs))
elif self.compiler.find_library_file(self.lib_dirs, 'OPENSSL'):
libs = ['OPENSSL']
self.add(Extension('_crypt', ['_cryptmodule.c'],
self.add(Extension('_crypt', ['_cryptmodule.c'],
libraries=libs))

def detect_socket(self):
Expand Down

0 comments on commit 236d0b7

Please sign in to comment.