Football transport implementations for Secure Transport (OS X).
More...
#include <config.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "fb_public.h"
#include "fb_transport.h"
#include "fb_service.h"
#include <CoreFoundation/CoreFoundation.h>
#include <Security/SecCertificate.h>
#include <Security/SecIdentity.h>
#include <Security/SecureTransport.h>
|
|
#define | SSLHasClosed(status) (((status) == errSSLClosedAbort || (status) == errSSLClosedGraceful || (status) == errSSLClosedNoNotify)) |
| |
|
| char * | fb_base64_decode (const char *data, const char *end_data, int *length) |
| | Decode some base-64 encoded data.
|
| |
| char * | load_pem_thing (const char *filename, const char *object_type, int *length) |
| | Extract a base 64 encoded, delimited data block from a PEM formatted file.
|
| |
|
bool | fb_securetransport_configure (const FB_TLS_CONFIG_FILENAMES *paths) |
| |
|
OSStatus | fb_SSLWriteFunc (SSLConnectionRef connection, const void *data, size_t *dataLength) |
| |
|
bool | fb_securetransport_init (FB_CONNECTION *connection) |
| |
|
ssize_t | fb_securetransport_handshake (struct fb_connection_t *connection) |
| | Perform TLS handshaking on a new connection. Return incomplete, failure, or 0.
|
| |
|
ssize_t | fb_securetransport_buffering (struct fb_connection_t *connection) |
| | Query number of bytes in TLS buffers.
|
| |
|
ssize_t | fb_securetransport_read (struct fb_connection_t *connection, char *data, ssize_t byte_count) |
| |
|
ssize_t | fb_securetransport_write (struct fb_connection_t *connection, const char *data, ssize_t byte_count) |
| |
|
void | fb_securetransport_done (FB_CONNECTION *connection) |
| |
|
void | fb_securetransport_cleanup () |
| |
Football transport implementations for Secure Transport (OS X).
- Football socket abstraction layer
- Author
- Perette Barella
- Date
- 2016-03-11
- Copyright
- Copyright 2016-2017 Devious Fish. All rights reserved.
◆ fb_base64_decode()
| char * fb_base64_decode |
( |
const char * |
data, |
|
|
const char * |
end_data, |
|
|
int * |
length |
|
) |
| |
Decode some base-64 encoded data.
- Parameters
-
| data | The start of the data. Whitespace in data is ignored. |
| end_data | The end of the data. |
| length | The length of the decoded binary data. |
- Returns
- A pointer to malloc'ed data blocked, or nullptr on error.
- Warning
- The returned data block must be freed.
◆ load_pem_thing()
| char * load_pem_thing |
( |
const char * |
filename, |
|
|
const char * |
object_type, |
|
|
int * |
length |
|
) |
| |
Extract a base 64 encoded, delimited data block from a PEM formatted file.
- Parameters
-
| filename | The file. |
| object_type | The type of block to extract. |
| length | The length of the resulting data block. |
- Returns
- A pointer to the extracted data blocked, or nullptr on error.
- Warning
- The returned data block must be freed.
◆ fb_transport_encrypted
Initial value:= {
.configure = fb_securetransport_configure,
.cleanup = fb_securetransport_cleanup,
.init = fb_securetransport_init,
.read = fb_securetransport_read,
.write = fb_securetransport_write,
.done = fb_securetransport_done
}
ssize_t fb_securetransport_buffering(struct fb_connection_t *connection)
Query number of bytes in TLS buffers.
Definition fb_transport_osx.c:277
ssize_t fb_securetransport_handshake(struct fb_connection_t *connection)
Perform TLS handshaking on a new connection. Return incomplete, failure, or 0.
Definition fb_transport_osx.c:261