How To Install opensc on CentOS 8

opensc is Smart card library and applications Smart card library and applications

Introduction

In this tutorial we learn how to install opensc on CentOS 8.

What is opensc

OpenSC provides a set of libraries and utilities to work with smart cards. Its main focus is on cards that support cryptographic operations, and facilitate their use in security applications such as authentication, mail encryption and digital signatures. OpenSC implements the PKCS#11 API so applications supporting this API (such as Mozilla Firefox and Thunderbird) can use it. On the card OpenSC implements the PKCS#15 standard and aims to be compatible with every software/card that does so, too. opensc 0.20.0 4.el8 x86_64 1.3 M opensc-0.20.0-4.el8.src.rpm baseos Smart card library and applications https LGPLv2+ OpenSC provides a set of libraries and utilities to work with smart cards. Its main focus is on cards that support cryptographic operations, and facilitate their use in security applications such as authentication, mail encryption and digital signatures. OpenSC implements the PKCS#11 API so applications supporting this API (such as Mozilla Firefox and Thunderbird) can use it. On the card OpenSC implements the PKCS#15 standard and aims to be compatible with every software/card that does so, too.

We can use yum or dnf to install opensc on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install opensc.

Install opensc on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install opensc using dnf by running the following command:

sudo dnf -y install opensc

Install opensc on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install opensc using yum by running the following command:

sudo yum -y install opensc

How To Uninstall opensc on CentOS 8

To uninstall only the opensc package we can use the following command:

sudo dnf remove opensc

opensc Package Contents on CentOS 8

