RambleJam

My little rambles in cyberspace …

Entries Comments


SSL MakeCert / pvk2pfx & Client & Server Certificate Generation

19 February, 2011 (14:26) | .NET / C#, Computing, Web Stuff | No comments

Hey All,

Hope we’re all well!  Been a while since I blogged anything as life has been pretty hectic.  Anyway, I’m working on a fairly intense little project at the moment centred around building a complete system infrastucture around the AdventureWorks demo database from Microsoft.

The demo system may well end up being another Code Project article as it’s covering a LOT of terriroty.  WPF, PRISM, WCF, WIF, SQL but mainly focussing on security aspect of the implementation using the Windows Identity Foundation.

In order to make the implementation as real world as possible the idea behind WIF makes use of SSL certificates for authentication purposes.  Whilst not wanting to go buying commercial certificates and seeing this is only development we need to use the makecert tool that is part of the Windows SDK.

To make a test CA (Certificate Authority) you can use the following command:

makecert -r -pe -n “CN=AdventureWorksTestCA” -sr CurrentUser -a sha1 -sky signature -cy authority -sv AdventureWorksTestCA.pvk AdventureWorksTestCA.cer

To make a test server authentication certificate:

makecert -pe -n “CN=AdventureWorksTestServer” -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -ic AdventureWorksTestCA.cer -iv AdventureWorksTestCA.pvk -sv AdventureWorksTestServer.pvk AdventureWorksTestServer.cer

To make a test client authentication certificate:

makecert -pe -n “CN=AdventureWorksTestClient” -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.2 -ic AdventureWorksTestCA.cer -iv AdventureWorksTestCA.pvk -sv AdventureWorksTestClient.pvk AdventureWorksTestClient.cer

Then to export the PFX files for both certificates:

pvk2pfx -pvk AdventureWorksTestServer.pvk -spc AdventureWorksTestServer.cer -pfx AdventureWorksTestServer.pfx

pvk2pfx -pvk AdventureWorksTestClient.pvk -spc AdventureWorksTestClient.cer -pfx AdventureWorksTestClient.pfx

Now once you have your certificates created you need to import them into your certificate store.  Start with the CA certificate, double click the .cer file and click on the [install certificate] button.  Once the dialog box opens make sure you import this certificate into the “Trusted Root Certification Authorities” store.  This is critical to ensure the other certificates are correctly chained up to trusted root.

Once this CA is installed you can simply go through the same process with the client and server certificates and allow them to simply import into their default location (don’t manually specify the store during import).  The client/server certs will import themselves into the Current User - Personal certificate store.

Now you should be all set-up with a CA/Server/Client certs ready for dev work.

Windows 7 & Midisport 8×8 Drivers

26 August, 2010 (16:20) | Music, Tools, Windows 7 64 Bit | No comments

At last it appears that M-Audio has finally released public beta drivers for their older midi units.  I was dreading having to buy a new midi interface considering how many midi devices I have.  I’ve not tried these drivers myself as yet but it appears that many people are having success with them.

Download them from here

Looking for a Free VST Sampler?

12 August, 2010 (11:13) | Music, Tools | No comments

A short while ago I was looking for a free VST sampler that would offer enough flexibility to be useful and stable enough in my SONAR setup to be worth sticking with, as it turns out I’ve found a couple of seriously good products and more importantly, they are free!

I would dearly love to splash the case on a copy of Komplete from Native Instruments but I just don’t have that kind of cash free at the moment.  So, which samplers are we talking about?

Short Circuit

First up is this really neat, lightweight tool from Vember Audio, unfortunately this isn’t actually supported anymore as it has been moved to freeware status.  Having said that I’ve loaded it up into SONAR and imported some NI Battery kits (created with SampleSort) and haven’t any *any* issues whatsoever.  As far as I can tell Short Circuit is rock solid.  It has a great feature set to boot, granted it’s not Kontakt but if you’re looking for a very lightweight solid sampler this is fantastic.

Independence Free

When I found this I was genuinely amazed.  Yello Tools are giving you their main sampler software for free along with a massive 2+Gb sample set.  This is quite a tool and to be honest as far as I can tell (limited use so far) it’s comparable to Kontakt.  Well worth checking out.  The only limitation this has is that it will only load 25 samples so loading up a nice Grand Piano multisample is out of the question … oh well … it is free!!

Now, go forth and sample …

Installing SQL Management Studio Express on Windows 7

