msv/msv.h(3)
β¨ msv/msv.h β main public libmsv header file β¨
okay bestie, so this is the page for msv/msv.h(3), and it lives in the Library Functions Manual. it's the main public libmsv header file and honestly? it's giving backbone of the whole libmsv situation. let's get into it π«Ά
πΈ NAME πΈ
msv/msv.h β main public libmsv header file
π¦ SYNOPSIS π¦
#include <unistd.h>
π Data Structures π
struct msv_queryβ a query to the MSVAstruct msv_responseβ a response from the MSVA
π Macros π
#define LIBMSV_ERROR_SUCCESS 0β Success or absence of error.#define LIBMSV_ERROR_INVALID 1β Use of certificate could not be determined valid or was determined invalid.#define LIBMSV_ERROR_NOENVVAR 2β Environment variable was needed but was not set.#define LIBMSV_ERROR_CURLINIT_FAILED 3βcurl_easy_init()failed for unknown reason#define LIBMSV_ERROR_CURLCODE 4β an unspecified curl function failed#define LIBMSV_ERROR_INCOMPATIBLE_AGENT 5β MSVA was perceived as incompatible.#define LIBMSV_ERROR_BADARG 6β An argument to the function was invalid.#define LIBMSV_ERROR_UNEXPECTED_RESPONSE 7β The response from MSVA was unexpected.#define LIBMSV_ERROR_NOMEM 8β necessary memory allocation failedMSV_DEPRECATED(X)βX
π§ Typedefs π§
typedef struct msv_ctxt * msv_ctxt_tβ opaque MSVA context
π Functions π
msv_ctxt_t msv_ctxt_init (const char *url)β Return an MSV context.void msv_ctxt_destroy (msv_ctxt_t ctx)β Destroy an MSV context.const char * msv_strerror (msv_ctxt_t ctx, int error_code)β Return string describing libmsv error code.int msv_check_msva (msv_ctxt_t ctx)β Check suitability of Monkeysphere Validation Agent.int msv_query_agent (msv_ctxt_t ctx, struct msv_query q, struct msv_response **response_ptr)β Query validation agent for certificate validity.void msv_response_destroy (struct msv_response *response)β Destroy an MSV response.
π Detailed Description π
main public libmsv header file
like, that's it. that's the whole vibe. this header is the front door to libmsv, no cap. π β¨
π₯ Macro Definition Documentation π₯
π #define LIBMSV_ERROR_CURLCODE 4
an unspecified curl function failed.
and listen β the MSV context retains the curl error code for the last operation run within that context. so if you're wondering "which curl thing broke, bestie?", the context remembers. iykyk. π
β Function Documentation β
π int msv_check_msva (msv_ctxt_t ctx)
Check suitability of Monkeysphere Validation Agent.
Parameters:
ctxβ the MSV context
Returns:
0 for success, or libmsv error code
π void msv_ctxt_destroy (msv_ctxt_t ctx)
Destroy an MSV context.
Parameters:
ctxβ the MSV context to destroy
π msv_ctxt_t msv_ctxt_init (const char * url)
Return an MSV context.
Parameters:
urlβ URL for MSVA orNULLto useMONKEYSPHERE_VALIDATION_AGENT_SOCKETenvironment variable
Returns:
MSV context
pro tip from your girl: passNULLand theMONKEYSPHERE_VALIDATION_AGENT_SOCKETenv var takes over. the way that env var just carries the whole thing on its back ππ«Ά
π int msv_query_agent (msv_ctxt_t ctx, struct msv_query q, struct msv_response ** response_ptr)
Query validation agent for certificate validity.
Parameters:
ctxβ the MSV contextqβmsv_querystruct representing the MSVA queryresponse_ptrβ pointer to pointer tomsv_responsestruct that the caller is responsible for destroying viamsv_response_destroy
Returns:
0 for valid use of certificate, 1 for invalid use of certificate, or libmsv error code
π¨ okay important one: you, the caller, are responsible for destroying thatmsv_responsestruct viamsv_response_destroy. don't leave it hanging, bestie, that's not main character energy, that's a memory leak energy. π
π void msv_response_destroy (struct msv_response * response)
Destroy an MSV response.
Parameters:
responseβ the MSV response to destroy
π const char * msv_strerror (msv_ctxt_t ctx, int error_code)
Return string describing libmsv error code.
Parameters:
ctxβ the relevant MSV contexterror_codeβ return value of libmsv function
Returns:
string describing error
π Author π
Generated automatically by Doxygen for libmsv from the source code.
and that's the whole page, bestie!! π this was libmsv, dated Wed Feb 27 2019 β yeah she's an elder but she still ate. periodt. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libmsv-dev 1.1.1-3 Β· GPL-3.0-or-later
- ubuntu jammy: libmsv-dev 1.1.1-3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms