Mac OS X El Capitan Smart Card Services PKCS#11 Tokend compilation and installation - keychain

I would like to install PKCS#11 Tokend to my Mac OS X El Capitan (10.11.2) so I can access PKCS#11 enabled devices from Safari.
I downloaded and install Smart Card Services for El Capitan from https://smartcardservices.macosforge.org/trac/wiki/installers.
Now I have Tokend installed in /Library/Security/tokend but there is no PKCS11.tokend, there are the following:
BELPIC.tokend
CAC.tokend
CACNG.tokend
JPKI.tokend
PIV.tokend
So I read on the following site that it should be included, or it can be built and copied to tokend directory to access PKCS#11 libraries stored in /usr/lib/pkcs11 or /usr/local/lib/pkcs11: http://ludovicrousseau.blogspot.cz/2010/04/free-software-tokend-above-pkcs11-for.html.
But I am not even able to successfully install darwinbuild.
Also I don't want to build the whole Smart Card Services solution, I would like to build just PKCS#11.tokend and use it with KeyChain.
The building steps are not very clear for me.
How to do it for El Capitan?
Or is there any version that is already built and can be used?

El Capitan is tricky because Apple has implemented SIP (System Integrity Protection) which prevents write access to various system folders... (\system\library\security\ , \library\security, etc)
If you want to move forward with installing SCS or if you want to try manually adding/removing tokend files... you'll have to disable SIP first.
Reboot into Recovery Mode (hold down Command+R)
Open Utilites > Terminal
Type 'csrutil disable' and hit enter
Reboot, and you'll be able to edit system files and/or install SCS.
Some extra advice regarding PKCS...
If you know what type of card you have, contact the manufacturer to get the appropriate PKCS tokend file. One size does not fit all unfortunately.
If you want to determine what type of card you have, plug in your reader, plug in the card, open Terminal and type pcsctest. When it asks for reader number type 01 and hit enter.
On that page, you'll find an ATR code. Grab that code and paste it here:
You should then have a manufacturer result. Search specifically for that smartcard manufacturer's PKCS libraries online (typically a .tokend file)
Good luck!!

In my experience, you'd be better off using OpenSC with tokend fork. It builds OK on Mac OS X 10.10 and 10.11, and supports RSA and ECC tokens (and SHA-2).

Related

Is it possible to install Weblogic 12.2.1.4 on Apple M1 computers?

I've been looking for information about this, but I don't find anything. I think there's no version available at Oracle site for installing Weblogic 12.2.1.X on Apple M1 devices, but maybe it's possible to do it using Rosetta 2.
Has somebody tried it? I cannot because I don't have an M1 device yet, but I'm wondering because I still develop soft that runs on Weblogic.
I could, but i had to add an argument -ignoreSysPrereqs (for example java -jar fmw_12.2.1.3.0_wls.jar -ignoreSysPrereqs), because throwed me a error
The error:
Checking if CPU speed is above 300 MHz. Actual unknown. Failed <<<<
I used this documentation:
https://community.oracle.com/tech/apps-infra/discussion/3888969/veridata-installation-checking-cpu-speed-failed
I currently use different versions (10.3.6,..)
I just copy the folder installed in an old mac with intel, an then they work 99%, was necessary fix the folders resource like java.
But just realize have an issue on ServiceConnector, for remote calls ..

Raspberry Pi wont remove OpenElec and Kodi

I have gotten a used Raspberry Pi 3 Model B (bought used).
I formatted the SD-Card and downloaded Raspbian Stretch Lite. When I turned on the Pi, somehow it opened Openelec with Kodi.
I tried it again and again. I went and tried to install NOOBS instead. Same thing happens. It opens OpenELEC and Kodi.
I have formatted the SD-Card using a Windows 10 PC. Triied it with the "Quick formating" option on and off. After formating, the SD-Card seems to be empty, as far as I can tell from Windows explorer.
Since I dont really need the GUI, it wouldnt be so bad when I could just use ssh to get a terminal and do the work I want to do. However, Openelec disabled basic things like apt-get. When I try it, the following message appears:
There is no working 'apt-get'.
'apt-get' is a command to install, update and remove software which
is stored in a non local repo. 'apt-get' does nothing then connecting to such
repo, downloads the software, unpacks the software, updates a big
local database with all filepaths and other informations about the
installed software or removes or updates installed Software.
With OpenELEC it is not possible to change the system for security and
stability reasons so even 'apt-get' would not be able to do this.
We also dont have and want to maintain such a repo for various other
great reasons.
Also Ubuntu or Debian packages are often outdated and not compatible
with OpenELEC
TIP: use XBMC's addon browser to enhance your OpenELEC system
I cant exmplain that behaviour. To my knowledge, the Pi should not have any type of internal storage. So I dont understand how the old OS can still be there after I format the SD-Card for the 5th time (no other data storage medium connected). Noobs and Raspbian shouldnt have anything to do with Kodi or Openelec so I do not undestand how it keeps coming up. I have tried to look for a solution online but couldnt find anything but how to install the software that I want to get rid of.
Does anybody know how I can remove Openelec and Kodi so that I can have a normal Raspbian distribution installed? Thanks in advance!
You formatted the microSD card on your PC and it still boots into Openelec? Did you write the Raspbian Lite image onto the card? It seems that you haven't actually modified the contents of the card.
I strongly recommend getting Etcher to write bootable images; you don't even have to decompress the downloaded image, Etcher will do that for you. Etcher is pretty smart at figuring out which media is your microSD card, but as always when working with tools that can overwrite disks be careful.

