~henrik-ziegeldorf/hipl/pisa

« back to all changes in this revision

Viewing changes to lib/core/certtools.c

  • Committer: Henrik Ziegeldorf
  • Date: 2011-11-15 08:47:07 UTC
  • Revision ID: henrik.ziegeldorf@rwth-aachen.de-20111115084707-nfkgp8k1m2vemse8
Applied patch by Christoph Viethen.

Show diffs side-by-side

added added

removed removed

Lines of Context:
700
700
    /* get the struct from the message sent back by the daemon */
701
701
    HIP_IFEL(!(p = hip_get_param(msg, HIP_PARAM_CERT_X509_RESP)), -1,
702
702
             "No name x509 struct found\n");
703
 
    memcpy(certificate, p->der, p->der_len);
704
 
    err = p->der_len;
 
703
    memcpy(certificate, p->der, ntohl(p->der_len));
 
704
    err = ntohl(p->der_len);
705
705
 
706
706
out_err:
707
707
    free(msg);
771
771
 *       the conf with NCONF_free().
772
772
 *
773
773
 */
774
 
STACK_OF(CONF_VALUE) * hip_cert_read_conf_section(const char *section_name,
775
 
                                                  CONF * conf)
 
774
STACK_OF(CONF_VALUE) *hip_cert_read_conf_section(const char *section_name,
 
775
                                                  CONF *conf)
776
776
{
777
777
    long err = 0;
778
 
    STACK_OF(CONF_VALUE) * sec = NULL;
 
778
    STACK_OF(CONF_VALUE) *sec = NULL;
779
779
 
780
780
    /* XXTODO conf is opened and reopened here why -Samu */
781
781
    conf = NCONF_new(NCONF_default());