31 #include "atari/res/netsurf.rsh" 43 #define CERT_INF_LINES 8 63 l1 = strlen(cert_info->
issuer) + add;
64 l2 = strlen(cert_info->
subject) + add;
65 return( MAX(l1, l2) );
79 char *
line = malloc(512);
84 "Cert info draw, win: %p, data: %p, scrollx: %d", win, data,
87 WindGet( win, WF_WORKXYWH, &x, &y, &w, &h );
89 pxy[0] = work.g_x = x + 8;
90 pxy[1] = work.g_y = y + 80;
92 pxy[3] = y + 80 + 176;
96 maxchars = (work.g_w / 8)+1;
144 if( (
int)strlen(line) > dp->
scrollx ) {
145 if( dp->
scrollx + maxchars < 511 && ( (
signed int)strlen(line) - dp->
scrollx) > maxchars )
146 line[dp->
scrollx + maxchars] = 0;
165 items[i] = malloc( 48 );
168 objc_offset( FORM(win), index, &x, &y );
169 dp->
current = MenuPopUp( items, x, y,
171 P_LIST + P_WNDW + P_CHCK );
172 ObjcChange( OC_FORM, win, index, NORMAL, TRUE );
179 ObjcDrawParent( OC_FORM, FORM(win), VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
199 RsrcGaddr (
h_gem_rsrc , R_TREE, VERIFY, &tree);
200 ObjcString( tree, VERIFY_LBL_HOST, (
char*)url );
201 ObjcChange( OC_OBJC, tree, VERIFY_BT_ACCEPT, 0, 0 );
202 ObjcChange( OC_OBJC, tree, VERIFY_BT_REJECT, 0, 0 );
203 form = FormWindBegin( tree, (
char*)
"SSL Verify failed" );
216 ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT,
do_popup, &dp );
222 res = FormWindDo( MU_MESAG );
225 case VERIFY_BT_ACCEPT:
229 case VERIFY_BT_NEXT_CERT:
234 case VERIFY_BT_REJECT:
238 case VERIFY_BT_SCROLL_D:
241 ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
244 case VERIFY_BT_SCROLL_U:
247 ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
250 case VERIFY_BT_SCROLL_R:
251 NSLOG(netsurf, INFO,
"scroll r!");
254 if( dp.scrollx > (dp.cols - (272 / 8 )) )
256 ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG);
259 case VERIFY_BT_SCROLL_L:
264 ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
static void do_popup(WINDOW *win, int index, int mode, void *data)
struct ssl_cert_info * cert_infos_n
Interface to utility string handling.
Localised message support (interface).
long version
Certificate version.
static nserror line(const struct redraw_context *ctx, const plot_style_t *style, const struct rect *line)
Plots a line.
static struct ssl_info_draw_param dp
#define NSLOG(catname, level, logmsg, args...)
char not_after[32]
Valid to date.
int sig_type
Signature type.
char subject[256]
Subject details.
int cert_type
Certificate type.
char not_before[32]
Valid from date.
ssl certificate information for certificate error message
static os_mode mode
The current sprite mode.
static html_css_fetcher_item * items
Interface to a number of general purpose functionality.
char issuer[256]
Issuer details.
short atari_plot_vdi_handle
static int cert_display_width(struct ssl_cert_info *cert_info)
bool verify_ssl_form_do(const char *url, const struct ssl_cert_info *cert_infos_n, unsigned long num_certs)
static void __CDECL cert_info_draw(WINDOW *win, short buf[8], void *data)