Skip to content

Commit 8b95fe4

Browse files
authored
Merge pull request #44 from passivetotal/certsearch-name
Use name field for SSL certificate searches
2 parents 8e9850a + 5af48ba commit 8b95fe4

File tree

6 files changed

+34
-5
lines changed

6 files changed

+34
-5
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# Changelog
22

33

4+
## v2.5.8
5+
6+
#### Enhancements
7+
8+
- `certificates` property of `analyzer.Hostname` objects now returns same list of SSL
9+
certificates as the UI, enabled by a CertificateField search with the field set to
10+
`name`. This activates special-case functionality in the API that performs a
11+
substring search for a hostname across both subjectAlternativeNames and subjectCommonName fields
12+
The previous version only looked at the `subjectAlternativeNames` field. A more narrow
13+
search across specific fields is still available by instantiating an
14+
`analyzer.CertificateField` object directly.
15+
- Docs now show current version number and link to this changelog hosted on GitHub.
16+
17+
18+
419
## v2.5.7
520

621
#### Enhancements

docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ RiskIQ PassiveTotal API.
1212

1313
Learn more at `community.riskiq.com <https://community.riskiq.com>`_
1414

15+
Current Version: |release|
16+
^^^^^^^^^^^^^^^^^^^^^^^^^^
17+
`View the changelog <https://github.com/passivetotal/python_api/blob/master/CHANGELOG.md>`_
18+
on the GitHub project page.
19+
1520
Contents:
1621

1722
.. toctree::

passivetotal/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION="2.5.7"
1+
VERSION="2.5.8"

passivetotal/analyzer/hostname.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def certificates(self):
180180
181181
:rtype: :class:`passivetotal.analyzer.ssl.Certificates`
182182
"""
183-
return CertificateField('subjectAlternativeName', self._hostname).certificates
183+
return CertificateField('name', self._hostname).certificates
184184

185185
@property
186186
def whois(self):

passivetotal/analyzer/pdns.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
class PdnsResolutions(RecordList, ForPandas):
88

9-
"""Historical passive DNS resolution records."""
9+
"""Historical passive DNS resolution records.
10+
11+
Provides a list-like interface to a collection of
12+
:class:`PdnsRecord` objects.
13+
"""
1014

1115
def __init__(self, api_response = None, query=None):
1216
super().__init__(api_response, query)
@@ -260,7 +264,11 @@ def resolutions(self):
260264
Bounded by dates set in :meth:`passivetotal.analyzer.set_date_range`.
261265
`timeout` and `sources` params are also set by the analyzer configuration.
262266
263-
Provides list of :class:`passivetotal.analyzer.pdns.PdnsRecord` objects.
267+
Provides a list of
268+
:class:`passivetotal.analyzer.pdns.PdnsRecord` objects contained in a
269+
:class:`passivetotal.analyzer.pdns.PdnsResolutions` object.
270+
271+
:rtype: :class:`passivetotal.analyzer.pdns.PdnsResolutions`
264272
"""
265273
if getattr(self, '_resolutions', None) is not None:
266274
return self._resolutions

passivetotal/common/const.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"subjectLocalityName", "issuerStreetAddress",
2121
"issuerLocalityName", "subjectGivenName",
2222
"subjectProvince", "issuerSerialNumber",
23-
"issuerEmailAddress","subjectAlternativeName"]
23+
"issuerEmailAddress","subjectAlternativeName",
24+
"name"]
2425

2526

2627
ATTRIBUTE_APPROVED_FIELDS = [

0 commit comments

Comments
 (0)