Changeset 595f4e7 in terepaima for signHash/cryptotoken.h


Ignore:
Timestamp:
Oct 25, 2017, 12:30:37 PM (7 years ago)
Author:
Antonio Araujo <aaraujo@…>
Branches:
master
Children:
baaf582
Parents:
2aa151c
Message:

Cambios en función getDeviceCertificates() para obtener la información de los certificados de un dispositivo criptográfico, ahora no se requiere el pin. Internamente ahora se obtiene la clave privada para firmar de acuerdo al índice del certificado firmante seleccionado de la lista que se obtiene con la función mencionada.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • signHash/cryptotoken.h

    r2506bdb r595f4e7  
    5454
    5555    /**
     56     * @brief Retorna un handle a la clave privada encontrada dentro del dispositivo
     57     * @param hSession handle de la sesión abierta en el dispositivo
     58     * @param slotID identificador de slot
     59     * @param id indice del certificado asociado a la clave privada
     60     * @return handle de la clave privada encontrada
     61     */
     62    CK_OBJECT_HANDLE getPrivateKey(CK_SESSION_HANDLE hSession, CK_SLOT_ID slotID, int certificateIndex);
     63
     64    /**
    5665     * @brief firma digitalmente unos datos con la tarjeta inteligente
    5766     * @param hSession handle a la sesion abierta en la tarjeta
     
    7786    std::vector<unsigned char> signHash(QString hashToSign, QString pin, QString label);
    7887
     88    /**
     89     * @brief Sign a hash.
     90     *
     91     * @param hashToSign hash a ser firmado
     92     * @param pin PIN del dispositivo
     93     * @param certificateIndex indice del certificado seleccionado para firmar
     94     * @return signed hash
     95     */
     96    std::vector<unsigned char> signHash(QString hashToSign, QString pin, int certificateIndex);
     97
    7998
    8099    //std::vector<CK_OBJECT_HANDLE> findObject(CK_OBJECT_CLASS objectClass, CK_ULONG max) const;
     
    87106     */
    88107    QStringList getPrivateKeyLabels(QString pin);
     108
     109
     110    QStringList getLabel();
    89111
    90112    /**
     
    106128    /**
    107129     * @brief Get information of commonName and expiration date of certificates inside the device
    108      * @param pin pin of the device
    109130     * @return list of QStringList with <commnonName,expirationDate>
    110131     */
    111     QList<QStringList> getCertificateCNandExpirationDate(QString pin);
     132    QList<QStringList> getCertificateCNandExpirationDate();
    112133
    113134    /**
    114135     * @brief Returns information about device's certificates.
    115136     *
    116      * @param pin pin of the device
    117      * @return QList<QStringList> of information about certificate: <key label, commonName, expiration date>
     137     * @return QList<QStringList> of information about certificate: <commonName, organizationName, expiration date>
    118138     */
    119     QList<QStringList> getDeviceCertificates(QString pin);
     139    QList<QStringList> getDeviceCertificates();
    120140
    121141
Note: See TracChangeset for help on using the changeset viewer.