+static void keyexpire_handler(int fd, short events, void *event) {
+ ifdebug(STATUS) logger(LOG_INFO, _("Regenerating symmetric key"));
+
+ RAND_pseudo_bytes((unsigned char *)myself->key, myself->keylength);
+ if(myself->cipher)
+ EVP_DecryptInit_ex(&packet_ctx, myself->cipher, NULL, (unsigned char *)myself->key, (unsigned char *)myself->key + myself->cipher->key_len);
+ send_key_changed(broadcast, myself);
+
+ event_add(event, &(struct timeval){keylifetime, 0});
+}
+