Bug #75909 [Com]: dns_get_record does not support CAA record type on Windows

From: Date: Tue, 13 Feb 2018 04:05:28 +0000
Subject: Bug #75909 [Com]: dns_get_record does not support CAA record type on Windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213933@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75909&edit=1

 ID:                 75909
 Comment by:         mattficken@php.net
 Reported by:        philip at kerzap dot com
 Summary:            dns_get_record does not support CAA record type on
                     Windows
 Status:             Open
 Type:               Bug
 Package:            Network related
 Operating System:   Windows
 PHP Version:        7.2.2
 Block user comment: N
 Private report:     N

 New Comment:

Windows doesn't seem to support CAA at all, surprisingly.

For example, nslookup:
C:\php-sdk>nslookup
Default Server:  google-public-dns-a.google.com
Address:  8.8.8.8

> set q=CAA
unknown query type: CAA
> set q=TXT
>

Also, see: https://social.technet.microsoft.com/Forums/en-US/2399c372-89ad-4254-a7a9-7ab55af7a486/do-any-versions-of-dns-server-support-certification-authority-authorization-records?forum=winserveripamdhcpdns

Therefore, PHP could only do it with a userland DNS library. Should be a Wont fix :(   Thanks for
pointing this out though :)


Previous Comments:
------------------------------------------------------------------------
[2018-02-12 12:02:21] ab@php.net

Thanks for reporting. The current Windows API doesn't seem to provide a way to query these
record types. One can query an authority of a host, but not the autority record itself. Until
I've overseen something, there's no way to map this functionality currently :(

Thanks.

------------------------------------------------------------------------
[2018-02-02 22:07:20] philip at kerzap dot com

Description:
------------
Support for this record was added to dns_get_record in 7.0.16, but Windows uses a separate
implementation of dns_get_record (defined in dns_win32.c) that did not get updated.

The DNS_CAA constant is defined on Windows.

Original bug: https://bugs.php.net/bug.php?id=73850
Original commit: https://github.com/php/php-src/commit/280e9cb28d07a69e56ebcde4c368f3053298abe3

Test script:
---------------
var_dump(dns_get_record('google.com', DNS_CAA));

Expected result:
----------------
array(1) {
  [0]=>
  array(7) {
    ["host"]=>
    string(10) "google.com"
    ["class"]=>
    string(2) "IN"
    ["ttl"]=>
    int(60)
    ["type"]=>
    string(3) "CAA"
    ["flags"]=>
    int(0)
    ["tag"]=>
    string(5) "issue"
    ["value"]=>
    string(8) "pki.goog"
  }
}

Actual result:
--------------
PHP Warning: dns_get_record(): Type '8192' not supported in php shell code on line 1
bool(false)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=75909&edit=1


Thread (4 messages)

« previous php.bugs (#213933) next »