<!-- Thank you for your bug report. NOTE: If you're asking about how to use OpenSSL, this isn't the right forum. Please see our User Support resources: https://github.com/openssl/openssl/blob/master/.github/SUPPORT.md Please remember to tell us in what OpenSSL version you found the issue. For build issues: If this is a build issue, please include the configuration output as well as a log of all errors. Don't forget to include the exact commands you typed. With OpenSSL before 1.1.1, the configuration output comes from the configuration command. With OpenSSL 1.1.1 and on, it's the output of `perl configdata.pm --dump` For other issues: If it isn't a build issue, example code or commands to reproduce the issue is highly appreciated. Also, please remember to tell us if you worked with your own OpenSSL build or if it is system provided. Please remember to put ``` lines before and after any commands plus output and code, like this: ``` $ echo output output output output output output ``` ``` #include <stdio.h> int main() { int foo = 1; printf("%d\n", foo); } ``` --> The [manual page for i2d_ECDSA_SIG](https://www.openssl.org/docs/man1.1.1/man3/i2d_ECDSA_SIG.html) documents it as returning 0 on error. However, in fact, [it returns -1 on error](https://github.com/openssl/openssl/blob/0d03acea7aa45e94903fb12186ed6cc324eb1b03/crypto/ec/ec_asn1.c#L1196). Additionally, the manpage does not document how it modifies the `*pp` pointer.