|
|
|
@ -47,21 +47,27 @@ void on_key_generate_accept(GtkWidget *self, key_creation_window* window){
|
|
|
|
const char *password_confirm = gtk_entry_get_text(GTK_ENTRY(window->PasswordConfirmationEntry));
|
|
|
|
const char *password_confirm = gtk_entry_get_text(GTK_ENTRY(window->PasswordConfirmationEntry));
|
|
|
|
int ex_status=0;
|
|
|
|
int ex_status=0;
|
|
|
|
if (yon_char_is_empty(password)&&yon_char_is_empty(password_confirm)){
|
|
|
|
if (yon_char_is_empty(password)&&yon_char_is_empty(password_confirm)){
|
|
|
|
yon_debug_output("%s\n",yon_generate_key_no_password_command(type,name,email,strength,comment,expire,password));
|
|
|
|
|
|
|
|
ex_status = system(yon_debug_output("%s\n",yon_generate_key_no_password_command(type,name,email,strength,comment,expire,password)));
|
|
|
|
char *command = yon_generate_key_no_password_command(type,name,email,strength,comment,expire,password);
|
|
|
|
|
|
|
|
yon_debug_output("%s\n",command);
|
|
|
|
|
|
|
|
yon_terminal_window_launch_shell(GTK_WINDOW(window->Window),(yon_debug_output("%s\n",command)),yon_char_get_localised_from_lib(SUCCESS_LABEL),yon_char_get_localised_from_lib(FAIL_LABEL));
|
|
|
|
} else if (!strcmp(password,password_confirm)){
|
|
|
|
} else if (!strcmp(password,password_confirm)){
|
|
|
|
yon_debug_output("%s\n",yon_generate_key_command(type,name,email,strength,comment,expire,password));
|
|
|
|
for (int i=0;i<strlen(password);i++){
|
|
|
|
ex_status = system(yon_debug_output("%s\n",yon_generate_key_command(type,name,email,strength,comment,expire,password)));
|
|
|
|
if (!g_ascii_isgraph(password[i])){
|
|
|
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
char *command = yon_generate_key_command(type,name,email,strength,comment,expire,password);
|
|
|
|
|
|
|
|
yon_debug_output("%s\n",command);
|
|
|
|
|
|
|
|
yon_terminal_window_launch_shell(GTK_WINDOW(window->Window),yon_debug_output("%s\n",command),yon_char_get_localised_from_lib(SUCCESS_LABEL),yon_char_get_localised_from_lib(FAIL_LABEL));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_INCORRECT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_INCORRECT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordConfirmationEntry);
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordConfirmationEntry);
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!ex_status)
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(KEY_CREATION_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(KEY_CREATION_FAILURE_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
gtk_widget_destroy(window->Window);
|
|
|
|
gtk_widget_destroy(window->Window);
|
|
|
|
yon_sign_list_update();
|
|
|
|
yon_sign_list_update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|