Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot extract certificate from crypto chip #12

Open
abilbaotm opened this issue Sep 28, 2017 · 0 comments
Open

Cannot extract certificate from crypto chip #12

abilbaotm opened this issue Sep 28, 2017 · 0 comments

Comments

@abilbaotm
Copy link

abilbaotm commented Sep 28, 2017

I have stored a private key in the crypto chip and I want to extract or generate a public key. The run_extract_certs.sh seems not working for me. I get ATECCX08: eccx08_cmd_ctrl(): error in atcatls_get_cert. I am missing something?

# ./run_extract_certs.sh 
++ dirname ./run_extract_certs.sh
+ cd .
+ source ./common.sh
++ set -e
++ set -x
+++ dirname ./run_extract_certs.sh
++ cd .
++ cd ..
++ export TREE_TOP=/home/parallels/cryptoauth-openssl-engine
++ TREE_TOP=/home/parallels/cryptoauth-openssl-engine
++ export CERTSTORE=/home/parallels/cryptoauth-openssl-engine/certstore
++ CERTSTORE=/home/parallels/cryptoauth-openssl-engine/certstore
++ export SCRIPTS=/home/parallels/cryptoauth-openssl-engine/scripts
++ SCRIPTS=/home/parallels/cryptoauth-openssl-engine/scripts
++ export BIN_DIR=/home/parallels/cryptoauth-openssl-engine/install_dir/bin
++ BIN_DIR=/home/parallels/cryptoauth-openssl-engine/install_dir/bin
++ export EX_DIR=/home/parallels/cryptoauth-openssl-engine/client-server
++ EX_DIR=/home/parallels/cryptoauth-openssl-engine/client-server
++ export DEVICE_CERT=/home/parallels/cryptoauth-openssl-engine/certstore/personal/AT_device
++ DEVICE_CERT=/home/parallels/cryptoauth-openssl-engine/certstore/personal/AT_device
++ export DEVICE_KEY=/home/parallels/cryptoauth-openssl-engine/certstore/privkeys/AT_device.key
++ DEVICE_KEY=/home/parallels/cryptoauth-openssl-engine/certstore/privkeys/AT_device.key
++ export DEVICE_CSR=/home/parallels/cryptoauth-openssl-engine/certstore/csr/AT_device.csr
++ DEVICE_CSR=/home/parallels/cryptoauth-openssl-engine/certstore/csr/AT_device.csr
++ export SIGNER_CERT=/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer
++ SIGNER_CERT=/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer
++ export SIGNER_PATH=/home/parallels/cryptoauth-openssl-engine/certstore/trusted
++ SIGNER_PATH=/home/parallels/cryptoauth-openssl-engine/certstore/trusted
++ export ROOT_CERT=/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root
++ ROOT_CERT=/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root
++ export SIGNER_BUNDLE=/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_bundle.crt
++ SIGNER_BUNDLE=/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_bundle.crt
++ export LD_LIBRARY_PATH=/home/parallels/cryptoauth-openssl-engine/install_dir/lib
++ LD_LIBRARY_PATH=/home/parallels/cryptoauth-openssl-engine/install_dir/lib
++ export LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0
++ LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0
++ '[' -z '' ']'
++ export PORT_NUMBER=49917
++ PORT_NUMBER=49917
++ '[' -z '' ']'
++ export IP_ADDRESS=127.0.0.1
++ IP_ADDRESS=127.0.0.1
++ export 'ENGINE=-engine ateccx08'
++ ENGINE='-engine ateccx08'
++ export 'KEYGEN_ENGINE=-keygen_engine ateccx08'
++ KEYGEN_ENGINE='-keygen_engine ateccx08'
++ '[' -z '' ']'
++ export COMPANY=homut
++ COMPANY=homut
++ '[' -z '' ']'
++ export COMMON_NAME=homut
++ COMMON_NAME=homut
++ '[' -z '' ']'
++ export USE_EXAMPLE=0
++ USE_EXAMPLE=0
++ '[' -z '' ']'
++ export USE_ENGINE=0
++ USE_ENGINE=0
++ '[' -z '' ']'
++ export USE_ATMEL_CA=0
++ USE_ATMEL_CA=0
++ '[' -z '' ']'
++ export NEW_KEY=0
++ NEW_KEY=0
++ '[' -z '' ']'
++ export NEW_ROOT=0
++ NEW_ROOT=0
++ '[' -z '' ']'
++ USE_WWW=0
++ '[' 0 = 0 ']'
++ export ENGINE=
++ ENGINE=
++ export ENGINE_EX=
++ ENGINE_EX=
++ '[' -z '' ']'
++ export USE_RSA=0
++ USE_RSA=0
++ '[' 0 = 0 ']'
++ RSA=
++ export CMD=/home/parallels/cryptoauth-openssl-engine/install_dir/bin/openssl
++ CMD=/home/parallels/cryptoauth-openssl-engine/install_dir/bin/openssl
++ export CMD_EX=/home/parallels/cryptoauth-openssl-engine/client-server/exchange-tls12
++ CMD_EX=/home/parallels/cryptoauth-openssl-engine/client-server/exchange-tls12
+ set +e
+ /home/parallels/cryptoauth-openssl-engine/client-server/exchange-tls12 -E -e ateccx08
Current working dir: /home/parallels/cryptoauth-openssl-engine
ATECCX08: bind_fn()
ATECCX08: ECCX08 bind_helper()
ATECCX08: eccx08_rand_init()
ATECCX08: eccx08_pkey_meth_init()
ATECCX08: eccx08_pkey_meth_init()
ATECCX08: eccx08_ecdh_init() - HW
ATECCX08: eccx08_cmd_defn_init()
ATECCX08: returned normally()
ATECCX08: eccx08_init()
ATECCX08: eccx08_pkey_meth_f()
ATECCX08: eccx08_pkey_asn1_meth_f()
ATECCX08: eccx08_ctrl()
ATECCX08: eccx08_cmd_ctrl(ECCX08_CMD_EXTRACT_ALL_CERTS)
ATECCX08: eccx08_cmd_ctrl(ECCX08_CMD_GET_SIGNER_CERT)
ATECCX08: eccx08_cmd_ctrl(): error in atcatls_get_cert

