Using AKM, and STM together, ignoring "incidental" issues such as error and logging, and dropping some variables:
ato_CfgMgr *cfgmgr;
ato_si_set(
"Your Organisation Name Here",
"ATO STM Reference Client (C version)",
"0.6", buildtime, hash);
ato_cfgm_create(ctx, &cfgmgr, NULL, "test")
logsomethingbutcarryon("Warning: renewal for '%s' failed\n", alias);
free(buffer);
ato_cfgm_free(cfgmgr);
ATO_AKM_EXPORT bool ato_cr_isrenewable(ato_Ctx *ctx, ato_Credential *cr)
ATO_AKM_EXPORT int ato_cr_privatekey(ato_Ctx *ctx, ato_Credential *cr, ato_String **privatekey, const char *pwd)
ATO_AKM_EXPORT int ato_cr_certificate(ato_Ctx *ctx, ato_Credential *cr, ato_String **certificate)
ATO_AKM_EXPORT void * ato_ks_free(ato_Keystore *ks)
ATO_AKM_EXPORT ato_Credential * ato_ks_credential(ato_Keystore *ks, const char *alias)
ATO_AKM_EXPORT int ato_ks_create(ato_Ctx *ctx, ato_Keystore **ks, const char *buffer, const ato_ksProperties *properties)
ATO_AKM_EXPORT void ato_akm_deinit(void)
ATO_AKM_EXPORT int ato_akm_init(ato_Ctx *ctx, unsigned short flag)
ATO_EXPORT void ato_ctx_free(ato_Ctx *ctx)
ATO_EXPORT void ato_ctx_create(ato_Ctx **ctx, const char *id)
ATO_EXPORT void ato_base_deinit(void)
ATO_EXPORT int ato_base_init(ato_Ctx *ctx, unsigned short flag)
ATO_EXPORT int ato_si_set(const char *organisation, const char *product, const char *version, const char *timestamp, const char *source, const char *hash)
struct _ato_String ato_String
#define ATO_BASE_INIT_ALL
ATO_STM_EXPORT int ato_stm_init(ato_Ctx *ctx, unsigned short flag)
Initialise the SDK.
ATO_STM_EXPORT void ato_stm_deinit(void)
Deinitialise the SDK.
ATO_STM_EXPORT int ato_stm_stsissue(ato_Ctx *ctx, ato_Stm *stm, ato_StmTkn **st, ato_String *certificate, ato_String *privatekey, const char *relyingpartyurl)
Submit an STS issue request to the STS service and return a SecurityToken response object.
ATO_STM_EXPORT int ato_stm_create(ato_Ctx *ctx, ato_Stm **stm, const char *stsurl, const char *stmtemplate)
Create an STM object from the XML stored in stmtemplate.
ATO_STM_EXPORT void ato_stm_free(ato_Ctx *ctx, ato_Stm *stm)
Free the STM object.
ATO_STM_EXPORT ato_String * ato_stmtkn_assertion(ato_StmTkn *st)
Given a SecurityToken object, retrieve the encrypted assertion.
ATO_STM_EXPORT ato_String * ato_stmtkn_prooftoken(ato_StmTkn *st)
Given a SecurityToken object, retrieve the embedded proof token.
#define ATO_STM_INIT_ALL
The ATO_STM_INIT_...
Definition: types.h:33