Fix type error in PEM processing
authorBenjamin Kaduk <bkaduk@akamai.com>
Tue, 30 Jan 2018 18:55:44 +0000 (12:55 -0600)
committerBen Kaduk <kaduk@mit.edu>
Fri, 9 Mar 2018 16:51:05 +0000 (10:51 -0600)
commitb0143b97529959470c90df157368c2925180e3c3
tree0650a9affce2191052d0062ebb5fe136c4f32044
parent37933acbeafef6db9a5c5681c1b5174cd91494bc
Fix type error in PEM processing

The get_name() helper was using a variable of type size_t to hold the
result of BIO_gets(), but BIO_gets() returns int and makes use of negative
values to indicate error conditions.

Change the type of the local variable to match, and propagate that
through to other places in the file to avoid -Wsign-compare issues.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5211)
crypto/pem/pem_lib.c