Hi,
(I've posted the question on MSDN too :
https://social.msdn.microsoft.com/Forum ... arpgeneral)
I've generated a certificate throw FileZilla FTP Server interface latest version (tried with both 1024 & 2048 bits).
But during .CER file load, an exception is thrown during call to CreateFromCertFile() :
'System.Security.Cryptography.CryptographicException' - "Impossible de trouver l'objet requis".
string filename = @"D:\certificate.cer";
if (File.Exists(filename))
{
try
{
X509Certificate cert = X509Certificate.CreateFromCertFile(filename);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
Does someone knows about it ?
Thanks,
Vincent
Filezilla X509 certificate not loaded by X509Certificate C# class
Moderator: Project members
Re: Filezilla X509 certificate not loaded by X509Certificate C# class
FileZilla Server creates syntactically valid files certificates. Since Windows' cryptographic libraries used by .net are closed-source, only Microsoft can answer your question for certain.
Re: Filezilla X509 certificate not loaded by X509Certificate C# class
Hi,
I had an answer from MSDN.
the X509Certificate class support only ASN.1 DER :
https://msdn.microsoft.com/fr-fr/librar ... 2147217396
So, what is Filezilla version ?
Vincent
I had an answer from MSDN.
the X509Certificate class support only ASN.1 DER :
https://msdn.microsoft.com/fr-fr/librar ... 2147217396
So, what is Filezilla version ?
Vincent
Re: Filezilla X509 certificate not loaded by X509Certificate C# class
It's in PEM format. Basically just base64 encoded DER enclosed in begin and end lines.