/etc/opensc-i386.conf
/usr/bin/cardos-tool
/usr/bin/cryptoflex-tool
/usr/bin/dnie-tool
/usr/bin/egk-tool
/usr/bin/eidenv
/usr/bin/gids-tool
/usr/bin/goid-tool
/usr/bin/iasecc-tool
/usr/bin/netkey-tool
/usr/bin/openpgp-tool
/usr/bin/opensc-asn1
/usr/bin/opensc-explorer
/usr/bin/opensc-notify
/usr/bin/opensc-tool
/usr/bin/piv-tool
/usr/bin/pkcs11-tool
/usr/bin/pkcs15-crypt
/usr/bin/pkcs15-init
/usr/bin/pkcs15-tool
/usr/bin/sc-hsm-tool
/usr/bin/westcos-tool
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/36a10aa2aec809a4f27b1960ac2a2abea21527
/usr/lib/.build-id/01
/usr/lib/.build-id/01/90122b3cd16f1922363e339d98cc53436e888c
/usr/lib/.build-id/03
/usr/lib/.build-id/03/84781b10bc583ede169cc07f66c30fc3aa3ccd
/usr/lib/.build-id/08
/usr/lib/.build-id/08/dc2876416770fa28f66e5cd152448872cae5b3
/usr/lib/.build-id/19
/usr/lib/.build-id/19/07831a30796a8a1610658d2ddc361d46034c56
/usr/lib/.build-id/1b
/usr/lib/.build-id/1b/bcb134bfd8265510e9016b4a8b03eb973ff7ce
/usr/lib/.build-id/1d
/usr/lib/.build-id/1d/5a1e89e803781e6c353afaadf45766c8ac7d24
/usr/lib/.build-id/20
/usr/lib/.build-id/20/11fcea3f6a2a054625fdba6d9e01cd6b316bba
/usr/lib/.build-id/29
/usr/lib/.build-id/29/3bfcea924c57ab7173fd2f5e209d52923ddd44
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/f3ea27e8d1e1cf7eaf8d82ec799dd363728777
/usr/lib/.build-id/47
/usr/lib/.build-id/47/fd1ffd765c4e7190d408ebc9c8a15bba72a431
/usr/lib/.build-id/55
/usr/lib/.build-id/55/f68585f85c0dae688809da569298c432e84ea9
/usr/lib/.build-id/6a
/usr/lib/.build-id/6a/cb5abdf46c71f88637037b48283e1c21a191ba
/usr/lib/.build-id/8b
/usr/lib/.build-id/8b/1de1ccc5fd6adf3079ab1d1d24b0a795794b0e
/usr/lib/.build-id/8e
/usr/lib/.build-id/8e/4861336a4a5364190ab15a2fc315da3ef0c1c3
/usr/lib/.build-id/92
/usr/lib/.build-id/92/cfe7065b717104058f567bee0008c02f38189a
/usr/lib/.build-id/95
/usr/lib/.build-id/95/eb42bb45419b9bec3fc1b8cfa706f0367a8b34
/usr/lib/.build-id/98
/usr/lib/.build-id/98/e304d5db70630fd330f5b630dbfe9543d51902
/usr/lib/.build-id/a8
/usr/lib/.build-id/a8/3042bacf02de84e4afe1e7d35e94396336fe67
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/95c6d75d753a78e0c9965e02115e30dbdd50ee
/usr/lib/.build-id/c6
/usr/lib/.build-id/c6/bc8c2b03ebb7f7bf177a2584a0ab3ed2ef039a
/usr/lib/.build-id/de
/usr/lib/.build-id/de/21a61fd41973ef51b58a099399c5989eacaf7e
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/7a5ad9fd7570a37ee2810563684ccd2f36a7a2
/usr/lib/.build-id/ea
/usr/lib/.build-id/ea/ee427d3f6dd698086ce20d0553d65e955f08dc
/usr/lib/.build-id/eb
/usr/lib/.build-id/eb/af62c168cad59fafe412de549e5f46272aebaf
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/39946020156035bf41e62fbac94bb548650314
/usr/lib/libopensc.so.6
/usr/lib/libopensc.so.6.0.0
/usr/lib/libsmm-local.so.6
/usr/lib/libsmm-local.so.6.0.0
/usr/lib/onepin-opensc-pkcs11.so
/usr/lib/opensc-pkcs11.so
/usr/lib/pkcs11
/usr/lib/pkcs11-spy.so
/usr/lib/pkcs11/onepin-opensc-pkcs11.so
/usr/lib/pkcs11/opensc-pkcs11.so
/usr/lib/pkcs11/pkcs11-spy.so
/usr/lib/pkgconfig/opensc-pkcs11.pc
/usr/share/applications/org.opensc.notify.desktop
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/cardos-tool
/usr/share/bash-completion/completions/cryptoflex-tool
/usr/share/bash-completion/completions/dnie-tool
/usr/share/bash-completion/completions/egk-tool
/usr/share/bash-completion/completions/eidenv
/usr/share/bash-completion/completions/gids-tool
/usr/share/bash-completion/completions/iasecc-tool
/usr/share/bash-completion/completions/netkey-tool
/usr/share/bash-completion/completions/npa-tool
/usr/share/bash-completion/completions/openpgp-tool
/usr/share/bash-completion/completions/opensc-asn1
/usr/share/bash-completion/completions/opensc-explorer
/usr/share/bash-completion/completions/opensc-notify
/usr/share/bash-completion/completions/opensc-tool
/usr/share/bash-completion/completions/piv-tool
/usr/share/bash-completion/completions/pkcs11-tool
/usr/share/bash-completion/completions/pkcs15-crypt
/usr/share/bash-completion/completions/pkcs15-init
/usr/share/bash-completion/completions/pkcs15-tool
/usr/share/bash-completion/completions/sc-hsm-tool
/usr/share/bash-completion/completions/westcos-tool
/usr/share/doc/opensc
/usr/share/doc/opensc/COPYING
/usr/share/doc/opensc/NEWS
/usr/share/doc/opensc/README
/usr/share/doc/opensc/README.pkcs15init
/usr/share/doc/opensc/README.scconf
/usr/share/man/man1/cardos-tool.1.gz
/usr/share/man/man1/cryptoflex-tool.1.gz
/usr/share/man/man1/dnie-tool.1.gz
/usr/share/man/man1/egk-tool.1.gz
/usr/share/man/man1/eidenv.1.gz
/usr/share/man/man1/gids-tool.1.gz
/usr/share/man/man1/iasecc-tool.1.gz
/usr/share/man/man1/netkey-tool.1.gz
/usr/share/man/man1/openpgp-tool.1.gz
/usr/share/man/man1/opensc-asn1.1.gz
/usr/share/man/man1/opensc-explorer.1.gz
/usr/share/man/man1/opensc-notify.1.gz
/usr/share/man/man1/opensc-tool.1.gz
/usr/share/man/man1/piv-tool.1.gz
/usr/share/man/man1/pkcs11-tool.1.gz
/usr/share/man/man1/pkcs15-crypt.1.gz
/usr/share/man/man1/pkcs15-init.1.gz
/usr/share/man/man1/pkcs15-tool.1.gz
/usr/share/man/man1/sc-hsm-tool.1.gz
/usr/share/man/man1/westcos-tool.1.gz
/usr/share/man/man5/opensc-i386.conf.5.gz
/usr/share/man/man5/pkcs15-profile.5.gz
/usr/share/opensc
/usr/share/opensc/asepcos.profile
/usr/share/opensc/authentic.profile
/usr/share/opensc/cardos.profile
/usr/share/opensc/cyberflex.profile
/usr/share/opensc/entersafe.profile
/usr/share/opensc/epass2003.profile
/usr/share/opensc/flex.profile
/usr/share/opensc/gids.profile
/usr/share/opensc/gpk.profile
/usr/share/opensc/ias_adele_admin1.profile
/usr/share/opensc/ias_adele_admin2.profile
/usr/share/opensc/ias_adele_common.profile
/usr/share/opensc/iasecc.profile
/usr/share/opensc/iasecc_admin_eid.profile
/usr/share/opensc/iasecc_generic_oberthur.profile
/usr/share/opensc/iasecc_generic_pki.profile
/usr/share/opensc/incrypto34.profile
/usr/share/opensc/isoApplet.profile
/usr/share/opensc/jcop.profile
/usr/share/opensc/miocos.profile
/usr/share/opensc/muscle.profile
/usr/share/opensc/myeid.profile
/usr/share/opensc/oberthur.profile
/usr/share/opensc/openpgp.profile
/usr/share/opensc/pkcs15.profile
/usr/share/opensc/rutoken.profile
/usr/share/opensc/rutoken_ecp.profile
/usr/share/opensc/rutoken_lite.profile
/usr/share/opensc/sc-hsm.profile
/usr/share/opensc/setcos.profile
/usr/share/opensc/starcos.profile
/usr/share/opensc/westcos.profile
/usr/share/p11-kit/modules/opensc.module
/etc/opensc-x86_64.conf
/etc/opensc.conf
/usr/bin/cardos-tool
/usr/bin/cryptoflex-tool
/usr/bin/dnie-tool
/usr/bin/egk-tool
/usr/bin/eidenv
/usr/bin/gids-tool
/usr/bin/goid-tool
/usr/bin/iasecc-tool
/usr/bin/netkey-tool
/usr/bin/openpgp-tool
/usr/bin/opensc-asn1
/usr/bin/opensc-explorer
/usr/bin/opensc-notify
/usr/bin/opensc-tool
/usr/bin/piv-tool
/usr/bin/pkcs11-tool
/usr/bin/pkcs15-crypt
/usr/bin/pkcs15-init
/usr/bin/pkcs15-tool
/usr/bin/sc-hsm-tool
/usr/bin/westcos-tool
/usr/lib/.build-id
/usr/lib/.build-id/04
/usr/lib/.build-id/04/cb98cd08a390162312ca0b556865f2b875475a
/usr/lib/.build-id/0f
/usr/lib/.build-id/0f/d8f0020b65bc87d965deea5ab6a3d18a012e08
/usr/lib/.build-id/14
/usr/lib/.build-id/14/96b8a56bb372cab8531bb80691d465fa3f762a
/usr/lib/.build-id/3f
/usr/lib/.build-id/3f/3f4e6f1e6923cad6293c12f6578fa4669ac718
/usr/lib/.build-id/4c
/usr/lib/.build-id/4c/85b2179e1e8be60098a3aec5e01e706c652123
/usr/lib/.build-id/5b
/usr/lib/.build-id/5b/78bb1513ae47f482bd221abba975018ef6a450
/usr/lib/.build-id/7c
/usr/lib/.build-id/7c/fdc4fb4e4fde67ecf700bb716aea96f1029a97
/usr/lib/.build-id/7e
/usr/lib/.build-id/7e/8d3298b1fa93af8b5df27f9d41aa432222f279
/usr/lib/.build-id/82
/usr/lib/.build-id/82/087b7741e98e847f88e115ed12b41645cf8f21
/usr/lib/.build-id/86
/usr/lib/.build-id/86/4708394b0e5596490842cab6efceccd6a429aa
/usr/lib/.build-id/8e
/usr/lib/.build-id/8e/3eec2ebfa62f4f146afb6e62173c6af21e0e36
/usr/lib/.build-id/95
/usr/lib/.build-id/95/f0a74ba558426bf90b5debfa6334b0d9a51b88
/usr/lib/.build-id/99
/usr/lib/.build-id/99/fb5b5467069632459b0f3b8eb9d05de13c3b1f
/usr/lib/.build-id/a6
/usr/lib/.build-id/a6/b9cc539fd9edec41c068ba38034d540def687e
/usr/lib/.build-id/af
/usr/lib/.build-id/af/e0b5491274594b2451a683d41f77abedfca1ea
/usr/lib/.build-id/af/fd6eafc2b265577aa22ee73641fd50cba33baa
/usr/lib/.build-id/b1
/usr/lib/.build-id/b1/1466ccf0edda8261bfc9e45578e969ec51387b
/usr/lib/.build-id/bd
/usr/lib/.build-id/bd/e31a7d99c5c814a0f5ce5d0cf0baf4c766215d
/usr/lib/.build-id/c4
/usr/lib/.build-id/c4/4880f87cd5974375050620f171a826fcb7e358
/usr/lib/.build-id/c9
/usr/lib/.build-id/c9/c7e3a0d7eadf2c9902b9b3a9ac6e00eedcc55d
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/d82a3d0c55b6bef6e9dfd7a4840d5158ed78fd
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/b616b5d2e2a0d98c4ee5a7438a55dd2f82f088
/usr/lib/.build-id/f0
/usr/lib/.build-id/f0/8b7e0ef3dabdc57eae9487bfdac25ac78d366c
/usr/lib/.build-id/f3
/usr/lib/.build-id/f3/ab2f565a145df0f03604b80a224a96e5530b2b
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/4eb6b0eb3e75cc8a5b69ae950ccc80acc3dd3b
/usr/lib/.build-id/ff
/usr/lib/.build-id/ff/a5e81c0dfc30dedeb3e9a2af569ec57ffbc23d
/usr/lib64/libopensc.so.6
/usr/lib64/libopensc.so.6.0.0
/usr/lib64/libsmm-local.so.6
/usr/lib64/libsmm-local.so.6.0.0
/usr/lib64/onepin-opensc-pkcs11.so
/usr/lib64/opensc-pkcs11.so
/usr/lib64/pkcs11
/usr/lib64/pkcs11-spy.so
/usr/lib64/pkcs11/onepin-opensc-pkcs11.so
/usr/lib64/pkcs11/opensc-pkcs11.so
/usr/lib64/pkcs11/pkcs11-spy.so
/usr/lib64/pkgconfig/opensc-pkcs11.pc
/usr/share/applications/org.opensc.notify.desktop
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/cardos-tool
/usr/share/bash-completion/completions/cryptoflex-tool
/usr/share/bash-completion/completions/dnie-tool
/usr/share/bash-completion/completions/egk-tool
/usr/share/bash-completion/completions/eidenv
/usr/share/bash-completion/completions/gids-tool
/usr/share/bash-completion/completions/iasecc-tool
/usr/share/bash-completion/completions/netkey-tool
/usr/share/bash-completion/completions/npa-tool
/usr/share/bash-completion/completions/openpgp-tool
/usr/share/bash-completion/completions/opensc-asn1
/usr/share/bash-completion/completions/opensc-explorer
/usr/share/bash-completion/completions/opensc-notify
/usr/share/bash-completion/completions/opensc-tool
/usr/share/bash-completion/completions/piv-tool
/usr/share/bash-completion/completions/pkcs11-tool
/usr/share/bash-completion/completions/pkcs15-crypt
/usr/share/bash-completion/completions/pkcs15-init
/usr/share/bash-completion/completions/pkcs15-tool
/usr/share/bash-completion/completions/sc-hsm-tool
/usr/share/bash-completion/completions/westcos-tool
/usr/share/doc/opensc
/usr/share/doc/opensc/COPYING
/usr/share/doc/opensc/NEWS
/usr/share/doc/opensc/README
/usr/share/doc/opensc/README.pkcs15init
/usr/share/doc/opensc/README.scconf
/usr/share/man/man1/cardos-tool.1.gz
/usr/share/man/man1/cryptoflex-tool.1.gz
/usr/share/man/man1/dnie-tool.1.gz
/usr/share/man/man1/egk-tool.1.gz
/usr/share/man/man1/eidenv.1.gz
/usr/share/man/man1/gids-tool.1.gz
/usr/share/man/man1/iasecc-tool.1.gz
/usr/share/man/man1/netkey-tool.1.gz
/usr/share/man/man1/openpgp-tool.1.gz
/usr/share/man/man1/opensc-asn1.1.gz
/usr/share/man/man1/opensc-explorer.1.gz
/usr/share/man/man1/opensc-notify.1.gz
/usr/share/man/man1/opensc-tool.1.gz
/usr/share/man/man1/piv-tool.1.gz
/usr/share/man/man1/pkcs11-tool.1.gz
/usr/share/man/man1/pkcs15-crypt.1.gz
/usr/share/man/man1/pkcs15-init.1.gz
/usr/share/man/man1/pkcs15-tool.1.gz
/usr/share/man/man1/sc-hsm-tool.1.gz
/usr/share/man/man1/westcos-tool.1.gz
/usr/share/man/man5/opensc.conf.5.gz
/usr/share/man/man5/pkcs15-profile.5.gz
/usr/share/opensc
/usr/share/opensc/asepcos.profile
/usr/share/opensc/authentic.profile
/usr/share/opensc/cardos.profile
/usr/share/opensc/cyberflex.profile
/usr/share/opensc/entersafe.profile
/usr/share/opensc/epass2003.profile
/usr/share/opensc/flex.profile
/usr/share/opensc/gids.profile
/usr/share/opensc/gpk.profile
/usr/share/opensc/ias_adele_admin1.profile
/usr/share/opensc/ias_adele_admin2.profile
/usr/share/opensc/ias_adele_common.profile
/usr/share/opensc/iasecc.profile
/usr/share/opensc/iasecc_admin_eid.profile
/usr/share/opensc/iasecc_generic_oberthur.profile
/usr/share/opensc/iasecc_generic_pki.profile
/usr/share/opensc/incrypto34.profile
/usr/share/opensc/isoApplet.profile
/usr/share/opensc/jcop.profile
/usr/share/opensc/miocos.profile
/usr/share/opensc/muscle.profile
/usr/share/opensc/myeid.profile
/usr/share/opensc/oberthur.profile
/usr/share/opensc/openpgp.profile
/usr/share/opensc/pkcs15.profile
/usr/share/opensc/rutoken.profile
/usr/share/opensc/rutoken_ecp.profile
/usr/share/opensc/rutoken_lite.profile
/usr/share/opensc/sc-hsm.profile
/usr/share/opensc/setcos.profile
/usr/share/opensc/starcos.profile
/usr/share/opensc/westcos.profile
/usr/share/p11-kit/modules/opensc.module

References

Summary

In this tutorial we learn how to install opensc on CentOS 8 using yum and dnf.