<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15439</bug_id>
          
          <creation_ts>2024-03-10 23:29:40 +0000</creation_ts>
          <short_desc>python-cryptodomex has inconsistent internal imports causing ImportError</short_desc>
          <delta_ts>2024-09-17 15:58:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.0.21</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>eroderic</reporter>
          <assigned_to name="Steve Sakoman">steve</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98449</commentid>
    <comment_count>0</comment_count>
    <who name="">eroderic</who>
    <bug_when>2024-03-10 23:29:40 +0000</bug_when>
    <thetext>python-cryptodomex is a Python package that adds crypto based operations and is imported as `Cryptodome`. It is similar to python-cryptodome, (exactly the same functionality/codebase) which is imported as `Crytpo` for compatibility. 

A recent patch to Yocto, adds a patch file for both of these Python packages, however it uses &apos;Crypto&apos; imports for both packages. This means that the python-cryptodomex package, which uses the `Cryptodome` import, will have an import error when attempting to import cryptographic functions.

The patch in particular is &apos;python3-pycryptodome: Fix CVE-2023-52323&apos;, https://git.yoctoproject.org/poky/commit/?h=kirkstone&amp;id=e17cf6a549c53c48629d9454ec744fd2c824a83f

Amending the patch to pycryptodomex to use the correct imports seems to fix the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98467</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-03-14 14:39:19 +0000</bug_when>
    <thetext>Can you send a patch to the list please?
There seems to be some test code, you could add a ptest wrapper?
 -- YP bug review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99064</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-05-23 15:15:13 +0000</bug_when>
    <thetext>Did this get sent to the list and/or merged</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99523</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-08-08 15:07:39 +0000</bug_when>
    <thetext>On master, fixed by? 

06b4475c5e   2024-07-23   python3-pycryptodome(x): use python_setuptools_build_meta build class


Steve please check on the stable releases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99671</commentid>
    <comment_count>4</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2024-09-17 15:58:22 +0000</bug_when>
    <thetext>Fixed in kirkstone and scarthgap:

https://git.yoctoproject.org/poky/commit/?h=kirkstone&amp;id=7db7a86fbc28eb8b7616010ee4542664ee65ef4f

https://git.yoctoproject.org/poky/commit/?id=7db7a86fbc28eb8b7616010ee4542664ee65ef4f&amp;h=scarthgap</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>