Ticket #6286: untangle-6286.patch

File untangle-6286.patch, 3.0 KB (added by Hynek Schlawack, 7 years ago)

Untangled as per jp’s request.

  • twisted/internet/endpoints.py

    # Bazaar merge directive format 2 (Bazaar 0.90)
    # revision_id: hs@ox.cx-20130308172707-zfc1cpf631duoprf
    # target_branch: http://svn.twistedmatrix.com/bzr/Twisted/branches\
    #   /sslendpoint-certificateoptions-6286/
    # testament_sha1: dce9504cd559b1d475a0ac5bcfdecacec9ff6c6c
    # timestamp: 2013-03-08 18:36:22 +0100
    # base_revision_id: svn-v4:bbbe8e31-12d6-0310-92fd-\
    #   ac37d47ddeeb:branches/sslendpoint-certificateoptions-6286:37446
    # 
    # Begin patch
    === modified file 'twisted/internet/endpoints.py'
     
    769769        kw['method'] = ssl.SSL.SSLv23_METHOD
    770770    certPEM = FilePath(certKey).getContent()
    771771    keyPEM = FilePath(privateKey).getContent()
     772    privateCertificate = ssl.PrivateCertificate.loadPEM(certPEM + keyPEM)
    772773    cf = ssl.CertificateOptions(
    773         privateKey=ssl.PrivateCertificate.loadPEM(
    774             keyPEM + certPEM).privateKey.original,
    775         certificate=ssl.Certificate.loadPEM(certPEM).original, **kw)
     774        privateKey=privateCertificate.privateKey.original,
     775        certificate=privateCertificate.original,
     776        **kw
     777    )
    776778    return ((int(port), factory, cf),
    777779            {'interface': interface, 'backlog': int(backlog)})
    778780