Write certificate on read instead of write.

[#81019816]

OG PR here: #233