msv.h
Go to the documentation of this file.
#ifndef _MSV_H
#define _MSV_H 1
#include <unistd.h>
#define LIBMSV_ERROR_SUCCESS 0
#define LIBMSV_ERROR_INVALID 1
#define LIBMSV_ERROR_NOENVVAR 2
#define LIBMSV_ERROR_CURLINIT_FAILED 3
#define LIBMSV_ERROR_CURLCODE 4
#define LIBMSV_ERROR_INCOMPATIBLE_AGENT 5
#define LIBMSV_ERROR_BADARG 6
#define LIBMSV_ERROR_UNEXPECTED_RESPONSE 7
#define LIBMSV_ERROR_NOMEM 8
struct msv_ctxt;
typedef struct msv_ctxt *msv_ctxt_t;
struct msv_query
{
const char *context;
const char *peertype;
const char *peername;
const char *pkctype;
const char *pkcdata;
};
#ifdef HAVE_VAR_ATTRIBUTE_DEPRECATED
# define MSV_DEPRECATED(X) X __attribute__((deprecated))
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# define MSV_DEPRECATED(X) X __attribute__((deprecated))
#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define MSV_DEPRECATED(X) X __attribute__((__deprecated__))
#else
# define MSV_DEPRECATED(X) X
#endif
struct msv_response
{
int valid;
char *message;
size_t MSV_DEPRECATED(sz);
};
extern msv_ctxt_t msv_ctxt_init (const char *url);
extern void msv_ctxt_destroy (msv_ctxt_t ctx);
extern const char *msv_strerror (msv_ctxt_t ctx, int error_code);
extern int msv_check_msva (msv_ctxt_t ctx);
extern int msv_query_agent (msv_ctxt_t ctx, struct msv_query q,
struct msv_response **response_ptr);
extern void msv_response_destroy (struct msv_response *response);
#endif /* _MSV_H */
msv_query::pkctype
const char * pkctype
Definition: msv.h:77
msv_response::message
char * message
Definition: msv.h:98
msv_strerror
const char * msv_strerror(msv_ctxt_t ctx, int error_code)
Return string describing libmsv error code.
msv_response
a response from the MSVA
Definition: msv.h:95
msv_response::valid
int valid
Definition: msv.h:97
msv_response_destroy
void msv_response_destroy(struct msv_response *response)
Destroy an MSV response.
msv_query::context
const char * context
Definition: msv.h:74
msv_query::pkcdata
const char * pkcdata
Definition: msv.h:78
msv_ctxt_t
struct msv_ctxt * msv_ctxt_t
opaque MSVA context
Definition: msv.h:66
msv_ctxt_destroy
void msv_ctxt_destroy(msv_ctxt_t ctx)
Destroy an MSV context.
msv_query_agent
int msv_query_agent(msv_ctxt_t ctx, struct msv_query q, struct msv_response **response_ptr)
Query validation agent for certificate validity.
msv_query::peertype
const char * peertype
Definition: msv.h:75
msv_check_msva
int msv_check_msva(msv_ctxt_t ctx)
Check suitability of Monkeysphere Validation Agent.
msv_query::peername
const char * peername
Definition: msv.h:76
msv_ctxt_init
msv_ctxt_t msv_ctxt_init(const char *url)
Return an MSV context.
msv_query
a query to the MSVA
Definition: msv.h:72