3.2.5.2.2.6 Compute Message Digest
The message digest MUST be computed using the SHA1 algorithm, as defined in [RFC3174] by following these steps:
Compute a digest of the serialized message using the SHA1 algorithm.
Compute the digest of the digest produced in step 1 using the SHA1 algorithm.
Then the digest produced in step 2 is ready to be signed using RSA as specified in section 3.2.5.2.2.7.
The message digest MUST include a serialized header element (as defined in section 3.2.5.2.2.5).