alex / letsencrypt-aws

BSD 3-Clause "New" or "Revised" License
727 stars 121 forks source link

TypeError: initializer for ctype 'char[]' must be a bytes or list or tuple, not str #78

Closed rustyautopsy closed 8 years ago

rustyautopsy commented 8 years ago

Receiving following error...

2016-09-16 13:37:46 [startup]
2016-09-16 13:37:46 [running] mode='single'
2016-09-16 13:37:46 [updating-elb] elb_name='XXXXXXXXXXXXXXXXXXX'
Traceback (most recent call last):
  File "/opt/letsencrypt-aws/letsencrypt-aws.py", line 577, in <module>
    cli()
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/opt/letsencrypt-aws/letsencrypt-aws.py", line 540, in update_certificates
    force_issue, certificate_requests
  File "/opt/letsencrypt-aws/letsencrypt-aws.py", line 432, in update_certs
    cert_request,
  File "/opt/letsencrypt-aws/letsencrypt-aws.py", line 344, in update_cert
    current_cert = cert_request.cert_location.get_current_certificate()
  File "/opt/letsencrypt-aws/letsencrypt-aws.py", line 96, in get_current_certificate
    self.iam_client, elb_listener["SSLCertificateId"]
  File "/opt/letsencrypt-aws/letsencrypt-aws.py", line 58, in _get_iam_certificate
    default_backend(),
  File "/usr/local/lib/python3.4/dist-packages/cryptography/x509/base.py", line 42, in load_pem_x509_certificate
    return backend.load_pem_x509_certificate(data)
  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/multibackend.py", line 325, in load_pem_x509_certificate
    return b.load_pem_x509_certificate(data)
  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 1118, in load_pem_x509_certificate
    mem_bio = self._bytes_to_bio(data)
  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 452, in _bytes_to_bio
    data_char_p = self._ffi.new("char[]", data)
TypeError: initializer for ctype 'char[]' must be a bytes or list or tuple, not str

Pip packages and versions...

acme (0.9.0.dev0, /opt/letsencrypt-aws/src/acme/acme)
awscli (1.10.65)
boto3 (1.4.0)
botocore (1.4.55)
cffi (1.8.2)
click (6.6)
colorama (0.3.7)
command-not-found (0.3)
cryptography (1.5)
dnspython (1.14.0)
docutils (0.12)
idna (2.1)
jmespath (0.9.0)
language-selector (0.1)
mock (2.0.0)
ndg-httpsclient (0.4.2)
pbr (1.10.0)
pip (8.1.2)
pyasn1 (0.1.9)
pycparser (2.14)
pycurl (7.19.3)
pygobject (3.12.0)
pyOpenSSL (16.1.0)
pyRFC3339 (1.0)
python-apt (0.9.3.5ubuntu2)
python-dateutil (2.5.3)
pytz (2016.6.1)
requests (2.11.1)
rfc3986 (0.4.1)
rsa (3.4.2)
s3transfer (0.1.4)
setuptools (27.2.0)
six (1.10.0)
ufw (0.34-rc-0ubuntu2)
unattended-upgrades (0.1)
wheel (0.29.0)

Any help would be greatly appreciated.

Cheers.