static void signing_info(struct smp_conn *conn, const void *data, uint16_t len)
{
	conn->remote_key_dist &= ~DIST_SIGN;

	if (conn->out && !conn->remote_key_dist)
		distribute_keys(conn);
}
static void master_ident(struct smp_conn *conn, const void *data, uint16_t len)
{
	conn->remote_key_dist &= ~DIST_ENC_KEY;

	if (conn->out && !conn->remote_key_dist)
		distribute_keys(conn);
}
static void ident_info(struct smp_conn *conn, const void *data, uint16_t len)
{
	conn->remote_key_dist &= ~DIST_ID_KEY;

	if (conn->out && !conn->remote_key_dist)
		distribute_keys(conn);
}
void smp_conn_encrypted(void *conn_data, uint8_t encrypt)
{
	struct smp_conn *conn = conn_data;

	if (!encrypt)
		return;

	if (conn->out && conn->remote_key_dist)
		return;

	distribute_keys(conn);
}
예제 #5
0
int main(int argc, char **argv) {

	int o;
	opterr = 0;
	
	while ((o = getopt(argc, argv, "v")) != EOF) {
		switch (o) {
		case 'v':{
			set_debug() ;
			break;
		}
		default:{
			}
		}
	}
	load_keys("/etc/keymgr/keys") ;
	// printf("%s\n",get_key("duarte_laptop") ) ;
	distribute_keys() ;
	return(0) ;

}