GnuPG: gpa.exe hungs when click on "smartcards" AND scdaemon cannot recognise SC-HSM 4K - cryptography

https://dev.gnupg.org/T6097
I am tring it get GnuPG to work with my SmartCard-HSM 4K on Windows, using the GP4Win bundle.
Kleopatra doesn't recognise the SC-HSM 4K at all, even though, it DOES recognise the YubiKey 5 NFC in BOTH PIV and Openpgp Card apps.
When trying to use the GPA.exe alternative, it just freezes when I click on the "smartcards" button; not sure if it's related.
Trying to debug this, using CMD:
scdaemon --server
serialno
I get the following result:
scdaemon[xxxxx]: detected reader 'ACS ACR38U 0' scdaemon[xxxxx]:
reader slot 0: not connected scdaemon[xxxxx]: pcsc_control failed:
invalid PC/SC error code (0x1) scdaemon[xxxxx]:
pcsc_vendor_specific_init: GET_FEATURE_REQUEST failed: 65547
scdaemon[xxxxx]: reader slot 0: active protocol: T1 scdaemon[xxxxx]:
slot 0: ATR=3bde18ff8191fe1fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
scdaemon[xxxxx]: error parsing PrKDF record: Invalid object
scdaemon[xxxxx]: no supported card application found: Invalid object S
PINCACHE_PUT 0// ERR 100696144 No such device
Below I am including my configuration files.
scdaemon.conf
###+++--- GPGConf ---+++###
verbose
verbose
verbose
verbose
verbose
verbose
verbose
verbose
verbose
disable-ccid
###+++--- GPGConf ---+++### 09/06/y22 23:29:33 GTB Daylight Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
#pcsc-shared
I have tried all possible combinations with disable-ccid and pcsc-shared and nothing works.
gpgagent.conf
###+++--- GPGConf ---+++###
enable-extended-key-format
ignore-cache-for-signing
no-allow-external-cache
no-allow-loopback-pinentry
grab
pinentry-timeout 10
verbose
verbose
verbose
verbose
verbose
verbose
verbose
verbose
verbose
ssh-fingerprint-digest SHA384
###+++--- GPGConf ---+++### 18/04/y22 07:30:51 GTB Daylight Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
enable-putty-support
enable-ssh-support
use-standard-socket
default-cache-ttl 600
max-cache-ttl 7200
gpgsm.conf
###+++--- GPGConf ---+++###
auto-issuer-key-retrieve
enable-crl-checks
enable-ocsp
verbose
verbose
verbose
verbose
verbose
verbose
verbose
verbose
verbose
include-certs -1
cipher-algo AES256
###+++--- GPGConf ---+++### 01/04/y22 19:10:26 GTB Daylight Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
I was never able to get the SC-HSM to work with GnuPG, even though it is supposedly supported. This is the current time I am trying to figure it out. This time, I haven't played with anything else than scdaemon.conf, but, as far as I can tell, the SC-HSM didn't work even with the defaults on a fresh install.
The card otherwise works nicely with everything else. Any help would be greatly appreciated!

I believe I have found the cause of the problem with the GnuPG. When removing the AES key from the card, the error about the invalid PrKDF disappeared. The card can still NOT be used those as the keys don't show up with gpg --card-edit --expert or in Kleopatra. Maybe the SC-HSM versions supported are only the older ones and for the newer cards there needs to be some update for the card profile?

Related

NP publishing library gives a git error and will not publish

I'm trying to add a library for better publishing experience (np).
The issue is, I'm getting this error regardless of what option/version I use:
✖ Command failed with exit code 128: git log --format=%s %h 715331db5d0ebbcda8751b08eaa4f84b213b2ff1
fb769f732b295e9debdfe80fe6a2c4d050a4093e..HEAD
fatal: ambiguous argument '715331db5d0ebbcda8751b08eaa4f84b213b2ff1
fb769f732b295e9debdfe80fe6a2c4d050a4093e..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
I'm not well versed enough with git to understand what this is trying to tell me, plus searches for the error led me to dead ends.

System limit for number of file watchers reached, but I can't use sudo to fix it

