getpatch: use ssl context for ssl endpoints