bin_PROGRAMS= tr/tr tid/example/tidc tid/example/tids common/dh_test/tr_dh_test
AM_CPPFLAGS=-I$(srcdir)/include
+AM_CFLAGS = -Wall -Werror=missing-prototypes -Werror=strict-prototypes -Wno-parentheses
SUBDIRS = gsscon
common_srcs = common/tr_name.c \
common/tr_msg.c \
*/
#include <openssl/dh.h>
+#include <tr_dh.h>
unsigned char tr_2048_dhprime[2048/8] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
return dh;
}
-json_t *tr_msg_encode_tidreq(TID_REQ *req)
+static json_t * tr_msg_encode_tidreq(TID_REQ *req)
{
json_t *jreq = NULL;
json_t *jstr = NULL;
return jreq;
}
-TID_REQ *tr_msg_decode_tidreq(json_t *jreq)
+static TID_REQ *tr_msg_decode_tidreq(json_t *jreq)
{
TID_REQ *treq = NULL;
json_error_t rc;
return treq;
}
-json_t *tr_msg_encode_tidresp(TID_RESP *resp)
+static json_t * tr_msg_encode_tidresp(TID_RESP *resp)
{
json_t *jresp = NULL;
json_t *jstr = NULL;
return jresp;
}
-TID_RESP *tr_msg_decode_tidresp(json_t *jresp)
+static TID_RESP *tr_msg_decode_tidresp(json_t *jresp)
{
TID_RESP *tresp = NULL;
json_error_t rc;
DH *tr_create_dh_params(char *key, size_t len);
DH *tr_create_matching_dh(char *key, size_t len, DH *in_dh);
void tr_destroy_dh_params(DH *dh);
-int tr_compute_dh_key(char *buf, size_t buflen, BIGNUM *pub_key, DH *priv_dh);
+int tr_compute_dh_key(unsigned char *buf, size_t buflen, BIGNUM *pub_key, DH *priv_dh);
#endif
TR_EXPORT int tidc_send_request (TIDC_INSTANCE *tidc, int conn, gss_ctx_id_t gssctx, char *rp_realm, char *realm, char *coi, TIDC_RESP_FUNC *resp_handler, void *cookie);
TR_EXPORT void tidc_destroy (TIDC_INSTANCE *tidc);
-TR_EXPORT TIDS_INSTANCE *tids_create ();
+TR_EXPORT TIDS_INSTANCE *tids_create (void);
TR_EXPORT int tids_start (TIDS_INSTANCE *tids, TIDS_REQ_FUNC *req_handler, void *cookie);
TR_EXPORT void tids_destroy (TIDS_INSTANCE *tids);
static int tidc_response_received = 0;
-void tidc_print_usage (const char *name)
+void static tidc_print_usage (const char *name)
{
printf("Usage: %s <server> <RP-realm> <target-realm> <community>\n", name);
}
-void tidc_resp_handler (TIDC_INSTANCE * tidc,
+static void tidc_resp_handler (TIDC_INSTANCE * tidc,
TID_RESP *resp,
void *cookie)
{
#include <trust_router/tid.h>
-int tids_req_handler (TIDS_INSTANCE * tids,
+static int tids_req_handler (TIDS_INSTANCE * tids,
TID_REQ *req,
TID_RESP *resp,
void *cookie)
return -1;
}
- fprintf(stdout, "Response Received, %d bytes.\n", resp_buflen);
+ fprintf(stdout, "Response Received, %u bytes.\n", (unsigned) resp_buflen);
/* Parse response -- TBD */
return -1;
}
- fprintf(stdout, "Request Received, %d bytes.\n", buflen);
+ fprintf(stdout, "Request Received, %u bytes.\n", (unsigned) buflen);
/* Parse request -- TBD */
return;
}
-TIDS_INSTANCE *tids_create ()
+TIDS_INSTANCE *tids_create (void)
{
TIDS_INSTANCE *tids = 0;
if (tids = malloc(sizeof(TIDS_INSTANCE)))
#include <tr.h>
-int tids_req_handler (TIDS_INSTANCE * tids,
+int static tids_req_handler (TIDS_INSTANCE * tids,
TID_REQ *req,
TID_RESP *resp,
void *cookie)