[Tkabber-dev] r1394 - in branches/tls: . mozilla-screens tls-sample

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Mar 15 03:55:34 MSK 2008


Author: kostix
Date: 2008-03-15 03:55:33 +0300 (Sat, 15 Mar 2008)
New Revision: 1394

Added:
   branches/tls/mozilla-screens/
   branches/tls/mozilla-screens/examine-details.png
   branches/tls/mozilla-screens/examine-general.png
   branches/tls/mozilla-screens/warn.png
   branches/tls/tls-sample/
   branches/tls/tls-sample/certinfo.tcl
Log:
mozilla-screens: Added temporary directory with sample screenshots
 of Mozilla FireFox certificate presentation dialogs
 (for reference purposes).

tls-sample: Added temporary directory for creation of certificate
 info presentation dialogs.

tls-sample/certinfo.tcl: Started implemetation of "certificate
 information" frame widget intended to be embedded on various
 windows providing cert info in Tkabber.


Added: branches/tls/mozilla-screens/examine-details.png
===================================================================
(Binary files differ)


Property changes on: branches/tls/mozilla-screens/examine-details.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/tls/mozilla-screens/examine-general.png
===================================================================
(Binary files differ)


Property changes on: branches/tls/mozilla-screens/examine-general.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/tls/mozilla-screens/warn.png
===================================================================
(Binary files differ)


Property changes on: branches/tls/mozilla-screens/warn.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/tls/tls-sample/certinfo.tcl
===================================================================
--- branches/tls/tls-sample/certinfo.tcl	                        (rev 0)
+++ branches/tls/tls-sample/certinfo.tcl	2008-03-15 00:55:33 UTC (rev 1394)
@@ -0,0 +1,102 @@
+#! /usr/bin/env wish
+
+option add *CertInfo.borderWidth 4 widgetDefault
+
+option add *CertInfo.Separator.height 2 widgetDefault
+option add *CertInfo.Separator.borderWidth 1 widgetDefault
+option add *CertInfo.Separator.relief sunken widgetDefault
+
+option add *CertInfo.Spacer.height 8 widgetDefault
+
+option add *CertInfo.Entry.state readonly widgetDefault
+option add *CertInfo.Entry.relief flat widgetDefault
+
+proc CertInfo {w args} {
+    set opts {
+	-reason
+	-issuer
+	-subject
+	-notbefore
+	-notafter
+	-serial
+    }
+
+    foreach {opt val} $args {
+	set ix [lsearch -exact $opts $opt]
+	if {$ix < 0} {
+	    return -code error "Bad option \"$opt\":\
+		must be one of $opts"
+	}
+	set [string trimleft $opt -] $val
+    }
+
+    if {![info exists reason]} {
+	set reason [::msgcat::mc "Certificate properties"]
+    }
+
+    frame $w -class CertInfo
+
+    label $w.reason -text $reason
+
+    frame $w.separator -class Separator
+
+    label $w.ititle -text [::msgcat::mc "Issued to"]
+    label $w.iCNcap -text [::msgcat::mc "Common Name (CN):"]
+    label $w.iCNval -text "foo.bar.baz"
+    label $w.iOcap  -text [::msgcat::mc "Organization (O):"]
+    label $w.iOval  -text "yummy"
+    label $w.iOUcap -text [::msgcat::mc "Organizational Unit (OU):"]
+    label $w.iOUval -text "gabba"
+    label $w.iSNcap -text [::msgcat::mc "Serial Number:"]
+    label $w.iSNval -text "1234"
+
+    frame $w.spacer1 -class Spacer
+
+    label $w.etitle -text [::msgcat::mc "Issued by"]
+    label $w.eCNcap -text [::msgcat::mc "Common Name (CN):"]
+    label $w.eCNval -text "foo.bar.baz"
+    label $w.eOcap  -text [::msgcat::mc "Organization (O):"]
+    label $w.eOval  -text "yummy"
+    label $w.eOUcap -text [::msgcat::mc "Organizational Unit (OU):"]
+    label $w.eOUval -text "gabba"
+
+    frame $w.spacer2 -class Spacer
+
+    label $w.vtitle -text [::msgcat::mc "Validity"]
+    label $w.vNBcap -text [::msgcat::mc "Not Defore:"]
+    label $w.vNBval -text "2007-10-12"
+    label $w.vNAcap  -text [::msgcat::mc "Not After:"]
+    label $w.vNAval  -text "2009-12-23"
+
+    grid $w.reason - -sticky w
+    grid $w.separator - -padx 4 -pady 4 -sticky we
+    grid $w.ititle -sticky w
+    grid $w.iCNcap $w.iCNval
+    grid $w.iOcap  $w.iOval
+    grid $w.iOUcap $w.iOUval
+    grid $w.iSNcap $w.iSNval
+    grid $w.spacer1 - -padx 4 -sticky we
+    grid $w.etitle -sticky w
+    grid $w.eCNcap $w.eCNval
+    grid $w.eOcap  $w.eOval
+    grid $w.eOUcap $w.eOUval
+    grid $w.spacer2 - -padx 4 -sticky we
+    grid $w.vtitle - -sticky w
+    grid $w.vNBcap $w.vNBval
+    grid $w.vNAcap $w.vNAval
+
+    grid configure $w.iCNcap $w.iOcap $w.iOUcap $w.iSNcap \
+	$w.eCNcap $w.eOcap $w.eOUcap \
+	$w.vNBcap $w.vNAcap -sticky e
+
+    grid configure $w.iCNval $w.iOval $w.iOUval $w.iSNval \
+	$w.eCNval $w.eOval $w.eOUval \
+	$w.vNBval $w.vNAval -sticky w
+
+    grid columnconfigure $w 1 -weight 1
+}
+
+CertInfo .certinfo -reason Foo!
+pack .certinfo -fill both -expand true -anchor nw
+
+# vim:ts=8:sw=4:sts=4:noet


Property changes on: branches/tls/tls-sample/certinfo.tcl
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Tkabber-dev mailing list