summaryrefslogtreecommitdiffstats
path: root/API.txt
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-02-16 13:07:13 +0100
committerRob Crittenden <rcritten@redhat.com>2011-02-16 22:04:44 -0500
commit36070555d1bd49aa1b25180db982a31dbac694a1 (patch)
treeade3b61a36e61ff84b72fad2a4dadb181bca8dc6 /API.txt
parent669c9d118027e890b4f6ed130815757fc4977e7a (diff)
downloadfreeipa-36070555d1bd49aa1b25180db982a31dbac694a1.tar.gz
freeipa-36070555d1bd49aa1b25180db982a31dbac694a1.tar.xz
freeipa-36070555d1bd49aa1b25180db982a31dbac694a1.zip
Validate and convert certificate SN
The cert plugin only worked OK with decimal certificate serial numbers. This patch allows specifying the serial number in hexadecimal, too. The conversion now works such that: * with no explicit radix, a best-effort conversion is done using int(str, 0) in python. If the format is ambiguous, decimal takes precedence. * a hexadecimal radix can be specified explicitly with the traditional 0x prefix https://fedorahosted.org/freeipa/ticket/958 https://fedorahosted.org/freeipa/ticket/953
Diffstat (limited to 'API.txt')
-rw-r--r--API.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/API.txt b/API.txt
index 557a0e80c..1f956ec77 100644
--- a/API.txt
+++ b/API.txt
@@ -303,7 +303,7 @@ output: Output('count', <type 'int'>, Gettext('', domain='ipa', localedir=None))
output: Output('results', <type 'list'>, Gettext('', domain='ipa', localedir=None))
command: cert_remove_hold
args: 1,0,1
-arg: Str('serial_number', label=Gettext('Serial number', domain='ipa', localedir=None))
+arg: Str('serial_number', validate_serial_number, label=Gettext('Serial number', domain='ipa', localedir=None), normalizer=normalize_serial_number)
output: Output('result', None, None)
command: cert_request
args: 1,3,1
@@ -314,12 +314,12 @@ option: Flag('add', autofill=True, default=False,lag('add', autofill=True, defau
output: Output('result', <type 'dict'>, Gettext('Dictionary mapping variable name to value', domain='ipa', localedir=None))
command: cert_revoke
args: 1,1,1
-arg: Str('serial_number', label=Gettext('Serial number', domain='ipa', localedir=None))
+arg: Str('serial_number', validate_serial_number, label=Gettext('Serial number', domain='ipa', localedir=None), normalizer=normalize_serial_number)
option: Int('revocation_reason?', default=0, label=Gettext('Reason', domain='ipa', localedir=None), maxvalue=10, minvalue=0)
output: Output('result', None, None)
command: cert_show
args: 1,1,1
-arg: Str('serial_number', label=Gettext('Serial number', domain='ipa', localedir=None))
+arg: Str('serial_number', validate_serial_number, label=Gettext('Serial number', domain='ipa', localedir=None), normalizer=normalize_serial_number)
option: Str('out?', exclude='webui', label=Gettext('Output filename', domain='ipa', localedir=None))
output: Output('result', None, None)
command: cert_status