+ /home/parallels/cryptoauth-openssl-engine/install_dir/bin/openssl x509 -inform DER -outform PEM -in /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer.der -out /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer.pem
Error opening Certificate /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer.der
140197270136472:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer.der','r')
140197270136472:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
unable to load certificate
+ /home/parallels/cryptoauth-openssl-engine/install_dir/bin/openssl x509 -inform DER -outform PEM -in /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root.der -out /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root.pem
Error opening Certificate /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root.der
139792167216792:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root.der','r')
139792167216792:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
unable to load certificate
+ cat /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer.pem /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root.pem
cat: /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_signer.pem: No such file or directory
cat: /home/parallels/cryptoauth-openssl-engine/certstore/trusted/AT_root.pem: No such file or directory
+ /home/parallels/cryptoauth-openssl-engine/install_dir/bin/openssl x509 -inform DER -outform PEM -in /home/parallels/cryptoauth-openssl-engine/certstore/personal/AT_device.der -out /home/parallels/cryptoauth-openssl-engine/certstore/personal/AT_device.pem
Error opening Certificate /home/parallels/cryptoauth-openssl-engine/certstore/personal/AT_device.der
140693885945496:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/home/parallels/cryptoauth-openssl-engine/certstore/personal/AT_device.der','r')
140693885945496:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
unable to load certificate
+ '[' 0 = 1 ']'
+ STATUS=0
+ echo 'EXIT STATUS: 0'
EXIT STATUS: 0
+ exit 0

Regards. Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant