Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong documentation of RAND_egd function in ssl module #62968

Closed
vajrasky mannequin opened this issue Aug 17, 2013 · 5 comments
Closed

Wrong documentation of RAND_egd function in ssl module #62968

vajrasky mannequin opened this issue Aug 17, 2013 · 5 comments
Labels
docs Documentation in the Doc dir

Comments

@vajrasky
Copy link
Mannequin

vajrasky mannequin commented Aug 17, 2013

BPO 18768
Nosy @tiran, @vajrasky
Files
  • fix_documentation_on_rand_egd_function.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2013-08-17.15:27:17.796>
    created_at = <Date 2013-08-17.15:15:39.368>
    labels = ['docs']
    title = 'Wrong documentation of RAND_egd function in ssl module'
    updated_at = <Date 2013-08-17.15:27:17.795>
    user = 'https://github.com/vajrasky'

    bugs.python.org fields:

    activity = <Date 2013-08-17.15:27:17.795>
    actor = 'christian.heimes'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2013-08-17.15:27:17.796>
    closer = 'christian.heimes'
    components = ['Documentation']
    creation = <Date 2013-08-17.15:15:39.368>
    creator = 'vajrasky'
    dependencies = []
    files = ['31338']
    hgrepos = []
    issue_num = 18768
    keywords = ['patch']
    message_count = 5.0
    messages = ['195482', '195483', '195484', '195485', '195486']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'docs@python', 'python-dev', 'vajrasky']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue18768'
    versions = ['Python 3.3', 'Python 3.4']

    @vajrasky
    Copy link
    Mannequin Author

    vajrasky mannequin commented Aug 17, 2013

    >>> import ssl
    >>> ssl.RAND_egd.__doc__
    "RAND_egd(path) -> bytes\n\nQueries the entropy gather daemon (EGD) on the socket named by 'path'.\nReturns number of bytes read.  Raises SSLError if connection to EGD\nfails or if it does provide enough data to seed PRNG."

    Compare it to documentation about RAND_egd() function from openssl website (https://www.openssl.org/docs/crypto/RAND_egd.html):

    RAND_egd() and RAND_egd_bytes() return the number of bytes read from the daemon on success, and -1 if the connection failed or the daemon did not return enough data to fully seed the PRNG.

    Attached the patch to fix the documentation. I am not sure whether we should put the word "fully" or not.

    On the side note:
    In line 813 in Modules/_ssl.c (the same file where my patch fixed the documentation about RAND_egd function):

    gntype = name-> type;

    The space between "->" and "type" irritates my eyes. Maybe we can fix this while we fix the documentation? Anyway, this is not really important. I just want to expose it to public and think this does not deserve a dedicated ticket.

    @vajrasky vajrasky mannequin assigned docspython Aug 17, 2013
    @vajrasky vajrasky mannequin added the docs Documentation in the Doc dir label Aug 17, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 17, 2013

    New changeset b352a5cb60b6 by Christian Heimes in branch '3.3':
    Issue bpo-18768: coding style nitpick. Thanks to Vajrasky Kok
    http://hg.python.org/cpython/rev/b352a5cb60b6

    New changeset fe444f324756 by Christian Heimes in branch 'default':
    Issue bpo-18768: coding style nitpick. Thanks to Vajrasky Kok
    http://hg.python.org/cpython/rev/fe444f324756

    New changeset a8787a6fa107 by Christian Heimes in branch '2.7':
    Issue bpo-18768: coding style nitpick. Thanks to Vajrasky Kok
    http://hg.python.org/cpython/rev/a8787a6fa107

    @tiran
    Copy link
    Member

    tiran commented Aug 17, 2013

    Thanks, I have removed the extra space in gntype = name-> type;

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 17, 2013

    New changeset ae91252943bf by Christian Heimes in branch '3.3':
    bpo-18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
    http://hg.python.org/cpython/rev/ae91252943bf

    New changeset 5c091acc799f by Christian Heimes in branch 'default':
    bpo-18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
    http://hg.python.org/cpython/rev/5c091acc799f

    New changeset 31389495cdbf by Christian Heimes in branch '2.7':
    bpo-18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
    http://hg.python.org/cpython/rev/31389495cdbf

    @tiran
    Copy link
    Member

    tiran commented Aug 17, 2013

    Thanks :)

    @tiran tiran closed this as completed Aug 17, 2013
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant