VirtualBox

Changeset 74052 in vbox for trunk/include/iprt/cpp


Ignore:
Timestamp:
Sep 3, 2018 8:09:45 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/rest: Started implementing http-signatures for oci. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cpp/restclient.h

    r74026 r74052  
    421421    /** @} */
    422422
     423    /** Flags to doCall. */
     424    enum
     425    {
     426        kDoCall_OciReqSignExcludeBody = 1 /**< Exclude the body when doing OCI request signing. */
     427    };
     428
    423429protected:
    424430    /** Handle to the HTTP connection object. */
     
    439445
    440446    /**
     447     * Hook that's called when doCall has fully assembled the request.
     448     *
     449     * Can be used for request signing and similar final steps.
     450     *
     451     * @returns IPRT status code.
     452     * @param   a_hHttp         The HTTP client instance.
     453     * @param   a_rStrFullUrl   The full URL.
     454     * @param   a_enmHttpMethod The HTTP request method.
     455     * @param   a_rStrXmitBody  The body text.
     456     * @param   a_fFlags        kDoCall_XXX.
     457     */
     458    virtual int xmitReady(RTHTTP a_hHttp, RTCString const &a_rStrFullUrl, RTHTTPMETHOD a_enmHttpMethod,
     459                          RTCString const &a_rStrXmitBody, uint32_t a_fFlags);
     460
     461    /**
    441462     * Implements stuff for making an API call.
    442463     *
     
    446467     * @param   a_pResponse     Pointer to the response object.
    447468     * @param   a_pszMethod     The method name, for logging purposes.
     469     * @param   a_fFlags        kDoCall_XXX.
    448470     */
    449471    virtual int doCall(RTCRestClientRequestBase const &a_rRequest, RTHTTPMETHOD a_enmHttpMethod,
    450                        RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod);
    451 
     472                       RTCRestClientResponseBase *a_pResponse, const char *a_pszMethod, uint32_t a_fFlags);
     473
     474    /**
     475     * Implements OCI style request signing.
     476     *
     477     * @returns IPRT status code.
     478     * @param   a_hHttp         The HTTP client instance.
     479     * @param   a_rStrFullUrl   The full URL.
     480     * @param   a_enmHttpMethod The HTTP request method.
     481     * @param   a_rStrXmitBody  The body text.
     482     * @param   a_fFlags        kDoCall_XXX.
     483     * @param   a_hKey          The key to use for signing.
     484     * @param   a_rStrKeyId     The key ID.
     485     *
     486     * @remarks The signing scheme is covered by a series of drafts RFC, the latest being:
     487     *                  https://tools.ietf.org/html/draft-cavage-http-signatures-10
     488     */
     489    int ociSignRequest(RTHTTP a_hHttp, RTCString const &a_rStrFullUrl, RTHTTPMETHOD a_enmHttpMethod,
     490                       RTCString const &a_rStrXmitBody, uint32_t a_fFlags, RTCRKEY a_hKey, RTCString const &a_rStrKeyId);
    452491};
    453492
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette