Deleted Added
full compact
key.c (285204) key.c (286292)
1/* $FreeBSD: head/sys/netipsec/key.c 285204 2015-07-06 12:40:31Z ae $ */
1/* $FreeBSD: head/sys/netipsec/key.c 286292 2015-08-04 17:47:11Z jmg $ */
2/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
3
4/*-
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 2820 unchanged lines hidden (view full) ---

2830 /*
2831 * Cleanup xform state. Note that zeroize'ing causes the
2832 * keys to be cleared; otherwise we must do it ourself.
2833 */
2834 if (sav->tdb_xform != NULL) {
2835 sav->tdb_xform->xf_zeroize(sav);
2836 sav->tdb_xform = NULL;
2837 } else {
2/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
3
4/*-
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 2820 unchanged lines hidden (view full) ---

2830 /*
2831 * Cleanup xform state. Note that zeroize'ing causes the
2832 * keys to be cleared; otherwise we must do it ourself.
2833 */
2834 if (sav->tdb_xform != NULL) {
2835 sav->tdb_xform->xf_zeroize(sav);
2836 sav->tdb_xform = NULL;
2837 } else {
2838 KASSERT(sav->iv == NULL, ("iv but no xform"));
2839 if (sav->key_auth != NULL)
2840 bzero(sav->key_auth->key_data, _KEYLEN(sav->key_auth));
2841 if (sav->key_enc != NULL)
2842 bzero(sav->key_enc->key_data, _KEYLEN(sav->key_enc));
2843 }
2844 if (sav->key_auth != NULL) {
2845 if (sav->key_auth->key_data != NULL)
2846 free(sav->key_auth->key_data, M_IPSEC_MISC);

--- 161 unchanged lines hidden (view full) ---

3008 IPSEC_ASSERT(mhp->msg != NULL, ("null msg"));
3009
3010 /* initialization */
3011 sav->replay = NULL;
3012 sav->key_auth = NULL;
3013 sav->key_enc = NULL;
3014 sav->sched = NULL;
3015 sav->schedlen = 0;
2838 if (sav->key_auth != NULL)
2839 bzero(sav->key_auth->key_data, _KEYLEN(sav->key_auth));
2840 if (sav->key_enc != NULL)
2841 bzero(sav->key_enc->key_data, _KEYLEN(sav->key_enc));
2842 }
2843 if (sav->key_auth != NULL) {
2844 if (sav->key_auth->key_data != NULL)
2845 free(sav->key_auth->key_data, M_IPSEC_MISC);

--- 161 unchanged lines hidden (view full) ---

3007 IPSEC_ASSERT(mhp->msg != NULL, ("null msg"));
3008
3009 /* initialization */
3010 sav->replay = NULL;
3011 sav->key_auth = NULL;
3012 sav->key_enc = NULL;
3013 sav->sched = NULL;
3014 sav->schedlen = 0;
3016 sav->iv = NULL;
3017 sav->lft_c = NULL;
3018 sav->lft_h = NULL;
3019 sav->lft_s = NULL;
3020 sav->tdb_xform = NULL; /* transform */
3021 sav->tdb_encalgxform = NULL; /* encoding algorithm */
3022 sav->tdb_authalgxform = NULL; /* authentication algorithm */
3023 sav->tdb_compalgxform = NULL; /* compression algorithm */
3024 /* Initialize even if NAT-T not compiled in: */

--- 4825 unchanged lines hidden ---
3015 sav->lft_c = NULL;
3016 sav->lft_h = NULL;
3017 sav->lft_s = NULL;
3018 sav->tdb_xform = NULL; /* transform */
3019 sav->tdb_encalgxform = NULL; /* encoding algorithm */
3020 sav->tdb_authalgxform = NULL; /* authentication algorithm */
3021 sav->tdb_compalgxform = NULL; /* compression algorithm */
3022 /* Initialize even if NAT-T not compiled in: */

--- 4825 unchanged lines hidden ---