asynciodebian/masterdebian/stretch-backportsproxy-ticketupstream
Last change
on this file since 3c123cd was
3c123cd,
checked in by Fiona Klute <fiona.klute@…>, 3 years ago
|
Update my name, prepare changelog for the next release
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /** |
---|
2 | * Check if GnuTLS was compiled with OpenPGP support |
---|
3 | * |
---|
4 | * Copyright 2017 Fiona Klute |
---|
5 | * |
---|
6 | * Licensed under the Apache License, Version 2.0 (the "License"); you |
---|
7 | * may not use this file except in compliance with the License. You |
---|
8 | * may obtain a copy of the License at |
---|
9 | * |
---|
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
11 | * |
---|
12 | * Unless required by applicable law or agreed to in writing, software |
---|
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
---|
15 | * implied. See the License for the specific language governing |
---|
16 | * permissions and limitations under the License. |
---|
17 | */ |
---|
18 | #include <gnutls/gnutls.h> |
---|
19 | #include <gnutls/openpgp.h> |
---|
20 | |
---|
21 | #include <stdio.h> |
---|
22 | |
---|
23 | int main() |
---|
24 | { |
---|
25 | gnutls_openpgp_crt_t cert; |
---|
26 | int ret = gnutls_openpgp_crt_init(&cert); |
---|
27 | if (ret == GNUTLS_E_UNIMPLEMENTED_FEATURE) |
---|
28 | { |
---|
29 | printf("OpenPGP support is disabled in libgnutls.\n"); |
---|
30 | return 77; |
---|
31 | } |
---|
32 | if (ret != GNUTLS_E_SUCCESS) |
---|
33 | { |
---|
34 | fprintf(stderr, "Unexpected error in gnutls_openpgp_crt_init(): " |
---|
35 | "%s (%d)\n", gnutls_strerror(ret), ret); |
---|
36 | return 1; |
---|
37 | } |
---|
38 | gnutls_openpgp_crt_deinit(cert); |
---|
39 | return 0; |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.