Properly read data from stream in pki --pkcs7