I have successfully imported the private key into the PKCS11 token. The token object looks like this:
Private Key Object; RSA 
  label:      #####
  ID:         #####
  Usage:      decrypt, sign, unwrap
  Access:     sensitive
Public Key Object; RSA 2048 bits
  label:      #####
  ID:         #####
  Usage:      encrypt, verify, wrap
  Access:     none
I learned that CKA_VALUE usually could not be extracted. And I would like to know what is the correct procedure to create mTLS connection by using pkcs#11 private key and certificate.
 
                        
Just in case, check out ThalesIgnite/crypto11
exportDSAPublicKey()which does exportpkcs11.Attribute, includingpcs11.CKA_VALUE, using the public key.(
CKA_VALUEis one of theECDSAprivate key objects)For mTLS, check if
miekg/pkcs11can help (not tested).It can at least help creating a tlsConfig based on private key and certificate.
Those should be extracted from your pkcs11 file:
That does not seem to require
CKA_VALUE