Home GnuPG
Diffusion GnuPG 39c745038181

dirmngr: Add a magic field to the http structs.
39c745038181Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

dirmngr: Add a magic field to the http structs.

* dirmngr/http.c (HTTP_SESSION_MAGIC): New.
(http_session_s): New field 'magic'.
(HTTP_CONTEXT_MAGIC): New.
(http_context_s): New field 'magic'.
(my_ntbtls_verify_cb): Assert MAGIC.
(fp_onclose_notification): Ditto.
(session_unref): Ditto.  Reset MAGIC.
(http_session_new): Set MAGIC.
(http_open): Ditto.
(http_raw_connect): Ditto.
(http_close): Assert MAGIC.  Reset MAGIC.
* dirmngr/t-http.c (my_http_tls_verify_cb): MArk HTTP_FLAGS unused.

We pass those handles through opaque pointers. The magic numbers will
help to detect wrong use.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Feb 21 2017, 9:12 AM
Parents
rG3fc69224b7b2: g10: Support primary key generation by keygrip.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG39c745038181: dirmngr: Add a magic field to the http structs. (authored by Werner Koch <wk@gnupg.org>).Feb 21 2017, 9:13 AM