Implemented requesting certs
This commit is contained in:
parent
7cb3972a1a
commit
0fc18236a2
@ -1596,12 +1596,9 @@ const char* requestCertificateDialog( void );
|
|||||||
|
|
||||||
/*! \ingroup groupCertAct
|
/*! \ingroup groupCertAct
|
||||||
\brief Generates a prototype certificate with the data provided
|
\brief Generates a prototype certificate with the data provided
|
||||||
in the first four parameters and sends it via email to the CA
|
in the four parameter.
|
||||||
specified in \c ca_address.
|
|
||||||
*/
|
*/
|
||||||
bool requestDecentralCertificate( const char* name, const char*
|
bool requestDecentralCertificate( const char* certparms, char** generatedKey );
|
||||||
email, const char* organization, const char* department,
|
|
||||||
const char* ca_address );
|
|
||||||
|
|
||||||
/*! \ingroup groupCertAct
|
/*! \ingroup groupCertAct
|
||||||
\brief Requests a certificate in a PSE from the CA
|
\brief Requests a certificate in a PSE from the CA
|
||||||
|
@ -1510,9 +1510,24 @@ bool decryptAndCheckMessage( const char* ciphertext,
|
|||||||
|
|
||||||
const char* requestCertificateDialog(){ return 0; }
|
const char* requestCertificateDialog(){ return 0; }
|
||||||
|
|
||||||
bool requestDecentralCertificate( const char* name, const char*
|
bool requestDecentralCertificate( const char* certparms, char** generatedKey )
|
||||||
email, const char* organization, const char* department,
|
{
|
||||||
const char* ca_address ){ return true; }
|
GpgmeCtx ctx;
|
||||||
|
GpgmeError err = gpgme_new (&ctx);
|
||||||
|
if( err != GPGME_No_Error )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL);
|
||||||
|
|
||||||
|
gpgme_set_armor (ctx, __GPGMEPLUG_SIGNATURE_CODE_IS_BINARY ? 0 : 1);
|
||||||
|
|
||||||
|
if( gpgme_op_genkey( ctx, certparms, NULL, NULL ) == GPGME_No_Error )
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
gpgme_release( ctx );
|
||||||
|
}
|
||||||
|
|
||||||
bool requestCentralCertificateAndPSE( const char* name,
|
bool requestCentralCertificateAndPSE( const char* name,
|
||||||
const char* email, const char* organization, const char* department,
|
const char* email, const char* organization, const char* department,
|
||||||
|
Loading…
Reference in New Issue
Block a user