Do these sentences have the same meaning? and both correct?

• She claims that she was innocent

• She claims to have been innocent

The first one is correct. The second suggests she was only innocent up to a certain point in time.

Yes, both sentences have the same meaning. Because Perfect infinitives can have the same kind of meaning as perfect or past tenses.