freeipa/ipatests/test_pkcs10
Petr Viktorin eab334dde8 Handle binascii.Error from base64.b64decode()
In Python 3, the base64.b64decode function raises binascii.Error (a ValueError
subclass) when it finds incorrect padding. In Python 2 it raises TypeError.

Callers should usually handle ValueError; unless they are specifically
concerned with handling base64 padding issues).

In some cases, callers should handle ValueError:
- ipalib.pkcs10 (get_friendlyname, load_certificate_request): callers should
  handle ValueError
- ipalib.x509 (load_certificate*, get_*): callers should handle ValueError

In other cases ValueError is handled:
- ipalib.parameters
- ipapython.ssh
- ipalib.rpc (json_decode_binary - callers already expect ValueError)
- ipaserver.install.ldapupdate

Elsewhere no error handling is done, because values come from trusted
sources, or are pre-validated:
- vault plugin
- ipaserver.install.cainstance
- ipaserver.install.certs
- ipaserver.install.ipa_otptoken_import

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-10-22 18:34:46 +02:00
..
__init__.py Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test0.csr Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test1.csr Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test2.csr Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test3.csr Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test4.csr Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test5.csr Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test_pkcs10.py Handle binascii.Error from base64.b64decode() 2015-10-22 18:34:46 +02:00