I need to sign .ma application. I read .ma application can be signed with rsign.exe.
But I didn't found rsign.exe in SDK location.
Where can I find rsign.exe to sign .ma file. Also heard rsign.exe is not delivered with MicroStation Connect SDK.
Suggest me how to sign .ma application using rsign.exe or any another approach.
Thanks in advance!
Hi kalyani Reddy (and all),
FYI. MSCE SDK U16 will be providing rsign.exe; as just mentioned here. Although rsign.exe from MicroStation V8's SDK should (untested) work fine to sign application resources (see: Protected Files and Applications), I need to confirm if we can provide the latest version of rsign.exe from internal SDK builds; possibly under SDK Preview > Tools; until the MSCE SDK U16 release is available.
I will provide an update here soon.
[UPDATE - 20210309-RH]Please see SDK Preview > Tools > MSCE SDK U16 PREVIEW: RSign.exe NOTE: Manually remove and delete files prior to installing MSCE SDK U16
Hi Robert Hook,
Thanks for sharing Rsign.exe file (SDK Preview > Tools > MSCE SDK U16 PREVIEW: RSign.exe )
I tried to sign MSCE .ma file using below syntaxes:
rsign -spc mycert.spc app.ma
rsign -spc mycert.spc -v mykey.pvk app.ma
rsign -spc mycert.cer app.ma
rsign -spc mycert.cer -v mykey.pvk app.ma
but each syntax failed to sign the file with below errors:
ERROR : Cannot extract private key from PVK file
ERROR : The PFK file is encrypted with a password. RSIGN cannot use encrypted PFK files.
Is there any other way to sign .ma file?
kalyani Reddy said:but each syntax failed to sign the file with below errors:
I think the error message is clear. Is your certificate password protected? Can be the same certificate used to sign dll files?
kalyani Reddy said:Is there any other way to sign .ma file?
Why do you repeat always the same question? What is not clear on the information rsign.exe is the tool to sign .ma and .rsc files?
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Answer Verified By: Robert Hook
Thanks Jan Šlegr, Now I'm able to sign .ma file using .pvk file(which is not an encrypted file).
And I verified whether file is signed or not using rdump.exe.
Thanks a lot for your support!
Hi kalyani Reddy,
Glad to hear that you are now able to sign your MDL apps. Fwiw. From my link above I had created a wiki for Sign MicroStation VBA Apps, however I have not yet had time to modify for MDL apps - though nearly identical steps and options required. This wiki shows how to create your own local temporary certificate (for testing) in the Windows Certificate Store, then use it to sign an app.
Hi Robert Hook, Jan Šlegr,
I'm back again.
Previously in this thread, I can successfully sign the .ma file using rsign.exe and Verified the digital signature using rdump.exe.
1) One thing I observed is, the signed timestamp is not displaying the correct date, always displaying the same date 1970/01/01 05:30:00, see below:
command: rdump.exe -t'dsig' sample.ma
Microstation Resource File Dump Utility 03.19.02
Digital signatures signer="user", alg=sha1, verified=yes sha1="my thumbprint" CN="my Corporation" signed="1970/01/01 05:30:00" location="my machine name"
Is it a bug or did I done anything wrong?
2) Is there any way to change the Signer name from individual user name to corporation name?
3) I need to fetch rsign.exe file path in c# code. Is there any way to fetch the path of rsign.exe using C#? Any Environment variables exists to fetch rsign.exe file path.
Hi Robert Hook , Jan Šlegr ,
Appreciated If there is any solution.
kalyani Reddy said:Hi Robert Hook , Jan Šlegr
Not all of us work for Bentley Systems.
Robert Hook does work for Bentley Systems. He is the technical support manager in the Bentley Developer Network (BDN) organisation within Bentley Systems. You are a developer, and the BDN is your primary point of contact for technical support. Having said that, Robert and his colleagues Artur Goldsweer and Yongan.Fu frequently contribute to this Forum.
Jan Šlegr provides plenty of help on this and other Forums. However, he does not work for Bentley Systems: he is an Independent Software Developer (ISD), just like you. He can't resolve internal problems with Bentley products.
kalyani Reddy said:Appreciated If there is any solution
Only Robert Hook, as BDN manager, can help with bugs in a Bentley tool such as rsign.exe.
Firing questions randomly won't get you anywhere. Try to focus!
Regards, Jon Summers LA Solutions
kalyani Reddy said:Appreciated If there is any solution.
any solution fr what?
As in the past already, I have to ask you (again) to respect the best practices, defined for this web (and the programming community specifically), and, pleas, to show some effort from your side.
You asked three new questions in existing post, so it's not clear at all what you are asked about now. It's common practice to never extend existing discussion with new question, but to ask in new posts.
FYI. I filed Defect 1125569 for this issue you brought to our attention.