I have looked around for a solution for this issue, but I do not have admin permissions so I cannot increase the limit of file watchers. I also have a very small project, so I don't understand how it can reach the limit. Does anyone know any fixes that don't involve admin permissions?
The entire error I got was:
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/ludkl571/Documents/TDDC73/test/node_modules/#react-native-community/cli-tools/node_modules/chalk'
at FSWatcher.start (internal/fs/watchers.js:210:26)
at Object.watch (fs.js:1444:11)
at NodeWatcher.watchdir (/home/ludkl571/Documents/TDDC73/test/node_modules/sane/src/node_watcher.js:159:22)
at Walker.<anonymous> (/home/ludkl571/Documents/TDDC73/test/node_modules/sane/src/common.js:109:31)
at Walker.emit (events.js:314:20)
at /home/ludkl571/Documents/TDDC73/test/node_modules/walker/lib/walker.js:69:16
at FSReqCallback.oncomplete (fs.js:156:23) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/home/ludkl571/Documents/TDDC73/test/node_modules/#react-native-community/cli-tools/node_modules/chalk',
filename: '/home/ludkl571/Documents/TDDC73/test/node_modules/#react-native-community/cli-tools/node_modules/chalk'
}
echo fs.inotify.max_user_watches=524288 try this command

How do I install Radare2 on Windows?

I am trying to get Radare2 installed on my Windows machine. I do have Windows Subsystem for Linux up and running if that changes things. I have tried the git technique from their website:
git clone https://github.com/radare/radare2
cd radare2
sys/install.sh
This did strange things depending on what I did. There are some comments headed with the # symbol that explain what's going on.
#-----Here I clone the repo.
PS [*****] C:\Users\*****\AppData\Local\Programs> git clone https://github.com/radare/radare2
Cloning into 'radare2'...
remote: Enumerating objects: 81, done.
remote: Counting objects: 100% (81/81), done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 215078 (delta 27), reused 17 (delta 10), pack-reused 214997
Receiving objects: 100% (215078/215078), 117.53 MiB | 817.00 KiB/s, done.
Resolving deltas: 100% (164658/164658), done.
Updating files: 100% (3934/3934), done.
#-----Here I cd into the new repo and run the install script.
PS [*****] C:\Users\*****\AppData\Local\Programs> cd radare2
#-----This next command opened a new window, which disappeared immediately.
PS [*****] C:\Users\*****\AppData\Local\Programs\radare2> sys/install.sh
#-----Calling bash and passing the script yielded some nice errors.
PS [*****] C:\Users\*****\AppData\Local\Programs\radare2> bash sys/install.sh
sys/install.sh: line 2: $'\r': command not found
: ambiguous redirect 4: 1
sys/install.sh: line 6: $'\r': command not found
sys/install.sh: line 11: syntax error near unexpected token `$'in\r''
'ys/install.sh: line 11: ` case "$1" in
#-----Here I fired up my WSL Ubuntu system and tried to run the script.
PS [*****] C:\Users\*****\AppData\Local\Programs\radare2> wsl
*****#DESKTOP-6L7K90U:/mnt/c/Users/*****/AppData/Local/Programs/radare2$ sys/install.sh
: not found.sh: 2:
sys/install.sh: 5: Syntax error: Bad fd number
*****#DESKTOP-6L7K90U:/mnt/c/Users/*****/AppData/Local/Programs/radare2$
At this point, I decided to try and use the Windows binary instead. I went to the download page and downloaded the windows binary, then unpacked it into my AppData programs folder. I then opened that folder and double-clicked on radare2.exe. This made a quick blip on the taskbar like a window was trying to open, which also immediately closed.
At this point, I suspect errors in the source code for Radare2 are causing it to crash almost immediately. Is this the case? Or do I need to do something different to get this running?
-----Solved-----
I went and experimented a little, including installing to a Linux VM using the git clone method. I have found that the windows binary is the way to go for this. to use it, unpack the downloaded binary, then open CMD/PowerShell in the radare2 directory, then run bin/radare2.exe or bin/r2.bat. You will need to manually add these to the path, though.

Detox Testing - How to disable detox info logging to stdout

I've read through the docs and cannot find a way to set the log level to something like "silent". I don't want to see all the detox log info. I just want to see the test output. The current log levels are:
-l, --loglevel [value] info, debug, verbose, silly, wss
Not specifying a log level defaults to info.
example:
Remove --loglevel from you detox test --loglevel.
Now there are more options - fatal, error, warn, info, verbose, trace (see docs)
detox test --loglevel fatal
Results in clean test execution output:

RVM install using wrong URL

I'm trying to install ruby-1.9.3-p194 using RVM and it is failing. It looks like the reason is that it is trying to download the source from bad urls. The output I get is:
% rvm install ruby-1.9.3-p194
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/robertlooby/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found
The requested url does not exist(22): 'http://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3-p194.tar.bz2'
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3-p194.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3-p194.tar.bz2
No fallback URL could be found, try increasing timeout with:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
There has been an error fetching the ruby interpreter. Halting the installation.
In each of the requested URLs where it has /./ it should have /1.9/. Any idea how to fix this or what is causing it?
I am using version 1.26.4 of RVM