This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gpg --list-keys --no-default-keyring --keyring /etc/apt/trusted.gpg | |
# For example Skype key | |
gpg --export --no-default-keyring --keyring /etc/apt/trusted.gpg D4040146BE3972509FD57FC71F3045A5DF7587C3 | sudo dd of=/etc/apt/trusted.gpg.d/skype.gpg status=none | |
# Delete (example) | |
sudo gpg --batch --no-autostart --no-options --delete-key --no-default-keyring --keyring /etc/apt/trusted.gpg FPR-OF-THE-KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CA Generation | |
# {hex}30030101FF => ASN.1 BasicConstraints: CA:TRUE | |
# $asn1=([System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension]::new($true, $flase, 0,$true)).RawData | |
# $asn1 | Format-Hex -Encoding Ascii | |
$ca_params =@{ | |
"Type" = "Custom"; | |
"Subject" = "CN=Local CA"; | |
"FriendlyName" = "Local CA"; | |
"KeyAlgorithm" = "RSA"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function trim-string() { | |
local _var="$1" | |
_var="${_var#"${_var%%[![:space:]]*}"}" # remove leading whitespace characters | |
_var="${_var%"${_var##*[![:space:]]}"}" # remove trailing whitespace characters | |
echo -n "$_var" | |
} | |
function dns-query() { | |
local _r | |
if [[ -n $1 ]] |