13 July, 2010 (22:21) | Computing, Windows 7 64 Bit | No comments

Hmm … developers usually use tools … yes?

Getting this installed on Windows 7 by double clicking the MSI doesn’t appear to work.  No, we have to run cmd.exe as Administrator then use MSIEXEC …

C:\>msiexec /i F:\VS2008Stuff\SQL\SQLServer2005_SSMSEE_x64.msi

Hmm …

WiX UI Not Updating As Expected

6 July, 2010 (10:23) | Computing, Deployment | No comments

During my recent forays into the world of WiX I’ve been slowly hacking away at the steep learning curve. This really is a huge framework that is dealing with an intrisically complicated process. For my own projects I’ve always stuck with Inno Setup and to be honest I don’t have any compelling reason to move them away from Inno at the moment as they are functioning as expected.

Anyway, the last problem I’ve encountered that took a question to the WiX mailing list to answer was regarding showing messages conditionally in the UI based on custom property values changing.  What was confusing was that the log file showed all the custom actions and properties being correctly processed but the UI never actually updated.  Sound familiar?  If you’r having this problem, simply try hitting the back or next button and then go back to the dialog that should have updated?  I bet you now see the updated value in the UI (provided all your WiX source is correct of course!).

This issue is that dialogs are never redrawn.  This is actually a limitation in the MSI UI implementation.  Whilst I haven’t looked into alternatives like replacing the MSI UI (lots of work apparently) there is a hacky solution to this.  Making twin dialogs … basically you create an exact copy of the dialog that should be updated and then once the property changes you simply show this twin dialog and it will appear as though the UI has updated when in fact it’s showing an entirely new dialog.

In the snippet below you can see that the last published event is the call to the current dialogs twin. You will need to give the twin dialog a new Id but all the others can remain the same. Not a nice solution as you now have two dialogs to maintain with any changes but it is a solution none-the-less.

Managed Custom Actions Failing in WiX?

2 July, 2010 (14:53) | Computing, Deployment | No comments

Well after many hours wondering why my WiX custom actions were failing to run I made an interesting discovery.  The library that I had created to hold my custom actions was all being referenced correct from the main WiX project code in a separate WiX fragment, like this:

Changing any part of this made the build process fail so it was finding the dll and adding it to the MSI package correctly.  The first line of the custom action being called was a call to launch a debugger so that I could then step through the method and see it in action, this was never being called so it wasn’t even getting this far.

Anyway, I have now cracked this particular problem.  As it happens the library containing the custom action was compiled for .NET 4.0 … as soon as I switched this to either .NET 2.0 or .NET 3.5 all is happy.  All I can assume is that since WiX itself is .NET 3.5 that is the version that is loaded into the process by default.  So when the MSI tried to access my custom action in a .NET 4.0 library it simply bombed the whole process.

Building Installers

1 July, 2010 (09:53) | .NET / C#, Computing, Deployment | No comments

If you are ever in a situation where you are building an installer for an application and things have gone a bit awry with the uninstall process (tut, tut) there is a nice simple way to get yourself back on track.  Simply run the command below and this will force an uninstall of the product matching the GUID supplied in the command.

Msiexec /x {your-product-guid-code} IGNORE_PRE_CHECK=1

I’ve not needed this yet but no doubt it’s worth blogging about as it will rear it’s ugly head at some point!

WPF / WinForms Property Mappings

20 May, 2010 (09:16) | .NET / C#, Computing, WPF / XAML | No comments

Just found a nice page on the Microsoft site that details some of the property mappings between WPF and Windows Forms.  Might prove useful!!

http://msdn.microsoft.com/en-us/library/ms751565.aspx

VS2010 / C# 4.0 RC Samples

10 April, 2010 (12:46) | .NET / C#, Computing | No comments

I’ve just installed the new version of Visual Studio to start looking at some of the new .NET and C# features and found a rather nice set of code samples on MSDN.

Windows 7 Update

3 April, 2010 (20:43) | Computing, Windows 7 64 Bit | No comments

I have now completed the majority of the setup on my new PC.  All in all I’m seriously impressed with Win 7 Pro.  I have solved all the BSOD issues (Dodgy audio driver from MOTU) and I have migrated all my data accros to the new machine.

It hasn’t been completely painless but all in all it has been a real pleasure.  All my hardware is working as desired and the machine is blisteringly quick.

Absolute thumbs up from here.

« Older entries