exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

post-management-signkeys-EXCHANGE_PUB-revoke.h (3937B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2014-2026 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15  */
     16 /**
     17  * @file include/taler/taler-exchange/post-management-signkeys-EXCHANGE_PUB-revoke.h
     18  * @brief C interface for POST /management/signkeys/$EXCHANGE_PUB/revoke
     19  * @author Christian Grothoff
     20  */
     21 #ifndef _TALER_EXCHANGE__POST_MANAGEMENT_SIGNKEYS_EXCHANGE_PUB_REVOKE_H
     22 #define _TALER_EXCHANGE__POST_MANAGEMENT_SIGNKEYS_EXCHANGE_PUB_REVOKE_H
     23 
     24 #include <taler/taler-exchange/common.h>
     25 
     26 /**
     27  * Handle for an operation to POST
     28  * /management/signkeys/$EXCHANGE_PUB/revoke.
     29  */
     30 struct TALER_EXCHANGE_PostManagementSignkeysRevokeHandle;
     31 
     32 
     33 /**
     34  * Set up POST /management/signkeys/$EXCHANGE_PUB/revoke operation.
     35  * Note that you must explicitly start the operation after setup.
     36  *
     37  * @param ctx the context
     38  * @param url HTTP base URL for the exchange
     39  * @param exchange_pub the public signing key that was revoked
     40  * @param master_sig signature affirming the revocation
     41  * @return handle to operation, NULL on error
     42  */
     43 struct TALER_EXCHANGE_PostManagementSignkeysRevokeHandle *
     44 TALER_EXCHANGE_post_management_signkeys_revoke_create (
     45   struct GNUNET_CURL_Context *ctx,
     46   const char *url,
     47   const struct TALER_ExchangePublicKeyP *exchange_pub,
     48   const struct TALER_MasterSignatureP *master_sig);
     49 
     50 
     51 /**
     52  * Response from a POST /management/signkeys/$SK/revoke request.
     53  */
     54 struct TALER_EXCHANGE_PostManagementSignkeysRevokeResponse
     55 {
     56   /**
     57    * HTTP response data
     58    */
     59   struct TALER_EXCHANGE_HttpResponse hr;
     60 };
     61 
     62 
     63 #ifndef TALER_EXCHANGE_POST_MANAGEMENT_SIGNKEYS_REVOKE_RESULT_CLOSURE
     64 /**
     65  * Type of the closure used by
     66  * the #TALER_EXCHANGE_PostManagementSignkeysRevokeCallback.
     67  */
     68 #define TALER_EXCHANGE_POST_MANAGEMENT_SIGNKEYS_REVOKE_RESULT_CLOSURE void
     69 #endif /* TALER_EXCHANGE_POST_MANAGEMENT_SIGNKEYS_REVOKE_RESULT_CLOSURE */
     70 
     71 /**
     72  * Type of the function that receives the result of a
     73  * POST /management/signkeys/$EXCHANGE_PUB/revoke request.
     74  *
     75  * @param cls closure
     76  * @param result result returned by the HTTP server
     77  */
     78 typedef void
     79 (*TALER_EXCHANGE_PostManagementSignkeysRevokeCallback)(
     80   TALER_EXCHANGE_POST_MANAGEMENT_SIGNKEYS_REVOKE_RESULT_CLOSURE *cls,
     81   const struct TALER_EXCHANGE_PostManagementSignkeysRevokeResponse *result);
     82 
     83 
     84 /**
     85  * Start POST /management/signkeys/$EXCHANGE_PUB/revoke operation.
     86  *
     87  * @param[in,out] pmsrh operation to start
     88  * @param cb function to call with the exchange's result
     89  * @param cb_cls closure for @a cb
     90  * @return status code, #TALER_EC_NONE on success
     91  */
     92 enum TALER_ErrorCode
     93 TALER_EXCHANGE_post_management_signkeys_revoke_start (
     94   struct TALER_EXCHANGE_PostManagementSignkeysRevokeHandle *pmsrh,
     95   TALER_EXCHANGE_PostManagementSignkeysRevokeCallback cb,
     96   TALER_EXCHANGE_POST_MANAGEMENT_SIGNKEYS_REVOKE_RESULT_CLOSURE *cb_cls);
     97 
     98 
     99 /**
    100  * Cancel POST /management/signkeys/$EXCHANGE_PUB/revoke operation.  This
    101  * function must not be called by clients after the
    102  * TALER_EXCHANGE_PostManagementSignkeysRevokeCallback has been invoked (as in
    103  * those cases it'll be called internally by the implementation already).
    104  *
    105  * @param[in] pmsrh operation to cancel
    106  */
    107 void
    108 TALER_EXCHANGE_post_management_signkeys_revoke_cancel (
    109   struct TALER_EXCHANGE_PostManagementSignkeysRevokeHandle *pmsrh);
    110 
    111 
    112 
    113 #endif /* _TALER_EXCHANGE__POST_MANAGEMENT_SIGNKEYS_EXCHANGE_PUB_REVOKE_H */