pdf_signing
pdf_signing copied to clipboard
Signature user information is overridden by certificate information
When a document is signed by running the sign_doc.rs the information defined in the UserSignatureInfo struct is ignored by acrobat. Instead it takes user information from the certificate instead.
UserSignatureInfo {
user_id: "272".to_owned(),
user_name: "Charlie".to_owned(),
user_email: "[email protected]".to_owned(),
user_signature: std::fs::read("./examples/assets/sig1.png").unwrap(),
user_signing_keys: signer.clone(),
}
This is Acrobat that decides which info to show. I think when the name is missing from the Certificate it will use the name given in UserSignatureInfo.
So try to create a new certificate without a username.
Removing user information from the certificate does result in the correct data being displayed. I wonder if there is a way to override this behaviour as certain certificates are provided with the information pre-filled.