This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, gregory.p.smith
Date 2022-03-23.19:45:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648064738.19.0.645334718673.issue47102@roundup.psfhosted.org>
In-reply-to
Content
We don't need libkcapi. I added AF_ALG support a while ago:

import binascii
import os
import socket

with socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0) as cfgsock:
    cfgsock.bind(("hash", "sha256"))
    opsock, _ = cfgsock.accept()
    with opsock:
        with open("/etc/os-release") as f:
            st = os.fstat(f.fileno())
            # blindly assumes that sendfile() exhausts the fd.
            os.sendfile(
                opsock.fileno(), f.fileno(), offset=0, count=st.st_size
            )
            res = opsock.recv(512)
        print(binascii.hexlify(res))
History
Date User Action Args
2022-03-23 19:45:38christian.heimessetrecipients: + christian.heimes, gregory.p.smith
2022-03-23 19:45:38christian.heimessetmessageid: <1648064738.19.0.645334718673.issue47102@roundup.psfhosted.org>
2022-03-23 19:45:38christian.heimeslinkissue47102 messages
2022-03-23 19:45:38christian.heimescreate