Skip to content

Instantly share code, notes, and snippets.

View savely-krasovsky's full-sized avatar

Savely Krasovsky savely-krasovsky

View GitHub Profile
@derrickorama
derrickorama / make-cert-and-pk.md
Last active April 17, 2024 23:10
Extracting certs/private keys from certificates that disable private key exporting

Situation

  • I have to use a Windows client to install a certificate (say via the Magnum PKI Client)
  • I cannot export the private key for this certificate
  • I am a Linux user that needs to have the cert and private key

Solution (steps)

Install/export certificate using Windows VM

@hvoecking
hvoecking / translate.go
Last active March 28, 2024 13:52
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//