The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Windows XP’ Category

Some command-line tips for OpenSSL and file format (pfx, p12, cer, crt, key, etc.) conversion of certificates, keys

Posted by jpluimers on 2015/02/27

OpenSSL is really nice, but remembering all these command-line switches is difficult, especially when you do not use them often enough.

I don’t, and when I do there are a few common tasks I perform, and I was glad to find a few links with great information:

I’ve converted them to batch files that run fine when copied to the directory where you put the x86 or x64 Windows version of OpenSSL (they assume %~dp0openssl.exe for the location of the OpenSSL.exe binary, just in case it is not on the path, or you have various tools that scattered around incompatible copies of OpenSSL binaries).

OpenSSL defaults to PEM format (that has text base64 strings), so if you get DER format (binary) you need to convert them.

A few errors I got and what they mean

Error decrypting PKCS#7 structure

Error decrypting PKCS#7 structure
5216:error:21070073:PKCS7 routines:PKCS7_dataDecode:no recipient matches certificate:.\crypto\pkcs7\pk7_doit.c:538:
5216:error:21072077:PKCS7 routines:PKCS7_decrypt:decrypt error:.\crypto\pkcs7\pk7_smime.c:557:

This error means that the recipient of the email does not match the certificate you pass in. What happens is that OpenSSL tries to decrypt the mail, it cannot match the certificate to the mail, and barfs. It usually happens when you have From/To reversed by accident.

Error decrypting PKCS#7 structure

Error decrypting PKCS#7 structure
4948:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:.\crypto\x509\x509_cmp.c:330:
4948:error:2107207F:PKCS7 routines:PKCS7_decrypt:private key does not match certificate:.\crypto\pkcs7\pk7_smime.c:552:

This means somewhere you mixed up a private and public key in the certificate files.

Use something like the OpenSSL wrapper verify-private-key-matches-certificate-x509-pem-cer.bat to verify them.

Error reading S/MIME message

Error reading S/MIME message
6900:error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data:.\crypto\asn1\a_d2i_fp.c:251:
6900:error:0D0D106E:asn1 encoding routines:B64_READ_ASN1:decode error:.\crypto\asn1\asn_mime.c:193:
6900:error:0D0D40CB:asn1 encoding routines:SMIME_read_ASN1:asn1 parse error:.\crypto\asn1\asn_mime.c:528:

OpenSSL does not like .EML files to end with a period (. which SMTP needs to process when sending an .EML file).
See https://gist.github.com/anonymous/7233372 and https://gist.github.com/anonymous/7233329
The former throws this error, the latter not. This is not caused the width of the base64 encoding (not yet archived at the WayBack machine), which I initially thought, but the terminating period.

Verification failure

Verification failure
8228:error:21075075:PKCS7 routines:PKCS7_verify:certificate verify error:.\crypto\pkcs7\pk7_smime.c:342:Verify error:self signed certificate in certificate chai
n

–jeroen

Posted in base64, Development, Encoding, MIME, OpenSSL, Power User, Security, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Installing the PIXMA mini260 – Canon Europe drivers under Windows 8.1 x64 – trying to say goodbye to Windows XP

Posted by jpluimers on 2015/02/23

Ditching Windows XP meant finding drivers for some older devices.

One of them is a [Archive.is] Canon PIXMA mini260 Photo Inkjet Printer which prints marvellous photos in a borderless way (so no post processing needed).

Installing drivers on Windows 8.1 x64 turned out to be really easy despite the fact that the Canon site does not offer them:  just install the “Windows Vista (64-bit)” drivers from this Canon link: [Wayback] PIXMA mini260 – Canon Europe.

This works as the printer driver model hasn’t changed much since Vista and the Vista drivers do not contain limits on future version numbers (see [Wayback] Getting older Windows drivers to work in Windows 8 for another example).

Now I need to find a way to get my [Archive.is] Olympus Camedia P-400 Digital Color Photo Printer. That is a lot harder: the most recent Windows P-400 Printer > Software Downloads are for Windows XP.

