Example #1
0
File: pwbox.c Project: Zensin/tor
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
pwbox_encoded_clear(pwbox_encoded_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->skey_header);
  TRUNNEL_DYNARRAY_CLEAR(&obj->skey_header);
  TRUNNEL_DYNARRAY_WIPE(&obj->data);
  TRUNNEL_DYNARRAY_CLEAR(&obj->data);
}
Example #2
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
trn_cell_introduce1_clear(trn_cell_introduce1_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->auth_key);
  TRUNNEL_DYNARRAY_CLEAR(&obj->auth_key);
  trn_cell_extension_free(obj->extensions);
  obj->extensions = NULL;
  TRUNNEL_DYNARRAY_WIPE(&obj->encrypted);
  TRUNNEL_DYNARRAY_CLEAR(&obj->encrypted);
}
Example #3
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
auth1_clear(auth1_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->sig);
  TRUNNEL_DYNARRAY_CLEAR(&obj->sig);
}
Example #4
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
rsa_ed_crosscert_clear(rsa_ed_crosscert_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->sig);
  TRUNNEL_DYNARRAY_CLEAR(&obj->sig);
}
Example #5
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
auth_challenge_cell_clear(auth_challenge_cell_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->methods);
  TRUNNEL_DYNARRAY_CLEAR(&obj->methods);
}
Example #6
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
certs_cell_cert_clear(certs_cell_cert_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->body);
  TRUNNEL_DYNARRAY_CLEAR(&obj->body);
}
Example #7
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
trn_cell_rendezvous1_clear(trn_cell_rendezvous1_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->handshake_info);
  TRUNNEL_DYNARRAY_CLEAR(&obj->handshake_info);
}
Example #8
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
ed25519_cert_extension_clear(ed25519_cert_extension_t *obj)
{
  (void) obj;
  TRUNNEL_DYNARRAY_WIPE(&obj->un_unparsed);
  TRUNNEL_DYNARRAY_CLEAR(&obj->un_unparsed);
}
Example #9
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
trn_cell_introduce_encrypted_clear(trn_cell_introduce_encrypted_t *obj)
{
  (void) obj;
  trn_cell_extension_free(obj->extensions);
  obj->extensions = NULL;
  TRUNNEL_DYNARRAY_WIPE(&obj->onion_key);
  TRUNNEL_DYNARRAY_CLEAR(&obj->onion_key);
  {

    unsigned idx;
    for (idx = 0; idx < TRUNNEL_DYNARRAY_LEN(&obj->nspecs); ++idx) {
      link_specifier_free(TRUNNEL_DYNARRAY_GET(&obj->nspecs, idx));
    }
  }
  TRUNNEL_DYNARRAY_WIPE(&obj->nspecs);
  TRUNNEL_DYNARRAY_CLEAR(&obj->nspecs);
  TRUNNEL_DYNARRAY_WIPE(&obj->pad);
  TRUNNEL_DYNARRAY_CLEAR(&obj->pad);
}
Example #10
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
certs_cell_clear(certs_cell_t *obj)
{
  (void) obj;
  {

    unsigned idx;
    for (idx = 0; idx < TRUNNEL_DYNARRAY_LEN(&obj->certs); ++idx) {
      certs_cell_cert_free(TRUNNEL_DYNARRAY_GET(&obj->certs, idx));
    }
  }
  TRUNNEL_DYNARRAY_WIPE(&obj->certs);
  TRUNNEL_DYNARRAY_CLEAR(&obj->certs);
}
Example #11
0
/** Release all storage held inside 'obj', but do not free 'obj'.
 */
static void
ed25519_cert_clear(ed25519_cert_t *obj)
{
  (void) obj;
  {

    unsigned idx;
    for (idx = 0; idx < TRUNNEL_DYNARRAY_LEN(&obj->ext); ++idx) {
      ed25519_cert_extension_free(TRUNNEL_DYNARRAY_GET(&obj->ext, idx));
    }
  }
  TRUNNEL_DYNARRAY_WIPE(&obj->ext);
  TRUNNEL_DYNARRAY_CLEAR(&obj->ext);
}