--- /tmp/canl-c-3.0.0-3.1cyj_j_bx/debian/libcanl-c-doc_3.0.0-3.1_all.deb +++ libcanl-c-doc_3.0.0-3.1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2021-01-04 16:08:19.000000 debian-binary │ -rw-r--r-- 0 0 0 684 2021-01-04 16:08:19.000000 control.tar.xz │ --rw-r--r-- 0 0 0 99232 2021-01-04 16:08:19.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 99512 2021-01-04 16:08:19.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,12 +1,12 @@ │ │ │ Package: libcanl-c-doc │ │ │ Source: canl-c │ │ │ Version: 3.0.0-3.1 │ │ │ Architecture: all │ │ │ Maintainer: Mattias Ellert │ │ │ -Installed-Size: 105 │ │ │ +Installed-Size: 106 │ │ │ Section: doc │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: https://github.com/CESNET/canl-c │ │ │ Description: Documentation files for EMI caNl │ │ │ This package contains documentation files for EMI caNl. │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -1,12 +1,12 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-04 16:08:19.000000 ./ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-04 16:08:19.000000 ./usr/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-04 16:08:19.000000 ./usr/share/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-04 16:08:19.000000 ./usr/share/doc/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-04 16:08:19.000000 ./usr/share/doc/libcanl-c-doc/ │ │ │ -rw-r--r-- 0 root (0) root (0) 779 2016-11-29 17:05:15.000000 ./usr/share/doc/libcanl-c-doc/README │ │ │ --rw-r--r-- 0 root (0) root (0) 92958 2021-01-04 16:08:19.000000 ./usr/share/doc/libcanl-c-doc/canl.pdf.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 93234 2021-01-04 16:08:19.000000 ./usr/share/doc/libcanl-c-doc/canl.pdf.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 992 2021-01-04 16:08:19.000000 ./usr/share/doc/libcanl-c-doc/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 2032 2016-11-29 17:05:15.000000 ./usr/share/doc/libcanl-c-doc/changelog.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1758 2018-03-28 21:22:38.000000 ./usr/share/doc/libcanl-c-doc/copyright │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-01-04 16:08:19.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 340 2016-12-23 10:22:37.000000 ./usr/share/doc-base/canl-dg │ │ ├── ./usr/share/doc/libcanl-c-doc/canl.pdf.gz │ │ │ ├── canl.pdf │ │ │ │ │ --- /tmp/diffoscope_ziwpsihu_/tmpzrtoh8_0GzipContainer/cc89e0e7-26cd-44df-b227-d23ca190ec54 │ │ │ │ ├── +++ /tmp/diffoscope_ziwpsihu_/tmp1ummdv0mGzipContainer/ab1cb73f-6d9a-42ba-a096-78142719a9e4 │ │ │ │ │┄ Document info │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -(Could not extract metadata: Multiple definitions in dictionary at byte 0x167a6 for key /Title) │ │ │ │ │ +(Could not extract metadata: Multiple definitions in dictionary at byte 0x168a7 for key /Title) │ │ │ │ ├── pdftotext {} - │ │ │ │ │ @@ -9,21 +9,21 @@ │ │ │ │ │ │ │ │ │ │ EMI Component Version: │ │ │ │ │ │ │ │ │ │ 2.x │ │ │ │ │ │ │ │ │ │ Date: │ │ │ │ │ │ │ │ │ │ -January 4, 2021 │ │ │ │ │ +October 18, 2021 │ │ │ │ │ │ │ │ │ │ 1/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ This work is co-funded by the European Commission as part of the EMI project under Grant Agreement │ │ │ │ │ INFSO-RI-261611. │ │ │ │ │ │ │ │ │ │ Copyright © EMI. 2010-2013. │ │ │ │ │ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except │ │ │ │ │ in compliance with the License. You may obtain a copy of the License at │ │ │ │ │ @@ -32,15 +32,15 @@ │ │ │ │ │ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and │ │ │ │ │ limitations under the License. │ │ │ │ │ │ │ │ │ │ 2/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ C ONTENTS │ │ │ │ │ 1 INTRODUCTION │ │ │ │ │ │ │ │ │ │ 4 │ │ │ │ │ │ │ │ │ │ 1.1 LANGUAGE BINDINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ @@ -107,15 +107,15 @@ │ │ │ │ │ │ │ │ │ │ 14 │ │ │ │ │ │ │ │ │ │ 3/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ 1 │ │ │ │ │ │ │ │ │ │ I NTRODUCTION │ │ │ │ │ │ │ │ │ │ This document serves as a developer’s guide and could be seen as an API reference too, even though │ │ │ │ │ comments in the header files may give the reader better insights into that matter. │ │ │ │ │ @@ -173,15 +173,15 @@ │ │ │ │ │ codes from errno.h are used as much as possible. │ │ │ │ │ Few API functions return char *. In such a case NULL indicates an error, non-null value means success. │ │ │ │ │ │ │ │ │ │ 4/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ 1.4 │ │ │ │ │ │ │ │ │ │ C ONTEXT AND PARAMETER S ETTINGS │ │ │ │ │ │ │ │ │ │ All the API functions use a context parameter of type canl_ctx to maintain state information like error │ │ │ │ │ message and code. Some API functions also use an io context of type canl_io_handler which keeps │ │ │ │ │ @@ -238,15 +238,15 @@ │ │ │ │ │ There is one opaque data structure representing caNl Certificate API context: canl_cred. It must only │ │ │ │ │ be initialized before function calls that use this context as a parameter. │ │ │ │ │ │ │ │ │ │ 5/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ # include < c a n l . h> │ │ │ │ │ # include < c a n l _ c r e d . h> │ │ │ │ │ canl_ctx ctx ; │ │ │ │ │ c a n l _ c r e d c_cred ; │ │ │ │ │ ctx = canl_create_ctx ( ) ; │ │ │ │ │ canl_cred_new ( c t x , &c_cred ) ; │ │ │ │ │ @@ -269,15 +269,15 @@ │ │ │ │ │ as for the Certificate API: │ │ │ │ │ c a n l _ c r e d _ f r e e ( c t x , c_cred ) ; │ │ │ │ │ │ │ │ │ │ 6/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ 3 │ │ │ │ │ │ │ │ │ │ C LIENT-S ERVER AUTHENTICATED C ONNECTION │ │ │ │ │ │ │ │ │ │ For client-server authenticated connection we just use caNl Main API calls. In time of writing this paper │ │ │ │ │ caNl use openssl – SSL/TLS and cryptography toolkit. However, core of the caNl has been developed to │ │ │ │ │ @@ -323,15 +323,15 @@ │ │ │ │ │ – param service – the service on the server - usually NULL │ │ │ │ │ – param port – the port on which the server is listening │ │ │ │ │ │ │ │ │ │ 7/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ – param auth_mechs – authentication mechanism to use │ │ │ │ │ – param flags – for future usage │ │ │ │ │ – param peer – if not NULL the canl_principal will be filled with peer’s principal info. Approppriate │ │ │ │ │ free funcion should be called if canl_princ is no longer to be used │ │ │ │ │ – param timeout – the timeout after which to drop the connect attempt │ │ │ │ │ – return – canl error code │ │ │ │ │ @@ -367,15 +367,15 @@ │ │ │ │ │ – param cp – canl peer’s principal structure │ │ │ │ │ – return – void │ │ │ │ │ │ │ │ │ │ 8/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ 3.2 │ │ │ │ │ │ │ │ │ │ M AIN API W ITH D IRECT C ALLS TO O PENSSL │ │ │ │ │ • canl_err_code canl_ctx_set_ssl_cred(canl_ctx cc, char *cert, char *key, │ │ │ │ │ │ │ │ │ │ char *proxy, canl_password_callback clb, void *pass) │ │ │ │ │ @@ -423,15 +423,15 @@ │ │ │ │ │ package or canl_sample_server.c at CVS │ │ │ │ │ Include nesessary header files: │ │ │ │ │ │ │ │ │ │ 9/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ # include < c a n l . h> │ │ │ │ │ # include < c a n l _ s s l . h> │ │ │ │ │ │ │ │ │ │ Initialize context and set parameters: │ │ │ │ │ c a n l _ c t x my_ctx ; │ │ │ │ │ c a n l _ i o _ h a n d l e r my_io_h = NULL ; │ │ │ │ │ @@ -477,15 +477,15 @@ │ │ │ │ │ c a n l _ i o _ d e s t r o y ( my_ctx , my_io_h ) ; │ │ │ │ │ c a n l _ f r e e _ c t x ( my_ctx ) ; │ │ │ │ │ │ │ │ │ │ 10/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ 4 │ │ │ │ │ │ │ │ │ │ C REDENTIALS H ANDLING │ │ │ │ │ │ │ │ │ │ If we want to create new proxy certificate or for example delegate credentials, we can use caNl Certificate │ │ │ │ │ API. This part of API uses X509 authentication mechanism (openssl library now) │ │ │ │ │ @@ -530,15 +530,15 @@ │ │ │ │ │ – param cred – credentials which save certificate chain to │ │ │ │ │ – param file – the file to load certificate chain from │ │ │ │ │ │ │ │ │ │ 11/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ • canl_err_code canl_cred_load_cert(canl_ctx, canl_cred cred, X509 *cert) │ │ │ │ │ This function loads user certificate out of an openssl structure │ │ │ │ │ – param cred – the credentials context to set certificate to │ │ │ │ │ – param cert – the openssl structure to load certificate from │ │ │ │ │ │ │ │ │ │ • canl_err_code canl_cred_load_cert_file(canl_ctx, canl_cred cred, │ │ │ │ │ @@ -583,15 +583,15 @@ │ │ │ │ │ – param cred – the credentials context with certificate to save │ │ │ │ │ – param file – save the certificate into │ │ │ │ │ │ │ │ │ │ 12/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ • canl_err_code canl_cred_save_cert(canl_ctx, canl_cred cred, X509 **to) │ │ │ │ │ This function saves certificate into openssl object of type X509 │ │ │ │ │ – param cred – the credentials context with certificate to save │ │ │ │ │ – param to – save the certificate into │ │ │ │ │ │ │ │ │ │ • canl_err_code canl_cred_save_chain(canl_ctx, canl_cred cred, STACK_OF(X509) **to) │ │ │ │ │ @@ -628,15 +628,15 @@ │ │ │ │ │ – param cadir – CA certificate directory │ │ │ │ │ – param store_ctx – openssl store context structure fed with certificates to verify │ │ │ │ │ │ │ │ │ │ 13/14 │ │ │ │ │ │ │ │ │ │ T ITLE: │ │ │ │ │ Common Authentication Library – Developer’s Guide │ │ │ │ │ -Date: January 4, 2021 │ │ │ │ │ +Date: October 18, 2021 │ │ │ │ │ │ │ │ │ │ 4.2 │ │ │ │ │ │ │ │ │ │ M AKE N EW P ROXY C ERTIFICATE – E XAMPLE │ │ │ │ │ │ │ │ │ │ We give an example of a proxy certificate creation. We do not define variables in this example, unless │ │ │ │ │ their type is caNl defined. We do not check return values in most cases as well. For complete sample see