bpo-31659: Use simple slicing to format PEM cert (GH-3849)
authorINADA Naoki <methane@users.noreply.github.com>
Mon, 2 Oct 2017 07:33:42 +0000 (16:33 +0900)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2017 07:33:42 +0000 (16:33 +0900)
commitb75a228af8c0553aef44e4e03763af90fbc8737f
tree557656c9ed12012c74c98c457b5a672df5fa4a52
parentedc05c5d88c1ce853b3d04b34679ed7d69c2142a
bpo-31659: Use simple slicing to format PEM cert (GH-3849)

DER_cert_to_PEM_cert() used textwrap.fill() to format PEM.
But it's library to wrap lines on word boundary, while PEM is
base64 encoded string.

Additionally, importing textwrap is little slow.
Lib/ssl.py