OpenVPN
Data Structures | Macros | Enumerations | Functions
keyingmaterialexporter.c File Reference
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "openvpn-plugin.h"
Include dependency graph for keyingmaterialexporter.c:

Go to the source code of this file.

Data Structures

struct  plugin
 
struct  session
 

Macros

#define MAXPATH   1024
 
#define ovpn_err(fmt, ...)   plugin->log(PLOG_ERR, "SSO", fmt, ## __VA_ARGS__)
 
#define ovpn_dbg(fmt, ...)   plugin->log(PLOG_DEBUG, "SSO", fmt, ## __VA_ARGS__)
 
#define ovpn_note(fmt, ...)   plugin->log(PLOG_NOTE, "SSO", fmt, ## __VA_ARGS__)
 

Enumerations

enum  endpoint { CLIENT = 1, SERVER = 2 }
 

Functions

static const char * get_env (const char *name, const char *envp[])
 
OPENVPN_EXPORT int openvpn_plugin_open_v3 (const int version, struct openvpn_plugin_args_open_in const *args, struct openvpn_plugin_args_open_return *rv)
 
static void session_user_set (struct session *sess, X509 *x509)
 
static int tls_verify (struct openvpn_plugin_args_func_in const *args)
 
static void file_store (char *file, char *content)
 
static void server_store (struct openvpn_plugin_args_func_in const *args)
 
static void client_store (struct openvpn_plugin_args_func_in const *args)
 
static int tls_final (struct openvpn_plugin_args_func_in const *args, struct openvpn_plugin_args_func_return *rv)
 
OPENVPN_EXPORT int openvpn_plugin_func_v3 (const int version, struct openvpn_plugin_args_func_in const *args, struct openvpn_plugin_args_func_return *rv)
 
OPENVPN_EXPORT void * openvpn_plugin_client_constructor_v1 (openvpn_plugin_handle_t handle)
 
OPENVPN_EXPORT void openvpn_plugin_client_destructor_v1 (openvpn_plugin_handle_t handle, void *ctx)
 
OPENVPN_EXPORT void openvpn_plugin_close_v1 (openvpn_plugin_handle_t handle)
 

Macro Definition Documentation

◆ MAXPATH

#define MAXPATH   1024

Definition at line 38 of file keyingmaterialexporter.c.

◆ ovpn_dbg

#define ovpn_dbg (   fmt,
  ... 
)    plugin->log(PLOG_DEBUG, "SSO", fmt, ## __VA_ARGS__)

Definition at line 43 of file keyingmaterialexporter.c.

◆ ovpn_err

#define ovpn_err (   fmt,
  ... 
)    plugin->log(PLOG_ERR, "SSO", fmt, ## __VA_ARGS__)

Definition at line 41 of file keyingmaterialexporter.c.

◆ ovpn_note

#define ovpn_note (   fmt,
  ... 
)    plugin->log(PLOG_NOTE, "SSO", fmt, ## __VA_ARGS__)

Definition at line 45 of file keyingmaterialexporter.c.

Enumeration Type Documentation

◆ endpoint

enum endpoint
Enumerator
CLIENT 
SERVER 

Definition at line 48 of file keyingmaterialexporter.c.

Function Documentation

◆ client_store()

static void client_store ( struct openvpn_plugin_args_func_in const *  args)
static

◆ file_store()

static void file_store ( char *  file,
char *  content 
)
static

Definition at line 189 of file keyingmaterialexporter.c.

References http-client::f.

Referenced by client_store(), and server_store().

◆ get_env()

static const char* get_env ( const char *  name,
const char *  envp[] 
)
static

Definition at line 68 of file keyingmaterialexporter.c.

Referenced by openvpn_plugin_open_v3(), and tls_final().

◆ openvpn_plugin_client_constructor_v1()

OPENVPN_EXPORT void* openvpn_plugin_client_constructor_v1 ( openvpn_plugin_handle_t  handle)

Definition at line 272 of file keyingmaterialexporter.c.

References ovpn_note.

◆ openvpn_plugin_client_destructor_v1()

OPENVPN_EXPORT void openvpn_plugin_client_destructor_v1 ( openvpn_plugin_handle_t  handle,
void *  ctx 
)

Definition at line 283 of file keyingmaterialexporter.c.

References session::key, and ovpn_note.

◆ openvpn_plugin_close_v1()

OPENVPN_EXPORT void openvpn_plugin_close_v1 ( openvpn_plugin_handle_t  handle)

Definition at line 295 of file keyingmaterialexporter.c.

◆ openvpn_plugin_func_v3()

OPENVPN_EXPORT int openvpn_plugin_func_v3 ( const int  version,
struct openvpn_plugin_args_func_in const *  args,
struct openvpn_plugin_args_func_return rv 
)

◆ openvpn_plugin_open_v3()

OPENVPN_EXPORT int openvpn_plugin_open_v3 ( const int  version,
struct openvpn_plugin_args_open_in const *  args,
struct openvpn_plugin_args_open_return rv 
)

◆ server_store()

static void server_store ( struct openvpn_plugin_args_func_in const *  args)
static

◆ session_user_set()

static void session_user_set ( struct session sess,
X509 *  x509 
)
static

Definition at line 117 of file keyingmaterialexporter.c.

References session::user.

Referenced by tls_verify().

◆ tls_final()

static int tls_final ( struct openvpn_plugin_args_func_in const *  args,
struct openvpn_plugin_args_func_return rv 
)
static

◆ tls_verify()

static int tls_verify ( struct openvpn_plugin_args_func_in const *  args)
static