Allow to read ber integers with fancy size when the result is ignored

The serial number of certificate is a BER integer, but some people reported me that it can have a length of 19. This fix relaxes checks when reading a BER integer.