If anyone knows a workaround for this, I might connect this to an XP VM in a walled garden:

Under Windows XP, often the P-400 driver installer didn’t even want to install the USB part of the drivers.

How can I work around this?

Might it be that only the parallel LPTENUM is included in the [Wayback] Windows XP P400N.inf file, unlike the [Wayback] Windows 2000 driver P400N.INF file that contains both [Wayback] LPTENUM and [Wayback] USBPRINT and the [Wayback] P-440 INF file only has USBPRINT?

Other vendors seem to include both in their .INF files like this [Wayback] Dell 3130cn INF file.

–jeroen

via:

Posted in Power User, Vista, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Vista, Windows XP | Leave a Comment »

Binary builds of Win64 and Win32 OpenSSL (via: Shining Light Productions)

Posted by jpluimers on 2015/02/20

The quickest way to get Win64 and Win32 binary builds of the youngest OpenSSL, you should get them from Shining Light Productions – Win32 OpenSSL.

Despite the link name, you can get the Win64 binaries from there too..

Besides binaries, they also have the source to build them from, and any other redistributable you’d need.

They run on virtually any Windows version, though I only used them on NT based Windows versions of XP/2003 and younger.

Two notes:

  • you usually need the Visual C++ 2008 redistributables, of which there is both an x86 and an x64 version (the OpenSSL installer just tells you it is missing, and assumes you know if it is the x86 or x64 one).
  • unless you are a software developer wanting to link to OpenSSL, the “Light” versions of the installs suffice.

–jeroen

via: Shining Light Productions – Win32 OpenSSL.

Posted in OpenSSL, Power User, Security, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 1 Comment »

Creating an ICO file from multiple PNG files: IcoFX versus ConvertICO.org

Posted by jpluimers on 2015/02/17

For Windows Vista and up, you need at least these icon resolutions:

  • 16×16
  • 32×32
  • 48×48
  • 256×256

For Windows XP / 2003 Server and earlier, you’d only need the 16×16, 32×32 and 48×48 resolutions, and if you support older video hardware, include them in 24-bit, 8-bit and 4-bit color depth.

For younger versions you might consider adding 20×20, 24×24, 40×40, 64×64 and 128×128 as well to support higher DPI modes.

You need to include and various other sizes for other operating systems.

Getting at them, I usually start with an EPS file, then downscale to the right resolution, and save the resulting files as PNG images, then assemble those together.

A while ago, I had some icons with nice long diagonal line, then I found out the hard way I should not have used ConvertICO.org. I often prefer on-line tools over off-line, especially for actions I rarely do (this is one of them). It saves you from installing software, and on-line sites usually get better over time.

In this case, I shouldn’t have gone online: Just look at the jagged edges in the 200% zoom below: the image on the right is from ConvertICO.org, on the left it is from IcoFX.

What you clearly see is that ConvertICO messes around with the 256×256 image (it doesn’t mess around with the other resolution), but IcoFX doesn’t mess around.

So now I switched to IcoFX. Not on-line, but a great free tool. Read the rest of this entry »

Posted in Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 2 Comments »

Windows Alt Key Codes

Posted by jpluimers on 2015/02/16

Brillant!: Windows Alt Key Codes.

The page has both lists of four-digit ALT+#### codes, a how-to, and reference links:

  1. Letters with Accents – (e.g. ó, ò, ñ)
  2. Other Foreign Characters – (e.g. ç, ¿, ß)
  3. Currency Symbols – (e.g. ¢, £, ¥)
  4. Math Symbols – (e.g. ±, °, ÷)
  5. Other Punctuation – (e.g. &, ©, §)
  6. Using the Codes
  7. Other Accents and Symbols: Character Map Other Page
  8. Non-Numeric Accent Codes: Activate International Keyboard Other Page
  9. Links to Other References

–jeroen

Posted in Development, Encoding, Power User, Software Development, Unicode, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Like Process Explorer, but open source, with some extra options: Process Hacker

Posted by jpluimers on 2015/01/09

Process Hacker is on my research list:

A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.

–jeroen

via: Overview – Process Hacker.

