Lines Matching refs:new
1906 cert_t *new;
1908 new = oakley_newcert();
1909 if (!new) {
1915 new->pl = vmalloc(ntohs(gen->len) - sizeof(*gen));
1916 if (new->pl == NULL) {
1919 oakley_delcert(new);
1920 new = NULL;
1923 memcpy(new->pl->v, gen + 1, new->pl->l);
1924 new->type = new->pl->v[0] & 0xff;
1925 new->cert.v = new->pl->v + 1;
1926 new->cert.l = new->pl->l - 1;
1928 return new;
2374 /* allocated new buffer for CERT */
2378 cert_t *new;
2380 new = racoon_calloc(1, sizeof(*new));
2381 if (new == NULL) {
2387 new->pl = NULL;
2389 return new;
2545 /* create buffer to save new iv */
2582 * save new iv and old iv.
2589 vchar_t *buf = NULL, *new = NULL;
2628 new = alg_oakley_encdef_decrypt(iph1->approval->enctype,
2630 if (new == NULL) {
2640 if (new == NULL)
2648 plogdump(LLV_DEBUG, new->v, new->l);
2652 padlen = new->v[new->l - 1] + 1;
2654 padlen = new->v[new->l - 1];
2659 if (padlen > new->l) {
2662 padlen, new->l);
2663 plogdump(LLV_ERROR, new->v, new->l);
2666 new->l -= padlen;
2672 /* create new buffer */
2673 len = sizeof(struct isakmp) + new->l;
2681 memcpy(buf->v + sizeof(struct isakmp), new->v, new->l);
2698 if (new != NULL)
2699 vfree(new);
2712 vchar_t *buf = 0, *new = 0;
2763 new = alg_oakley_encdef_encrypt(iph1->approval->enctype,
2765 if (new == NULL) {
2775 if (new == NULL)
2783 memcpy(ivp->v, (caddr_t)&new->v[new->l - blen], blen);
2788 /* create new buffer */
2789 len = sizeof(struct isakmp) + new->l;
2797 memcpy(buf->v + sizeof(struct isakmp), new->v, new->l);
2809 if (new != NULL)
2810 vfree(new);