Skip to content

Instantly share code, notes, and snippets.

View babelouest's full-sized avatar
🌴
On vacation

Nicolas Mora babelouest

🌴
On vacation
View GitHub Profile
@babelouest
babelouest / issue-269.c
Created October 15, 2023 21:59
POC for ulfius issue #269
/**
* issue-269.c
* https://github.com/babelouest/ulfius/issues/269
* to compile with gcc, run the following command
* gcc -o issue-269 issue-269.c -lulfius
*/
#include <stdio.h>
#include <ulfius.h>
#define PORT 8080
@babelouest
babelouest / hmac-secret-demo.html
Last active January 3, 2023 02:14
might be usable in a foreseen future (this was written in 2019), but hmac-secret still isn't available in the browser I know of
<!doctype html>
<html lang="en">
<head>
<!--
inspired by Mozilla Webauthn documentation: https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API
copyright: 2019 Nicolas Mora <nicolas@babelouest.org>
license: MIT
-->
<title>Hmac-Secret webauthn Extension</title>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cbor-js-unofficial@0.1.0-a4/cbor.min.js"></script>
@babelouest
babelouest / VERSION
Last active June 5, 2022 21:41
Simple rainloop plugin to login to the webmail using oidc server, dovecot master password and apache module auth_openidc - Download those files in a directory named oidc-master-password-login/
1.0
#!/bin/sh
certtool --generate-privkey --outfile packed.key --sec-param High
certtool --generate-request --load-privkey packed.key --outfile packed.csr --template template-ca.cfg
certtool --generate-self-signed --load-privkey packed.key --outfile packed.crt --template template-ca.cfg
certtool --generate-privkey --outfile client-p-v.key --key-type=ecdsa --sec-param High
certtool --generate-request --load-privkey client-p-v.key --outfile client-p-v.csr --template template-client.cfg
certtool --generate-certificate --load-request client-p-v.csr --load-ca-certificate packed.crt --load-ca-privkey packed.key --outfile client-p-v.crt --template template-client.cfg
/**
*
* gnutls_generate_pkcs12.c
*
* Generate a new RSA key
* Generate the associated certificate
* Sign the certificate with the issuer key and certificate
* Create the PKCS#12 structure and exports it to the file out.p12 protected with the password PASSWORD
*
* License: MIT
/**
*
* resize-libav
*
* Use libav to resize an image using its swscale functions, sample code
*
* Copyright 2018 - Nicolas Mora <mail@babelouest.org>
* Copyright (c) 2013-2017 Andreas Unterweger
*
* This program is free software; you can redistribute it and/or