mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge branch 'master' of https://github.com/sriharshak/xenadmin
This commit is contained in:
commit
6c202460d9
@ -628,7 +628,7 @@
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="checkForUpdatesNowButton.Text" xml:space="preserve">
|
||||
<value>Check for &Updates Now</value>
|
||||
<value>&Check for Updates Now</value>
|
||||
</data>
|
||||
<data name="checkForUpdatesNowButton.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
|
@ -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
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user