[Mono-list] SSL Certificate Store

Abe Gillespie abe.gillespie at gmail.com
Tue Jun 1 14:20:11 EDT 2010


Well, I grepped around the source and found the path for the user is
/usr-dir/.config/.mono (thanks, Sebastien for cluing me into "man
mono").  Unfortunately blowing this away and redoing mozroots and
certmgr doesn't seem to be working on my CentOS machine.  Can anyone
confirm this is a bug?

mono --version
Mono JIT compiler version 2.4.2.3 (tarball Wed Mar 10 15:11:17 EST 2010)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
	TLS:           __thread
	GC:            Included Boehm (with typed GC)
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  x86
	Disabled:      none

Here's the code that's failing:

        static void SendEmail()
        {
            var sender = "sender at gmail.com";
            var email = "receiver at mail.com";
			
            var from = new MailAddress(sender, "Sender");
            var to = new MailAddress(email);
            var mail = new MailMessage(from, to);

            // Set the content.
            mail.Subject = "Subject";
            mail.Body = "Body";

            // Send the message.
            SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
            smtp.EnableSsl = true;
            smtp.Credentials = new NetworkCredential(sender, "password");

            // Timeouts may occur while sending - attempt it three times.
            var sent = false;
            var attempts = 0;
            while (!sent && attempts < 3)
            {
                ++attempts;

                try
                {
                    smtp.Send(mail);
                    sent = true;
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    if (e.InnerException != null)
                        Console.WriteLine(e.InnerException.Message);

                    // Give it some time.
                    Thread.Sleep(1000);
                }
            }

            Console.WriteLine("sent: {0}", sent);
        }

On Tue, Jun 1, 2010 at 1:51 PM, Abe Gillespie <abe.gillespie at gmail.com> wrote:
> Anyway to blow the entire thing away?  ... or at least get the path to
> the cert store (machine and user)?  Google's Gmail cert updated in
> April and now my service can no longer send emails.  I did mozroots
> and certmgr for both user and machine and it's still failing (CentOS).
>  I did the same for my test OS X machine and it fixed it.  Can I just
> delete the cert store and start from scratch?  If so, where is it?  Or
> is there something else I should try?
>
> Thanks.
> -Abe
>


More information about the Mono-list mailing list