Posted in Microsoft Surface on Windows 7, Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 1 Comment »

Taking Screenshot on multiple platforms (via Wikipedia, the free encyclopedia)

Posted by jpluimers on 2014/11/28

Cool, I just found out that Wikipedia has a Screenshot topic, listing how to take screenshots (and often shots of the current window) on many platforms, where (*) means I verified them:

  • Apple Mac OS X
    (*) Use “⌘ Cmd+⇧ Shift+3” for the screen or “⌘ Cmd+⇧ Shift+4” for a part of the screen (as of Mac OS X Tiger, you can press the “Spacebar” to capture a Window in stead of part of the screen). You can press “Ctrl” with these shortcuts to the shot goes to the clipboard, otherwise it gets saved as a PNG file.
  • Microsoft Windows
    (*) Use “Prt Sc” for the screen or “Alt+Prt Sc” for the Window
    (note that on my laptop and multi-media keyboards, you need to type the “Fn” key in order to press the “Prt Sc”)
  • Microsoft Windows Phone
    Press the “Sleep/Wake” button and the Startbutton at the same time.
  • Apple iOS
    (*) Press the “Home” and “Lock” button at the same time.
  • Google Android
    Hold the “Volume down” button, then press the “Sleep/Wake” button.
    (*) Or press the “Sleep/Wake” and the “Home” button at the same time.
  • HP WebOS
    Press the “Orange/Gray Key+Sym+P” at the same time.
    Or press “Home Key+Power” at the same time.
  • X Window System
    Varies with the installed tooling
  • Maemo 5
    Press “Ctrl+⇧ Shift+P” at the same time.
  • Google Chrome OS
    Press “Ctrl+F5” to capture the screen or press “Ctrl+⇧ Shift+F5” to capture a portion of the screen.

–jeroen

via: Screenshot – Wikipedia, the free encyclopedia.

Posted in Android Devices, Apple, Chrome, Google, HTC, HTC Sensation, Keyboards and Keyboard Shortcuts, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Nexus 4, OS X 10.8 Mountain Lion, Power User, Uncategorized, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Windows .RES/Resource editors

Posted by jpluimers on 2014/11/07

While researching the manifest problem I will post about next week, I made a short list of free Windows Resource Editors:

All other resource editors I found were not free, and someof them not maintained for an even longer period than the free ones.

–jeroen

Posted in Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 4 Comments »

Indent/Unindent text in PowerShell ISE

Posted by jpluimers on 2014/10/31

When searching for powershell ise indent tab, I came across this very nice post by rpscripter:

If one selects multiple lines, then pressing tab will indent them all.  Pressing shift+tab will un-indent them all.

Yes, I know the PowerShell is limited, so the indents are tabs (not spaces) and you cannot change the tab size: Powershell ISE – change indent/tab size + keep tabs.

–jeroen

via:

Posted in CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Old and invalidated by the Microsoft RDP client in the Mac App Store: Best RDP client for Mac OS X Lion and up

Posted by jpluimers on 2014/10/10

Back when I wrote this mid 2013, this was the best Windows RDP overview article I could find: Best RDP client for Mac OSX Lion.

And it all got invalidated when finally (after years of silence), Microsoft released AppStore versions of the RDP client for both Mac OS X and iOS:

Microsoft Launches ‘Remote Desktop’ Apps for Mac and iOS – Mac Rumors.

So I tried the Mac App Store – Microsoft Remote Desktop that runs on OS X 10.6.0 or later for more than a year, and I like it a lot.

This is what the AppStore version improved over the classic Microsoft Remote Desktop Connection:

  • It has more regular updates.
  • It remaps the Mac Command key to the Microsoft Windows logo key.
  • It uses the new RDP protocol version features which means fast response, even on slow network connections and better security.
  • Full screen support is superb.
  • Clipboard integration just works.
  • It is really stable.

Just so you know about alternatives,

for the record, this is the draft I wrote in 2013: Read the rest of this entry »

Posted in Apple, Keyboards and Keyboard Shortcuts, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 3 Comments »