OpenVPN
Functions
mock_ssl_dependencies.c File Reference
#include "syshead.h"
#include <setjmp.h>
#include <cmocka.h>
#include "ssl.h"
#include "ssl_verify.h"
Include dependency graph for mock_ssl_dependencies.c:

Go to the source code of this file.

Functions

int parse_line (const char *line, char **p, const int n, const char *file, const int line_num, int msglevel, struct gc_arena *gc)
 
int pem_password_callback (char *buf, int size, int rwflag, void *u)
 Callback to retrieve the user's password. More...
 
void cert_hash_remember (struct tls_session *session, const int cert_depth, const struct buffer *cert_hash)
 
result_t verify_cert (struct tls_session *session, openvpn_x509_cert_t *cert, int cert_depth)
 

Function Documentation

◆ cert_hash_remember()

void cert_hash_remember ( struct tls_session session,
const int  cert_depth,
const struct buffer cert_hash 
)

◆ parse_line()

int parse_line ( const char *  line,
char **  p,
const int  n,
const char *  file,
const int  line_num,
int  msglevel,
struct gc_arena gc 
)

Definition at line 41 of file mock_ssl_dependencies.c.

◆ pem_password_callback()

int pem_password_callback ( char *  buf,
int  size,
int  rwflag,
void *  u 
)

Callback to retrieve the user's password.

Parameters
bufBuffer to return the password in
sizeSize of the buffer
rwflagUnused, needed for OpenSSL compatibility
uUnused, needed for OpenSSL compatibility

Definition at line 51 of file mock_ssl_dependencies.c.

References passbuf, user_pass::password, pem_password_setup(), purge_user_pass(), and strncpynt().

◆ verify_cert()

result_t verify_cert ( struct tls_session session,
openvpn_x509_cert_t cert,
int  cert_depth 
)