473,413 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

.Cab Signing problem

Hi Guys,

This should be something simple or not possible at all, I have a ‘.pvk’ file
and I want to generate a corresponding .spc file, I have followed the
instructions on http://msdn2.microsoft.com/en-us/library/9sh96ycy.aspx but
failed to generate an adequate cet/spc file, following are the steps I follow.

1.I have received a valid .pvk from some formal issuer
2.I have used makecert –sk <%mycert.PVK%> <%resulting new .CER file name%>
3.cer2spc <%.CER file name%> <%resulting .SPC file name%>
4.Failed to use SIGNCODE.EXE to sign a .cab file with the received PVK file
and the generated SPC file, signcode.exe prompts the certificate is invalid
while writing the password.
5.Browsing the .CER file generated by makesert.exe I can see that this is a
‘demo’ certificate ( it expire on 2040 and it doesn’t include out authority )

How can I generate a valid SPC file ?
Is it possible to generate SPC files from a PVK file ?

Any help would be appreciated.

--
Nadav
http://www.sophin.com
May 31 '06 #1
1 1630
I use openssl. You can create your own demo certificate and certificate of
authority or use a valid certificate and certificate of authority from
Verisign, Thawte, etc.

It assumes that you have previously generated or have a valid certificate
with certificate of authority that you will use will to create a .pfx
formatted certificate container.

Here is how I do it:
openssl pkcs12 -in certs\pfxfile.pfx -nocerts -nodes -out pvkspc\keyfile.key
pvk -in pvkspc\keyfile.key -topvk -out pvkspc\outpvkfile.pvk
openssl pkcs12 -in certs\pfxfile.pfx -nokeys -out pvkspc\outpemfile.pem
openssl crl2pkcs7 -nocrl -certfile pvkspc\outpemfile.pem -outform DER -out
pvkspc\outspcfile.spc

Now sign the code:
signcode -spc outspcfile.spc -v pvkspc\outpvkfile.pvk -t
http://timestamp.verisign.com/scripts/timstamp.dll codetobesignedfile

Since you already have a .pvk file, you only need to create the .spc file
from your certificate in .pem format.
"Nadav" <Na***@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.com...
Hi Guys,

This should be something simple or not possible at all, I have a '.pvk'
file
and I want to generate a corresponding .spc file, I have followed the
instructions on http://msdn2.microsoft.com/en-us/library/9sh96ycy.aspx but
failed to generate an adequate cet/spc file, following are the steps I
follow.

1.I have received a valid .pvk from some formal issuer
2.I have used makecert -sk <%mycert.PVK%> <%resulting new .CER file name%>
3.cer2spc <%.CER file name%> <%resulting .SPC file name%>
4.Failed to use SIGNCODE.EXE to sign a .cab file with the received PVK
file
and the generated SPC file, signcode.exe prompts the certificate is
invalid
while writing the password.
5.Browsing the .CER file generated by makesert.exe I can see that this is
a
'demo' certificate ( it expire on 2040 and it doesn't include out
authority )

How can I generate a valid SPC file ?
Is it possible to generate SPC files from a PVK file ?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Jun 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martin | last post by:
I have a couple of questions around code signing with MS technology: 1. Is there a way to transfer the generated strong name signing private key directly to a smartcard (or generate it on the...
4
by: Todd Richardson | last post by:
Two questions. We would like to have users complete ASP.NET web forms for submission. Once these are completed I would like to generate an XML document from the form. The XML document should...
2
by: Henrik Skak Pedersen | last post by:
Hello, I have a class which is beeing serialized/deserialized using the BinaryFormatter class. That has been working with no problems until I signed all my assemblies. Now I get a...
1
by: AVL | last post by:
Hi I need some clarification on signing. what does it mean--signing an assembly? where is ti used? How is it used?
1
by: Jason Richmeier | last post by:
I have encountered an error while attempting to sign an assembly. I have become quite frustrated since I seem to be going in circles and making no progress. Hopefully someone will have the magic...
0
by: Raffi Basmajian | last post by:
I am trying to understand the difference between signing ClickOnce manifests and signing shared assemblies. My company is building .Net 2005 WinForm applications for internal company use only....
0
by: adam3223 | last post by:
I have a mixed code dll which will be used by many developers to build applications on top of. I've read signing an assembly is recommended to rule out any naming conflicts, and increase security....
0
by: =?Utf-8?B?d29taW4=?= | last post by:
Hello, I have a software that I sign with a trusted certificate from Verisign (both the assemblies and the MSI packages) following Microsoft recomendations. In most of the cases I install the...
6
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
1
by: BillE | last post by:
<extreme frustration> I have googled and read about this, but can't seem to get a grip on it. Apparently I am being coerced into digitally signing applications. Is this true? What if I don't...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.