aboutsummaryrefslogtreecommitdiffstats
path: root/ui/win32
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-10-16 18:14:16 +0000
committerGerald Combs <gerald@wireshark.org>2012-10-16 18:14:16 +0000
commit403e6dc86a55a12f1cf586093d4b6a8fa62f91ba (patch)
treee5155f0cc0e573dda3d6055122dcd16b39440083 /ui/win32
parent5bcb56b21c1c102001a2b50651ed3e6c9815dc64 (diff)
Move common SSL key export routines to ui/ssl_key_export.[ch]. Make the
exported keys a gchar *. Implement SSL key exports in the Qt UI. Remove some no-longer-necessary packet-ssl*.h includes. Change lastOpenDir().absolutePath() to .canonicalPath(). Get rid of the "Export As PostScript" action. svn path=/trunk/; revision=45589
Diffstat (limited to 'ui/win32')
-rw-r--r--ui/win32/file_dlg_win32.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c
index 3ec0a3f9f8..88341eb7d3 100644
--- a/ui/win32/file_dlg_win32.c
+++ b/ui/win32/file_dlg_win32.c
@@ -43,8 +43,6 @@
#include "epan/filesystem.h"
#include "epan/addr_resolv.h"
#include "epan/prefs.h"
-#include "epan/dissectors/packet-ssl.h"
-#include "epan/dissectors/packet-ssl-utils.h"
#include "wsutil/file_util.h"
#include "wsutil/unicode-utils.h"
@@ -57,6 +55,7 @@
#include "ui/file_dialog.h"
#include "ui/last_open_dir.h"
#include "ui/simple_dialog.h"
+#include "ui/ssl_key_export.h"
#include "ui/util.h"
#include "ui/gtk/main.h"
@@ -809,7 +808,7 @@ win32_export_sslkeys_file(HWND h_wnd) {
OPENFILENAME *ofn;
TCHAR file_name[MAX_PATH] = _T("");
char *dirname;
- StringInfo *keylist;
+ gchar *keylist;
char *file_name8;
int fd;
int ofnsize;
@@ -818,7 +817,7 @@ win32_export_sslkeys_file(HWND h_wnd) {
OSVERSIONINFO osvi;
#endif
- keylist_size = g_hash_table_size(ssl_session_hash);
+ keylist_size = ssl_session_key_count();
if (keylist_size==0) {
/* This shouldn't happen */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No SSL Session Keys to export.");
@@ -864,7 +863,7 @@ win32_export_sslkeys_file(HWND h_wnd) {
if (GetSaveFileName(ofn)) {
g_free( (void *) ofn);
file_name8 = utf_16to8(file_name);
- keylist = ssl_export_sessions(ssl_session_hash);
+ keylist = ssl_export_sessions();
fd = ws_open(file_name8, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666);
if (fd == -1) {
open_failure_alert_box(file_name8, errno, TRUE);
@@ -875,7 +874,7 @@ win32_export_sslkeys_file(HWND h_wnd) {
* Thanks, Microsoft, for not using size_t for the third argument to
* _write(). Presumably this string will be <= 4GiB long....
*/
- if (ws_write(fd, keylist->data, (unsigned int)strlen(keylist->data)) < 0) {
+ if (ws_write(fd, keylist, (unsigned int)strlen(keylist)) < 0) {
write_failure_alert_box(file_name8, errno);
ws_close(fd);
g_free(keylist);
@@ -1927,7 +1926,7 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) {
StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), range->user_range_cnt);
}
SetWindowText(cur_ctrl, static_val);
-
+
cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_RANGE_DISP);
EnableWindow(cur_ctrl, filtered_active);
if (range->remove_ignored) {