Skip to content

Instantly share code, notes, and snippets.

View smuehlst's full-sized avatar

Stephan Mühlstrasser smuehlst

  • Deisenhofen, Germany
View GitHub Profile
@smuehlst
smuehlst / opensctest.c
Created December 2, 2020 10:10
Test program to reproduce issue with OpenSC C_Initialize function keeping the pInitArgs pointer
/*
* Program to demonstrate problem with OpenSC PKCS#11 C_Initialize()
* function: It must not keep the CK_C_INITIALIZE_ARGS pointer.
*/
#include <Windows.h>
#include <stdio.h>
#include "cryptoki.h"
static
CK_RV
@smuehlst
smuehlst / grab_linux.go
Last active August 11, 2018 22:47
Go program that crashes when cross-compiled for Raspberry Pi on Windows 10
// Example program that uses blackjack/webcam library
// for working with V4L2 devices.
package main
import (
"errors"
"fmt"
"log"
"os"
"sort"
#include "gpiointerrupt.h"
#include <assert.h>
CGPIOInterrupt::CGPIOInterrupt (unsigned nClockPin,
CGPIOManager &GPIOManager) :
m_bInterruptOn (false),
m_ClockPin (nClockPin, GPIOModeInput, &GPIOManager),
value(0)
{