35 |
#include "wptUTF8.h" |
#include "wptUTF8.h" |
36 |
#include "openpgp.h" |
#include "openpgp.h" |
37 |
|
|
38 |
|
/* Return the date in locale format. */ |
39 |
const char* |
const char* |
40 |
get_fmt_date (long timest) |
get_fmt_date (long timest) |
41 |
{ |
{ |
46 |
} |
} |
47 |
|
|
48 |
|
|
49 |
|
/* Return humand readable public key algo. */ |
50 |
static const char* |
static const char* |
51 |
get_pubkey_algo (int algo) |
get_pubkey_algo (int algo) |
52 |
{ |
{ |
60 |
} |
} |
61 |
|
|
62 |
|
|
63 |
|
/* Return human readable symmetric algo. */ |
64 |
const char* |
const char* |
65 |
get_symkey_algo (int algo) |
get_symkey_algo (int algo) |
66 |
{ |
{ |
81 |
} |
} |
82 |
|
|
83 |
|
|
84 |
|
/* Return human readable hash algo. */ |
85 |
static const char* |
static const char* |
86 |
get_digest_algo (int algo) |
get_digest_algo (int algo) |
87 |
{ |
{ |
103 |
} |
} |
104 |
|
|
105 |
|
|
106 |
|
/* Return human readable compress algo. */ |
107 |
static const char* |
static const char* |
108 |
get_compress_algo (int algo) |
get_compress_algo (int algo) |
109 |
{ |
{ |
118 |
} |
} |
119 |
|
|
120 |
|
|
121 |
|
/* Return human string to key algo. */ |
122 |
static const char* |
static const char* |
123 |
get_s2k_algo (int algo) |
get_s2k_algo (int algo) |
124 |
{ |
{ |
151 |
|
|
152 |
inp = gpg_iobuf_open (file); |
inp = gpg_iobuf_open (file); |
153 |
if (!inp) { |
if (!inp) { |
154 |
log_box (_("File Manager"), MB_ERR, "%s: %s", file, |
log_box (_("File Manager"), MB_ERR, "%s: %s", file, |
155 |
winpt_strerror (WPTERR_FILE_OPEN)); |
winpt_strerror (WPTERR_FILE_OPEN)); |
156 |
return -1; |
return -1; |
157 |
} |
} |
158 |
gpg_iobuf_ioctl( inp, 3, 1, NULL ); /* disable cache */ |
gpg_iobuf_ioctl (inp, 3, 1, NULL); /* disable cache */ |
159 |
if (gpg_use_armor_filter (inp)) { |
if (gpg_use_armor_filter (inp)) { |
160 |
memset (&afx, 0, sizeof (afx)); |
memset (&afx, 0, sizeof (afx)); |
161 |
gpg_iobuf_push_filter (inp, gpg_armor_filter, &afx); |
gpg_iobuf_push_filter (inp, gpg_armor_filter, &afx); |
168 |
{PKT_pubkey_enc *enc = pkt->pkt.pubkey_enc; n++; |
{PKT_pubkey_enc *enc = pkt->pkt.pubkey_enc; n++; |
169 |
if (!enc) |
if (!enc) |
170 |
break; |
break; |
171 |
_snprintf( inf, sizeof(inf)-1, |
_snprintf (inf, sizeof(inf)-1, |
172 |
"public key encryted packet: version %d, algo %s, keyid 0x%08X", |
"public key encryted packet: version %d, algo %s, keyid 0x%08X", |
173 |
enc->version, get_pubkey_algo(enc->pubkey_algo), enc->keyid[1]); |
enc->version, get_pubkey_algo(enc->pubkey_algo), enc->keyid[1]); |
174 |
listbox_add_string (list, inf);} |
listbox_add_string (list, inf);} |
274 |
int n; |
int n; |
275 |
|
|
276 |
switch (msg) { |
switch (msg) { |
277 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
|
SetWindowText (dlg, _("File Status")); |
|
278 |
file = (const char*)lparam; |
file = (const char*)lparam; |
279 |
if (!file) |
if (!file) |
280 |
BUG (0); |
BUG (0); |
284 |
EndDialog (dlg, FALSE); |
EndDialog (dlg, FALSE); |
285 |
return TRUE; |
return TRUE; |
286 |
} |
} |
287 |
|
SetWindowText (dlg, _("File Status")); |
288 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
289 |
break; |
break; |
290 |
|
|