Test Tool: Certificate Generator


At work I do most of my Automation and tool development in C#.NET and PowerShell. To reduce dependency sprawl I code some things myself in C# when there may be existing utilities that perform a similar function (but in another language or that require cumbersome installation/setup, etc...). In this way I can keep things simple and more maintainable as the automation team grows and I work with additional engineers (I'm a team of 1 right now :) )

This Self Signed Certificate Generator tool is one piece of a systems level test I am performing on an  Encryption Management product. As I've developed this Certificate Generator on my own time I feel comfortable sharing the project on my personal page.

The idea behind this tool is to make it simple to generate many certificates in DER or PKCS12 containers. I will be expanding the tool over time to allow for additional features- for now it's good enough for me.

Read on for details.

Note: The download link is at the bottom of the page


How to Compile Bouncy Castle 1.7 with MS Visual Studio C# Express 2010


I work in the Encryption management space and am in need of some tools to help scale test our product. To that end I am investigating BouncyCastle to see how it can be used in my projects.

After downloading the Bouncy Castle 1.7 source release I had to 'tweak' the project to get it to build. This article describes what I needed to do to get BouncyCastle 1.7 to compile in Visual Studio Expres 2010

 

For a run through on how to create a certificate using bouncy castle, see this BW article.


GIT part 2: Get TortoiseGIT working on Windows


After you setup a GIT repository on a central server (See GIT Article 1), you will probably want a GUI client you can easily use for day to day operations. This article will show how to get TortoiseGIT up and running on a windows workstation. I picked TortoiseGIT since I come from a Subversion background where I used TortoiseSVN on a regular basis.


GIT Part 1: Install the 'Server' and create a repository


My first exposure to GIT was around 14 months ago. I was trying to get a GIT 'Server' setup and working with several Windows workstations. After awhile I gave up and moved on to more interesting projects. SVN was working fine for me anyway, thank you very much.

GIT didn't show up on my radar again until last week. Over the next few weeks or so my employer will be migrating everyone from Subversion to GIT. As I don't have any concept of how to use GIT, it seems logical to spend some time getting acquainted with it before I have to start using it full time.

This article focuses on how to setup a GIT 'Server' and repository that can be accessed by anyone with SSH access to the server.

 

Update: GIT Article 2 covers how to get TortoiseGIT up and running


How to get SVN+SSH Working on Windows with a CLI SVN Client


As part of our ongoing automation efforts I was in need of setting up a script to automatically setup a few dev machines. One key step was automating the SVN Update process to ensure we had the latest source code from the mainline development group. As their SVN server uses SVN+SSH we needed to tweak our clients to get this to work in an automated fashion

While the Linux machines were simple to setup, we had more issues with the Windows machines. All the Windows machines had TortoiseSVN installed, which is an excellent GUI SVN Client- but does not provide CLI tools for automation. I had to come up with another solution to get SVN+SSH working at the command line on the windows boxes.


PowerShell function to connect to MSSQL Database


As part of an on-going automation effort I had need recently to have PowerShell connect to a Database and add a few entries. This could not have been easily accomlished with a typical .sql script since I needed to base the new entries off of dynamically generated  entries in another table.

I didn't want to write a C# Console app as I may need to tweak the script on machines without visual studio from time to time (PowerShell is installed on almost all windows machines).


Grab bag - Cygwin SSH and Zombie bash processes on Windows and PowerShell symbols


Sometimes I find a lot of little things that are worth remembering but aren't worth making a whole article about. In Today's Grab Bag we have:

  • Powershell null, true and false symbols
  • Cygwin SSH + Bash zombie processes on Windows
  • 'Dynamic' casting in C#.NET

SpecFlow project uses incorrect step definition or throws an ambiguous step error


One of my co-workers was having difficulty with their SpecFlow project this last week. When the test cases were executed either an incorrect step definition was being used or an error message appeared indicating that the step definition is ambiguous.

I was able to root cause the problem and want to document what I found.

 


Get Powershell and Command Script (Batch) files to play nice together


I needed a script that could perform SVN operations, kick off a legacy command script (.bat) and perform other mundane tasks. As this was on a Windows system I used my PowerShell experience to put together a script that tied everything together.

Up until now I have had minimal trouble kicking off command scripts- but for some reason PowerShell would not execute this one script. It just barfed and threw this error:

PS C:\SVN\SourceCode> Invoke-Expression "cmd /C `"cd $SourceDir & .\Projs\ParentBuilder.cmd`""
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Building with the Configuration set to Debug.
cmd.exe : 'KickOffBuild.cmd' is not recognized as an internal or external command,
At line:1 char:4
+ cmd <<<<  /C "cd C:\SVN\SourceCode & .\Projs\ParentBuilder.cmd"
    + CategoryInfo          : NotSpecified: ('KickOffBuild.cmd'...ternal command,:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

operable program or batch file.


Setup rtorrent + GNU Screen on Centos 6


Recently I found myself out running an errand across town. While running errands I decided that I wanted to download a large file (Centos DVD Images). Since these take a little while to download I thought 'Wouldn't it be great if I could tell my home server to download the torrents? They would probably be finished by the time I get home!'

This spurred me on to create a PHP based website that could be quickly and easily accessed from my mobile device. A key part of this system is having a BitTorrent client that can be scripted or in some other way manipulated to download a file then stop seeding when finished. Enter rtorrent. It appears to be the best fit for my purposes.

This article shows how to get rtorrent installed and configured on a Centos 6 x64 system