convert cert and private key creation to use context managers
convert cert and private key creation to use context managers

pyca/pyopenssl,mitghi/pyopenssl,mhils/pyopenssl,aalba6675/pyopenssl,mschmo/pyopenssl,adamwolf/pyopenssl,hynek/pyopenssl,samv/pyopenssl,sholsapp/pyopenssl,sorenh/pyopenssl,reaperhulk/pyopenssl,aalba6675/pyopenssl,hynek/pyopenssl,mitghi/pyopenssl,kjav/pyopenssl,daodaoliang/pyopenssl,reaperhulk/pyopenssl,r0ro/pyopenssl,mhils/pyopenssl,r0ro/pyopenssl