Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14195 > unrolled thread

PHP fails when using multi-domain certificates

Started byJustus Hoffmann <j-hoffmann@gmx.net>
First post2014-08-26 11:21 +0200
Last post2014-08-26 17:54 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.lang.php


Contents

  PHP fails when using multi-domain certificates Justus Hoffmann <j-hoffmann@gmx.net> - 2014-08-26 11:21 +0200
    Re: PHP fails when using multi-domain certificates Jerry Stuckle <jstucklex@attglobal.net> - 2014-08-26 07:38 -0400
    Re: PHP fails when using multi-domain certificates Arno Welzel <usenet@arnowelzel.de> - 2014-08-26 17:54 +0200

#14195 — PHP fails when using multi-domain certificates

FromJustus Hoffmann <j-hoffmann@gmx.net>
Date2014-08-26 11:21 +0200
SubjectPHP fails when using multi-domain certificates
Message-ID<c631sfFpifqU1@mid.individual.net>
Hi everyone,

I am trying to access an IMAP account via a PHP script using SSL:

$srv = '{mail.myhost.com:993/imap/ssl}';
$x=imap_open($srv, $user, $pass);

The certificate check fails, although the certificate itself is valid:

Certificate failure for mail.myhost.com: Unable to locate common name in
certificate: /OU=Domain Control Validated/OU=PositiveSSL Multi-Domain

It *does* work, when I add the option "novalidate-cert", however this would allow man-in-the-middle attacks since the script would accept any certificate.

I think the problem is, that the mail hoster uses a "multi-domain" certificate. Co-workers tell me, that PHP cannot handle this problem.

Is that correct? Do I really have to use the "novalidate-cert" option?

Thank you very much,
Justus

[toc] | [next] | [standalone]


#14197

FromJerry Stuckle <jstucklex@attglobal.net>
Date2014-08-26 07:38 -0400
Message-ID<lthrkh$cmc$1@dont-email.me>
In reply to#14195
On 8/26/2014 5:21 AM, Justus Hoffmann wrote:
> Hi everyone,
> 
> I am trying to access an IMAP account via a PHP script using SSL:
> 
> $srv = '{mail.myhost.com:993/imap/ssl}';
> $x=imap_open($srv, $user, $pass);
> 
> The certificate check fails, although the certificate itself is valid:
> 
> Certificate failure for mail.myhost.com: Unable to locate common name in
> certificate: /OU=Domain Control Validated/OU=PositiveSSL Multi-Domain
> 
> It *does* work, when I add the option "novalidate-cert", however this would allow man-in-the-middle attacks since the script would accept any certificate.
> 
> I think the problem is, that the mail hoster uses a "multi-domain" certificate. Co-workers tell me, that PHP cannot handle this problem.
> 
> Is that correct? Do I really have to use the "novalidate-cert" option?
> 
> Thank you very much,
> Justus
> 

PHP validates against the certificate's common name.  This would not
match to a multi-domain certificate.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#14199

FromArno Welzel <usenet@arnowelzel.de>
Date2014-08-26 17:54 +0200
Message-ID<53FCADB3.8050306@arnowelzel.de>
In reply to#14195
Justus Hoffmann schrieb am 2014-08-26 um 11:21:
> Hi everyone,
> 
> I am trying to access an IMAP account via a PHP script using SSL:
> 
> $srv = '{mail.myhost.com:993/imap/ssl}';
> $x=imap_open($srv, $user, $pass);
> 
> The certificate check fails, although the certificate itself is valid:
> 
> Certificate failure for mail.myhost.com: Unable to locate common name in
> certificate: /OU=Domain Control Validated/OU=PositiveSSL Multi-Domain

Where is the common name (CN)? This is the part which is checked - not
the OU.



-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web