openssl client certificate

mozilla was using: spkac keygen
skrew it, client certs seem deprecated.
let’s look at basic and then bearer auth

https://pkijs.org/
examples require babel, I hate babel

I need a javascript library to generate a certificate request
roll my own?

Digital ID Files generally have a PFX or P12 extension and contain the public key file (certificate) and the associated private key file. We will assume that you already have a PFX or P12 Digital ID Certificate file and it has been moved to or already resides on your Windows system in question. This file format also has a passphrase associated with it. If you do not know your password for this pfx/p12 file then you will need to figure it out, or go back to the source where the pfx/p12 certificate file was generated. Do the needful and Re-export, generate a new password, etc.. what ever is needed.

openssl genrsa -out paul.key 2048
openssl req -new -key paul.key -out paul.csr -config /usr3/homlishCA/openssl.cnf
openssl x509 -req -days 3650 -in paul.csr -signkey paul.key -out paul.crt
openssl pkcs12 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -in paul.crt -inkey paul.key -out paul.pfx -name “paul”

so that worked and it imported to firefox, but golang is still not requesting the cert
except let’s not use openssl ca

let’s try to create a cert by reverse engineering my original code that used to work

@req_names = (‘commonName’, ’emailAddress’, ‘organizationName’,
‘organizationalUnitName’, ‘localityName’, ‘stateOrProvinceName’,
‘countryName’, ‘SPKAC’);
request-client-cert.cgi
$req_file = “$catop/requests/$serial.req”;
export CATOP=/usr3/homlishCA
export SER=02020020

openssl ca -config $CATOP/openssl.cnf -extensions client_extensions -extensions client_x509_extensions \
-policy policy_anything $serial.req -out $serial.der -outdir .

let’s try to replace spkac with our key paul.key

openssl genrsa -out paul.key 2048
openssl req -new -key paul.key -out paul.csr -config $CATOP/openssl.cnf

Master Controller Details

Master: if studio not active mute red/blue/white.
Change the way green works.

studio active
on: master connected, sql connected, a2 connected
flash: master connected, sql or a2 not connected
double: master not connected
off: slave not running

studio inactive
on: master connected
off: master not connected
also red/blue/white off

todo:
switch lights
motion/light box
add switches to bench box
sump pump switch

bench box
7 lights
7 switches & 7 lights

aux box
motion sensor
light sensor

goal:

pin desc
0 ADC0
1 ADC1
2 Relay0 white
3 Relay1 yellow
4 Relay2 red
5 Relay3 blue
6 Relay4 green
7 Relay5 yellow bottom
8 Relay6 blue bottom buzzer
9 SW0 t1 broadcast
10 SW1 p1 applause
11 SW2 p2 laughter
12 SW3 p3 jukebox
13 SW4 p4
14 SW5 t2 motion
15 SW6 t3 sump pump

2 ADC inputs
photocell IO0
POT IO1

7 relays
7 lights red/green/yellow/blue/white/unk

7 switches w/ lights?
toggle broadcast
push random applause
push random laugh
push jukebox silent
motion sensor
sump pump IO15
one more

hardware bit definition:
2 adc (0-1) 7 lights (2-8) 7 switches (9-15)

iodirMask 1111 1111 1111 1111
iodirValue 1111 1110 0000 0011
light mask 0000 0001 1111 1100
switch mask 1111 1110 0000 0000

gpio lights 20mA
color changing: 3.2V
@ 5V
2.0-2.2V red, yellow @ 2.2V = 140Ω (150Ω)
3.0-3.2V white,blue,green @ 3.2V = 90Ω (100Ω)
@ 12V
2.0-2.2V red, yellow @ 2.2V = 490Ω (510Ω)
3.0-3.2V white,blue,green @ 3.2V = 440Ω (470Ω)
3.4V white 3mm = 430Ω (470Ω)

Maximum current drawn by digital circuitry 300mA
Maximum IO source current : IO0 – IO7 2mA
Maximum IO sink current : IO0 – IO7 2mA
Maximum IO source current : IO8 – IO15 8mA
Maximum IO sink current : IO8 – IO15 8mA
Recommended Impedance of Analog Voltage Source 2.5KΩ

Switch
DD: Pin No.2 of the header marked as ICSP. This pin has VDD always available and can source more current compared to an IO port. VDD=3.3V. Using this recommendation uses 33 mA

Ohm’s Law
E = I x R
I = E / R
R = E / I
E=Volts
I=Current
R=Resistance

 

Voltage Divider

LED Resistance Calculator

Thermistor
00C = 273.15 Kelvin
(C × 9/5) + 32
10KΩ @ 25°C @ 77°F
12.6KΩ @ 20°C @ 68°F
8KΩ @ 30°C @ 86°F

float steinhart;
steinhart = average / THERMISTORNOMINAL; // (R/Ro)
steinhart = log(steinhart); // ln(R/Ro)
steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro)
steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)
steinhart = 1.0 / steinhart; // Invert
steinhart -= 273.15; // convert to C

Motion sensor
off:
on:

Master Controller

The master controller is a hardware/software combination that controls and monitors physical devices.  Using a USB device switch states are detected and lights/relays are activated.

Original Design

Parallel Port controlled
Check out that huge power supply.

Parallel Port controlled

Parallel Port controlled
Figuring out where all the wires went.
Lights/Switches
Some wires went to the studio lights & switches

New Equipment

Motion, Temperature, Light sensors
Sump Pump relay
Sump Pump relay
Sump Pump relay
Sump Pump relay

New Design

mounted slave

Zone Minder

Upgrade cameras

IP cameras w/ POE $1000

Ethernet cable
$109 500′ outdoor

16 port (8 w/POE) Ethernet switch
$115 Linksys LGS116P 80 Watts

Computer $1000
2 ethernet
32 meg ram
loads of HD space

matomo

Server Version: Apache/2.4.39 (Unix) OpenSSL/1.1.1c mod_fcgid/2.3.9 PHP/7.3.7
Matomo version: 3.11.0
MySQL version: 10.3.15-MariaDB-1
WP-Matomo 1.0.22 is successfully connected to Matomo 3.11.0. You are running a WordPress 5.2.2 blog network (WPMU). WP-Matomo will handle your sites as different websites.

ffmpeg->rtp

Having trouble with the swarm & choppy video.

Starting at the top, we throw this to janus:
/opt/ffmpeg/bin/ffmpeg -ss 00:00:00 -re -i file:///usr4/mydetv/webm/archive.org/Drive-inIntermission2/Drive-inIntermission2.ogv.vp8-opus.webm -vcodec copy -an -f rtp rtp://10.11.1.96:5024 -acodec copy -vn -f rtp rtp://10.11.1.96:5022

on mac, play file:
ffplay -protocol_whitelist “file,rtp,udp” -i /private/nfs/a6/usr6/mydetv/webm/clips/fireworks.mp4.vp8-opus.webm -strict -2
not choppy

/opt/ffmpeg/bin/ffmpeg -re -i /usr4/mydetv/webm/archive.org/TarzanoftheApes1918AndyDivx_512kb.mp4.vp8-opus.webm -vcodec copy -an -f rtp rtp://10.11.1.96:5124 -acodec copy -vn -f rtp rtp://10.11.1.96:5122