Error while working in `FID` enabled systems

Nithin M S via reportlab-users <[email protected]> Thu, 6 Mar 2025 20:29:57 +0530
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CAGJuAP+r7-RMrPkUALBnFmqHEv_Ey7hD2R716gprjuozn=Qg4A@mail.gmail.com>
--===============6132386231843935099==
Content-Type: multipart/alternative; boundary="000000000000105be0062fadc3c0"

--000000000000105be0062fadc3c0
Content-Type: text/plain; charset="UTF-8"

Hi All,

While working on `Federal Information Processing Standard (FIPS)` enabled
systems like `RHEL`, getting the following error:
```
  File
"./vu_commons/reports/datasource/dashboards/dashboard_data_source.py", line
776, in add_reports_footer
  File
"/opt/app-root/lib64/python3.11/site-packages/reportlab/pdfgen/canvas.py",
line 305, in __init__
    self._doc = pdfdoc.PDFDocument(compression=pageCompression,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/opt/app-root/lib64/python3.11/site-packages/reportlab/pdfbase/pdfdoc.py",
line 137, in __init__
    sig = self.signature = md5()
                           ^^^^^
_hashlib.UnsupportedDigestmodError: [digital envelope routines] unsupported
```

I understand that this is an error from the `hashlib` library indicating
that the `md5` algorithm is not a safer algorithm.
There seems to be a work around for this by using something like `md5(...,
usedforsecurity=False)`.

Now, my question is whether it makes sense to implement `userforsecurity`
in reportlab or a different algorithm altogether to be safer from security
compliances.

Thanks

Regards,
Nithin

--000000000000105be0062fadc3c0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Hi All,<div><br></div><div>While working =
on `Federal Information Processing Standard (FIPS)` enabled systems like `R=
HEL`, getting the following error:<br></div><div>```</div><div>=C2=A0 File =
&quot;./vu_commons/reports/datasource/dashboards/dashboard_data_source.py&q=
uot;, line 776, in add_reports_footer<br>=C2=A0 File &quot;/opt/app-root/li=
b64/python3.11/site-packages/reportlab/pdfgen/canvas.py&quot;, line 305, in=
 __init__<br>=C2=A0 =C2=A0 self._doc =3D pdfdoc.PDFDocument(compression=3Dp=
ageCompression,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>=C2=A0 File &quot;/opt/a=
pp-root/lib64/python3.11/site-packages/reportlab/pdfbase/pdfdoc.py&quot;, l=
ine 137, in __init__<br>=C2=A0 =C2=A0 sig =3D self.signature =3D md5()<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0^^^^^<br>_hashlib.UnsupportedDigestmodError: [digit=
al envelope routines] unsupported<br></div><div>```</div><div><br></div><di=
v>I understand that this is an error from the `hashlib` library indicating =
that the `md5` algorithm is not a safer algorithm.</div><div>There seems to=
 be a work around for this by using something like `md5(..., usedforsecurit=
y=3DFalse)`.</div><div><br></div><div>Now, my question is whether it makes =
sense to implement `userforsecurity` in reportlab or a different algorithm=
=C2=A0altogether to be safer from security compliances.</div><div><br></div=
><div>Thanks</div><div><br></div><div>Regards,</div><div>Nithin</div></div>
</div>

--000000000000105be0062fadc3c0--

--===============6132386231843935099==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline