Support CKA_PUBLIC_KEY_INFO

Abierto
#759 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Start with the three CKA_PUBLIC_KEY_INFO TODO comments, including the one in src/lib/P11Objects.cpp, and the i2d_PUBKEY comment in src/lib/crypto/OSSLEDPublicKey.cpp. Read how public key attributes are currently retrieved and identify the existing tests for C_GetAttributeValue. Implementing the DER encoded SubjectPublicKeyInfo value is done when the attribute returns the expected encoding for each supported public key type.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

PKCS11 C_GetAttributeValue for CKA_PUBLIC_KEY_INFO returns with zero length.
This comment appears 3 times in the code: "// TODO: CKA_PUBLIC_KEY_INFO is accepted, but we do not calculate it."
one is here.

The comment: "// i2d_PUBKEY incorrectly does not const the key argument?!" appears here.

https://docs.openssl.org/3.0/man3/X509_PUBKEY_new/ says: "i2d_PUBKEY() encodes an EVP_PKEY structure using SubjectPublicKeyInfo". PKCS11 says: "The value of the CKA_PUBLIC_KEY_INFO attribute is the DER encoded value of SubjectPublicKeyInfo".

https://docs.openssl.org/3.0/man3/X509_PUBKEY_new/#description says: "i2d_PUBKEY() encodes an EVP_PKEY structure using SubjectPublicKeyInfo format."

This should be easy to implement, for a C++ programmer, and it would work on any type of pubkey.

The problems shows up in mods to OpenSC https://github.com/OpenSC/OpenSC/pull/3090 calling the softhsm2 pkcs11 module.

Lenguaje dominante
C++
Estrellas
1.1k
Forks
434
Merge medio
12 d 14 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de softhsm/SoftHSMv2

Todos los issues de softhsm/SoftHSMv2

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.