pki_crypto: Use temporary pointer when using i2d_*
These functions modify the provided pointer by advancing to the end of
if (point to the byte after the last written). This makes the pointer
invalid, making necessary to use a temporary variable.
Signed-off-by: Anderson Toshiyuki Sasaki <email@example.com>
Reviewed-by: Andreas Schneider <firstname.lastname@example.org>