This commit is contained in:
CITRITE\sriharshak 2016-05-05 15:16:34 +05:30
commit 6c202460d9
4 changed files with 33 additions and 2 deletions

View File

@ -628,7 +628,7 @@
<value>3</value>
</data>
<data name="checkForUpdatesNowButton.Text" xml:space="preserve">
<value>Check for &amp;Updates Now</value>
<value>&amp;Check for Updates Now</value>
</data>
<data name="checkForUpdatesNowButton.Visible" type="System.Boolean, mscorlib">
<value>False</value>

View File

@ -280,7 +280,7 @@ namespace XenAdmin.Wizards.ExportWizard
if (m_checkBoxManifest.Checked && m_checkBoxSign.Checked)
{
if (String.IsNullOrEmpty(m_textBoxCertificate.Text) || String.IsNullOrEmpty(m_textBoxPrivateKeyPwd.Text)
|| !PerformCheck(CheckCertificatePathValid, CheckCertificatePathExists, CheckSignPasswordValid))
|| !PerformCheck(CheckCertificatePathValid, CheckCertificatePathExists, CheckSignPasswordValid, CheckCertificateValid))
{
m_pictureBoxTickValidate.Visible = false;
m_isSignatureOk = false;
@ -336,6 +336,25 @@ namespace XenAdmin.Wizards.ExportWizard
return true;
}
/// <summary>
/// Verify the certificate used to sign the package.
/// </summary>
private bool CheckCertificateValid(out string error)
{
error = string.Empty;
try
{
if (Certificate != null && Certificate.Verify())
return true;
}
catch (CryptographicException)
{ }
error = Messages.EXPORT_SECURITY_PAGE_ERROR_CERTIFICATE_INVALID;
return false;
}
#endregion
#region Control event handlers

View File

@ -14139,6 +14139,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to The certificate is invalid..
/// </summary>
public static string EXPORT_SECURITY_PAGE_ERROR_CERTIFICATE_INVALID {
get {
return ResourceManager.GetString("EXPORT_SECURITY_PAGE_ERROR_CERTIFICATE_INVALID", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Certificate path is invalid..
/// </summary>

View File

@ -4997,6 +4997,9 @@ Would you like to eject these ISOs before continuing?</value>
<data name="EXPORT_OPTIONS_PAGE_TITLE" xml:space="preserve">
<value>Select the manifest, signing and output file format options you want</value>
</data>
<data name="EXPORT_SECURITY_PAGE_ERROR_CERTIFICATE_INVALID" xml:space="preserve">
<value>The certificate is invalid.</value>
</data>
<data name="EXPORT_SECURITY_PAGE_ERROR_CERT_NON_EXIST" xml:space="preserve">
<value>Certificate file does not exist.</value>
</data>