Posts

Showing posts from 2013

Handy OpenSSL Commands

To convert a certificate from PEM to DER: openssl x509 -in cert.txt -inform PEM -out cert.bin -outform DER To convert a certificate from DER to PEM: openssl x509 -in cert.bin -inform DER -out cert.txt -outform PEM To convert a key from PEM to DER: openssl rsa -in key.txt -inform PEM -out key.bin -outform DER To convert a key from DER to PEM: openssl rsa -in key.bin -inform DER -out key.txt -outform PEM Convert a PEM+KEY to PKCS12: openssl pkcs12 -export -out client.pfx -inkey keyfile.txt -in cert.txt -certfile root.txt Extract Private Key from PKCS12: openssl pkcs12 -in client.pfx -nocerts -out keyfile.txt Extract Public Cert from PKCS12: openssl pkcs12 -in client.pfx -clcerts -nokeys -out cert.txt Remove Password from Private Key: openssl rsa -in keyfile.txt -out unpassworded.txt Generate a client key: openssl genrsa -out client.key 4096 Build a certificate request: openssl req -key client.key -new -out client.req Build a certificate request (advanced): openssl req -n

Updating Firmware on legacy Dell Hardware in Ubuntu Linux

It took a bit of Google searching and hocus-pocus to figure out how to patch the BIOS rev A04 on our old Dell PowerEdge SC1420 Server. Here's the magic incantation. ############################################################ # Dell Firmware Update for Ubuntu Linux, on Legacy Hardware ############################################################ # Install firmware update tool out of the universe repository apt-get install firmware-addon-dell # Not sure if this is needed, I didn't need it, but it's documented modprobe dell_rbu # Dump a list of all device ids in the system bootstrap_firmware -a # open http://linux.dell.com/repo/firmware/bios-hdrs in a browser # search for IDs that appear in bootstrap_firmware output # In my case, the SC1420 is system_bios_ven_0x1028_dev_0x0173 wget http://linux.dell.com/repo/firmware/bios-hdrs/system_bios_ven_0x1028_dev_0x0173_version_a04/bios.hdr # Queue the new bios to be updated durning the next warm-boot dellBiosUpdate -u --force-mono -

Using PowerShell To Get Citrix ICA Client Versions In Use On a XenApp 6 Farm

################################################# # XenApp 6 Client Version Retrieval Script # Created by Ben Piper # http://blog.benpiper.com, ben@benpiper.com ################################################# function convertToVersion($build) { switch($build){ 6685 {"13.0"; break}30 {"12.1"; break}6 {"12.0.3"; break}6410 {"12.0"; break}142{"Java"; break}317{"3.0"; break}324{"3.0"; break}330{"3.0"; break}349{"3.0"; break}304{"MAC 6.3"; break}314{"MAC 6.3"; break}323{"MAC 6.3"; break}326{"MAC 6.3"; break}400{"MAC 7.0"; break}402{"MAC 7.0"; break}405{"MAC 7.0"; break}406{"MAC 7.0"; break}407{"MAC 7.0"; break}402{"MAC 7.0"; break}411{"MAC 7.0"; break}500{"MAC 7.1"; break}600{"MAC 10.0"; break}601{"MAC 10.0"; break}581{"4.0"; break}606{"4.0";

Citrix client version build list

''---------------------------------------------------------------------------------------------------- '' this routine converts citrix internal build numbers to actual client version numbers ''---------------------------------------------------------------------------------------------------- '' Sources -- '' '' http://forums.citrix.com/message.jspa?messageID=558285 '' http://support.citrix.com/article/CTX112613 ''---------------------------------------------------------------------------------------------------- '' Last Update: 2013-03-04 15:18 ''---------------------------------------------------------------------------------------------------- ShortVer = "": LongVer = "" Select Case session.ClientBuild Case 0: LongVer = "Disconnected": ShortVer = " " Case 1: LongVer = "12.1.44" Case 3: LongVer = "11.2.2" Case 6:

PRB: Windows 8, MSXML4 Application Error 429: ActiveX component can't create object

Image
This article was previously published under MSXML4 WIN8 ELEVATION FAIL On This Page SYMPTOMS When you create an instance of an MSXML2.DomDocument40 in VB6 or VBSCRIPT (32-bit), you will receive the following error message: Application Error 429: ActiveX component can't create object The error only occurs if your process is running with elevated (administrator) privileges, on Windows 8.   CAUSE Microsoft broke this for some reason but chances are its an unmitigated security vulnerability.  (And, we like to be jerks). RESOLUTION To work around this problem, use either of the following methods: Downgrade to Windows 7, 2008, Vista, or XP Replace references to msxml4.dll with msxml6.dll  Replace MSXML2.DomDocument.4.0 with MSXML2.DomDocument.6.0 in your code STATUS This behavior is by design.  Or, maybe its a bug.  We really don't care, as long as you port your crappy VB6 code to .NET. MORE INFORMATION Steps to Reproduce Behavior Execute the following code in a compiled VB6 executab

Raising events in VB6 from .NET via COM Interop

Image
So I've been experimenting with VB6 and a .NET DLL compiled with COM interop to see how it behaves.  The results are a little surprising. What I did was I built a test scenario where the "Client" (vb6 app) hangs for 5 seconds while the "Server" (.NET COM object) fires an event once per second. First, I start the timer.  Inside the DLL on each timer tick, it adds 1 to an internal counter ("Count").  When the timer fires, it raises an event and passes the value of Count at that time as a parameter (nTicks). When the client app (vb6) hangs, internally the count continues to run, but the events get queued up.  VB6 gets all the events in a rush when the 5 second sleep is over.   Here's the part where it gets interesting.  During that rush, the events come in out-of-order .  The order seems random.  I've run it several times and the order always varies.  I circled the interesting part in red, below. Aside from the return order issue I think this thre
Found a neat program today written in VB6 that looks and acts just like a Windows 8 Metro App. Here  is a link to the proect on planet-source-code.  And  here  is the author's blog site where he has other neat VB6 things.  (Its all in French, but Chrome graciously translates the web page to English for me.  Google Chrome is such a nice product!)