16993 packagemanger should provide a way to manipulate and see publisher certs
16992 package manager should provide a way to change signature-policy
18311 OK button on Preferences dialog doesn't work after applying Certificate Mng and Sig Policy patches
18336 OK and Cancel buttons work incorrectly
--- a/src/gui/data/packagemanager-preferences.schemas.in Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/data/packagemanager-preferences.schemas.in Fri May 13 15:17:29 2011 +0100
@@ -86,6 +86,19 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/packagemanager/preferences/last_add_pubcert_path</key>
+ <applyto>/apps/packagemanager/preferences/last_add_pubcert_path</applyto>
+ <owner>packagemanager</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>Last Add Publisher Certificate Path</short>
+ <long>
+ The path for the last Publisher Certificate added to packagemanager.
+ </long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/packagemanager/preferences/initial_section</key>
<applyto>/apps/packagemanager/preferences/initial_section</applyto>
<owner>packagemanager</owner>
--- a/src/gui/data/packagemanager.ui Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/data/packagemanager.ui Fri May 13 15:17:29 2011 +0100
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="mainwindow">
<property name="width_request">750</property>
<property name="height_request">500</property>
@@ -2173,11 +2173,10 @@
</action-widgets>
</object>
<object class="GtkDialog" id="preferencesdialog">
- <property name="width_request">400</property>
+ <property name="width_request">480</property>
<property name="height_request">500</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Preferences</property>
- <property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
@@ -2627,10 +2626,311 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkAlignment" id="sigpol_alignment2">
+ <property name="visible">True</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
+ <child>
+ <object class="GtkVBox" id="sigpol_vbox2">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkVBox" id="mods_svbox3">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkAlignment" id="mods_sig_alignment2">
+ <property name="visible">True</property>
+ <property name="top_padding">5</property>
+ <property name="bottom_padding">10</property>
+ <child>
+ <object class="GtkLabel" id="mods_sig_label2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>When installing packages from any publisher:</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="mods_shbox2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="mods_salignment1">
+ <property name="width_request">10</property>
+ <property name="visible">True</property>
+ <property name="yscale">0</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="mods_svbox4">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkRadioButton" id="gsig_ignored_radiobutton">
+ <property name="label" translatable="yes">Signatures are _ignored</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Signatures are _ignored</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="gsig_optional_but_valid_radiobutton">
+ <property name="label" translatable="yes">Signatures are _optional, but must be valid if provided</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Signatures are _optional, but must be valid if provided</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">gsig_ignored_radiobutton</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="gsig_valid_radiobutton">
+ <property name="label" translatable="yes">One or more _valid signatures are required</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">One or more _valid signatures are required</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">gsig_ignored_radiobutton</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="gsig_name_radiobutton">
+ <property name="label" translatable="yes">Signatures are _required and certificate names must include:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">gsig_ignored_radiobutton</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="gsig_cert_names_vbox">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkHBox" id="cert_names_hbox2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="modn_hbox2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="modn_alignment1">
+ <property name="width_request">20</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="modn_alignment2">
+ <property name="visible">True</property>
+ <property name="yalign">0.15000000596046448</property>
+ <property name="yscale">0</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="modn_vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkEntry" id="gsig_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="modn_label1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><i><b>Example:</b> oracle, opensolaris</i></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment20">
+ <property name="width_request">50</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="mods_walignment4">
+ <property name="visible">True</property>
+ <property name="top_padding">35</property>
+ <property name="bottom_padding">10</property>
+ <child>
+ <object class="GtkHBox" id="mods_whbox4">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImage" id="mods_wimage4">
+ <property name="visible">True</property>
+ <property name="yalign">0.10000000149011612</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon-size">3</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox21">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="mods_wlabel4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><i><b>Note:</b> This global signature policy maybe overridden by stricter settings in an individual publisher signature policy</i></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
- <placeholder/>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Signature Policy</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
</child>
<child>
<object class="GtkAlignment" id="lang_tab_alignment1">
@@ -4770,7 +5070,7 @@
</child>
</object>
<object class="GtkDialog" id="modify_repository">
- <property name="width_request">500</property>
+ <property name="width_request">600</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Modify Publisher</property>
<property name="resizable">False</property>
@@ -4785,82 +5085,195 @@
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
- <object class="GtkVBox" id="vbox16">
+ <object class="GtkAlignment" id="mod_alignment1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Publisher</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="top_padding">5</property>
+ <property name="left_padding">5</property>
<child>
- <object class="GtkHBox" id="hbox14">
+ <object class="GtkNotebook" id="modify_pub_notebook">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
<child>
- <object class="GtkVBox" id="vbox13">
+ <object class="GtkAlignment" id="mod_alignment2">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
<child>
- <object class="GtkHBox" id="hbox42">
+ <object class="GtkVBox" id="mod_vbox16">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
<child>
- <object class="GtkAlignment" id="alignment203">
- <property name="width_request">16</property>
+ <object class="GtkAlignment" id="gen_alignment11">
<property name="visible">True</property>
+ <property name="top_padding">5</property>
<child>
- <placeholder/>
+ <object class="GtkLabel" id="label30">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Publisher</b></property>
+ <property name="use_markup">True</property>
+ </object>
</child>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox105">
+ <object class="GtkHBox" id="hbox14">
<property name="visible">True</property>
- <property name="spacing">10</property>
<child>
- <object class="GtkVBox" id="vbox205">
+ <object class="GtkVBox" id="vbox13">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="repository_name_text">
+ <object class="GtkHBox" id="hbox42">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">Name: </property>
- <property name="use_underline">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment203">
+ <property name="width_request">16</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox105">
+ <property name="visible">True</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkVBox" id="vbox205">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="repository_name_text">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">Name: </property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">A_lias:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">repositorymodifyalias</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox304">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="repository_name_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="repositorymodifyalias">
+ <property name="width_request">320</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="repositorymodifyalias-atkobject">
+ <property name="AtkObject::accessible-name">repositorymodifyurl</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alias_alignment1">
+ <property name="width_request">40</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="modify_registration_box">
+ <property name="no_show_all">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment270">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xscale">0</property>
+ <property name="top_padding">3</property>
<child>
- <object class="GtkLabel" id="label25">
+ <object class="GtkLabel" id="repositorymodifyregistrationcommentlabel">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">A_lias:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">repositorymodifyalias</property>
+ <property name="label" translatable="yes">This is a secure publisher.</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
@@ -4869,481 +5282,23 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox304">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="repository_name_label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="repositorymodifyalias">
- <property name="width_request">320</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="repositorymodifyalias-atkobject">
- <property name="AtkObject::accessible-name">repositorymodifyurl</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment302">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="modify_registration_box">
- <property name="no_show_all">True</property>
- <child>
- <object class="GtkAlignment" id="alignment270">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xscale">0</property>
- <property name="top_padding">3</property>
- <child>
- <object class="GtkLabel" id="repositorymodifyregistrationcommentlabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is a secure publisher.</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment280">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xscale">0</property>
- <property name="top_padding">3</property>
- <child>
- <object class="GtkLinkButton" id="repositorymodifyregistrationlinkbutton">
- <property name="label" translatable="yes">Re_gistration Details</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">none</property>
- <property name="use_underline">True</property>
- <property name="uri">http://glade.gnome.org</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox404">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="label105">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes"><b>Origins</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox303">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkAlignment" id="alignment104">
- <property name="width_request">10</property>
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox61">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox205">
- <property name="visible">True</property>
- <property name="spacing">10</property>
- <child>
- <object class="GtkLabel" id="label203">
+ <object class="GtkAlignment" id="alignment280">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">O_rigin:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">add_repo</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox71">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkEntry" id="add_repo">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="no_show_all">True</property>
- <property name="invisible_char">●</property>
- <signal name="changed" handler="on_add_repo_changed"/>
- <signal name="focus_in_event" handler="on_add_repo_focus_in_event"/>
- <signal name="activate" handler="on_pub_add_repo_clicked"/>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="xscale">0</property>
+ <property name="top_padding">3</property>
<child>
- <object class="GtkLabel" id="modrepoerror_label">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">e.g. http://pkg.oracle.com/solaris/release</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow8">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkTreeView" id="modify_pub_repos_treeview">
+ <object class="GtkLinkButton" id="repositorymodifyregistrationlinkbutton">
+ <property name="label" translatable="yes">Re_gistration Details</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="modify_pub_repos_treeview-atkobject">
- <property name="AtkObject::accessible-name">Repositories</property>
- </object>
- </child>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <property name="use_underline">True</property>
+ <property name="uri">http://glade.gnome.org</property>
</object>
</child>
</object>
- </child>
- <child type="label_item">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVButtonBox" id="vbuttonbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">20</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="pub_add_repo">
- <property name="label" translatable="yes">_Add</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_pub_add_repo_clicked"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="pub_remove_repo">
- <property name="label" translatable="yes">Remo_ve</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_pub_remove_repo_clicked"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander" id="repositorymodifysslexpander">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="spacing">4</property>
- <signal name="activate" handler="on_repositorymodifysslexpander_activate"/>
- <child>
- <object class="GtkHBox" id="hbox17">
- <property name="visible">True</property>
- <child>
- <object class="GtkAlignment" id="alignment21">
- <property name="width_request">16</property>
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox28">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkVBox" id="vbox24">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkLabel" id="label34">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">SSL _Key:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">modkeyentry</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">SSL Certi_ficate:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">modcertentry</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox25">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">7</property>
- <child>
- <object class="GtkEntry" id="modkeyentry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="modkeyentry-atkobject">
- <property name="AtkObject::accessible-name">modkeyentry</property>
- </object>
- </child>
- <signal name="changed" handler="on_modkeyentry_changed"/>
- <signal name="focus_in_event" handler="on_modkeyentry_focus_in_event"/>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox106">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkEntry" id="modcertentry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="modcertentry-atkobject">
- <property name="AtkObject::accessible-name">modcertentry</property>
- </object>
- </child>
- <signal name="changed" handler="on_modcertentry_changed"/>
- <signal name="focus_in_event" handler="on_modcertentry_focus_in_event"/>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="modsslerror_label">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="xalign">0</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVButtonBox" id="vbuttonbox4">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="modkeybrowse">
- <property name="label" translatable="yes">_Browse...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_modkeybrowse_clicked"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="modcertbrowse">
- <property name="label" translatable="yes">Bro_wse...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_modcertbrowse_clicked"/>
- </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -5356,104 +5311,846 @@
<property name="position">2</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label40">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>_SSL Key and Certificate</b></property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander" id="repositorymodifymirrorsexpander">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="use_underline">True</property>
- <property name="spacing">10</property>
- <signal name="activate" handler="on_repositorymodifymirrorsexpander_activate"/>
- <child>
- <object class="GtkHBox" id="hbox21">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkAlignment" id="alignment29">
- <property name="width_request">10</property>
- <property name="visible">True</property>
<child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox27">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkHBox" id="hbox26">
+ <object class="GtkAlignment" id="alignment16">
<property name="visible">True</property>
- <property name="spacing">10</property>
+ <property name="top_padding">12</property>
<child>
- <object class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">M_irror:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">addmirror_entry</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox53">
+ <object class="GtkVBox" id="vbox404">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkEntry" id="addmirror_entry">
+ <object class="GtkLabel" id="label105">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes"><b>Origins</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox303">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="addmirror_entry-atkobject">
- <property name="AtkObject::accessible-name">addmirror_entry</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkAlignment" id="alignment104">
+ <property name="width_request">10</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <signal name="changed" handler="on_addmirror_entry_changed"/>
- <signal name="focus_in_event" handler="on_addmirror_entry_focus_in_event"/>
- <signal name="activate" handler="on_addmirror_button_clicked"/>
+ <child>
+ <object class="GtkVBox" id="vbox61">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkHBox" id="hbox205">
+ <property name="visible">True</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkLabel" id="label203">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">O_rigin:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">add_repo</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox71">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkEntry" id="add_repo">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="no_show_all">True</property>
+ <property name="invisible_char">●</property>
+ <signal name="changed" handler="on_add_repo_changed"/>
+ <signal name="focus_in_event" handler="on_add_repo_focus_in_event"/>
+ <signal name="activate" handler="on_pub_add_repo_clicked"/>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="modrepoerror_label">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">e.g. http://pkg.oracle.com/solaris/release</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow8">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="modify_pub_repos_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="modify_pub_repos_treeview-atkobject">
+ <property name="AtkObject::accessible-name">Repositories</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">20</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="pub_add_repo">
+ <property name="label" translatable="yes">_Add</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_pub_add_repo_clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="pub_remove_repo">
+ <property name="label" translatable="yes">Remo_ve</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_pub_remove_repo_clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment15">
+ <property name="visible">True</property>
+ <property name="top_padding">20</property>
+ <child>
+ <object class="GtkVBox" id="vbox17">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label40">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>_SSL Key and Certificate</b></property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="modmirrerror_label">
+ <object class="GtkHBox" id="hbox17">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment21">
+ <property name="width_request">16</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox28">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="vbox24">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label34">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">SSL _Key:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">modkeyentry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label35">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">SSL Certi_ficate:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">modcertentry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox25">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">7</property>
+ <child>
+ <object class="GtkEntry" id="modkeyentry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="modkeyentry-atkobject">
+ <property name="AtkObject::accessible-name">modkeyentry</property>
+ </object>
+ </child>
+ <signal name="changed" handler="on_modkeyentry_changed"/>
+ <signal name="focus_in_event" handler="on_modkeyentry_focus_in_event"/>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox106">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkEntry" id="modcertentry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="modcertentry-atkobject">
+ <property name="AtkObject::accessible-name">modcertentry</property>
+ </object>
+ </child>
+ <signal name="changed" handler="on_modcertentry_changed"/>
+ <signal name="focus_in_event" handler="on_modcertentry_focus_in_event"/>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="modsslerror_label">
+ <property name="visible">True</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox4">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="modkeybrowse">
+ <property name="label" translatable="yes">_Browse...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_modkeybrowse_clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="modcertbrowse">
+ <property name="label" translatable="yes">Bro_wse...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_modcertbrowse_clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment17">
+ <property name="visible">True</property>
+ <property name="bottom_padding">15</property>
+ <child>
+ <object class="GtkExpander" id="repositorymodifymirrorsexpander">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="use_underline">True</property>
+ <property name="spacing">10</property>
+ <signal name="activate" handler="on_repositorymodifymirrorsexpander_activate"/>
+ <child>
+ <object class="GtkHBox" id="hbox21">
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkAlignment" id="alignment29">
+ <property name="width_request">10</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox27">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkHBox" id="hbox26">
+ <property name="visible">True</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkLabel" id="label36">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">M_irror:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">addmirror_entry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox53">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkEntry" id="addmirror_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="addmirror_entry-atkobject">
+ <property name="AtkObject::accessible-name">addmirror_entry</property>
+ </object>
+ </child>
+ <signal name="changed" handler="on_addmirror_entry_changed"/>
+ <signal name="focus_in_event" handler="on_addmirror_entry_focus_in_event"/>
+ <signal name="activate" handler="on_addmirror_button_clicked"/>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="modmirrerror_label">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">e.g. http://pkg.oracle.com/solaris/release</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame106">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow80">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="modify_repo_mirrors_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox5">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">20</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="addmirror_button">
+ <property name="label" translatable="yes">A_dd</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_addmirror_button_clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="mirrorremove">
+ <property name="label" translatable="yes">Remov_e</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_mirrorremove_clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">5</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label33">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>_Mirrors</b></property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="mod_label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_General</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="mods_alignment1">
+ <property name="visible">True</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
+ <child>
+ <object class="GtkVBox" id="mods_vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkVBox" id="mods_vbox2">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkAlignment" id="mods_pub_alignment11">
+ <property name="visible">True</property>
+ <property name="top_padding">5</property>
+ <property name="bottom_padding">5</property>
+ <child>
+ <object class="GtkLabel" id="mods_pub_label">
+ <property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">e.g. http://pkg.oracle.com/solaris/release</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>Certificates for publisher</b></property>
<property name="use_markup">True</property>
</object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="mods_hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="mods_alignment2">
+ <property name="width_request">10</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkFrame" id="mods_frame1">
+ <property name="height_request">106</property>
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkScrolledWindow" id="mods_scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTreeView" id="pub_certificate_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="mods_hbox3">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment18">
+ <property name="visible">True</property>
+ <property name="yalign">1</property>
+ <property name="bottom_padding">3</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">1</property>
+ <property name="label" translatable="yes"><b>Details</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment13">
+ <property name="visible">True</property>
+ <property name="top_padding">5</property>
+ <property name="bottom_padding">5</property>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkButton" id="pub_certificate_add_button">
+ <property name="label" translatable="yes">_Add...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="pub_certificate_remove_button">
+ <property name="label" translatable="yes">_Remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="pub_certificate_revoke_button">
+ <property name="label" translatable="yes">Re_voke</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="pub_certificate_reinstate_button">
+ <property name="label" translatable="yes">Re_instate...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment10">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkFrame" id="mods_frame4">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkScrolledWindow" id="mods_scrolledwindow4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkTextView" id="pub_certificate_details_textview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="left_margin">6</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
<packing>
<property name="position">1</property>
</packing>
@@ -5469,101 +6166,365 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame106">
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="mod_label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Cer_tificates</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="sigpol_alignment1">
+ <property name="visible">True</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">10</property>
+ <child>
+ <object class="GtkVBox" id="sigpol_vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkVBox" id="mods_svbox1">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow80">
+ <object class="GtkAlignment" id="mods_sig_alignment1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="top_padding">5</property>
+ <property name="bottom_padding">10</property>
<child>
- <object class="GtkTreeView" id="modify_repo_mirrors_treeview">
+ <object class="GtkLabel" id="mods_pub_sig_label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><b>When installing packages from this publisher:</b></property>
+ <property name="use_markup">True</property>
</object>
</child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <child type="label_item">
- <placeholder/>
+ <child>
+ <object class="GtkHBox" id="mods_shbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="mods_salignment2">
+ <property name="width_request">10</property>
+ <property name="visible">True</property>
+ <property name="yscale">0</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="mods_svbox2">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkRadioButton" id="sig_ignored_radiobutton">
+ <property name="label" translatable="yes">Signatures are _ignored</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Signatures are _ignored</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="sig_optional_but_valid_radiobutton">
+ <property name="label" translatable="yes">Signatures are _optional, but must be valid if provided</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Signatures are _optional, but must be valid if provided</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">sig_ignored_radiobutton</property>
+ </object>
+ <packing>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="sig_valid_radiobutton">
+ <property name="label" translatable="yes">One or more _valid signatures are required</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">One or more _valid signatures are required</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">sig_ignored_radiobutton</property>
+ </object>
+ <packing>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="sig_name_radiobutton">
+ <property name="label" translatable="yes">Signatures are _required and certificate names must include:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">sig_ignored_radiobutton</property>
+ </object>
+ <packing>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="sig_cert_names_vbox">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkHBox" id="cert_names_hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="modn_hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkAlignment" id="modn_alignment5">
+ <property name="width_request">20</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="modn_alignment6">
+ <property name="visible">True</property>
+ <property name="yalign">0.15000000596046448</property>
+ <property name="yscale">0</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="modn_vbox3">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkEntry" id="sig_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="modn_label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><i><b>Example:</b> oracle, opensolaris</i></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment19">
+ <property name="width_request">50</property>
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="mods_walignment1">
+ <property name="visible">True</property>
+ <property name="top_padding">35</property>
+ <property name="bottom_padding">10</property>
+ <child>
+ <object class="GtkHBox" id="mods_whbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImage" id="mods_wimage1">
+ <property name="visible">True</property>
+ <property name="yalign">0.10000000149011612</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon-size">3</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox15">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="mods_wlabel1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><i><b>Note:</b> This signature policy may be overridden by stricter settings in the global signature policy</i></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="sig_linkalignment1">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">10</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">5</property>
+ <property name="right_padding">10</property>
+ <child>
+ <object class="GtkButton" id="sig_view_globpol_button">
+ <property name="label" translatable="yes">View Global _Policy...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Edit->Preferences: Signature Policy</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
</child>
</object>
<packing>
- <property name="padding">4</property>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVButtonBox" id="vbuttonbox5">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">20</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="addmirror_button">
- <property name="label" translatable="yes">A_dd</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_addmirror_button_clicked"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="mirrorremove">
- <property name="label" translatable="yes">Remov_e</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_mirrorremove_clicked"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">5</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
- <child type="label">
- <object class="GtkLabel" id="label33">
+ <child type="tab">
+ <object class="GtkLabel" id="sigpol_label1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>_Mirrors</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">_Signature Policy</property>
<property name="use_underline">True</property>
</object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
</child>
</object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child>
- <placeholder/>
</child>
</object>
<packing>
--- a/src/gui/modules/enumerations.py Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/modules/enumerations.py Fri May 13 15:17:29 2011 +0100
@@ -174,3 +174,13 @@
LOCALE_SELECTED, # selected
) = range(5)
+# Publisher Certificate List in Modify Publisher Dialog - Certificates Tab
+(
+PUBCERT_ORGANIZATION, # O
+PUBCERT_NAME, # CN
+PUBCERT_STATUS, # Approved or Revoked
+PUBCERT_IPSHASH, # IPS Cert hash
+PUBCERT_PATH, # Path to Cert when added or reinstated
+PUBCERT_XCERT_OBJ, # X509 certificate object
+PUBCERT_NEW, # True if Cert just added, but not yet commited
+) = range(7)
--- a/src/gui/modules/misc.py Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/modules/misc.py Fri May 13 15:17:29 2011 +0100
@@ -30,6 +30,17 @@
RELEASE_URL = "http://www.opensolaris.org" # Fallback url for release notes if api
# does not gave us one.
+PUBCERT_COMMON_NAME = _(" Common Name (CN):")
+PUBCERT_ORGANIZATION = _(" Organization (O):")
+PUBCERT_ORGANIZATIONAL_UNIT = _(" Organizational Unit (OU):")
+
+PROP_SIGNATURE_POLICY = "signature-policy"
+PROP_SIGNATURE_REQUIRED_NAMES = "signature-required-names"
+SIG_POLICY_IGNORE = "ignore"
+SIG_POLICY_VERIFY = "verify"
+SIG_POLICY_REQUIRE_SIGNATURES = "require-signatures"
+SIG_POLICY_REQUIRE_NAMES = "require-names"
+
import os
import sys
import traceback
@@ -73,6 +84,103 @@
'SUNWipkg-um' : 'package/pkg/update-manager',
'SUNWpython26-notify' : 'library/python-2/python-notify-26' }
+def set_signature_policy_names_for_textfield(widget, names):
+ txt = ""
+ if names != None and len(names) > 0:
+ txt = names[0]
+ for name in names[1:]:
+ txt += ", " + name
+ widget.set_text(txt)
+
+def fetch_signature_policy_names_from_textfield(text):
+ names = []
+ names = __split_ignore_comma_in_quotes(text)
+ names = [x.strip(' ') for x in names]
+ if len(names) == 1 and names[0] == '':
+ del names[0]
+ return names
+
+def setup_signature_policy_properties(ignore, verify, req_sigs, req_names, names, orig):
+ set_props = {}
+ if ignore != orig[SIG_POLICY_IGNORE] and ignore:
+ set_props[PROP_SIGNATURE_POLICY] = SIG_POLICY_IGNORE
+ elif verify != orig[SIG_POLICY_VERIFY] and verify:
+ set_props[PROP_SIGNATURE_POLICY] = SIG_POLICY_VERIFY
+ elif req_sigs != orig[SIG_POLICY_REQUIRE_SIGNATURES] and req_sigs:
+ set_props[PROP_SIGNATURE_POLICY] = SIG_POLICY_REQUIRE_SIGNATURES
+ elif req_names != orig[SIG_POLICY_REQUIRE_NAMES] and req_names:
+ set_props[PROP_SIGNATURE_POLICY] = SIG_POLICY_REQUIRE_NAMES
+
+ if names != orig[PROP_SIGNATURE_REQUIRED_NAMES]:
+ set_props[PROP_SIGNATURE_REQUIRED_NAMES] = names
+ return set_props
+
+def create_sig_policy_from_property(prop_sig_pol, prop_sig_req_names):
+ names = []
+ #Names with embedded commas, the default name separator, need to
+ #be quoted to be treated as a single name
+ for name in prop_sig_req_names:
+ if name.split(",", 1) == 2:
+ names.append("\"%s\"" % name)
+ else:
+ names.append(name)
+ sig_policy = {}
+ sig_policy[SIG_POLICY_IGNORE] = False
+ sig_policy[SIG_POLICY_VERIFY] = False
+ sig_policy[SIG_POLICY_REQUIRE_SIGNATURES] = False
+ sig_policy[SIG_POLICY_REQUIRE_NAMES] = False
+ sig_policy[PROP_SIGNATURE_REQUIRED_NAMES] = []
+
+ if prop_sig_pol == SIG_POLICY_IGNORE:
+ sig_policy[SIG_POLICY_IGNORE] = True
+ elif prop_sig_pol == SIG_POLICY_VERIFY:
+ sig_policy[SIG_POLICY_VERIFY] = True
+ elif prop_sig_pol == SIG_POLICY_REQUIRE_SIGNATURES:
+ sig_policy[SIG_POLICY_REQUIRE_SIGNATURES] = True
+ elif prop_sig_pol == SIG_POLICY_REQUIRE_NAMES:
+ sig_policy[SIG_POLICY_REQUIRE_NAMES] = True
+ sig_policy[PROP_SIGNATURE_REQUIRED_NAMES] = names
+ return sig_policy
+
+def __split_ignore_comma_in_quotes(string):
+ split_char = ","
+ quote = "'"
+ string_split = []
+ current_word = ""
+ inside_quote = False
+ for letter in string:
+ if letter == "'" or letter == "\"":
+ quote = letter
+ current_word += letter
+ if inside_quote:
+ inside_quote = False
+ else:
+ inside_quote = True
+ elif letter == split_char and not inside_quote:
+ if current_word != '':
+ string_split.append(current_word)
+ current_word = ""
+ else:
+ current_word += letter
+ if current_word != "" and inside_quote:
+ current_word += quote
+ if current_word != '':
+ string_split.append(current_word)
+ return string_split
+
+def check_sig_required_names_policy(text, req_names, error_dialog_title):
+ if not req_names:
+ return True
+ names = fetch_signature_policy_names_from_textfield(text)
+ if len(names) == 0:
+ error_occurred(None,
+ _("One or more certificate names must be specified "
+ "with this option."),
+ error_dialog_title,
+ gtk.MESSAGE_INFO)
+ return False
+ return True
+
def get_image_path():
return g_image_path()
@@ -657,6 +765,82 @@
itr = infobuffer.get_iter_at_line(i)
infobuffer.insert(itr, text["desc"])
+def set_pub_cert_details_text(labs, text, textview, added=False, reinstated=False):
+ style = textview.get_style()
+ font_size_in_pango_unit = style.font_desc.get_size()
+ font_size_in_pixel = font_size_in_pango_unit / pango.SCALE
+ tab_array = pango.TabArray(3, True)
+
+ infobuffer = textview.get_buffer()
+ infobuffer.set_text("")
+
+ labs_issuer = {}
+ labs_issuer["common_name_to"] = PUBCERT_COMMON_NAME
+ labs_issuer["org_to"] = PUBCERT_ORGANIZATION
+ labs_issuer["org_unit_to"] = PUBCERT_ORGANIZATIONAL_UNIT
+ max_issuer_len = 0
+ for lab in labs_issuer:
+ __add_label_to_generalinfo(infobuffer, 0, labs_issuer[lab])
+ test_len = get_textview_width(textview)
+ if test_len > max_issuer_len:
+ max_issuer_len = test_len
+ infobuffer.set_text("")
+
+ max_finger_len = 0
+ __add_label_to_generalinfo(infobuffer, 0, labs["fingerprints"])
+ max_finger_len = get_textview_width(textview)
+ infobuffer.set_text("")
+
+ tab_array.set_tab(0, pango.TAB_LEFT, max_finger_len + font_size_in_pixel)
+ tab_array.set_tab(1, pango.TAB_LEFT, max_issuer_len + font_size_in_pixel)
+ textview.set_tabs(tab_array)
+ infobuffer.set_text("")
+ i = 0
+ __add_label_to_generalinfo(infobuffer, i, labs["issued_to"] + '\n')
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["common_name_to"],
+ text["common_name_to"])
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["org_to"], text["org_to"],
+ bold_label=False)
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["org_unit_to"],
+ text["org_unit_to"])
+
+ i += 1
+ __add_label_to_generalinfo(infobuffer, i, labs["issued_by"] + '\n')
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["common_name_by"],
+ text["common_name_by"])
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["org_by"], text["org_by"])
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["org_unit_by"],
+ text["org_unit_by"])
+
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["validity"], "", bold_label=True)
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["issued_on"], text["issued_on"])
+
+ i += 1
+ __add_label_to_generalinfo(infobuffer, i, labs["fingerprints"] + '\n')
+
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["sha1"], text["sha1"])
+ i += 1
+ __add_line_to_pub_cert_info(infobuffer, i, labs["md5"], text["md5"])
+ i += 1
+ if not added and not reinstated:
+ __add_line_to_pub_cert_info(infobuffer, i, labs["ips"], text["ips"],
+ add_return=False)
+ elif added and not reinstated:
+ __add_label_to_generalinfo(infobuffer, i,
+ _("Note: \t Certificate is marked to be added"))
+ elif not added and reinstated:
+ __add_label_to_generalinfo(infobuffer, i,
+ _("Note: \t Certificate is marked to be reinstated"))
+
def __add_renamed_line_to_generalinfo(text_buffer, index, labs, text):
if text["renamed_to"] != "":
rename_list = text["renamed_to"].split("\n", 1)
@@ -694,6 +878,24 @@
text_buffer.insert_pixbuf(end_itr, resized_icon)
text_buffer.insert(end_itr, " %s\n" % text)
+def __add_line_to_pub_cert_info(text_buffer, index, label, text,
+ bold_label = False, add_return = True):
+ tab_str = "\t"
+ itr = text_buffer.get_iter_at_line(index)
+ if bold_label:
+ text_buffer.insert_with_tags_by_name(itr, label, "bold")
+ else:
+ text_buffer.insert_with_tags_by_name(itr, label, "normal")
+ end_itr = text_buffer.get_end_iter()
+
+ return_str = ""
+ if add_return:
+ return_str = "\n"
+
+ text_buffer.insert(end_itr, tab_str)
+ text_buffer.get_end_iter()
+ text_buffer.insert(end_itr, (" %s" + return_str) % text)
+
def same_pkg_versions(info1, info2):
if info1 == None or info2 == None:
return False
--- a/src/gui/modules/pmgconf.py Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/modules/pmgconf.py Fri May 13 15:17:29 2011 +0100
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved.
#
import sys
@@ -40,6 +40,8 @@
INITIAL_SECTION_PREFERENCES = "/apps/packagemanager/preferences/initial_section"
LAST_EXPORT_SELECTION_PATH = \
"/apps/packagemanager/preferences/last_export_selections_path"
+LAST_ADD_PUBCERT_PATH = \
+ "/apps/packagemanager/preferences/last_add_pubcert_path"
SHOW_STARTPAGE_PREFERENCES = "/apps/packagemanager/preferences/show_startpage"
SHOW_IMAGE_UPDATE_CONFIRMATION = "/apps/packagemanager/preferences/imageupdate_confirm"
SHOW_INSTALL_CONFIRMATION = "/apps/packagemanager/preferences/install_confirm"
@@ -62,6 +64,8 @@
self.client.get_int(INITIAL_SECTION_PREFERENCES)
self.last_export_selection_path = \
self.client.get_string(LAST_EXPORT_SELECTION_PATH)
+ self.last_add_pubcert_path = \
+ self.client.get_string(LAST_ADD_PUBCERT_PATH)
self.show_startpage = \
self.client.get_bool(SHOW_STARTPAGE_PREFERENCES)
self.save_state = \
@@ -105,6 +109,7 @@
self.initial_show_filter = 0
self.initial_section = 2
self.last_export_selection_path = ""
+ self.last_add_pubcert_path = ""
self.show_startpage = True
self.show_image_update = True
self.show_install = True
@@ -201,6 +206,9 @@
if self.last_export_selection_path:
self.client.set_string(LAST_EXPORT_SELECTION_PATH,
self.last_export_selection_path)
+ if self.last_add_pubcert_path:
+ self.client.set_string(LAST_ADD_PUBCERT_PATH,
+ self.last_add_pubcert_path)
self.client.set_string(LASTSOURCE_PREFERENCES, pub)
self.client.set_bool(START_INSEARCH_PREFERENCES,
start_insearch)
--- a/src/gui/modules/preferences.py Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/modules/preferences.py Fri May 13 15:17:29 2011 +0100
@@ -39,7 +39,8 @@
import pkg.gui.enumerations as enumerations
PREFERENCES_NOTEBOOK_GENERAL_PAGE = 0
-PREFERENCES_NOTEBOOK_LANGUAGES_PAGE = 1
+PREFERENCES_NOTEBOOK_SIG_POL_PAGE = 1
+PREFERENCES_NOTEBOOK_LANGUAGES_PAGE = 2
GDK_2BUTTON_PRESS = 5 # gtk.gdk._2BUTTON_PRESS causes pylint warning
LOCALE_PREFIX = "facet.locale."
LANG_STAR_SUFFIX = "_*"
@@ -99,6 +100,21 @@
self.w_languages_treeview = builder.get_object(
"languages_treeview")
+ self.w_gsig_ignored_radiobutton = builder.get_object(
+ "gsig_ignored_radiobutton")
+ self.w_gsig_optional_radiobutton = builder.get_object(
+ "gsig_optional_but_valid_radiobutton")
+ self.w_gsig_valid_radiobutton = builder.get_object(
+ "gsig_valid_radiobutton")
+ self.w_gsig_name_radiobutton = builder.get_object(
+ "gsig_name_radiobutton")
+ self.w_gsig_name_entry = builder.get_object(
+ "gsig_name_entry")
+ self.w_gsig_cert_names_vbox = builder.get_object(
+ "gsig_cert_names_vbox")
+
+ self.orig_gsig_policy = None
+
self.watch = gtk.gdk.Cursor(gtk.gdk.WATCH)
self.orig_lang_locale_count_dict = {}
self.orig_facets_dict = {}
@@ -107,12 +123,17 @@
self.orig_facet_locale_dict = {}
self.facet_g11_locales_dict = {}
self.facetlocales_list = []
- self.facets_to_set = None
+ self.facets_to_set = {}
self.locales_treeview_selection = []
self.locales_list = self.__get_locales_liststore()
self.__init_locales_tree_view(self.locales_list)
self.__init_locales_list()
+ def show_signature_policy(self):
+ self.w_preferences_notebook.set_current_page(
+ PREFERENCES_NOTEBOOK_SIG_POL_PAGE)
+ self.w_preferencesdialog.show()
+
def set_window_icon(self, window_icon):
self.w_preferencesdialog.set_icon(window_icon)
@@ -136,10 +157,77 @@
self.__on_languages_treeview_button_and_key_events),
(self.w_languages_treeview, "key_press_event",
self.__on_languages_treeview_button_and_key_events),
+
+ (self.w_gsig_ignored_radiobutton, "toggled",
+ self.__on_gsig_radiobutton_toggled),
+ (self.w_gsig_optional_radiobutton, "toggled",
+ self.__on_gsig_radiobutton_toggled),
+ (self.w_gsig_valid_radiobutton, "toggled",
+ self.__on_gsig_radiobutton_toggled),
+ (self.w_gsig_name_radiobutton, "toggled",
+ self.__on_gsig_radiobutton_toggled),
]
for widget, signal_name, callback in signals_table:
widget.connect(signal_name, callback)
+ def __on_gsig_radiobutton_toggled(self, widget):
+ self.w_gsig_cert_names_vbox.set_sensitive(
+ self.w_gsig_name_radiobutton.get_active())
+
+ def __update_img_sig_policy_prop(self, set_props):
+ try:
+ self.parent.get_api_object().img.set_properties(set_props)
+ except api_errors.ApiException, e:
+ error_msg = str(e)
+ msg_title = _("Preferences Error")
+ msg_type = gtk.MESSAGE_ERROR
+ gui_misc.error_occurred(None, error_msg, msg_title, msg_type)
+ return False
+ return True
+
+ def __update_img_sig_policy(self):
+ orig = self.orig_gsig_policy
+ ignore = self.w_gsig_ignored_radiobutton.get_active()
+ verify = self.w_gsig_optional_radiobutton.get_active()
+ req_sigs = self.w_gsig_valid_radiobutton.get_active()
+ req_names = self.w_gsig_name_radiobutton.get_active()
+ names = gui_misc.fetch_signature_policy_names_from_textfield(
+ self.w_gsig_name_entry.get_text())
+ if req_names and len(names) == 0:
+ return False
+ set_props = gui_misc.setup_signature_policy_properties(ignore,
+ verify, req_sigs, req_names, names, orig)
+ if len(set_props) > 0:
+ return self.__update_img_sig_policy_prop(set_props)
+ return True
+
+ def __prepare_img_signature_policy(self):
+ sig_policy = self.__fetch_img_signature_policy()
+ self.orig_gsig_policy = sig_policy
+ self.w_gsig_ignored_radiobutton.set_active(
+ sig_policy[gui_misc.SIG_POLICY_IGNORE])
+ self.w_gsig_optional_radiobutton.set_active(
+ sig_policy[gui_misc.SIG_POLICY_VERIFY])
+ self.w_gsig_valid_radiobutton.set_active(
+ sig_policy[gui_misc.SIG_POLICY_REQUIRE_SIGNATURES])
+ self.w_gsig_cert_names_vbox.set_sensitive(False)
+
+ if sig_policy[gui_misc.SIG_POLICY_REQUIRE_NAMES]:
+ self.w_gsig_name_radiobutton.set_active(True)
+ self.w_gsig_cert_names_vbox.set_sensitive(True)
+
+ names = sig_policy[gui_misc.PROP_SIGNATURE_REQUIRED_NAMES]
+ gui_misc.set_signature_policy_names_for_textfield(
+ self.w_gsig_name_entry, names)
+
+ def __fetch_img_signature_policy(self):
+ prop_sig_pol = self.parent.get_api_object().img.get_property(
+ gui_misc.PROP_SIGNATURE_POLICY)
+ prop_sig_req_names = self.parent.get_api_object().img.get_property(
+ gui_misc.PROP_SIGNATURE_REQUIRED_NAMES)
+ return gui_misc.create_sig_policy_from_property(
+ prop_sig_pol, prop_sig_req_names)
+
def __on_notebook_change(self, widget, event, pagenum):
if pagenum == PREFERENCES_NOTEBOOK_LANGUAGES_PAGE:
locales_not_setup = len(self.orig_facets_dict) == 0
@@ -147,6 +235,8 @@
self.w_preferencesdialog.window.set_cursor(
self.watch )
gobject.idle_add(self.__prepare_locales)
+ elif pagenum == PREFERENCES_NOTEBOOK_SIG_POL_PAGE:
+ gobject.idle_add(self.__prepare_img_signature_policy)
@staticmethod
def __get_locales_liststore():
@@ -663,12 +753,22 @@
if pagenum == PREFERENCES_NOTEBOOK_LANGUAGES_PAGE:
self.w_preferencesdialog.window.set_cursor(self.watch)
gobject.idle_add(self.__prepare_locales)
+ elif pagenum == PREFERENCES_NOTEBOOK_SIG_POL_PAGE:
+ gobject.idle_add(self.__prepare_img_signature_policy)
return True
def __on_preferencescancel_clicked(self, widget):
self.w_preferencesdialog.hide()
def __on_preferencesclose_clicked(self, widget):
+ error_dialog_title = _("Preferences")
+ text = self.w_gsig_name_entry.get_text()
+ req_names = self.w_gsig_name_radiobutton.get_active()
+ if not gui_misc.check_sig_required_names_policy(text,
+ req_names, error_dialog_title):
+ return
+ if self.orig_gsig_policy and not self.__update_img_sig_policy():
+ return
self.__dump_locales_list()
self.__dump_optional_components()
self.w_preferencesdialog.hide()
@@ -676,7 +776,7 @@
len(self.facets_to_set) == 1 \
and self.facets_to_set.has_key(ALL_LOCALES) and \
self.facets_to_set[ALL_LOCALES] == True
- if not ignore_all_default and \
+ if not ignore_all_default and self.orig_facets_dict != {} and \
self.orig_facets_dict != self.facets_to_set:
self.parent.update_facets(self.facets_to_set)
self.gconf.set_show_startpage(
--- a/src/gui/modules/repository.py Fri May 13 11:36:32 2011 +0100
+++ b/src/gui/modules/repository.py Fri May 13 15:17:29 2011 +0100
@@ -22,12 +22,25 @@
# Copyright (c) 2008, 2011 Oracle and/or its affiliates. All rights reserved.
#
-MODIFY_DIALOG_WIDTH_DEFAULT = 500
-MODIFY_DIALOG_SSL_WIDTH_DEFAULT = 410
+MODIFY_DIALOG_WIDTH_DEFAULT = 570
+MODIFY_DIALOG_SSL_WIDTH_DEFAULT = 480
+
+MODIFY_NOTEBOOK_GENERAL_PAGE = 0
+MODIFY_NOTEBOOK_CERTIFICATE_PAGE = 1
+MODIFY_NOTEBOOK_SIG_POLICY_PAGE = 2
+
+PUBCERT_APPROVED_STR = _("Approved")
+PUBCERT_REVOKED_STR = _("Revoked")
+PUBCERT_NOTSET_HASH = "HASH-NOTSET" #No L10N required
+PUBCERT_NOTAVAILABLE = _("Not available")
import sys
import os
import pango
+import datetime
+import tempfile
+import M2Crypto as m2
+import errno
from threading import Thread
from gettext import ngettext
@@ -52,10 +65,11 @@
ERROR_FORMAT = "<span color = \"red\">%s</span>"
class Repository(progress.GuiProgressTracker):
- def __init__(self, parent, image_directory,
- action = -1, webinstall_new = False, main_window = None):
+ def __init__(self, parent, image_directory, action = -1,
+ webinstall_new = False, main_window = None, gconf = None):
progress.GuiProgressTracker.__init__(self)
self.parent = parent
+ self.gconf = gconf
self.action = action
self.main_window = main_window
self.api_o = gui_misc.get_api_object(image_directory,
@@ -193,8 +207,6 @@
self.w_repositorymodify_registration_link = \
builder.get_object(
"repositorymodifyregistrationlinkbutton")
- self.w_repositoryssl_expander = \
- builder.get_object("repositorymodifysslexpander")
self.w_repositorymirror_expander = \
builder.get_object(
"repositorymodifymirrorsexpander")
@@ -224,6 +236,7 @@
builder.get_object("manage_cancel")
self.w_manage_help_btn = \
builder.get_object("manage_help")
+
self.publishers_apply = \
builder.get_object("publishers_apply")
self.publishers_apply.set_icon(self.parent.window_icon)
@@ -238,6 +251,47 @@
self.publishers_apply_progress = \
builder.get_object("publishers_apply_progress")
+ self.w_pub_cert_treeview = \
+ builder.get_object("pub_certificate_treeview")
+ self.w_modify_pub_notebook = builder.get_object(
+ "modify_pub_notebook")
+ self.w_pub_cert_details_textview = builder.get_object(
+ "pub_certificate_details_textview")
+ manage_pub_cert_details_buf = \
+ self.w_pub_cert_details_textview.get_buffer()
+ manage_pub_cert_details_buf.create_tag("level0",
+ weight=pango.WEIGHT_BOLD)
+ manage_pub_cert_details_buf.create_tag("bold",
+ weight=pango.WEIGHT_BOLD)
+ manage_pub_cert_details_buf.create_tag("normal",
+ weight=pango.WEIGHT_NORMAL)
+ self.w_pub_cert_label = \
+ builder.get_object("mods_pub_label")
+ self.w_pub_cert_add_btn = builder.get_object(
+ "pub_certificate_add_button")
+ self.w_pub_cert_remove_btn = builder.get_object(
+ "pub_certificate_remove_button")
+ self.w_pub_cert_revoke_btn = builder.get_object(
+ "pub_certificate_revoke_button")
+ self.w_pub_cert_reinstate_btn = builder.get_object(
+ "pub_certificate_reinstate_button")
+
+
+ self.w_pub_sig_ignored_radiobutton = builder.get_object(
+ "sig_ignored_radiobutton")
+ self.w_pub_sig_optional_radiobutton = builder.get_object(
+ "sig_optional_but_valid_radiobutton")
+ self.w_pub_sig_valid_radiobutton = builder.get_object(
+ "sig_valid_radiobutton")
+ self.w_pub_sig_name_radiobutton = builder.get_object(
+ "sig_name_radiobutton")
+ self.w_pub_sig_name_entry = builder.get_object(
+ "sig_name_entry")
+ self.w_pub_sig_view_globpol_button = builder.get_object(
+ "sig_view_globpol_button")
+ self.w_pub_sig_cert_names_vbox = builder.get_object(
+ "sig_cert_names_vbox")
+
checkmark_icon = gui_misc.get_icon(
self.parent.icon_theme, "pm-check", 24)
@@ -250,6 +304,15 @@
self.__init_mirrors_tree_view(self.modify_repo_mirrors_treeview)
self.__init_origins_tree_view(self.modify_repo_origins_treeview)
+ self.pub_cert_list = self.__get_pub_cert_liststore()
+ self.orig_pub_cert_added_dict = {} # Orig Pub Certs added to model:
+ # - key/val: [ips-hash] = status
+ self.all_pub_cert_added_dict = {} # New/ Orig Pub Certs added to model
+ # - key/val: [sha-hash] = ips-hash
+ self.removed_orig_pub_cert_dict = {}# Removed Orig Pub Certs from model
+ # - key/val: [sha-hash] = ips-hash
+ self.orig_sig_policy = {}
+
if self.action == enumerations.ADD_PUBLISHER:
gui_misc.set_modal_and_transient(self.w_add_publisher_dialog,
self.main_window)
@@ -278,6 +341,7 @@
gui_misc.set_modal_and_transient(self.w_add_publisher_dialog,
self.w_manage_publishers_dialog)
+ self.__init_pub_cert_tree_view(self.pub_cert_list)
self.w_manage_publishers_dialog.show_all()
return
@@ -367,14 +431,729 @@
(self.w_confirm_ok_btn, "clicked",
self.__on_ok_conf_clicked),
- (self.publishers_apply, "delete_event",
+ (self.publishers_apply, "delete_event",
self.__on_publishers_apply_delete_event),
- (self.publishers_apply_cancel, "clicked",
+ (self.publishers_apply_cancel, "clicked",
self.__on_apply_cancel_clicked),
+
+ (self.w_pub_cert_add_btn, "clicked",
+ self.__on_pub_cert_add_clicked),
+ (self.w_pub_cert_remove_btn, "clicked",
+ self.__on_pub_cert_remove_clicked),
+ (self.w_pub_cert_revoke_btn, "clicked",
+ self.__on_pub_cert_revoke_clicked),
+ (self.w_pub_cert_reinstate_btn, "clicked",
+ self.__on_pub_cert_reinstate_clicked),
+ (self.w_modify_pub_notebook, "switch_page",
+ self.__on_notebook_change),
+
+ (self.w_pub_sig_ignored_radiobutton, "toggled",
+ self.__on_pub_sig_radiobutton_toggled),
+ (self.w_pub_sig_optional_radiobutton, "toggled",
+ self.__on_pub_sig_radiobutton_toggled),
+ (self.w_pub_sig_valid_radiobutton, "toggled",
+ self.__on_pub_sig_radiobutton_toggled),
+ (self.w_pub_sig_name_radiobutton, "toggled",
+ self.__on_pub_sig_radiobutton_toggled),
+ (self.w_pub_sig_view_globpol_button, "clicked",
+ self.__on_pub_sig_view_globpol_clicked),
]
for widget, signal_name, callback in signals_table:
widget.connect(signal_name, callback)
+ def __on_pub_sig_radiobutton_toggled(self, widget):
+ self.w_pub_sig_cert_names_vbox.set_sensitive(
+ self.w_pub_sig_name_radiobutton.get_active())
+
+ def __on_pub_sig_view_globpol_clicked(self, widget):
+ #Preferences Dialog is modal so no need to hide the Modify Dialog
+ self.parent.preferences.show_signature_policy()
+
+ def __update_pub_sig_policy_prop(self, set_props):
+ errors = []
+ try:
+ pub = self.repository_modify_publisher
+ if pub != None:
+ pub.update_props(set_props=set_props)
+ except api_errors.ApiException, e:
+ errors.append(("", e))
+ return errors
+
+ def __update_pub_sig_policy(self):
+ errors = []
+ orig = self.orig_sig_policy
+ if not orig:
+ return errors
+ ignore = self.w_pub_sig_ignored_radiobutton.get_active()
+ verify = self.w_pub_sig_optional_radiobutton.get_active()
+ req_sigs = self.w_pub_sig_valid_radiobutton.get_active()
+ req_names = self.w_pub_sig_name_radiobutton.get_active()
+ names = gui_misc.fetch_signature_policy_names_from_textfield(
+ self.w_pub_sig_name_entry.get_text())
+ set_props = gui_misc.setup_signature_policy_properties(ignore,
+ verify, req_sigs, req_names, names, orig)
+ if len(set_props) > 0:
+ errors = self.__update_pub_sig_policy_prop(set_props)
+ return errors
+
+ def __prepare_pub_signature_policy(self):
+ sig_policy = self.__fetch_pub_signature_policy()
+ self.orig_sig_policy = sig_policy
+ self.w_pub_sig_ignored_radiobutton.set_active(
+ sig_policy[gui_misc.SIG_POLICY_IGNORE])
+ self.w_pub_sig_optional_radiobutton.set_active(
+ sig_policy[gui_misc.SIG_POLICY_VERIFY])
+ self.w_pub_sig_valid_radiobutton.set_active(
+ sig_policy[gui_misc.SIG_POLICY_REQUIRE_SIGNATURES])
+ self.w_pub_sig_cert_names_vbox.set_sensitive(False)
+
+ if sig_policy[gui_misc.SIG_POLICY_REQUIRE_NAMES]:
+ self.w_pub_sig_name_radiobutton.set_active(True)
+ self.w_pub_sig_cert_names_vbox.set_sensitive(True)
+
+ names = sig_policy[gui_misc.PROP_SIGNATURE_REQUIRED_NAMES]
+ gui_misc.set_signature_policy_names_for_textfield(
+ self.w_pub_sig_name_entry, names)
+
+ def __fetch_pub_signature_policy(self):
+ pub = self.repository_modify_publisher
+ prop_sig_pol = pub.signature_policy.name
+ prop_sig_req_names = \
+ pub.properties[gui_misc.PROP_SIGNATURE_REQUIRED_NAMES]
+ return gui_misc.create_sig_policy_from_property(
+ prop_sig_pol, prop_sig_req_names)
+
+ def __on_notebook_change(self, widget, event, pagenum):
+ if pagenum == MODIFY_NOTEBOOK_CERTIFICATE_PAGE:
+ gobject.idle_add(self.__prepare_pub_certs)
+ elif pagenum == MODIFY_NOTEBOOK_SIG_POLICY_PAGE:
+ gobject.idle_add(self.__prepare_pub_signature_policy)
+
+ @staticmethod
+ def __get_pub_cert_liststore():
+ return gtk.ListStore(
+ gobject.TYPE_STRING, # enumerations.PUBCERT_ORGANIZATION
+ gobject.TYPE_STRING, # enumerations.PUBCERT_NAME
+ gobject.TYPE_STRING, # enumerations.PUBCERT_STATUS
+ gobject.TYPE_STRING, # enumerations.PUBCERT_IPSHASH
+ gobject.TYPE_STRING, # enumerations.PUBCERT_PATH
+ gobject.TYPE_PYOBJECT, # enumerations.PUBCERT_XCERT_OBJ
+ gobject.TYPE_BOOLEAN, # enumerations.PUBCERT_NEW
+ )
+
+ @staticmethod
+ def __sort_func(treemodel, iter1, iter2, column):
+ col_val1 = treemodel.get_value(iter1, column)
+ col_val2 = treemodel.get_value(iter2, column)
+ ret = cmp(col_val1, col_val2)
+ if ret != 0:
+ return ret
+ if column == enumerations.PUBCERT_ORGANIZATION:
+ name1 = treemodel.get_value(iter1,
+ enumerations.PUBCERT_NAME)
+ name2 = treemodel.get_value(iter2,
+ enumerations.PUBCERT_NAME)
+ ret = cmp(name1, name2)
+ elif column == enumerations.PUBCERT_NAME:
+ org1 = treemodel.get_value(iter1,
+ enumerations.PUBCERT_ORGANIZATION)
+ org2 = treemodel.get_value(iter2,
+ enumerations.PUBCERT_ORGANIZATION)
+ ret = cmp(org1, org2)
+ return ret
+
+ def __init_pub_cert_tree_view(self, pub_cert_list):
+ pub_cert_sort_model = gtk.TreeModelSort(pub_cert_list)
+ pub_cert_sort_model.set_sort_column_id(enumerations.PUBCERT_ORGANIZATION,
+ gtk.SORT_ASCENDING)
+
+ pub_cert_sort_model.set_sort_func(enumerations.PUBCERT_ORGANIZATION,
+ self.__sort_func,
+ enumerations.PUBCERT_ORGANIZATION)
+ pub_cert_sort_model.set_sort_func(enumerations.PUBCERT_NAME,
+ self.__sort_func,
+ enumerations.PUBCERT_NAME)
+
+ # Organization column - sort using custom __sort_func()
+ org_renderer = gtk.CellRendererText()
+ column = gtk.TreeViewColumn(_("Organization"),
+ org_renderer, text = enumerations.PUBCERT_ORGANIZATION)
+ column.set_expand(False)
+ column.set_sort_column_id(enumerations.PUBCERT_ORGANIZATION)
+ column.set_sort_indicator(True)
+ column.set_resizable(True)
+ self.w_pub_cert_treeview.append_column(column)
+
+ # Name column - sort using custom __sort_func()
+ name_renderer = gtk.CellRendererText()
+ column = gtk.TreeViewColumn(_("Name"),
+ name_renderer, text = enumerations.PUBCERT_NAME)
+ column.set_expand(True)
+ column.set_sort_column_id(enumerations.PUBCERT_NAME)
+ column.set_sort_indicator(True)
+ column.set_resizable(True)
+ self.w_pub_cert_treeview.append_column(column)
+
+ # Status column
+ status_renderer = gtk.CellRendererText()
+ column = gtk.TreeViewColumn(_("Status"),
+ status_renderer, text = enumerations.PUBCERT_STATUS)
+ column.set_expand(False)
+ column.set_sort_column_id(enumerations.PUBCERT_STATUS)
+ self.w_pub_cert_treeview.append_column(column)
+
+ self.w_pub_cert_treeview.get_selection().connect('changed',
+ self.__on_pub_cert_treeview_changed)
+ self.w_pub_cert_treeview.set_model(pub_cert_sort_model)
+
+ @staticmethod
+ def __get_pub_display_name(pub):
+ display_name = ""
+ if not pub:
+ return display_name
+
+ name = pub.prefix
+ alias = pub.alias
+ use_name = False
+ use_alias = False
+ if len(name) > 0:
+ use_name = True
+ if alias and len(alias) > 0 and alias != name:
+ use_alias = True
+
+ if use_name and not use_alias:
+ display_name = name
+ elif use_name and use_alias:
+ display_name = "%s (%s)" % (name, alias)
+ return display_name
+
+ def __prepare_pub_certs(self):
+ pub = self.repository_modify_publisher
+ if not pub:
+ return
+ sorted_model = self.w_pub_cert_treeview.get_model()
+ selection = self.w_pub_cert_treeview.get_selection()
+ selected_rows = selection.get_selected_rows()
+ self.w_pub_cert_treeview.set_model(None)
+ if not sorted_model:
+ return
+ model = sorted_model.get_model()
+ if not model:
+ return
+ model.clear()
+
+ self.orig_pub_cert_added_dict.clear()
+ self.all_pub_cert_added_dict.clear()
+ self.removed_orig_pub_cert_dict.clear()
+
+ pub_display_name = self.__get_pub_display_name(pub)
+ if pub_display_name != "":
+ self.w_pub_cert_label.set_markup(
+ _("<b>Certificates for publisher %s</b>") % pub_display_name)
+ else:
+ self.w_pub_cert_label.set_markup(
+ _("<b>Publisher certificates</b>"))
+
+ for h in pub.approved_ca_certs:
+ self.__add_cert_to_model(model,
+ pub.get_cert_by_hash(h), h, PUBCERT_APPROVED_STR)
+ for h in pub.revoked_ca_certs:
+ self.__add_cert_to_model(model,
+ pub.get_cert_by_hash(h), h, PUBCERT_REVOKED_STR)
+
+ self.w_pub_cert_treeview.set_model(sorted_model)
+ if len(pub.revoked_ca_certs) == 0 and len(pub.approved_ca_certs) == 0:
+ self.__set_empty_pub_cert()
+ return
+
+ sel_path = (0,)
+ if len(selected_rows) > 1 and len(selected_rows[1]) > 0:
+ sel_path = selected_rows[1][0]
+ self.__set_pub_cert_selection(sorted_model, sel_path)
+
+ def __add_cert_to_model(self, model, cert, ips_hash, status, path = "",
+ scroll_to=False, new=False):
+ pub = self.repository_modify_publisher
+ if not cert or not pub:
+ return
+ i = cert.get_subject()
+ organization = PUBCERT_NOTAVAILABLE
+ if len(i.get_entries_by_nid(i.nid["O"])) > 0:
+ organization = i.get_entries_by_nid(
+ i.nid["O"])[0].get_data().as_text()
+ name = PUBCERT_NOTAVAILABLE
+ if len(i.get_entries_by_nid(i.nid["CN"])) > 0:
+ name = i.get_entries_by_nid(
+ i.nid["CN"])[0].get_data().as_text()
+ if self.all_pub_cert_added_dict.has_key(cert.get_fingerprint('sha1')):
+ err = _("The publisher certificate:\n %s\n"
+ "has already been added.") % \
+ self.__get_cert_display_name(cert)
+ gui_misc.error_occurred(None, err,
+ _("Modify Publisher - %s") % self.__get_pub_display_name(pub),
+ gtk.MESSAGE_INFO)
+ return
+
+ self.all_pub_cert_added_dict[cert.get_fingerprint('sha1')] = ips_hash
+ itr = model.append(
+ [organization, name, status, ips_hash, path, cert, new])
+ if not new:
+ self.orig_pub_cert_added_dict[ips_hash] = status
+
+ if scroll_to:
+ path = model.get_path(itr)
+ sorted_model = self.w_pub_cert_treeview.get_model()
+ if not sorted_model:
+ return
+ sorted_path = sorted_model.convert_child_path_to_path(path)
+ self.w_pub_cert_treeview.scroll_to_cell(sorted_path)
+ selection = self.w_pub_cert_treeview.get_selection()
+ selection.select_path(sorted_path)
+
+ def __on_pub_cert_treeview_changed(self, treeselection):
+ selection = treeselection.get_selected_rows()
+ pathlist = selection[1]
+ if not pathlist or len(pathlist) == 0:
+ return
+ sorted_model = self.w_pub_cert_treeview.get_model()
+ if not sorted_model:
+ return
+ model = sorted_model.get_model()
+ path = pathlist[0]
+ child_path = sorted_model.convert_path_to_child_path(path)
+ self.__enable_disable_pub_cert_buttons(model, child_path)
+ self.__set_pub_cert_details(model, child_path)
+
+ def __enable_disable_pub_cert_buttons(self, model, path):
+ if not model or not path:
+ return
+ itr = model.get_iter(path)
+ status = model.get_value(itr, enumerations.PUBCERT_STATUS)
+ new = model.get_value(itr, enumerations.PUBCERT_NEW)
+
+ if status == PUBCERT_APPROVED_STR:
+ self.w_pub_cert_revoke_btn.set_sensitive(True)
+ self.w_pub_cert_reinstate_btn.set_sensitive(False)
+ else:
+ self.w_pub_cert_revoke_btn.set_sensitive(False)
+ self.w_pub_cert_reinstate_btn.set_sensitive(True)
+ if new:
+ self.w_pub_cert_revoke_btn.set_sensitive(False)
+ self.w_pub_cert_reinstate_btn.set_sensitive(False)
+ self.w_pub_cert_remove_btn.set_sensitive(True)
+
+ def __set_pub_cert_details(self, model, path):
+ itr = model.get_iter(path)
+ ips_hash = model.get_value(itr, enumerations.PUBCERT_IPSHASH)
+ cert = model.get_value(itr, enumerations.PUBCERT_XCERT_OBJ)
+ new = model.get_value(itr, enumerations.PUBCERT_NEW)
+ if not cert:
+ return
+ details_buffer = self.w_pub_cert_details_textview.get_buffer()
+ details_buffer.set_text("")
+ itr = details_buffer.get_end_iter()
+
+ labs = {}
+ labs["issued_to"] = _("Issued To:")
+ labs["common_name_to"] = gui_misc.PUBCERT_COMMON_NAME
+ labs["org_to"] = gui_misc.PUBCERT_ORGANIZATION
+ labs["org_unit_to"] = gui_misc.PUBCERT_ORGANIZATIONAL_UNIT
+ labs["issued_by"] = _("Issued By:")
+ labs["common_name_by"] = _(" Common Name (CN):")
+ labs["org_by"] = gui_misc.PUBCERT_ORGANIZATION
+ labs["org_unit_by"] = gui_misc.PUBCERT_ORGANIZATIONAL_UNIT
+ labs["validity"] = _("Validity:")
+ labs["issued_on"] = _(" Issued On:")
+ labs["fingerprints"] = _("Fingerprints:")
+ labs["sha1"] = _(" SHA1:")
+ labs["md5"] = _(" MD5:")
+ labs["ips"] = _(" IPS:")
+
+ text = {}
+ text["issued_to"] = ""
+ text["common_name_to"] = ""
+ text["org_to"] = ""
+ text["org_unit_to"] = ""
+ text["issued_by"] = ""
+ text["common_name_by"] = ""
+ text["org_by"] = ""
+ text["org_unit_by"] = ""
+ text["validity"] = ""
+ text["issued_on"] = ""
+ text["fingerprints"] = ""
+ text["sha1"] = ""
+ text["md5"] = ""
+ text["ips"] = ""
+
+ self._set_cert_issuer(text, cert.get_subject(), "to")
+ self._set_cert_issuer(text, cert.get_issuer(), "by")
+
+ eo = cert.get_not_after().get_datetime().date().isoformat()
+ today = datetime.datetime.today().date().isoformat()
+ validity_str = _("Validity:")
+ #TBD: may have an issue here in some locales if Validity string
+ #is very long then would only need one \t.
+ if eo < today:
+ validity_str += _("\t\t EXPIRED")
+ labs["validity"] = validity_str
+
+ io_str = cert.get_not_before().get_datetime().date().strftime("%x")
+ eo_str = cert.get_not_after().get_datetime().date().strftime("%x")
+ labs["issued_on"] += " " + io_str
+ text["issued_on"] = _("Expires On: %s") % eo_str
+
+ sha = cert.get_fingerprint('sha1')
+ md5 = cert.get_fingerprint('md5')
+ text["sha1"] = sha.lower()
+ text["md5"] = md5.lower()
+ text["ips"] = ips_hash.lower()
+
+ added = False
+ reinstated = False
+ if new:
+ if ips_hash == PUBCERT_NOTSET_HASH:
+ added = True
+ reinstated = False
+ else:
+ reinstated = True
+ added = False
+
+ gui_misc.set_pub_cert_details_text(labs, text,
+ self.w_pub_cert_details_textview, added, reinstated)
+
+ @staticmethod
+ def _set_cert_issuer(text, issuer, itype):
+ if len(issuer.get_entries_by_nid(issuer.nid["CN"])) > 0:
+ text["common_name_" + itype] = issuer.get_entries_by_nid(
+ issuer.nid["CN"])[0].get_data().as_text()
+ if len(issuer.get_entries_by_nid(issuer.nid["O"])) > 0:
+ text["org_" + itype] = issuer.get_entries_by_nid(
+ issuer.nid["O"])[0].get_data().as_text()
+ if len(issuer.get_entries_by_nid(issuer.nid["OU"])) > 0:
+ text["org_unit_" + itype] = issuer.get_entries_by_nid(
+ issuer.nid["OU"])[0].get_data().as_text()
+ else:
+ text["org_unit_" + itype] = PUBCERT_NOTAVAILABLE
+
+ def __get_pub_cert_filename(self, title, path = None):
+ if path == None or path == "":
+ path = tempfile.gettempdir()
+ filename = None
+ chooser = gtk.FileChooserDialog(title,
+ self.w_manage_publishers_dialog,
+ gtk.FILE_CHOOSER_ACTION_OPEN,
+ (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+ gtk.STOCK_OK, gtk.RESPONSE_OK))
+
+ file_filter = gtk.FileFilter()
+ file_filter.set_name(_("Certificate Files"))
+ file_filter.add_pattern("*.pem")
+ chooser.add_filter(file_filter)
+ chooser.set_current_folder(path)
+
+ response = chooser.run()
+ if response == gtk.RESPONSE_OK:
+ filename = chooser.get_filename()
+ chooser.destroy()
+
+ if filename != None:
+ info = os.path.split(filename)
+ self.gconf.last_add_pubcert_path = info[0]
+ return filename
+
+ def __on_pub_cert_add_clicked(self, widget):
+ filename = self.__get_pub_cert_filename(
+ _("Add Publisher Certificate"),
+ self.gconf.last_add_pubcert_path)
+ if filename == None:
+ return
+ try:
+ cert = self.__get_new_cert(filename)
+ sha = cert.get_fingerprint('sha1')
+ ips_hash = PUBCERT_NOTSET_HASH
+ status = PUBCERT_APPROVED_STR
+ new = True
+ #Restore orig cert if it was already added but just removed
+ if self.removed_orig_pub_cert_dict.has_key(sha):
+ ips_hash = self.removed_orig_pub_cert_dict[sha]
+ status = self.orig_pub_cert_added_dict[ips_hash]
+ filename = ""
+ new = False
+ del self.removed_orig_pub_cert_dict[sha]
+ sorted_model = self.w_pub_cert_treeview.get_model()
+ if not sorted_model:
+ return
+ model = sorted_model.get_model()
+ self.__add_cert_to_model(model, cert, ips_hash, status,
+ path=filename, scroll_to=True, new=new)
+ except api_errors.ApiException, e:
+ self.__show_errors([("", e)])
+ return
+
+ @staticmethod
+ def __get_new_cert(filename):
+ cert = None
+ try:
+ with open(filename, "rb") as fh:
+ s = fh.read()
+ except EnvironmentError, e:
+ if e.errno == errno.ENOENT:
+ raise api_errors.MissingFileArgumentException(
+ filename)
+ elif e.errno == errno.EACCES:
+ raise api_errors.PermissionsException(
+ filename)
+ raise api_errors.ApiException(e)
+ try:
+ cert = m2.X509.load_cert_string(s)
+ except m2.X509.X509Error, e:
+ raise api_errors.BadFileFormat(_("The file:\n"
+ " %s\nwas expected to be a PEM certificate but it "
+ "could not be read.") % filename)
+ return cert
+
+ def __on_pub_cert_reinstate_clicked(self, widget):
+ itr, sorted_model = self.__get_selected_pub_cert_itr_model()
+ if not itr or not sorted_model:
+ return
+ model = sorted_model.get_model()
+ child_itr = sorted_model.convert_iter_to_child_iter(None, itr)
+
+ ips_hash = model.get_value(child_itr, enumerations.PUBCERT_IPSHASH)
+ orig_status = ""
+ if self.orig_pub_cert_added_dict.has_key(ips_hash):
+ orig_status = self.orig_pub_cert_added_dict[ips_hash]
+ else:
+ #Should not be able to reinstate new cert, only existing ones
+ return
+ #Originally approved so just reset as there is nothing to do
+ if orig_status == PUBCERT_APPROVED_STR:
+ model.set_value(child_itr,
+ enumerations.PUBCERT_STATUS,
+ PUBCERT_APPROVED_STR)
+ self.__set_pub_cert_details(model,
+ model.get_path(child_itr))
+ self.__enable_disable_pub_cert_buttons(model,
+ model.get_path(child_itr))
+ return
+
+ filename = self.__get_pub_cert_filename(
+ _("Reinstate Publisher Certificate"),
+ self.gconf.last_add_pubcert_path)
+ if filename == None:
+ return
+
+ #Check the old cert and new ones match according to the sha fingerprint
+ cert = model.get_value(child_itr, enumerations.PUBCERT_XCERT_OBJ)
+ new_cert = self.__get_new_cert(filename)
+ if cert == None or new_cert == None:
+ #Must have exisitng cert and new one to reinstate
+ return
+ orig_sha = cert.get_fingerprint('sha1')
+ new_sha = new_cert.get_fingerprint('sha1')
+ if orig_sha != new_sha:
+ pub = self.repository_modify_publisher
+ if not pub:
+ return
+ gui_misc.error_occurred(None,
+ _("To reinstate the publisher certificate:\n %s\n"
+ "the original certificate file must be selected.") %
+ self.__get_cert_display_name(cert),
+ _("Modify Publisher - %s") % self.__get_pub_display_name(pub),
+ gtk.MESSAGE_INFO)
+ return
+ #Update model of existing cert which is to be reinstated by
+ #re-adding the cert as new
+ model.set_value(child_itr, enumerations.PUBCERT_STATUS,
+ PUBCERT_APPROVED_STR)
+ model.set_value(child_itr, enumerations.PUBCERT_PATH, filename)
+ model.set_value(child_itr, enumerations.PUBCERT_XCERT_OBJ, new_cert)
+ model.set_value(child_itr, enumerations.PUBCERT_NEW, True)
+ self.__set_pub_cert_details(model, model.get_path(child_itr))
+ self.__enable_disable_pub_cert_buttons(model,
+ model.get_path(child_itr))
+
+ @staticmethod
+ def __get_cert_display_name(cert):
+ cert_display_name = ""
+ if cert == None:
+ return cert_display_name
+ issuer = cert.get_subject()
+ cn = "-"
+ org = "-"
+ ou = "-"
+ if len(issuer.get_entries_by_nid(issuer.nid["CN"])) > 0:
+ cn = issuer.get_entries_by_nid(
+ issuer.nid["CN"])[0].get_data().as_text()
+ if len(issuer.get_entries_by_nid(issuer.nid["O"])) > 0:
+ org = issuer.get_entries_by_nid(
+ issuer.nid["O"])[0].get_data().as_text()
+ if len(issuer.get_entries_by_nid(issuer.nid["OU"])) > 0:
+ ou = issuer.get_entries_by_nid(
+ issuer.nid["OU"])[0].get_data().as_text()
+ else:
+ ou = PUBCERT_NOTAVAILABLE
+
+ if ou != PUBCERT_NOTAVAILABLE:
+ cert_display_name = \
+ "%s (CN) %s (O) %s (OU)" % (cn, org, ou) #No l10n required
+ else:
+ cert_display_name = "%s (CN) %s (O)" % (cn, org)#No l10n required
+ return cert_display_name
+
+ def __on_pub_cert_revoke_clicked(self, widget):
+ selection = self.w_pub_cert_treeview.get_selection()
+ if not selection:
+ return
+ selected_rows = selection.get_selected_rows()
+ if not selected_rows or len(selected_rows) < 2:
+ return
+ pathlist = selected_rows[1]
+ if not pathlist or len(pathlist) == 0:
+ return
+ path = pathlist[0]
+ self.__revoked(None, path)
+
+
+ def __revoked(self, cell, sorted_path):
+ sorted_model = self.w_pub_cert_treeview.get_model()
+ if not sorted_model:
+ return
+ model = sorted_model.get_model()
+ path = sorted_model.convert_path_to_child_path(sorted_path)
+ itr = model.get_iter(path)
+ if not itr:
+ return
+ status = model.get_value(itr, enumerations.PUBCERT_STATUS)
+ if status == PUBCERT_APPROVED_STR:
+ model.set_value(itr, enumerations.PUBCERT_STATUS,
+ PUBCERT_REVOKED_STR)
+ self.__enable_disable_pub_cert_buttons(model, path)
+ self.__set_pub_cert_details(model, path)
+
+ def __on_pub_cert_remove_clicked(self, widget):
+ itr, sorted_model = self.__get_selected_pub_cert_itr_model()
+ if not itr or not sorted_model:
+ return
+ sel_path = sorted_model.get_path(itr)
+ model = sorted_model.get_model()
+ child_itr = sorted_model.convert_iter_to_child_iter(None, itr)
+
+ cert = model.get_value(child_itr, enumerations.PUBCERT_XCERT_OBJ)
+ if self.all_pub_cert_added_dict.has_key(cert.get_fingerprint('sha1')):
+ del self.all_pub_cert_added_dict[cert.get_fingerprint('sha1')]
+
+ new = model.get_value(child_itr, enumerations.PUBCERT_NEW)
+ if not new:
+ sha = cert.get_fingerprint('sha1')
+ ips_hash = model.get_value(child_itr,
+ enumerations.PUBCERT_IPSHASH)
+ self.removed_orig_pub_cert_dict[sha] = ips_hash
+
+ model.remove(child_itr)
+ self.__set_pub_cert_selection(sorted_model, sel_path)
+
+ def __set_pub_cert_selection(self, sorted_model, sel_path):
+ len_smodel = len(sorted_model)
+ if len_smodel == 0:
+ self.__set_empty_pub_cert()
+ return
+ if len_smodel <= sel_path[0]:
+ sel_path = (len_smodel - 1,)
+ if sel_path[0] < 0:
+ sel_path = (0,)
+
+ self.w_pub_cert_treeview.scroll_to_cell(sel_path)
+ selection = self.w_pub_cert_treeview.get_selection()
+ selection.select_path(sel_path)
+
+ def __set_empty_pub_cert(self):
+ details_buffer = self.w_pub_cert_details_textview.get_buffer()
+ details_buffer.set_text("")
+ self.w_pub_cert_remove_btn.set_sensitive(False)
+ self.w_pub_cert_revoke_btn.set_sensitive(False)
+ self.w_pub_cert_reinstate_btn.set_sensitive(False)
+
+ def __get_selected_pub_cert_itr_model(self):
+ return self.__get_fitr_model_from_tree(self.w_pub_cert_treeview)
+
+ def __update_pub_certs(self):
+ errors = []
+ sorted_model = self.w_pub_cert_treeview.get_model()
+ if not sorted_model:
+ return errors
+ model = sorted_model.get_model()
+ if not model:
+ return errors
+
+ updated_pub_cert_dict = {}
+ add_pub_cert_dict = {}
+ iter_next = sorted_model.get_iter_first()
+ while iter_next != None:
+ itr = sorted_model.convert_iter_to_child_iter(None, iter_next)
+ ips_hash = model.get_value(itr, enumerations.PUBCERT_IPSHASH)
+ status = model.get_value(itr, enumerations.PUBCERT_STATUS)
+ path = model.get_value(itr, enumerations.PUBCERT_PATH)
+ new = model.get_value(itr, enumerations.PUBCERT_NEW)
+ #Both new and reinstated certs treated as new and to be added
+ if new:
+ add_pub_cert_dict[path] = True
+ else:
+ updated_pub_cert_dict[ips_hash] = status
+ iter_next = sorted_model.iter_next(iter_next)
+ for ips_hash, status in self.orig_pub_cert_added_dict.items():
+ if not updated_pub_cert_dict.has_key(ips_hash):
+ errors += self.__remove_pub_cert_for_publisher(ips_hash)
+ elif status != updated_pub_cert_dict[ips_hash] and \
+ updated_pub_cert_dict[ips_hash] == PUBCERT_REVOKED_STR:
+ errors += self.__revoke_pub_cert_for_publisher(ips_hash)
+ # Add and reinstate pub certs for publisher
+ for path in add_pub_cert_dict.keys():
+ errors += self.__add_pub_cert_to_publisher(path)
+
+ return errors
+
+ def __add_pub_cert_to_publisher(self, path):
+ errors = []
+ try:
+ with open(path, "rb") as fh:
+ s = fh.read()
+ except EnvironmentError, e:
+ if e.errno == errno.ENOENT:
+ errors.append(("",
+ api_errors.MissingFileArgumentException(path)))
+ elif e.errno == errno.EACCES:
+ errors.append(("", api_errors.PermissionsException(path)))
+ else:
+ errors.append(("", e))
+ try:
+ pub = self.repository_modify_publisher
+ if pub != None:
+ pub.approve_ca_cert(s)
+ except api_errors.ApiException, e:
+ errors.append(("", e))
+ return errors
+
+ def __revoke_pub_cert_for_publisher(self, ips_hash):
+ errors = []
+ try:
+ pub = self.repository_modify_publisher
+ if pub != None:
+ pub.revoke_ca_cert(ips_hash)
+ except api_errors.ApiException, e:
+ errors.append(("", e))
+ return errors
+
+ def __remove_pub_cert_for_publisher(self, ips_hash):
+ errors = []
+ try:
+ pub = self.repository_modify_publisher
+ if pub != None:
+ pub.unset_ca_cert(ips_hash)
+ except api_errors.ApiException, e:
+ errors.append(("", e))
+ return errors
+
def __init_pubs_tree_view(self, publishers_list):
publishers_list_filter = publishers_list.filter_new()
publishers_list_sort = gtk.TreeModelSort(publishers_list_filter)
@@ -627,8 +1406,17 @@
MODIFY_DIALOG_WIDTH_DEFAULT, -1)
if updated_modify_repository:
+ self.w_modify_repository_dialog.set_title(
+ _("Modify Publisher - %s") %
+ self.__get_pub_display_name(pub))
self.w_modify_repository_dialog.show_all()
+ pagenum = self.w_modify_pub_notebook.get_current_page()
+ if pagenum == MODIFY_NOTEBOOK_CERTIFICATE_PAGE:
+ gobject.idle_add(self.__prepare_pub_certs)
+ elif pagenum == MODIFY_NOTEBOOK_SIG_POLICY_PAGE:
+ gobject.idle_add(self.__prepare_pub_signature_policy)
+
def __update_repository_dialog_width(self, ssl_error):
if ssl_error == None:
self.w_modify_repository_dialog.set_size_request(
@@ -719,10 +1507,6 @@
if update_ssl:
self.w_repositorymodify_cert_entry.set_text(ssl_cert)
self.w_repositorymodify_key_entry.set_text(ssl_key)
- if len(ssl_cert) > 0 or len(ssl_key) > 0:
- self.w_repositoryssl_expander.set_expanded(True)
- else:
- self.w_repositoryssl_expander.set_expanded(False)
return True
def __add_mirror(self, new_mirror):
@@ -1228,6 +2012,8 @@
repo = pub.repository
pub.alias = alias
errors += self.__update_ssl_creds(pub, repo, ssl_cert, ssl_key)
+ errors += self.__update_pub_certs()
+ errors += self.__update_pub_sig_policy()
try:
errors += self.__update_publisher(pub, new_publisher=False)
except api_errors.UnknownRepositoryPublishers, e:
@@ -1598,6 +2384,17 @@
self.__rm_origin()
def __on_repositorymodifyok_clicked(self, widget):
+ pub = self.repository_modify_publisher
+ if pub == None:
+ return
+ error_dialog_title = _("Modify Publisher - %s") % \
+ self.__get_pub_display_name(pub)
+ text = self.w_pub_sig_name_entry.get_text()
+ req_names = self.w_pub_sig_name_radiobutton.get_active()
+ if not gui_misc.check_sig_required_names_policy(text,
+ req_names, error_dialog_title):
+ return
+
self.publishers_apply.set_title(_("Applying Changes"))
self.__run_with_prog_in_thread(self.__proceed_modifyrepo_ok,
self.w_manage_publishers_dialog)
--- a/src/packagemanager.py Fri May 13 11:36:32 2011 +0100
+++ b/src/packagemanager.py Fri May 13 15:17:29 2011 +0100
@@ -1460,13 +1460,13 @@
''' handler for manage publishers menu event '''
repository.Repository(self, self.image_directory,
action=enumerations.MANAGE_PUBLISHERS,
- main_window = self.w_main_window)
+ main_window = self.w_main_window, gconf = self.gconf)
def __on_file_add_publisher(self, widget):
''' handler for add publisher menu event '''
repository.Repository(self, self.image_directory,
action=enumerations.ADD_PUBLISHER,
- main_window = self.w_main_window)
+ main_window = self.w_main_window, gconf = self.gconf)
def __on_file_be_activate(self, widget):
''' handler for be menu event '''