Category Archives: Coding

Posts about coding and other software issues

Changing Certificate Verification Flags in openssl

Recently I was needed to modify some flags for verification of X.509 public key certificates. These flags defined in x509_vfy.h include files. Particularly it was necessary to set X509_V_FLAG_X509_STRICT flag, which enables additional security checks and turns off workarounds for broken certificate chain. In other words this flag makes the certificate verification more strictly. This… Read More »

Rip Audio CD Programmatically

More than 10 years ago I started XEdit project which is binary editor for files and disks contents. XEdit is available there. I am still using it sometime, however I do not support the project since 2011 mainly because this MFC application was written on Visual C++ 6 and I have no time to do… Read More »

Installing swift on CentOS 8

Previously I worked with swift occasionally and using xCode only. There is my previous post with XML parser written in swift language. Here is my experience in swift installation on Linux platform with initial command line programming example. The first step – swift installation: It takes several minutes. Check swift version: # swift –version Swift… Read More »

Valgrind Testing of non Virtual Destructor

What is the purpose of Virtual Destructor? Sometime this question is asked on job interview. The main purpose of virtual destructor is to keep appropriate clean-up sequence when object is disposed. Deleting a derived class object which is casted to pointer of base class may be result of memory leak if base class destructor is… Read More »

snmpget in C#

SNMP (simple network management protocol) is the way to discover information about remote device or to monitor such device using agentless technique. The agentless approach means that no additional custom spy software is installed on target device. Anyware snmp or WMI are detective features, but usually they are part of operating system. Here is example… Read More »

Linux C error handling, errno and perror

If you have Java or .Net programming background you used to be familiar with exception which generated in runtime if something is going wrong with code execution. Linux C does not provide direct support to runtime error handling or exception handling. Usually code developer has to check return values from the functions. Generally C function… Read More »

C++ Calling Convention with naked functions

Calling conventions are a standardized methods for c++ compilers how to pass parameters to called function. MS Visual Studio gives possibility to use four of them: cdecl, fastcall, stdcall and vectorcall. The specific of every calling convention is hidden in function prolog and not visible for high level language programmer. This article makes an attempt… Read More »

CPU usage programmatically

Do you know what does it mean when some tool shows percentage of CPU usage, for example 60%? Basically this indicates that during some timing interval 60% of time processor spent on execution of some software code and 40% did nothing or was in idle state. Usually CPU timing is divided into 3 main categories:… Read More »

How to Increase CPU Usage

The title of this post looks ridiculous, usually high CPU usage is a problem that slows down your computer and people are fighting to reduce CPU usage. However in my particular case I was working on CPU monitoring code and I need some tool that makes CPU consumption higher. So I created simple C# console… Read More »

Custom Protocol Handler (CPH)

Microsoft Windows supports registered custom protocols additionally to the common ones such as http, https, ftp, mailto and so on. To register an application to handle a particular URI scheme, new key, along with the appropriate subkeys and values should be added to the Windows registry. The new key The may be added to HKEY_LOCAL_MACHINE\Software\Classes… Read More »