Browse Source

Merge pull request #191 from github/new-sshfp-values

Support for SSHFP ECDSA (3) and SHA-256 (2)
pull/196/head
Ross McFarland 8 years ago
committed by GitHub
parent
commit
5138d06162
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      octodns/record.py
  2. +3
    -3
      tests/test_octodns_record.py

+ 2
- 2
octodns/record.py View File

@ -678,8 +678,8 @@ class PtrRecord(_ValueMixin, Record):
class SshfpValue(object): class SshfpValue(object):
VALID_ALGORITHMS = (1, 2)
VALID_FINGERPRINT_TYPES = (1,)
VALID_ALGORITHMS = (1, 2, 3)
VALID_FINGERPRINT_TYPES = (1, 2)
@classmethod @classmethod
def _validate_value(cls, value): def _validate_value(cls, value):


+ 3
- 3
tests/test_octodns_record.py View File

@ -1360,7 +1360,7 @@ class TestRecordValidation(TestCase):
'ttl': 600, 'ttl': 600,
'value': { 'value': {
'algorithm': 'nope', 'algorithm': 'nope',
'fingerprint_type': 1,
'fingerprint_type': 2,
'fingerprint': 'bf6b6825d2977c511a475bbefb88aad54a92ac73' 'fingerprint': 'bf6b6825d2977c511a475bbefb88aad54a92ac73'
} }
}) })
@ -1386,7 +1386,7 @@ class TestRecordValidation(TestCase):
'type': 'SSHFP', 'type': 'SSHFP',
'ttl': 600, 'ttl': 600,
'value': { 'value': {
'algorithm': 1,
'algorithm': 2,
'fingerprint': 'bf6b6825d2977c511a475bbefb88aad54a92ac73' 'fingerprint': 'bf6b6825d2977c511a475bbefb88aad54a92ac73'
} }
}) })
@ -1398,7 +1398,7 @@ class TestRecordValidation(TestCase):
'type': 'SSHFP', 'type': 'SSHFP',
'ttl': 600, 'ttl': 600,
'value': { 'value': {
'algorithm': 1,
'algorithm': 3,
'fingerprint_type': 'yeeah', 'fingerprint_type': 'yeeah',
'fingerprint': 'bf6b6825d2977c511a475bbefb88aad54a92ac73' 'fingerprint': 'bf6b6825d2977c511a475bbefb88aad54a92ac73'
} }


Loading…
Cancel
Save