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

Accessing private key within HSM #2492

Open
Kitty-Hawk1 opened this issue Mar 25, 2022 · 0 comments
Open

Accessing private key within HSM #2492

Kitty-Hawk1 opened this issue Mar 25, 2022 · 0 comments

Comments

@Kitty-Hawk1
Copy link

Attempting use a private key stored within HSM via openssl engine, how should the private key reference be passed in ?

Example in openssl

openssl dgst -sign 0xe0f1 --keyform engine -engine trustm_engine -out helloworld.sig helloworld.txt

  bridge_cafile /etc/mosquitto/ca_certificates/RootCA.crt
  bridge_certfile /nvmem/CONN_uP.crt
  bridge_insecure true
  bridge_keyfile 0xe0f1
  bridge_protocol_version mqttv50
  bridge_tls_version tlsv1.3
  notification_topic CloudState
  notifications true
  restart_timeout 1
  start_type automatic
  tls_engine trustm_engine
  tls_keyform engine

Mar 24 17:25:36 mach-cw-rnet-sn-gpm-249-2050 mosquitto[235]: 1648142736: Error: Unable to load client key file, check bridge_keyfile "0xe0f1".

	ret = SSL_CTX_use_PrivateKey_file(mosq->ssl_ctx, mosq->tls_keyfile, SSL_FILETYPE_PEM);
	if(ret != 1){
#ifdef WITH_BROKER
			log__printf(mosq, MOSQ_LOG_ERR, "Error: Unable to load client key file, check bridge_keyfile \"%s\".", mosq->tls_keyfile);
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