mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-28 16:29:54 +02:00
updated options for drop downs for dnssec ds and key data
This commit is contained in:
parent
2c69d720bc
commit
6950de9d6b
2 changed files with 40 additions and 26 deletions
|
@ -1,28 +1,37 @@
|
|||
# common.py
|
||||
#
|
||||
# ALGORITHM_CHOICES are options for alg attribute in DS Data and Key Data
|
||||
# reference: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
|
||||
ALGORITHM_CHOICES = [
|
||||
(1, "ERSA/MD5 [RSAMD5]"),
|
||||
(2 , "Diffie-Hellman [DH]"),
|
||||
(3 ,"DSA/SHA-1 [DSA]"),
|
||||
(5 ,"RSA/SHA-1 [RSASHA1]"),
|
||||
(6 ,"DSA-NSEC3-SHA1"),
|
||||
(7 ,"RSASHA1-NSEC3-SHA1"),
|
||||
(8 ,"RSA/SHA-256 [RSASHA256]"),
|
||||
(10 ,"RSA/SHA-512 [RSASHA512]"),
|
||||
(12 ,"GOST R 34.10-2001 [ECC-GOST]"),
|
||||
(13 ,"ECDSA Curve P-256 with SHA-256 [ECDSAP256SHA256]"),
|
||||
(14 ,"ECDSA Curve P-384 with SHA-384 [ECDSAP384SHA384]"),
|
||||
(15 ,"Ed25519"),
|
||||
(16 ,"Ed448"),
|
||||
(1, "(1) ERSA/MD5 [RSAMD5]"),
|
||||
(2, "(2) Diffie-Hellman [DH]"),
|
||||
(3, "(3) DSA/SHA-1 [DSA]"),
|
||||
(5, "(5) RSA/SHA-1 [RSASHA1]"),
|
||||
(6, "(6) DSA-NSEC3-SHA1"),
|
||||
(7, "(7) RSASHA1-NSEC3-SHA1"),
|
||||
(8, "(8) RSA/SHA-256 [RSASHA256]"),
|
||||
(10, "(10) RSA/SHA-512 [RSASHA512]"),
|
||||
(12, "(12) GOST R 34.10-2001 [ECC-GOST]"),
|
||||
(13, "(13) ECDSA Curve P-256 with SHA-256 [ECDSAP256SHA256]"),
|
||||
(14, "(14) ECDSA Curve P-384 with SHA-384 [ECDSAP384SHA384]"),
|
||||
(15, "(15) Ed25519"),
|
||||
(16, "(16) Ed448"),
|
||||
]
|
||||
# Q: What are the options?
|
||||
# DIGEST_TYPE_CHOICES are options for digestType attribute in DS Data
|
||||
# reference: https://datatracker.ietf.org/doc/html/rfc4034#appendix-A.2
|
||||
DIGEST_TYPE_CHOICES = [
|
||||
(0, "Reserved"),
|
||||
(1, "SHA-256"),
|
||||
(0, "(0) Reserved"),
|
||||
(1, "(1) SHA-256"),
|
||||
]
|
||||
# Flag choices
|
||||
# PROTOCOL_CHOICES are options for protocol attribute in Key Data
|
||||
# reference: https://datatracker.ietf.org/doc/html/rfc4034#section-2.1.2
|
||||
PROTOCOL_CHOICES = [
|
||||
(3, "(3) DNSSEC"),
|
||||
]
|
||||
# FLAG_CHOICES are options for flags attribute in Key Data
|
||||
# reference: https://datatracker.ietf.org/doc/html/rfc4034#section-2.1.1
|
||||
FLAG_CHOICES = [
|
||||
(0, "0"),
|
||||
(256, "256"),
|
||||
(257, "257"),
|
||||
(0, "(0)"),
|
||||
(256, "(256) ZSK"),
|
||||
(257, "(257) KSK"),
|
||||
]
|
||||
|
|
|
@ -7,7 +7,7 @@ from django.forms import formset_factory
|
|||
from phonenumber_field.widgets import RegionalPhoneNumberWidget
|
||||
|
||||
from ..models import Contact, DomainInformation
|
||||
from .common import ALGORITHM_CHOICES, DIGEST_TYPE_CHOICES, FLAG_CHOICES
|
||||
from .common import ALGORITHM_CHOICES, DIGEST_TYPE_CHOICES, FLAG_CHOICES, PROTOCOL_CHOICES
|
||||
|
||||
class DomainAddUserForm(forms.Form):
|
||||
|
||||
|
@ -230,13 +230,18 @@ class DomainKeydataForm(forms.Form):
|
|||
choices=FLAG_CHOICES,
|
||||
)
|
||||
|
||||
protocol = forms.IntegerField(
|
||||
max_value=3,
|
||||
min_value=3,
|
||||
initial=3,
|
||||
protocol = forms.TypedChoiceField(
|
||||
required=True,
|
||||
disabled=True,
|
||||
label="Protocol",
|
||||
choices=PROTOCOL_CHOICES,
|
||||
)
|
||||
# protocol = forms.IntegerField(
|
||||
# max_value=3,
|
||||
# min_value=3,
|
||||
# initial=3,
|
||||
# required=True,
|
||||
# disabled=True,
|
||||
# )
|
||||
|
||||
algorithm = forms.TypedChoiceField(
|
||||
required=True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue