diff options
| author | 2007-12-16 09:04:11 +0000 | |
|---|---|---|
| committer | 2007-12-16 09:04:11 +0000 | |
| commit | e2b7f8e1d72fa4f8987b1174364f32e95f06ea22 (patch) | |
| tree | 65b75bc8d52305df8ecaf4608c049294b29571cb /src/gnutls_config.c | |
| parent | 517e02f03e246f32a740958237f8e6de03796cd5 (diff) | |
more changes for openpgp support. Seems to be at a workable state.
Diffstat (limited to 'src/gnutls_config.c')
| -rw-r--r-- | src/gnutls_config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gnutls_config.c b/src/gnutls_config.c index 4dccd08..f08512e 100644 --- a/src/gnutls_config.c +++ b/src/gnutls_config.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * Copyright 2004-2005 Paul Querna | 2 | * Copyright 2004-2005 Paul Querna |
| 3 | * Copyright 2007 Nikos Mavrogiannopoulos | ||
| 3 | * | 4 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 6 | * you may not use this file except in compliance with the License. |
| @@ -229,7 +230,6 @@ const char *mgs_set_pgpcert_file(cmd_parms * parms, void *dummy, | |||
| 229 | gnutls_strerror(ret)); | 230 | gnutls_strerror(ret)); |
| 230 | } | 231 | } |
| 231 | 232 | ||
| 232 | |||
| 233 | ret = | 233 | ret = |
| 234 | gnutls_openpgp_crt_import(sc->cert_pgp, &data, GNUTLS_OPENPGP_FMT_BASE64); | 234 | gnutls_openpgp_crt_import(sc->cert_pgp, &data, GNUTLS_OPENPGP_FMT_BASE64); |
| 235 | if (ret < 0) { | 235 | if (ret < 0) { |
| @@ -450,6 +450,12 @@ const char *mgs_set_keyring_file(cmd_parms * parms, void *dummy, | |||
| 450 | "Keyring File '%s'", file); | 450 | "Keyring File '%s'", file); |
| 451 | } | 451 | } |
| 452 | 452 | ||
| 453 | rv = gnutls_openpgp_keyring_init(&sc->pgp_list); | ||
| 454 | if (rv < 0) { | ||
| 455 | return apr_psprintf(parms->pool, "GnuTLS: Failed to initialize" | ||
| 456 | "keyring: (%d) %s", rv, gnutls_strerror(rv)); | ||
| 457 | } | ||
| 458 | |||
| 453 | rv = gnutls_openpgp_keyring_import(sc->pgp_list, &data, GNUTLS_OPENPGP_FMT_BASE64); | 459 | rv = gnutls_openpgp_keyring_import(sc->pgp_list, &data, GNUTLS_OPENPGP_FMT_BASE64); |
| 454 | if (rv < 0) { | 460 | if (rv < 0) { |
| 455 | return apr_psprintf(parms->pool, "GnuTLS: Failed to load " | 461 | return apr_psprintf(parms->pool, "GnuTLS: Failed to load " |
