Sign a file with a certificate stored in Microsoft store - delphi

I would like to sign a file using the certificate that is stored in the Microsoft store, searched everywhere for some info or samples but couldn't find anything... My app currently can sign a file using the .pfx file but that is not the best solution since it exports the private key as well. Does anyone have any suggestions or tips by any chance. Thanks in advance.

You could use Microsoft signtool.exe. it has command line options so you could call it with appropriate parameters from Delphi Application.
here are two links to its documentations:
https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool

Related

Accessing OneDrive file - the easiest way

My android app needs to access (read only) .txt file located on OneDrive. Which is the simplest way to achieve that? All tutorial I read are a bit complicated for me (I'm new in this android stuff).
The simplest way is to share the file read only using “anyone anonymous with the link”. So basically no log in is required to access the file, just the link generated by onedrive. Using that link you should be able to access the file directly like any http web link.
Cheers
Christian

Sign Blackberry 10 applications with different certificates

I'm building a process to sign Blackberry applications with different certificates.
The idea is that the user could upload their author.p12, barsigner.cks and barsigner.db, as well as their password, and the server would use those certs to sign a .bar file.
The problem is that when I'm running blackberry-signer, I cannot specify the paths of those files, that tool is trying to get them from "C:\Users\\AppData\Local\Research In Motion".
Is there a way to specify the path to those files when signing with blackberry-signer?
Thanks in advance!
We tried a similar thing and found we couldn't specify paths to the relevant signing files - the command line options didn't seem to work. We worked around this by writing a script which would copy the signing files the the Research in Motion folder for the duration of the signing process
Based on the output from the command-line the following option sounds like it should work -keystore <file> - file containing developer certificate

Encrypting or protecting files stored in iOS app's NSDocumentsDirectory

I have a custom requirement in one of my products and I need to protect or encrypt files that are stored inside the NSDocumentsDirectory folder. Even if these documents are mailed (The app has the ability to mail documents) to some other person , he or she will not be able to open this document without using my app (I will be using open in functionality of email attachments). So basically only the application can access all these documents and without the app the documents should be mere junk. IS there any way to do it, or has any one done something before.
I also saw this but could not get a complete idea.
If you want a quick and easy method for data that doesn't need serious security, just zip the files with a fixed password.
ZipArchive is a good library for this.
For a more serious approach, check iOS - Protecting files with a custom encryption key?
The other post you mentioned works on the concept of password protecting the files, I had encountered the same issue that was for my custom defined files in which our team, encoded the contents of the file on random locations, and saved it.
Only our Application could decode it correctly as we had the key :)
It was a windows application, It would work here also.

Exporting files from a Javascript based phonegap app - options or ideas?

I'm currently writing a mobile app (hopefully iOS or android) using the jquery mobile framework and phonegap.
It'll need to export/send csv files in some way to the users, but I'd be interested to hear ideas or suggestions about the best way of doing so. If this can be done on the js side of the app that'd be ideal as it's what I'm most familiar with. A couple of options I've considered are:
Uploading the file using the google docs api
Writing the file to the file system (then export e.g. via iTunes)
I'm new to this so any suggestions gratefully received! Thanks for your help
There are a few options that you could use depending on how you want it to work.
The main options would be to
Use the File API (http://docs.phonegap.com/phonegap_file_file.md.html#File) to store files on the filesystem of the device.
Upload the file to a server using a standard XMLHttpRequest.
Write a native PhoneGap plugin on each platform that you are interested in that could connect to Google docs.
As Dave pointed out you can write files with the FILE API. I have used the file api on iOs to write custom log files and havent found any yikes so far.

Blackberry signature tool - invalid private key

A couple of months after installing successfully the BlackBerry signature key for signing my application, I have lost my private key. How can I retrieve it?
I have already sent an email to BlackBerry developers' support, but they're really slow in replying.
Search your hard-drive or trash-bin for sigtool.* :
You need to find sigtool.csk and sigtool.db. If you can find these files you can copy them to your Components\bin folder. For example:
C:\eclipses\BB1.1.2\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\bin
Or you can use the Import Key Feature of the Blackberry Plugin and point it to these files.
If you can't find these files, then you need TechSupport to resend you the three CSI files for creating your keys. Note, after you create a key-set with these csi files they are useless, so you can't use them to recreate new keys later.
I suggest backing up the sigtool files after you find/recreate them.
Good Luck mate!

Resources