• Russ Cox's avatar
    encoding/pem: change Encode, EncodeToMemory not to generate partial PEM blocks · c3fa046f
    Russ Cox authored
    Originally these routines could not fail except by
    returning errors from the underlying writer.
    
    Then we realized that header keys containing colons
    needed to be rejected, and we started returning an error
    from Encode. But that only happens after writing a
    partial PEM block to the underlying writer, which is
    unfortunate, but at least it was undocumented.
    
    CL 77790 then documented this unfortunate behavior.
    
    Instead of documenting unfortunate behavior, fix it.
    
    Change-Id: Ic7467a576c4cecd16a99138571a1269cc4f96204
    Reviewed-on: https://go-review.googlesource.com/82076
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    c3fa046f
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...