~ubuntu-branches/ubuntu/oneiric/strongswan/oneiric

« back to all changes in this revision

Viewing changes to src/libstrongswan/crypto/prf_plus.c

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2008-12-05 17:21:42 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20081205172142-9g77wgyzcj0blq7p
* New upstream release, fixes a MOBIKE issue.
  Closes: #507542: strongswan: endless loop
* Explicitly enable compilation with libcurl for CRL fetching
  Closes: #497756: strongswan: not compiled with curl support; crl 
                   fetching not available
* Enable compilation with SSH agent support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
14
 * for more details.
15
15
 *
16
 
 * $Id: prf_plus.c 3589 2008-03-13 14:14:44Z martin $
 
16
 * $Id: prf_plus.c 4524 2008-10-29 14:12:54Z martin $
17
17
 */
18
18
 
19
19
#include <string.h>
96
96
 */     
97
97
static void allocate_bytes(private_prf_plus_t *this, size_t length, chunk_t *chunk)
98
98
{
99
 
        chunk->ptr = malloc(length);
100
 
        chunk->len = length;
101
 
        this->public.get_bytes(&(this->public), length, chunk->ptr);
 
99
        if (length)
 
100
        {
 
101
                chunk->ptr = malloc(length);
 
102
                chunk->len = length;
 
103
                get_bytes(this, length, chunk->ptr);
 
104
        }
 
105
        else
 
106
        {
 
107
                *chunk = chunk_empty;
 
108
        }
102
109
}
103
110
 
104
111
/**