/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hash.h"
#include "iostream-ssl-private.h"
struct ssl_iostream_context_cache {
bool server;
};
static HASH_TABLE(struct ssl_iostream_context_cache *,
struct ssl_iostream_context *) ssl_iostream_contexts;
static unsigned int
{
unsigned int n, i, g, h = 0;
/* checking for different certs is typically good enough,
and it should be enough to check only the first few bytes (after the
"BEGIN CERTIFICATE" line). */
for (n = 0; n < N_ELEMENTS(cert); n++) {
continue;
h = (h << 4) + cert[n][i];
if ((g = h & 0xf0000000UL) != 0) {
h = h ^ (g >> 24);
h = h ^ g;
}
}
}
}
static int
const struct ssl_iostream_context_cache *c2)
{
return -1;
}
static int
bool server,
struct ssl_iostream_context **ctx_r,
const char **error_r)
{
};
if (ssl_iostream_contexts_pool == NULL) {
}
return 0;
}
/* add to cache */
if (server) {
return -1;
} else {
return -1;
}
struct ssl_iostream_context_cache, 1);
return 0;
}
struct ssl_iostream_context **ctx_r,
const char **error_r)
{
}
struct ssl_iostream_context **ctx_r,
const char **error_r)
{
}
void ssl_iostream_context_cache_free(void)
{
if (ssl_iostream_contexts_pool == NULL)
return;
}