Something in RPM changed between RHEL5 and RHEL6.
I can read RPMs for CentOS5 and earlier, but in EL6, the signature header is longer than expected by exactly 4 bytes. I have also observed some normal header (non signature) sections being longer than expected by 16 bytes. It is quite confusing.
If you have insight, please let me know here.
Reading the 2nd header section failed because the signature header is actually longer by 4 bytes than I calculate. I cannot figure out where this extra 4 bytes comes from. All 4 bytes are zeros as seen above.