---
name: "tlsrpt_finish_policy"
section: "3"
platform: "linux"
package: "libtlsrpt"
version: "0.5.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/tlsrpt_finish_policy"
---

# tlsrpt\_finish\_policy(3)

finishes a policy within a delivery request

## NAME

tlsrpt\_finish\_policy - finishes a policy within a delivery request

## SYNOPSIS

\#include \<tlsrpt.h\>

int tlsrpt\_finish\_policy(struct tlsrpt\_dr\_t\* dr, tlsrpt\_final\_result\_t final\_result)

## DESCRIPTION

The `tlsrpt_finish_policy` function finishes a policy within a delivery request. It frees all the resources allocated by `tlsrpt_init_policy`. Every call to `tlsrpt_init_policy` must be matched by a call to `tlsrpt_finish_policy`!

**Note**\

No plausibility checks are done by the library regarding the number of failures added to this policy and the final result. It is just as well possible to finish a poliy as `TLSRPT_FINAL_FAILURE` with no failures added at all, as it is possible to finish a poliy as `TLSRPT_FINAL_SUCCESS` with one or more failures added.

## RETURN VALUE

The tlsrpt\_finish\_policy function returns 0 on success and a combined error code on failure. The combined error code can be analyzed with the *tlsrpt\_strerror* function.

## SEE ALSO

man:tlsrpt\_init\_policy\[3\], man:tlsrpt\_strerror\[3\], man:tlsrpt\_error\_code\_is\_internal\[3\]

## AUTHOR

Boris Lohner
