TLSRPT_INIT_POLICY(3)

✨ TLSRPT_INIT_POLICY ✨

okay bestie, buckle up, we're doing the tlsrpt_init_policy page from section 3 of the manual πŸ’… it's giving very specific, very useful, very "you need this if you're building TLS reporting stuff" energy.


πŸ’– NAME πŸ’–

tlsrpt_init_policy β€” she initializes a brand new policy inside a delivery request that already exists 🫢


🌸 SYNOPSIS 🌸

#include <tlsrpt.h>

int tlsrpt_init_policy(struct tlsrpt_dr_t* dr, tlsrpt_policy_type_t
policy_type, * const char* policydomainname)

πŸ¦‹ DESCRIPTION πŸ¦‹

so the tlsrpt_init_policy function starts up a fresh new policy within an existing delivery request. and like, real talk: a delivery request must contain at least one policy. not optional. no cap. πŸ’€

after you call this, you gotta properly complete the policy by calling some of the functions below πŸ‘‡ and then a final call to tlsrpt_finish_policy seals the deal ✨

🚨 bestie warning, this one matters: an unfinished policy sitting after some properly finished policies will make the whole delivery request datagram fail β€” and it won't get sent out at all 😭 which means all those other already-completed policies don't get reported either. gone. not it. so finish your policies, okay?? πŸ₯Ί

⭐ RETURN VALUE ⭐

she returns 0 on success πŸŽ€ and on failure you get a combined error code. you can break that combined error code down with the tlsrpt_strerror function β€” it's literally the translator for your error drama πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

  • man:tlsrpt_finish_policy[3]
  • man:tlsrpt_strerror[3]
  • man:tlsrpt_error_code_is_internal[3]

🌈 AUTHOR 🌈

Boris Lohner πŸ’œ (yes, the legend himself)


and that's a wrap on tlsrpt_init_policy from TLSRPT_INIT_POLICY(3) πŸ’… this page is dated 2026-05-12, brought to you under the manual name tlsrpt_init_policy β€” go forth and finish your policies, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from