Revision 1bfb8007 src/pluto/fetch.c
| b/src/pluto/fetch.c | ||
|---|---|---|
| 28 | 28 |
#include <library.h> |
| 29 | 29 |
#include <debug.h> |
| 30 | 30 |
#include <asn1/asn1.h> |
| 31 |
#include <asn1/pem.h> |
|
| 31 | 32 |
|
| 32 | 33 |
#include "constants.h" |
| 33 | 34 |
#include "defs.h" |
| ... | ... | |
| 263 | 264 |
*/ |
| 264 | 265 |
bool fetch_asn1_blob(char *url, chunk_t *blob) |
| 265 | 266 |
{
|
| 266 |
err_t ugh = NULL; |
|
| 267 |
|
|
| 268 | 267 |
DBG1(" fetching crl from '%s' ...", url);
|
| 269 | 268 |
if (lib->fetcher->fetch(lib->fetcher, url, blob, FETCH_END) != SUCCESS) |
| 270 | 269 |
{
|
| ... | ... | |
| 280 | 279 |
{
|
| 281 | 280 |
bool pgp = FALSE; |
| 282 | 281 |
|
| 283 |
ugh = pemtobin(blob, NULL, "", &pgp); |
|
| 284 |
if (ugh != NULL) |
|
| 282 |
if (pem_to_bin(blob, chunk_empty, &pgp) != SUCCESS) |
|
| 285 | 283 |
{
|
| 286 | 284 |
free(blob->ptr); |
| 287 | 285 |
return FALSE; |
| 288 |
}; |
|
| 286 |
} |
|
| 289 | 287 |
if (is_asn1(*blob)) |
| 290 | 288 |
{
|
| 291 | 289 |
DBG2(" fetched blob coded in PEM format");
|
Also available in: Unified diff