secsrv_private.h revision 8f2a34cc6964a1f80a1434e05315a7ae0bb5774e
/*
SSSD
Secrets Responder, private header file
Copyright (C) Simo Sorce <ssorce@redhat.com> 2016
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SECSRV_PRIVATE_H__
#define __SECSRV_PRIVATE_H__
#include "config.h"
#include "responder/common/responder.h"
#include <http_parser.h>
struct sec_kvp {
char *name;
char *value;
};
struct sec_data {
char *data;
};
enum sec_http_status_codes {
STATUS_200 = 0,
};
struct sec_proto_ctx {
};
struct sec_url {
char *schema;
char *host;
int port;
char *path;
char *query;
char *fragment;
char *userinfo;
};
struct sec_req_ctx {
const char *base_path;
const char *cfg_section;
bool complete;
char *request_url;
char *mapped_path;
enum http_method method;
struct sec_url parsed_url;
int num_headers;
};
struct tevent_context *ev,
void *provider_ctx,
struct sec_req_ctx *secreq);
struct provider_handle {
const char *name;
void *context;
};
struct provider_handle **out_handle);
#define SEC_BASEPATH "/secrets/"
/* providers.c */
struct provider_handle **handle);
enum sec_http_status_codes code);
enum sec_http_status_codes code,
const char *content_type,
int status_code, const char *reason,
const char *input,
char **secret);
const char *secret,
char **output);
char **output);
/* secsrv_cmd.c */
#define SEC_REQUEST_MAX_SIZE 65536
#define SEC_PACKET_MAX_RECV_SIZE 8192
#endif /* __SECSRV_PRIVATE_H__ */