Closed by commit rHGbde1cd4c99d9: sha1dc: initial implementation of Python
extension (authored by durin42).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7815?vs=19188&id=19198
CHA
durin42 marked an inline comment as done.
durin42 updated this revision to Diff 19188.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7815?vs=19119&id=19188
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7815/new/
REVISION D
durin42 added a comment.
durin42 marked 3 inline comments as done.
Good call on tests, I had the return type of `hexdigest()` wrong. Please do
let me know if you think of any missing cases here.
INLINE COMMENTS
> indygreg wrote in cext.c:68
> I'm not super keen on overloading `OverflowError`
indygreg added a comment.
This seems mostly good to me.
INLINE COMMENTS
> cext.c:68
> + if (SHA1DCFinal(hash_out, &ctx)) {
> + PyErr_SetString(PyExc_OverflowError,
> + "sha1 collision attack detected");
I'm not super keen on overloading `OverflowEr
durin42 edited the summary of this revision.
durin42 retitled this revision from "sha1dc: initial implementation of Python
extension (NOT READY)" to "sha1dc: initial implementation of Python extension".
durin42 updated this revision to Diff 19119.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UP
durin42 added inline comments.
durin42 marked 4 inline comments as done.
INLINE COMMENTS
> spectral wrote in cext.c:24
> Nit: "clang-format on" (typo: s/oon/on/)
Good catch!
> spectral wrote in cext.c:104
> I think you need a {NULL} entry here, or else it's going to walk off the end
> of this
durin42 updated this revision to Diff 19116.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7815?vs=19115&id=19116
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7815/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D78
durin42 edited the summary of this revision.
durin42 updated this revision to Diff 19115.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7815?vs=19113&id=19115
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7815/new/
REVISIO
spectral added inline comments.
INLINE COMMENTS
> cext.c:24
> +} pysha1ctx;
> +/* clang-format oon */
> +
Nit: "clang-format on" (typo: s/oon/on/)
> cext.c:104
> + "Return a copy of the hash object."},
> +};
> +
I think you need a {NULL} entry here, or else it's going to walk off the end
durin42 updated this revision to Diff 19113.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7815?vs=19112&id=19113
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7815/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D78
durin42 created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This is not yet ready: there's some bug (probably a simple oversight)
that causes it to segfault inside PyType_Ready() during import of the
module.
RE
11 matches
Mail list logo