Skip to content

Commit a59c4ed

Browse files
committed
Added TLS cert pinset example, changed permissions on everything to 755 for consistency's sake
1 parent 9f41b45 commit a59c4ed

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

examples/client_subnet.py

100644100755
File mode changed.

examples/dane_encrypt.py

100644100755
File mode changed.

examples/pinset.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Note that we expect that each pin in the pinset list
3+
# must be prefaced with pin-<algorithm>= and the pin
4+
# itself must be base64-encoded and enclosed in double-
5+
# quotes. We may loosen this up in a future version
6+
#
7+
8+
import getdns
9+
c = getdns.Context()
10+
u = [ { 'address_data': '185.49.141.37',
11+
'address_type': 'IPv4',
12+
'tls_pubkey_pinset': ['pin-sha256="foxZRnIh9gZpWnl+zEiKa0EJ2rdCGroMWm02gaxSc9S="']
13+
}]
14+
c.resolution_type = getdns.RESOLUTION_STUB
15+
c.dns_transport_list = [ getdns.TRANSPORT_TLS ]
16+
c.upstream_recursive_servers = u
17+
f = c.address('getdnsapi.net')

examples/tsig_demo.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)