csrgen_ffi: cast the DN value to unsigned char *

cffi throws warnings during the implicit cast from char * to
unsigned char * since the support of these casts is nearing
its end of life.

https://pagure.io/freeipa/issue/7131
This commit is contained in:
Stanislav Laznicka 2017-10-03 09:32:34 +02:00
parent 0d7daf0495
commit 03786ad9f3

View File

@ -206,7 +206,8 @@ def _parse_dn_section(subj, dn_sk):
else:
mval = 0
if not X509_NAME_add_entry_by_txt(
subj, rdn_type, MBSTRING_UTF8, v.value, -1, -1, mval):
subj, rdn_type, MBSTRING_UTF8,
_ffi.cast("unsigned char *", v.value), -1, -1, mval):
_raise_openssl_errors()
if not X509_NAME_entry_count(subj):