Browse code

modules: readme files regenerated - secsipid ... [skip ci]

Kamailio Dev authored on 17/06/2021 14:46:24
Showing 1 changed files
... ...
@@ -41,6 +41,9 @@ Daniel-Constantin Mierla
41 41
               4.4. secsipid_add_identity(origTN, destTN, attest, origID,
42 42
                       x5u, keyPath)
43 43
 
44
+              4.5. secsipid_build_identity(origTN, destTN, attest, origID,
45
+                      x5u, keyPath)
46
+
44 47
         5. Installation
45 48
 
46 49
    List of Examples
... ...
@@ -55,7 +58,8 @@ Daniel-Constantin Mierla
55 58
    1.8. secsipid_check_identity_pubkey usage
56 59
    1.9. secsipid_get_url usage
57 60
    1.10. secsipid_add_identity usage
58
-   1.11. Libsecsipid Usage
61
+   1.11. secsipid_build_identity usage
62
+   1.12. Libsecsipid Usage
59 63
 
60 64
 Chapter 1. Admin Guide
61 65
 
... ...
@@ -84,6 +88,9 @@ Chapter 1. Admin Guide
84 88
         4.4. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
85 89
                 keyPath)
86 90
 
91
+        4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
92
+                keyPath)
93
+
87 94
    5. Installation
88 95
 
89 96
 1. Overview
... ...
@@ -213,6 +220,9 @@ modparam("secsipid", "libopt", "CacheExpires=0")
213 220
    4.4. secsipid_add_identity(origTN, destTN, attest, origID, x5u,
214 221
           keyPath)
215 222
 
223
+   4.5. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
224
+          keyPath)
225
+
216 226
 4.1.  secsipid_check_identity(keyPath)
217 227
 
218 228
    Check the validity of the Identity header using the keys stored in the
... ...
@@ -305,6 +315,35 @@ request_route {
305 315
 }
306 316
 ...
307 317
 
318
+4.5.  secsipid_build_identity(origTN, destTN, attest, origID, x5u, keyPath)
319
+
320
+   Build Identity value using the key specified by "keyPath" to sign the
321
+   JWT body. If origID is empty, a UUID string is generated to fill the
322
+   field. The origTN represents the origination telephone number; destTN
323
+   represents the destination telephone number; x5u is the HTTP URL
324
+   referencing to the public key that should be used to verify the
325
+   signature; attest represents the attestation level (should be "A", "B"
326
+   or "C"). On success, the Indentity value is stored in variable
327
+   $secsipid(val). It also sets $secsipid(ret) to the return value of the
328
+   libsecsipid functions.
329
+
330
+   The parameters can contain pseudo-variables.
331
+
332
+   This function can be used from ANY_ROUTE.
333
+
334
+   Example 1.11. secsipid_build_identity usage
335
+...
336
+request_route {
337
+    ...
338
+    if(secsipid_build_identity("$fU", "$rU", "A", "",
339
+            "https://kamailio.org/stir/$rd/cert.pem", "/secsipid/$rd/key.pem"))
340
+{
341
+        xinfo("Identity value: $secsipid(val)\n");
342
+    }
343
+    ...
344
+}
345
+...
346
+
308 347
 5. Installation
309 348
 
310 349
    The module needs "secsipdi_proc.so" module that depends on
... ...
@@ -319,7 +358,7 @@ request_route {
319 358
    installed and its environment configured, then run the following
320 359
    commands:
321 360
 
322
-   Example 1.11. Libsecsipid Usage
361
+   Example 1.12. Libsecsipid Usage
323 362
 ...
324 363
 export GO111MODULE=off
325 364
 go get https://github.com/asipto/secsipidx