.TH "msv/msv.h" 3 "Sat Mar 16 2024 23:51:15" "libmsv" \" -*- nroff -*- .ad l .nh .SH NAME msv/msv.h \- main public libmsv header file .SH SYNOPSIS .br .PP \fC#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBmsv_query\fP" .br .RI "a query to the MSVA " .ti -1c .RI "struct \fBmsv_response\fP" .br .RI "a response from the MSVA " .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBLIBMSV_ERROR_SUCCESS\fP 0" .br .RI "Success or absence of error\&. " .ti -1c .RI "#define \fBLIBMSV_ERROR_INVALID\fP 1" .br .RI "Use of certificate could not be determined valid or was determined invalid\&. " .ti -1c .RI "#define \fBLIBMSV_ERROR_NOENVVAR\fP 2" .br .RI "Environment variable was needed but was not set\&. " .ti -1c .RI "#define \fBLIBMSV_ERROR_CURLINIT_FAILED\fP 3" .br .RI "curl_easy_init() failed for unknown reason " .ti -1c .RI "#define \fBLIBMSV_ERROR_CURLCODE\fP 4" .br .RI "an unspecified curl function failed " .ti -1c .RI "#define \fBLIBMSV_ERROR_INCOMPATIBLE_AGENT\fP 5" .br .RI "MSVA was perceived as incompatible\&. " .ti -1c .RI "#define \fBLIBMSV_ERROR_BADARG\fP 6" .br .RI "An argument to the function was invalid\&. " .ti -1c .RI "#define \fBLIBMSV_ERROR_UNEXPECTED_RESPONSE\fP 7" .br .RI "The response from MSVA was unexpected\&. " .ti -1c .RI "#define \fBLIBMSV_ERROR_NOMEM\fP 8" .br .RI "necessary memory allocation failed " .ti -1c .RI "#define \fBMSV_DEPRECATED\fP(X) X" .br .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct msv_ctxt * \fBmsv_ctxt_t\fP" .br .RI "opaque MSVA context " .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBmsv_ctxt_t\fP \fBmsv_ctxt_init\fP (const char *url)" .br .RI "Return an MSV context\&. " .ti -1c .RI "void \fBmsv_ctxt_destroy\fP (\fBmsv_ctxt_t\fP ctx)" .br .RI "Destroy an MSV context\&. " .ti -1c .RI "const char * \fBmsv_strerror\fP (\fBmsv_ctxt_t\fP ctx, int error_code)" .br .RI "Return string describing libmsv error code\&. " .ti -1c .RI "int \fBmsv_check_msva\fP (\fBmsv_ctxt_t\fP ctx)" .br .RI "Check suitability of Monkeysphere Validation Agent\&. " .ti -1c .RI "int \fBmsv_query_agent\fP (\fBmsv_ctxt_t\fP ctx, struct \fBmsv_query\fP q, struct \fBmsv_response\fP **response_ptr)" .br .RI "Query validation agent for certificate validity\&. " .ti -1c .RI "void \fBmsv_response_destroy\fP (struct \fBmsv_response\fP *response)" .br .RI "Destroy an MSV response\&. " .in -1c .SH "Detailed Description" .PP main public libmsv header file .SH "Macro Definition Documentation" .PP .SS "#define LIBMSV_ERROR_CURLCODE 4" .PP an unspecified curl function failed The MSV context retains the curl error code for the last operation run within that context .SH "Function Documentation" .PP .SS "int msv_check_msva (\fBmsv_ctxt_t\fP ctx)\fC [extern]\fP" .PP Check suitability of Monkeysphere Validation Agent\&. .PP \fBParameters\fP .RS 4 \fIctx\fP the MSV context .RE .PP \fBReturns\fP .RS 4 0 for success, or libmsv error code .RE .PP .SS "void msv_ctxt_destroy (\fBmsv_ctxt_t\fP ctx)\fC [extern]\fP" .PP Destroy an MSV context\&. .PP \fBParameters\fP .RS 4 \fIctx\fP the MSV context to destroy .RE .PP .SS "\fBmsv_ctxt_t\fP msv_ctxt_init (const char * url)\fC [extern]\fP" .PP Return an MSV context\&. .PP \fBParameters\fP .RS 4 \fIurl\fP URL for MSVA or NULL to use MONKEYSPHERE_VALIDATION_AGENT_SOCKET environment variable .RE .PP \fBReturns\fP .RS 4 MSV context .RE .PP .SS "int msv_query_agent (\fBmsv_ctxt_t\fP ctx, struct \fBmsv_query\fP q, struct \fBmsv_response\fP ** response_ptr)\fC [extern]\fP" .PP Query validation agent for certificate validity\&. .PP \fBParameters\fP .RS 4 \fIctx\fP the MSV context .br \fIq\fP \fBmsv_query\fP struct representing the MSVA query .br \fIresponse_ptr\fP pointer to pointer to \fBmsv_response\fP struct that the caller is responsible for destroying via \fImsv_response_destroy\fP .RE .PP \fBReturns\fP .RS 4 0 for valid use of certificate, 1 for invalid use of certificate, or libmsv error code .RE .PP .SS "void msv_response_destroy (struct \fBmsv_response\fP * response)\fC [extern]\fP" .PP Destroy an MSV response\&. .PP \fBParameters\fP .RS 4 \fIresponse\fP the MSV response to destroy .RE .PP .SS "const char * msv_strerror (\fBmsv_ctxt_t\fP ctx, int error_code)\fC [extern]\fP" .PP Return string describing libmsv error code\&. .PP \fBParameters\fP .RS 4 \fIctx\fP the relevant MSV context .br \fIerror_code\fP return value of libmsv function .RE .PP \fBReturns\fP .RS 4 string describing error .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libmsv from the source code\&.