improve amount of copying for ssl

/cc @fijal

Merge request reports