Lines Matching defs:new
2366 cert_t *new;
2374 new = oakley_newcert();
2375 if (!new) {
2381 new->pl = vmalloc(ntohs(gen->len) - sizeof(*gen));
2382 if (new->pl == NULL) {
2385 oakley_delcert(new);
2386 new = NULL;
2389 memcpy(new->pl->v, gen + 1, new->pl->l);
2390 new->type = new->pl->v[0] & 0xff;
2391 new->cert.v = new->pl->v + 1;
2392 new->cert.l = new->pl->l - 1;
2394 return new;
2401 cert_t *new;
2405 new = oakley_newcert();
2406 if (!new) {
2413 new->pl = vmalloc(len);
2414 if (new->pl == NULL) {
2417 oakley_delcert(new);
2418 new = NULL;
2421 bp = (u_char *) new->pl->v;
2423 new->type = ISAKMP_CERT_X509SIGN;
2424 new->cert.v = new->pl->v;
2425 new->cert.l = new->pl->l;
2427 return new;
2920 /* allocated new buffer for CERT */
2924 cert_t *new;
2926 new = racoon_calloc(1, sizeof(*new));
2927 if (new == NULL) {
2933 new->pl = NULL;
2935 return new;
3091 /* create buffer to save new iv */
3131 * save new iv and old iv.
3138 vchar_t *buf = NULL, *new = NULL;
3177 new = alg_oakley_encdef_decrypt(iph1->approval->enctype,
3179 if (new == NULL || new->v == NULL || new->l == 0) {
3195 plogdump(LLV_DEBUG, new->v, new->l);
3199 padlen = new->v[new->l - 1] + 1;
3201 padlen = new->v[new->l - 1];
3206 if (padlen > new->l) {
3209 padlen, new->l);
3210 plogdump(LLV_ERROR, new->v, new->l);
3213 new->l -= padlen;
3219 /* create new buffer */
3220 len = sizeof(struct isakmp) + new->l;
3228 memcpy(buf->v + sizeof(struct isakmp), new->v, new->l);
3245 if (new != NULL)
3246 vfree(new);
3259 vchar_t *buf = 0, *new = 0;
3310 new = alg_oakley_encdef_encrypt(iph1->approval->enctype,
3312 if (new == NULL) {
3328 memcpy(ivp->v, (caddr_t)&new->v[new->l - blen], blen);
3333 /* create new buffer */
3334 len = sizeof(struct isakmp) + new->l;
3342 memcpy(buf->v + sizeof(struct isakmp), new->v, new->l);
3354 if (new != NULL)
3355 vfree(new);