Building Darwin 16.6 from source?

Put succinctly I need a base for my system, since it was built on macOS Darwin seems like the logical choice as it will require the least porting effort. I know you can download up to Darwin 8.0.1 from Apple, and the full source tree is available for up to 10.0, however v8 is too old and lacks many standard modern features (i.e. a password system that doesn't restrict the root user to 10 characters, or support for the case-sensitive version of HFS+). I've tried building Darwin 9/10/11/12 from source using darwinbuild, but it always fails for various server-side reasons.
There has to be some way to create the equivalent of a vanilla Darwin 16 image. Perhaps taking an existing copy of macOS and stripping away all the closed-source stuff? Building the source that Apple provides at Apple Open Source Repository and substituting the rest of the packages required for the OS to function with source from another BSD distro? Taking an existing copy of FreeBSD and substituting the kernel with XNU? There has to be some way. Any ideas or thoughts on the ideas I suggested are welcome. Thanks.
The last xnu build instructions are for El Capitan (Darwin 15) but you might be able to follow them for Sierra (Darwin 16). The latest source available at time of writing is for 10.12.4, which isn't overly out of date.
This gets you most of the kernel of shipping macOS. It doesn't get you the driver stack - especially the SATA/AHCI stack is not open source, which could be a problem. (One of these days I'll get around to publishing our full virtio driver stack including virtio-blk and virtio-scsi drivers, with which you should be able to run without SATA in Qemu/KVM at least.)
I have no idea about getting a useful userland going - macOS/OSX uses launchd as its "init" process, and the last published source code for that is some years old. I don't know if it will need some tweaking to get it working on newer kernels.

STM32 libraries for eclipse

Can you use the CMSIS, HAL, TM libraries for STM32F407 discovery board with eclipse, without STM32Cube? According to this link http://www.carminenoviello.com/en/2015/06/04/stm32-applications-eclipse-gcc-stcube/ you can do it with eclipse & STM32Cube. But I wonder if you can do just same thing without the STM32Cube. Since I'm using OS X, it is impossible to install the STM32Cube, but in order to use the GPIO library I need to use CMSIS, HAL, TM libraries.
You might be able to used the older "Standard Peripheral Driver" model - which was a just a distributed set of driver files specific to the chip. These libraries are no longer supported and are replaced by STM32Cube which generates equivalent code - but with better support for hardware abstraction however they are still very useable.
Search "STM32F4xx_StdPeriph_Driver" to locate the libraries (which include the standard peripheral drivers and CMSIS).
You can download the libraries as a separate zip file
http://www.st.com/web/en/catalog/tools/PF259243
just unpack it and import whatever you need from it into your project. You can take an example project which is closest to your needs, and start developing your application from that. That's what I did in Linux.
There is the STM32CubeMX, which is the installable program you're referring to, and there are STM32CubeF4, STM32CubeL0, etc, which are the firmware package for the different controller families.
CubeMX now officially supports Mac and Linux. However here is an old post how to run it manually http://www.carminenoviello.com/2015/09/09/running-stm32cubemx-macos-finally/.
Regarding the HAL and SPL I'll add that there are really nice libraries in libopencm3 which are developed by community and are not so "buggy" as HAL or SPL.
I found an interesting instruction. You can install the STM32CubeMX on OS X. http://www.stm32duino.com/viewtopic.php?t=267
There is an Eclipse based IDE by OpenSTM32 community called SW4STM32. Available at OpenSTM32 community's site. System Workbench for STM32 installer has been released on the following platforms:
Microsoft Windows Vista and newer (32 bits or 64 bits)
Linux (32 bits or 64 bits)
Mac OSX 10.10 Yosemite and newer + Xcode 7
Java SE JRE 7 or newer
When creating a project you can choose which library you want want to use, SPL, HAL or baremetal.
STM32CubeMX is a initialization code generator. It definitely eases development, but you can write you code completely from the beginning.
STM32CubeMX uses HAL as its Library. You can download the HAL and Include the files that you need and write down the code from scratch. You just need to be aware of the APIs, which are documented in UM1725 Application Note.
But, now STM32CubeMX is also available for Linux and Mac.

Install device driver silently on Windows XP

Is there a way to programmatically install device driver silently without cat file and without connecting the device on Windows Xp?
I'm using DriverPackageInstall function from Windows Driver Kit. And I can install driver only if device is attached. In other case I get an error: ERROR_NO_SUCH_DEVINST. But that method works fine with Windows Vista.
Another problem is warning dialog that asks user to continue or stop installation because cat file is missing . It shows on both OSes.
Any ideas?
You're not going to get past the signing prompt, as this is baked pretty far into windows, but there is a tool in the DDK called devinst that works well for device installations.
There's Source Code included with it.
The only way to avoid any UI interaction caused by your driver being unsigned is to hackishly preinstall the driver by modifying the registry directly.
Yes, it can be done. You'd have to modify the ACLs on the HKLM\System\CurrentControlSet\Enum registry key run as SYSTEM (by installing yourself as a service or using Sysinternals psexec -s), and add all the registry keys which Windows device installation would usually add - on your own. This will only work if you can predict precisely what your device's Device Instance ID would be -- e.g. in case of a USB device, the precise port it'd be connected to etc.
This is hacky, but the result would be the device being essentially "preinstalled". It'll be a lot of work, and it'll break on Windows Vista.
Microsoft really wants you to go the WHQL way on Windows XP, sorry :(