From 5139b35f8c8f6d85b5d84632472b5692fe975174 Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Wed, 18 Mar 2009 15:59:57 +0100 Subject: [PATCH] Bug 453466 - in ff3 an imported self-signed server certificate can't be marked trusted (edit button disabled), r=honzab --- security/manager/ssl/src/nsCertOverrideService.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/security/manager/ssl/src/nsCertOverrideService.cpp b/security/manager/ssl/src/nsCertOverrideService.cpp index 916b4637c08..0efb04c2f87 100644 --- a/security/manager/ssl/src/nsCertOverrideService.cpp +++ b/security/manager/ssl/src/nsCertOverrideService.cpp @@ -903,10 +903,12 @@ void nsCertOverrideService::GetHostWithPort(const nsACString & aHostName, PRInt32 aPort, nsACString& _retval) { nsCAutoString hostPort(aHostName); - if (aPort == -1) + if (aPort == -1) { aPort = 443; - hostPort.AppendLiteral(":"); - hostPort.AppendInt(aPort); - + } + if (!hostPort.IsEmpty()) { + hostPort.AppendLiteral(":"); + hostPort.AppendInt(aPort); + } _retval.Assign(hostPort); -} \ No newline at end of file +}