Přeskočit na hlavní obsah

Příspěvky

Zobrazují se příspěvky se štítkem tools

JSignPKCS11 - when your smartcard is too smart

TL;DR Yes, you can add digital signatures in Java even when you use newer hardware tokens such as Gemalto SafeNet eToken 5110 CC. JSignPKCS11 might help. Maybe you've seen the infamous PKCS11 error message CKR_USER_NOT_LOGGED_IN already. Thrown even when the SunPKCS11 security provider and the keystore settings were properly configured for your hardware token. java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_USER_NOT_LOGGED_IN at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:685) at java.base/java.security.Signature$Delegate.engineSign(Signature.java:1404) at java.base/java.security.Signature.sign(Signature.java:713) ... Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_USER_NOT_LOGGED_IN at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_Sign(Native Method) at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:664) ...

Network scanning with Lexmark CX410

It took me some time to get Lexmark CX410 network scanning working on my Ubuntu (16.04 LTS). Scanning programs were not able to discover the device even if the correct driver was installed. So here are some troubleshooting steps, you can try if you also experience some problems with the network scanning. Download and install the driver Download network scan driver for CX410 from Lexmark support page support.lexmark.com install it: sudo dpkg -i lexmark_network-scan-linux-glibc2_12212015_x86_64.deb And now add the secret ingredient . Link the installed drivers to a proper location : sudo ln -s /usr/local/lexmark/unix_scan_drivers/lib/sane /usr/lib/sane Installation verification $ scanimage -L device `lexmark_nscan:libnet/SPECIFY_DEVICE' is a Lexmark Network Scanner device `lexmark_nscan:libnet/0021B76D22F6' is a Lexmark Lexmark CX410de Ethernet Scanner```

Clean-up blobs in Azure storage account with Azure CLI

If you realize at some point of your bright Azure future you don't remove VM disks correctly (like me in JCLOUDS-1170 ) you'll probably want to do a storage account clean up. Here is, how I did it on my linux desktop using Azure CLI. As I wanted to keep some private OS images which were located in the storage account too, I moved them first into a newly created storage container. # Prerequisities installed azure-cli (I personally use the latest docker image microsoft/azure-cli with the tool) installed jq tool for parsing JSON # Set up STORAGE_ACCOUNT=" PutYourStorageAccountNameHere " STORAGE_KEY=" PutYourStorageAccountAccessKeyHere " # Move/backup OS images to a new container # create new storage container for OS image blobs azure storage container create -a $STORAGE_ACCOUNT -k "$STORAGE_KEY" os-images # linux images to be kept for IMG in eap-7-rhel-7.2 eap-7-rhel-7.2-service; do ORIG_BLOB=$(azure vm image show...

Create your own SSH-able Windows image with JBoss EAP on Azure

This entry describes one of possible ways how to create SSH-able Windows image with JBoss EAP 7 installed on MS Azure cloud (classic VM mode - asm). It's written mostly as commands with some comments - use your imagination (or a boring documentation), when you're not sure what does it do. If you use these step, then do it carefully - it disables the firewall for instance! Don't forget to change the USER_PASSWORD value! # Prerequisites # Azure CLI - install and configure classic mode # install either Azure CLI for your system or use Docker image provided by Microsoft # sample script for the Docker version: https://gist.github.com/kwart/ffd6dc34bb8d5e297bc34ce10764bfe6 # login and configure classic mode azure login azure config mode asm # Create Azure storage account (with container for the image) # Create VM from public Windows image # name of virtual machine used to prepare new OS image export AZURE_HOST=eap7-prepare # target image name export ...

Playing live demos on Linux

I like live demos during presentations. When they work and don't take too much time. And I don't like when the presenter types too much. So I've created the demo-step script . History I've tried to find a way how to "play" live demos (on Linux) in a natural way. First I've found solution by putting keyboard shortcuts into the ~/.inputrc configuration file ( example here ). The disadvantage is, you have to remember, what's the next shortcut. I'm not so good in remembering shortcuts, so I've created simpler solution by utilizing xdotool Linux application ( xdotool home ). Sample usage You can find sample presentation with uses the demo-step on my GitHub. You just need to put the live demo commands into the ~/demo.commands text file and then play them by running demo-step after pressing a keyboard shortcut. Sample content of the ~/demo.commands : #\n# search images in Docker public registry (Docker hub)\ndocker search wil...