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
#!/bin/bash | |
IP_ADDRESS="$1" | |
HOSTED_ZONES=$(aws route53 list-hosted-zones) | |
echo "$HOSTED_ZONES" | jq -r '.HostedZones[].Id' | while read ZONE_ID; do | |
RECORD_SETS=$(aws route53 list-resource-record-sets --hosted-zone-id "$ZONE_ID" --query "ResourceRecordSets[?ResourceRecords[?Value == '$IP_ADDRESS']].Name") | |
for RECORD_SET in $RECORD_SETS; do | |
echo $RECORD_SET | |
done | |
done |
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
import sun.security.pkcs11.SunPKCS11; | |
import java.security.KeyStore; | |
import java.security.Security; | |
import java.security.cert.X509Certificate; | |
import java.util.Enumeration; | |
public class AccessingSmartCardThroughPKCS11 implements Test, Test2 { | |
public static void main(String[] args) throws Exception { | |
SunPKCS11 sunPKCS11 = new SunPKCS11("pkcs11.cfg"); |
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
#!/usr/bin/env bash | |
# Parameters: <db_host> <db_name> <db_username> <db_password> <pem_cert> <revocation_reason> | |
# | |
# TODOS: | |
# | |
# - Look for (or develop) something better integrated with EJBCA, e.g. an EJBCA CLI command. Related notes at the top of 'TODOS-EjbcaCt'. | |
# - If later this script is to be allowed to be executed remotely (not from EJBCA CA as required now), create a dedicated DB user per person with the minimum required DB privileges. | |
# - Check all commands for their exit status and only continue if the command executed succesfully. | |
# |
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
#!/bin/bash | |
# TODO receive these from the CLI. | |
declare -a wisroots=("OISTE WISeKey Global Root GA CA" "OISTE WISeKey Global Root GB CA" "OISTE WISeKey Global Root GC CA") | |
# TODO get the following list from its live location. | |
declare -a prod_logs=( | |
"https://ct.googleapis.com/pilot" | |
"https://ct.googleapis.com/aviator" | |
"https://ct1.digicert-ct.com/log/" |
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
package com.company; | |
import java.util.Comparator; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* Very basic comparator | |
* <p><b>Warning: it could be unstable because there are more possible patterns for Java versions | |
*/ |
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
#!/usr/bin/perl | |
=head1 DESCRIPTION | |
printenv — a CGI program that just prints its environment | |
=cut | |
print "Content-type: text/plain\r\n\r\n"; | |
for my $var ( sort keys %ENV ) { |