bug 1017: Read the certificate before sending it