~ubuntu-branches/ubuntu/maverick/gnutls26/maverick-security

« back to all changes in this revision

Viewing changes to doc/gnutls.ps

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2009-04-30 19:00:21 UTC
  • mfrom: (1.1.6 upstream) (12.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090430190021-kjagrqik7888nksh
Tags: 2.6.6-1
* use @LTLIBTASN1@ instead of @LIBTASN1@ in Libs.private of *.pc.in. This
  way lib-link.m4 gives us -ltasn1 instead of /usr/lib/libtasn1.so.
* New upstream security release.
  + libgnutls: Corrected double free on signature verification failure.
    GNUTLS-SA-2009-1 CVE-2009-1415
  + libgnutls: Fix DSA key generation. Noticed when investigating the
    previous GNUTLS-SA-2009-1 problem. All DSA keys generated using GnuTLS
    2.6.x are corrupt.  See the advisory for more details.
    GNUTLS-SA-2009-2 CVE-2009-1416
  + libgnutls: Check expiration/activation time on untrusted certificates.
    Before the library did not check activation/expiration times on
    certificates, and was documented as not doing so.
    GNUTLS-SA-2009-3 CVE-2009-1417
 * The former two issues only apply to gnutls 2.6.x. The latter is a
   brehavior change, add a NEWS.Debian file to document it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%!PS-Adobe-2.0
2
2
%%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software
3
3
%%Title: gnutls.dvi
4
 
%%CreationDate: Sat Apr 11 20:42:03 2009
 
4
%%CreationDate: Thu Apr 30 12:14:23 2009
5
5
%%Pages: 335
6
6
%%PageOrder: Ascend
7
7
%%BoundingBox: 0 0 596 842
13
13
%DVIPSWebPage: (www.radicaleye.com)
14
14
%DVIPSCommandLine: dvips -o gnutls.ps gnutls.dvi
15
15
%DVIPSParameters: dpi=600
16
 
%DVIPSSource:  TeX output 2009.04.11:2042
 
16
%DVIPSSource:  TeX output 2009.04.30:1214
17
17
%%BeginProcSet: tex.pro 0 0
18
18
%!
19
19
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
5642
5642
TeXDict begin 1 0 bop 150 1317 a FC(GNU)65 b(TLS)p 150
5643
5643
1383 3600 34 v 1587 1480 a FB(T)-8 b(ransp)s(ort)29 b(La)m(y)m(er)j
5644
5644
(Securit)m(y)f(Library)e(for)h(the)h(GNU)g(system)2521
5645
 
1588 y(for)g(v)m(ersion)f(2.6.5,)j(11)e(April)f(2009)150
 
5645
1588 y(for)g(v)m(ersion)f(2.6.6,)j(24)e(April)f(2009)150
5646
5646
3899 y @beginspecial 14 @llx 14 @lly 60 @urx 56 @ury
5647
5647
1700 @rwi @setspecial
5648
5648
%%BeginDocument: gnutls-logo.eps
5807
5807
FA(\))p 150 5141 3600 17 v eop end
5808
5808
%%Page: 2 2
5809
5809
TeXDict begin 2 1 bop 150 4523 a FB(This)30 b(man)m(ual)g(is)h(last)g
5810
 
(up)s(dated)e(11)i(April)f(2009)i(for)f(v)m(ersion)f(2.6.5)j(of)d(GNU)h
 
5810
(up)s(dated)e(24)i(April)f(2009)i(for)f(v)m(ersion)f(2.6.6)j(of)d(GNU)h
5811
5811
(TLS.)150 4658 y(Cop)m(yrigh)m(t)37 b(\(C\))g(2001,)k(2002,)f(2003,)g
5812
5812
(2004,)g(2005,)h(2006,)f(2007,)g(2008)e(F)-8 b(ree)38
5813
5813
b(Soft)m(w)m(are)g(F)-8 b(oundation,)150 4767 y(Inc.)390
6146
6146
FB(116)275 1586 y(9.2)92 b Fu(X.509)29 b FB(Certi\014cate)i(F)-8
6147
6147
b(unctions)17 b Fw(:)f(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
6148
6148
(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
6149
 
f(:)h(:)f(:)g(:)47 b FB(180)275 1695 y(9.3)92 b Fu(Gn)n(uTLS-extra)29
 
6149
f(:)h(:)f(:)g(:)47 b FB(181)275 1695 y(9.3)92 b Fu(Gn)n(uTLS-extra)29
6150
6150
b FB(F)-8 b(unctions)19 b Fw(:)d(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
6151
6151
f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
6152
 
(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)49 b FB(231)275
 
6152
(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)49 b FB(232)275
6153
6153
1805 y(9.4)92 b Fu(Op)r(enPGP)29 b FB(F)-8 b(unctions)15
6154
6154
b Fw(:)h(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
6155
6155
h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
6345
6345
h(from)f(the)g(follo)m(wing)i(URL:)150 935 y Ft
6346
6346
(http://www.gnutls.org/do)o(wnlo)o(ad.h)o(tml)150 1070
6347
6347
y FB(The)f(latest)i(v)m(ersion)f(is)g(stored)f(in)g(a)h(\014le,)g
6348
 
(e.g.,)i(`)p Ft(gnutls-2.6.5.tar.gz)p FB(')26 b(where)31
6349
 
b(the)h(`)p Ft(2.6.5)p FB(')e(v)-5 b(alue)150 1179 y(is)30
 
6348
(e.g.,)i(`)p Ft(gnutls-2.6.6.tar.gz)p FB(')26 b(where)31
 
6349
b(the)h(`)p Ft(2.6.6)p FB(')e(v)-5 b(alue)150 1179 y(is)30
6350
6350
b(the)h(highest)g(v)m(ersion)f(n)m(um)m(b)s(er)g(in)g(the)g(directory)
6351
6351
-8 b(.)150 1314 y(Gn)m(uTLS)25 b(uses)g(a)h(Lin)m(ux-lik)m(e)h(dev)m
6352
6352
(elopmen)m(t)g(cycle:)40 b(ev)m(en)26 b(minor)g(v)m(ersion)g(n)m(um)m
8854
8854
b(Y)-8 b(ou)31 b(can)f(test)h(if)150 1812 y(an)f(error)g(co)s(de)h(is)f
8855
8855
(a)h(fatal)h(one)e(b)m(y)h(using)e(the)i([gn)m(utls)p
8856
8856
2044 1812 V 41 w(error)p 2278 1812 V 39 w(is)p 2378 1812
8857
 
V 40 w(fatal],)i(page)e(143.)150 1946 y(If)d(an)m(y)i(non)e(fatal)i
 
8857
V 40 w(fatal],)i(page)e(144.)150 1946 y(If)d(an)m(y)i(non)e(fatal)i
8858
8858
(errors,)f(that)g(require)g(an)f(action,)j(are)e(to)h(b)s(e)e(returned)
8859
8859
g(b)m(y)h(a)g(function,)g(these)g(error)150 2056 y(co)s(des)34
8860
8860
b(will)g(b)s(e)g(do)s(cumen)m(ted)g(in)f(the)i(function's)e(reference.)
8900
8900
(functions)d(suc)m(h)g(as)h(the)g(one)g(set)g(b)m(y)g([gn)m(utls)p
8901
8901
2290 4742 V 40 w(srp)p 2453 4742 V 39 w(set)p 2603 4742
8902
8902
V 41 w(serv)m(er)p 2877 4742 V 40 w(creden)m(tials)p
8903
 
3338 4742 V 42 w(function],)150 4852 y(page)45 b(176,)k(ma)m(y)c
 
8903
3338 4742 V 42 w(function],)150 4852 y(page)45 b(177,)k(ma)m(y)c
8904
8904
(require)f(more)h(complicated)h(input,)h(including)d(data)h(to)g(b)s(e)
8905
8905
f(allo)s(cated.)84 b(These)150 4961 y(callbac)m(ks)32
8906
8906
b(should)e(allo)s(cate)j(and)c(free)i(memory)f(using)g(the)h(functions)
8907
8907
e(sho)m(wn)h(b)s(elo)m(w.)225 5096 y Fs(\017)60 b FB([gn)m(utls)p
8908
 
601 5096 V 41 w(mallo)s(c],)32 b(page)f(151)225 5230
 
8908
601 5096 V 41 w(mallo)s(c],)32 b(page)f(152)225 5230
8909
8909
y Fs(\017)60 b FB([gn)m(utls)p 601 5230 V 41 w(free],)31
8910
 
b(page)g(144)p eop end
 
8910
b(page)g(145)p eop end
8911
8911
%%Page: 8 14
8912
8912
TeXDict begin 8 13 bop 150 -116 a FB(Chapter)30 b(3:)41
8913
8913
b(In)m(tro)s(duction)30 b(to)h Fu(TLS)2293 b FB(8)150
10998
10998
931 V 41 w(transp)s(ort)p 1015 931 V 39 w(set)p 1165
10999
10999
931 V 41 w(pull)p 1358 931 V 39 w(function],)31 b(page)g(180)225
11000
11000
1057 y Fs(\017)60 b FB([gn)m(utls)p 601 1057 V 41 w(transp)s(ort)p
11001
 
1015 1057 V 39 w(set)p 1165 1057 V 41 w(ptr],)30 b(page)h(179)225
 
11001
1015 1057 V 39 w(set)p 1165 1057 V 41 w(ptr],)30 b(page)h(180)225
11002
11002
1184 y Fs(\017)60 b FB([gn)m(utls)p 601 1184 V 41 w(transp)s(ort)p
11003
11003
1015 1184 V 39 w(set)p 1165 1184 V 41 w(lo)m(w)m(at],)32
11004
11004
b(page)g(179)225 1311 y Fs(\017)60 b FB([gn)m(utls)p
11005
11005
601 1311 V 41 w(transp)s(ort)p 1015 1311 V 39 w(set)p
11006
 
1165 1311 V 41 w(errno],)30 b(page)h(178)150 1454 y(These)i(functions)g
 
11006
1165 1311 V 41 w(errno],)30 b(page)h(179)150 1454 y(These)i(functions)g
11007
11007
(accept)h(a)g(callbac)m(k)h(function)e(as)g(a)h(parameter.)49
11008
11008
b(The)33 b(callbac)m(k)i(functions)e(should)150 1564
11009
11009
y(return)c(the)i(n)m(um)m(b)s(er)e(of)h(b)m(ytes)h(written,)g(or)f(-1)h
11048
11048
3871 y(authen)m(ticate)33 b(and)c(|optionally|)j(compress)e(pac)m(k)m
11049
11049
(ets.)43 b(The)30 b(follo)m(wing)i(functions)d(are)i(a)m(v)-5
11050
11050
b(ailable:)150 4015 y([gn)m(utls)p 421 4015 V 41 w(record)p
11051
 
710 4015 V 40 w(send],)30 b(page)h(163:)630 4125 y(T)-8
 
11051
710 4015 V 40 w(send],)30 b(page)h(164:)630 4125 y(T)-8
11052
11052
b(o)31 b(send)e(a)i(record)f(pac)m(k)m(et)j(\(with)d(application)i
11053
11053
(data\).)150 4268 y([gn)m(utls)p 421 4268 V 41 w(record)p
11054
11054
710 4268 V 40 w(recv],)f(page)g(163:)630 4378 y(T)-8
11055
11055
b(o)31 b(receiv)m(e)h(a)f(record)f(pac)m(k)m(et)i(\(with)f(application)
11056
11056
h(data\).)150 4522 y([gn)m(utls)p 421 4522 V 41 w(record)p
11057
 
710 4522 V 40 w(get)p 870 4522 V 41 w(direction],)f(page)h(162:)630
 
11057
710 4522 V 40 w(get)p 870 4522 V 41 w(direction],)f(page)h(163:)630
11058
11058
4631 y(T)-8 b(o)31 b(get)g(the)g(direction)g(of)f(the)h(last)g(in)m
11059
11059
(terrupted)f(function)g(call.)150 4775 y(As)c(y)m(ou)h(ma)m(y)g(ha)m(v)
11060
11060
m(e)h(already)f(noticed,)h(the)f(functions)f(whic)m(h)g(access)i(the)f
11143
11143
(secret.)74 5308 y Fr(4)150 5340 y Fp(Y)-6 b(ou)25 b(should)g(use)h
11144
11144
([gn)n(utls)p 913 5340 24 4 v 34 w(handshak)n(e)p 1298
11145
11145
5340 V 33 w(set)p 1425 5340 V 35 w(priv)l(ate)p 1693
11146
 
5340 V 33 w(extensions],)h(page)f(147)h(to)f(enable)g(priv)l(ate)f
 
11146
5340 V 33 w(extensions],)h(page)f(148)h(to)f(enable)g(priv)l(ate)f
11147
11147
(extensions.)p eop end
11148
11148
%%Page: 11 17
11149
11149
TeXDict begin 11 16 bop 150 -116 a FB(Chapter)30 b(3:)41
11199
11199
y([gn)m(utls)p 421 3431 V 41 w(alert)p 643 3431 V 41
11200
11200
w(send],)f(page)h(117:)630 3541 y(T)-8 b(o)31 b(send)e(an)i(alert)g
11201
11201
(signal.)150 3701 y([gn)m(utls)p 421 3701 V 41 w(error)p
11202
 
655 3701 V 39 w(to)p 774 3701 V 41 w(alert],)h(page)f(143:)630
 
11202
655 3701 V 39 w(to)p 774 3701 V 41 w(alert],)h(page)f(144:)630
11203
11203
3810 y(T)-8 b(o)31 b(map)f(a)h(gn)m(utls)f(error)g(n)m(um)m(b)s(er)f
11204
11204
(to)i(an)g(alert)g(signal.)150 3970 y([gn)m(utls)p 421
11205
11205
3970 V 41 w(alert)p 643 3970 V 41 w(get],)h(page)f(116:)630
11227
11227
760 299 V 40 w(deinit],)31 b(page)g(156:)630 408 y(T)-8
11228
11228
b(o)31 b(deinitialize)h(a)f(priorit)m(y)g(set)g(of)f(ciphers.)150
11229
11229
563 y([gn)m(utls)p 421 563 V 41 w(priorit)m(y)p 760 563
11230
 
V 40 w(set],)i(page)f(157:)630 672 y(T)-8 b(o)31 b(asso)s(ciate)h(a)f
 
11230
V 40 w(set],)i(page)f(158:)630 672 y(T)-8 b(o)31 b(asso)s(ciate)h(a)f
11231
11231
(priorit)m(y)g(set)g(with)f(a)g Fu(TLS)h FB(session.)150
11232
11232
827 y([gn)m(utls)p 421 827 V 41 w(priorit)m(y)p 760 827
11233
 
V 40 w(set)p 911 827 V 41 w(direct],)g(page)g(157:)630
 
11233
V 40 w(set)p 911 827 V 41 w(direct],)g(page)g(158:)630
11234
11234
936 y(T)-8 b(o)31 b(directly)g(asso)s(ciate)h(a)f(session)f(with)h(a)f
11235
11235
(giv)m(en)i(priorit)m(y)e(string.)150 1091 y([gn)m(utls)p
11236
11236
421 1091 V 41 w(creden)m(tials)p 883 1091 V 41 w(set],)i(page)f(134:)
11341
11341
b FB([gn)m(utls)p 601 2291 V 41 w(session)p 911 2291
11342
11342
V 40 w(get)p 1071 2291 V 41 w(data],)32 b(page)f(169)225
11343
11343
2430 y Fs(\017)60 b FB([gn)m(utls)p 601 2430 V 41 w(session)p
11344
 
911 2430 V 40 w(get)p 1071 2430 V 41 w(id],)31 b(page)g(169)225
 
11344
911 2430 V 40 w(get)p 1071 2430 V 41 w(id],)31 b(page)g(170)225
11345
11345
2568 y Fs(\017)60 b FB([gn)m(utls)p 601 2568 V 41 w(session)p
11346
 
911 2568 V 40 w(set)p 1062 2568 V 40 w(data],)32 b(page)f(170)150
 
11346
911 2568 V 40 w(set)p 1062 2568 V 40 w(data],)32 b(page)f(171)150
11347
11347
2740 y(The)36 b(serv)m(er)h(side)f(is)h(di\013eren)m(t.)60
11348
11348
b(A)36 b(serv)m(er)h(has)g(to)g(sp)s(ecify)f(some)h(callbac)m(k)i
11349
11349
(functions)d(whic)m(h)g(store,)150 2850 y(retriev)m(e)c(and)e(delete)h
11353
11353
1213 2993 V 42 w(function],)30 b(page)i(139)225 3131
11354
11354
y Fs(\017)60 b FB([gn)m(utls)p 601 3131 V 41 w(db)p 744
11355
11355
3131 V 39 w(set)p 894 3131 V 40 w(store)p 1126 3131 V
11356
 
41 w(function],)31 b(page)g(139)225 3270 y Fs(\017)60
 
11356
41 w(function],)31 b(page)g(140)225 3270 y Fs(\017)60
11357
11357
b FB([gn)m(utls)p 601 3270 V 41 w(db)p 744 3270 V 39
11358
11358
w(set)p 894 3270 V 40 w(retriev)m(e)p 1231 3270 V 42
11359
11359
w(function],)30 b(page)h(139)225 3408 y Fs(\017)60 b
11403
11403
b([gn)m(utls)p 808 1031 28 4 v 41 w(serv)m(er)p 1082
11404
11404
1031 V 40 w(name)p 1334 1031 V 40 w(set],)i(page)g(168)f(and)f([gn)m
11405
11405
(utls)p 2368 1031 V 41 w(serv)m(er)p 2642 1031 V 40 w(name)p
11406
 
2894 1031 V 40 w(get],)j(page)e(167)h(can)f(b)s(e)150
 
11406
2894 1031 V 40 w(get],)j(page)e(168)h(can)f(b)s(e)150
11407
11407
1141 y(used)k(to)h(enable)g(this)f(extension,)h(or)f(to)i(retriev)m(e)f
11408
11408
(the)g(name)f(sen)m(t)h(b)m(y)f(a)h(clien)m(t.)150 1392
11409
11409
y FA(3.7)68 b(Selecting)46 b(Cryptographic)f(Key)h(Sizes)150
11536
11536
b(it)47 b(has)f(to)i(b)s(e)e(enabled)150 1091 y(sp)s(eci\014cally)-8
11537
11537
b(.)98 b(It)49 b(can)h(b)s(e)e(enabled)i(b)m(y)f(using)f([gn)m(utls)p
11538
11538
2164 1091 28 4 v 41 w(record)p 2453 1091 V 40 w(disable)p
11539
 
2766 1091 V 40 w(padding],)54 b(page)c(162,)55 b(or)150
 
11539
2766 1091 V 40 w(padding],)54 b(page)c(163,)55 b(or)150
11540
11540
1200 y([gn)m(utls)p 421 1200 V 41 w(priorit)m(y)p 760
11541
 
1200 V 40 w(set],)32 b(page)f(157)g(with)f(the)h Ft(\045COMPAT)d
 
11541
1200 V 40 w(set],)32 b(page)f(158)g(with)f(the)h Ft(\045COMPAT)d
11542
11542
FB(priorit)m(y)j(string.)150 1335 y(If)22 b(y)m(ou)h(implemen)m(t)h(an)
11543
11543
e(application)i(that)g(ha)m(v)m(e)g(a)f(con\014guration)g(\014le,)i(w)m
11544
11544
(e)e(recommend)f(that)i(y)m(ou)f(mak)m(e)150 1445 y(it)33
11545
11545
b(p)s(ossible)e(for)h(users)f(or)h(administrators)g(to)h(sp)s(ecify)e
11546
11546
(a)i(Gn)m(uTLS)d(proto)s(col)j(priorit)m(y)g(string,)f(whic)m(h)150
11547
11547
1554 y(is)e(used)e(b)m(y)i(y)m(our)f(application)i(via)f([gn)m(utls)p
11548
 
1667 1554 V 40 w(priorit)m(y)p 2005 1554 V 41 w(set],)h(page)f(157.)42
 
11548
1667 1554 V 40 w(priorit)m(y)p 2005 1554 V 41 w(set],)h(page)f(158.)42
11549
11549
b(T)-8 b(o)29 b(allo)m(w)i(the)f(b)s(est)f(\015exibilit)m(y)-8
11550
11550
b(,)150 1664 y(mak)m(e)31 b(it)g(p)s(ossible)f(to)h(ha)m(v)m(e)h(a)f
11551
11551
(di\013eren)m(t)g(priorit)m(y)f(string)h(for)f(di\013eren)m(t)h
11620
11620
2997 4021 V 41 w(\014le],)55 b(page)49 b(126)i(or)150
11621
11621
4131 y([gn)m(utls)p 421 4131 V 41 w(certi\014cate)p 849
11622
11622
4131 V 42 w(set)p 1002 4131 V 40 w(op)s(enpgp)p 1379
11623
 
4131 V 39 w(k)m(ey)p 1551 4131 V 41 w(\014le],)46 b(page)e(232)g(dep)s
 
11623
4131 V 39 w(k)m(ey)p 1551 4131 V 41 w(\014le],)46 b(page)e(233)g(dep)s
11624
11624
(ending)d(on)h(the)h(certi\014cate)i(t)m(yp)s(e.)78 b(In)150
11625
11625
4240 y(the)26 b Fu(X.509)f FB(case,)j(the)e(functions)f(will)h(also)h
11626
11626
(accept)g(and)f(use)f(a)h(certi\014cate)i(list)f(that)f(leads)h(to)f(a)
11637
11637
(using)e(the)i(functions:)225 4943 y Fs(\017)60 b FB([gn)m(utls)p
11638
11638
601 4943 V 41 w(certi\014cate)p 1029 4943 V 42 w(serv)m(er)p
11639
11639
1304 4943 V 40 w(set)p 1455 4943 V 41 w(retriev)m(e)p
11640
 
1793 4943 V 41 w(function],)31 b(page)g(123)225 5075
 
11640
1793 4943 V 41 w(function],)31 b(page)g(124)225 5075
11641
11641
y Fs(\017)60 b FB([gn)m(utls)p 601 5075 V 41 w(certi\014cate)p
11642
11642
1029 5075 V 42 w(clien)m(t)p 1284 5075 V 41 w(set)p 1436
11643
11643
5075 V 41 w(retriev)m(e)p 1774 5075 V 42 w(function],)30
11704
11704
1182 2588 V 40 w(dh)p 1324 2588 V 39 w(params],)31 b(page)g(124)225
11705
11705
2722 y Fs(\017)60 b FB([gn)m(utls)p 601 2722 V 41 w(rsa)p
11706
11706
759 2722 V 40 w(params)p 1088 2722 V 39 w(generate2],)33
11707
 
b(page)e(166)225 2856 y Fs(\017)60 b FB([gn)m(utls)p
 
11707
b(page)e(167)225 2856 y Fs(\017)60 b FB([gn)m(utls)p
11708
11708
601 2856 V 41 w(certi\014cate)p 1029 2856 V 42 w(set)p
11709
11709
1182 2856 V 40 w(rsa)p 1339 2856 V 40 w(exp)s(ort)p 1637
11710
11710
2856 V 40 w(params],)31 b(page)g(124)150 3014 y(Sometimes)g(in)f(order)
11716
11716
FB(b)m(y)h(using)e(the)i(follo)m(wing)h(functions:)225
11717
11717
3367 y Fs(\017)60 b FB([gn)m(utls)p 601 3367 V 41 w(dh)p
11718
11718
744 3367 V 39 w(params)p 1072 3367 V 39 w(imp)s(ort)p
11719
 
1382 3367 V 40 w(pk)m(cs3],)31 b(page)g(142)225 3501
 
11719
1382 3367 V 40 w(pk)m(cs3],)31 b(page)g(143)225 3501
11720
11720
y Fs(\017)60 b FB([gn)m(utls)p 601 3501 V 41 w(rsa)p
11721
11721
759 3501 V 40 w(params)p 1088 3501 V 39 w(imp)s(ort)p
11722
 
1398 3501 V 40 w(pk)m(cs1],)31 b(page)g(166)225 3635
 
11722
1398 3501 V 40 w(pk)m(cs1],)31 b(page)g(167)225 3635
11723
11723
y Fs(\017)60 b FB([gn)m(utls)p 601 3635 V 41 w(dh)p 744
11724
11724
3635 V 39 w(params)p 1072 3635 V 39 w(exp)s(ort)p 1369
11725
 
3635 V 40 w(pk)m(cs3],)32 b(page)f(141)225 3769 y Fs(\017)60
 
11725
3635 V 40 w(pk)m(cs3],)32 b(page)f(142)225 3769 y Fs(\017)60
11726
11726
b FB([gn)m(utls)p 601 3769 V 41 w(rsa)p 759 3769 V 40
11727
11727
w(params)p 1088 3769 V 39 w(exp)s(ort)p 1385 3769 V 40
11728
 
w(pk)m(cs1],)32 b(page)f(165)150 3928 y(Key)f(exc)m(hange)i(algorithms)
 
11728
w(pk)m(cs1],)32 b(page)f(166)150 3928 y(Key)f(exc)m(hange)i(algorithms)
11729
11729
g(for)e Fu(Op)r(enPGP)f FB(and)h Fu(X.509)f FB(certi\014cates:)150
11730
11730
4086 y Ft(RSA:)288 b FB(The)41 b(RSA)g(algorithm)h(is)g(used)e(to)i
11731
11731
(encrypt)f(a)h(k)m(ey)g(and)f(send)g(it)h(to)g(the)f(p)s(eer.)73
11842
11842
(function)e(b)m(y)g(using)f(the)h(function)150 903 y([gn)m(utls)p
11843
11843
421 903 V 41 w(srp)p 585 903 V 39 w(set)p 735 903 V 40
11844
11844
w(clien)m(t)p 988 903 V 42 w(creden)m(tials)p 1451 903
11845
 
V 41 w(function],)37 b(page)f(175.)57 b(This)34 b(has)h(the)h(adv)-5
 
11845
V 41 w(function],)37 b(page)f(176.)57 b(This)34 b(has)h(the)h(adv)-5
11846
11846
b(an)m(tage)37 b(that)f(allo)m(ws)150 1013 y(probing)31
11847
11847
b(the)g(serv)m(er)h(for)f Fu(SRP)h FB(supp)s(ort.)42
11848
11848
b(In)31 b(that)h(case)g(the)g(callbac)m(k)i(function)d(will)h(b)s(e)f
11865
11865
b(aries)82 b FB(and)72 b(can)i(b)s(e)f(sp)s(eci\014ed)f(using)h(the)g
11866
11866
([gn)m(utls)p 2499 1918 V 41 w(srp)p 2663 1918 V 39 w(set)p
11867
11867
2813 1918 V 41 w(serv)m(er)p 3087 1918 V 40 w(creden)m(tials)p
11868
 
3548 1918 V 41 w(\014le],)150 2028 y(page)67 b(176.)148
 
11868
3548 1918 V 41 w(\014le],)150 2028 y(page)67 b(177.)148
11869
11869
b(If)66 b(a)g(di\013eren)m(t)g(passw)m(ord)f(\014le)h(format)h(is)f(to)
11870
11870
g(b)s(e)f(used,)75 b(then)65 b(the)h(function)150 2138
11871
11871
y([gn)m(utls)p 421 2138 V 41 w(srp)p 585 2138 V 39 w(set)p
11872
11872
735 2138 V 40 w(serv)m(er)p 1008 2138 V 41 w(creden)m(tials)p
11873
 
1470 2138 V 41 w(function],)36 b(page)f(176,)j(should)33
 
11873
1470 2138 V 41 w(function],)36 b(page)f(177,)j(should)33
11874
11874
b(b)s(e)i(called,)i(in)d(order)g(to)i(set)f(an)150 2247
11875
11875
y(appropriate)30 b(callbac)m(k.)150 2386 y(Some)g(help)s(er)g
11876
11876
(functions)g(suc)m(h)g(as)225 2525 y Fs(\017)60 b FB([gn)m(utls)p
11877
11877
601 2525 V 41 w(srp)p 765 2525 V 39 w(v)m(eri\014er],)31
11878
11878
b(page)g(177)225 2661 y Fs(\017)60 b FB([gn)m(utls)p
11879
11879
601 2661 V 41 w(srp)p 765 2661 V 39 w(base64)p 1066 2661
11880
 
V 41 w(enco)s(de],)31 b(page)g(174)225 2798 y Fs(\017)60
 
11880
V 41 w(enco)s(de],)31 b(page)g(175)225 2798 y Fs(\017)60
11881
11881
b FB([gn)m(utls)p 601 2798 V 41 w(srp)p 765 2798 V 39
11882
11882
w(base64)p 1066 2798 V 41 w(deco)s(de],)31 b(page)g(174)150
11883
11883
2964 y(are)f(included)g(in)f Fu(Gn)n(uTLS)p FB(,)h(and)g(can)g(b)s(e)f
11908
11908
(y)e(calling)h(the)f(function)g([gn)m(utls)p 2662 4763
11909
11909
V 40 w(psk)p 2837 4763 V 40 w(set)p 2988 4763 V 40 w(clien)m(t)p
11910
11910
3241 4763 V 42 w(creden)m(tials],)150 4872 y(page)50
11911
 
b(160.)98 b(Alternativ)m(ely)51 b(they)e(could)g(sp)s(ecify)g(a)g
 
11911
b(161.)98 b(Alternativ)m(ely)51 b(they)e(could)g(sp)s(ecify)g(a)g
11912
11912
(callbac)m(k)i(function)e(b)m(y)g(using)f(the)h(function)150
11913
11913
4982 y([gn)m(utls)p 421 4982 V 41 w(psk)p 597 4982 V
11914
11914
39 w(set)p 747 4982 V 41 w(clien)m(t)p 1001 4982 V 41
11933
11933
(format)g(is)f(to)150 518 y(b)s(e)25 b(used,)i(then)f(the)g(function)g
11934
11934
([gn)m(utls)p 1477 518 V 40 w(psk)p 1652 518 V 40 w(set)p
11935
11935
1803 518 V 40 w(serv)m(er)p 2076 518 V 41 w(creden)m(tials)p
11936
 
2538 518 V 41 w(function],)h(page)g(161,)h(should)e(b)s(e)150
 
11936
2538 518 V 41 w(function],)h(page)g(162,)h(should)e(b)s(e)150
11937
11937
628 y(used)k(instead.)150 772 y(The)46 b(serv)m(er)h(can)f(help)h(the)f
11938
11938
(clien)m(t)i(c)m(hose)g(a)f(suitable)g(username)e(and)h(passw)m(ord,)k
11939
11939
(b)m(y)d(sending)f(a)150 882 y(hin)m(t.)88 b(In)46 b(the)g(serv)m(er,)
11940
11940
51 b(sp)s(ecify)46 b(the)g(hin)m(t)g(b)m(y)g(calling)i([gn)m(utls)p
11941
11941
2444 882 V 41 w(psk)p 2620 882 V 39 w(set)p 2770 882
11942
11942
V 41 w(serv)m(er)p 3044 882 V 40 w(creden)m(tials)p 3505
11943
 
882 V 41 w(hin)m(t],)150 992 y(page)43 b(161.)77 b(The)41
 
11943
882 V 41 w(hin)m(t],)150 992 y(page)43 b(162.)77 b(The)41
11944
11944
b(clien)m(t)j(can)e(retriev)m(e)i(the)e(hin)m(t,)j(for)d(example)h(in)e
11945
11945
(the)h(callbac)m(k)j(function,)f(using)150 1101 y([gn)m(utls)p
11946
11946
421 1101 V 41 w(psk)p 597 1101 V 39 w(clien)m(t)p 849
11950
11950
(the)150 1356 y(TLS)23 b(PSK)f(do)s(cumen)m(t.)39 b(Ho)m(w)m(ev)m(er,)
11951
11951
27 b(Gn)m(uTLS)22 b(pro)m(vides)i([gn)m(utls)p 2382 1356
11952
11952
V 41 w(psk)p 2558 1356 V 39 w(netconf)p 2887 1356 V 40
11953
 
w(deriv)m(e)p 3164 1356 V 41 w(k)m(ey],)i(page)f(159)150
 
11953
w(deriv)m(e)p 3164 1356 V 41 w(k)m(ey],)i(page)f(160)150
11954
11954
1465 y(whic)m(h)30 b(follo)m(ws)i(the)e(algorithm)i(sp)s(eci\014ed)d
11955
11955
(in)h(`)p Ft(draft-ietf-netconf-tls-02.)o(txt)p FB('.)150
11956
11956
1610 y(Some)g(help)s(er)g(functions)g(suc)m(h)g(as:)225
11957
11957
1755 y Fs(\017)60 b FB([gn)m(utls)p 601 1755 V 41 w(hex)p
11958
11958
781 1755 V 40 w(enco)s(de],)31 b(page)g(149)225 1894
11959
11959
y Fs(\017)60 b FB([gn)m(utls)p 601 1894 V 41 w(hex)p
11960
 
781 1894 V 40 w(deco)s(de],)31 b(page)g(148)150 2069
 
11960
781 1894 V 40 w(deco)s(de],)31 b(page)g(149)150 2069
11961
11961
y(are)g(included)e(in)h Fu(Gn)n(uTLS)p FB(,)h(and)f(ma)m(y)h(b)s(e)f
11962
11962
(used)f(to)i(generate)h(and)e(main)m(tain)h Fu(PSK)f
11963
11963
FB(k)m(eys.)150 2317 y FA(4.5)68 b(Authen)l(tication)46
12304
12304
b(See)32 b(the)g(\014gure)f(ab)s(o)m(v)m(e)i(for)f(a)150
12305
12305
3845 y(t)m(ypical)22 b(example.)39 b(The)20 b(API)g(for)h(handling)f
12306
12306
Fu(X.509)f FB(certi\014cates)k(is)e(describ)s(ed)e(at)j(section)g
12307
 
([sec:x509api],)150 3955 y(page)31 b(180.)42 b(Some)31
 
12307
([sec:x509api],)150 3955 y(page)31 b(181.)42 b(Some)31
12308
12308
b(examples)f(are)h(listed)g(b)s(elo)m(w.)150 4147 y Fv(5.1.1)63
12309
12309
b Fn(X.509)42 b Fv(Certi\014cates)150 4294 y FB(An)30
12310
12310
b Fu(X.509)f FB(certi\014cate)k(usually)d(con)m(tains)i(information)e
12439
12439
(the)h(\015ags)f(set)h(b)m(y)f(calling)150 3382 y([gn)m(utls)p
12440
12440
421 3382 V 41 w(certi\014cate)p 849 3382 V 42 w(set)p
12441
12441
1002 3382 V 40 w(v)m(erify)p 1264 3382 V 41 w(\015ags],)e(page)57
12442
 
b(124.)118 b(All)57 b(the)f(a)m(v)-5 b(ailable)58 b(\015ags)f(are)f
 
12442
b(125.)118 b(All)57 b(the)f(a)m(v)-5 b(ailable)58 b(\015ags)f(are)f
12443
12443
(part)g(of)g(the)150 3492 y(en)m(umeration)31 b([gn)m(utls)p
12444
12444
944 3492 V 41 w(certi\014cate)p 1372 3492 V 42 w(v)m(erify)p
12445
12445
1636 3492 V 40 w(\015ags],)g(page)g(25)h(and)d(are)i(explained)g(in)f
14508
14508
(certi\014cate)i(c)m(hain,)150 2887 y(y)m(ou)30 b(can)f(call)i([gn)m
14509
14509
(utls)p 923 2887 V 40 w(certi\014cate)p 1350 2887 V 42
14510
14510
w(set)p 1503 2887 V 41 w(v)m(erify)p 1766 2887 V 40 w(\015ags],)g(page)
14511
 
f(124)g(with)f(the)g Ft(GNUTLS_VERIFY_ALLOW_)150 2996
 
14511
f(125)g(with)f(the)g Ft(GNUTLS_VERIFY_ALLOW_)150 2996
14512
14512
y(SIGN_RSA_MD2)e FB(or)j Ft(GNUTLS_VERIFY_ALLOW_SIGN_R)o(SA_)o(MD5)24
14513
14513
b FB(\015ag,)31 b(as)g(in:)485 3131 y Ft(gnutls_certificate_set_ver)o
14514
14514
(ify_)o(fla)o(gs)42 b(\(x509cred,)2251 3240 y
14539
14539
(certi\014cates,)j(and)c(then)g(use)150 4411 y([gn)m(utls)p
14540
14540
421 4411 V 41 w(x509)p 645 4411 V 41 w(crt)p 797 4411
14541
14541
V 40 w(get)p 957 4411 V 42 w(signature)p 1363 4411 V
14542
 
40 w(algorithm],)h(page)f(211)g(to)g(\014nd)d(out)j(the)f(signing)h
 
14542
40 w(algorithm],)h(page)f(212)g(to)g(\014nd)d(out)j(the)f(signing)h
14543
14543
(algorithm)g(used)150 4521 y(for)e(eac)m(h)i(certi\014cate.)42
14544
14544
b(If)30 b(an)m(y)f(of)h(the)g(in)m(termediary)g(certi\014cates)h(are)f
14545
14545
(using)f Ft(GNUTLS_SIGN_RSA_MD2)150 4630 y FB(or)h Ft
14725
14725
150 4205 y(from)23 b Fu(Gn)n(uTLS)g FB(is)g(desired.)38
14726
14726
b(Those)23 b(are)h(the)f(case)i(where)d(the)i([gn)m(utls)p
14727
14727
2537 4205 V 41 w(global)p 2814 4205 V 41 w(set)p 2966
14728
 
4205 V 41 w(log)p 3122 4205 V 41 w(lev)m(el],)j(page)d(145)150
 
14728
4205 V 41 w(log)p 3122 4205 V 41 w(lev)m(el],)j(page)d(146)150
14729
14729
4314 y(and)42 b([gn)m(utls)p 610 4314 V 40 w(global)p
14730
14730
886 4314 V 42 w(set)p 1039 4314 V 40 w(log)p 1194 4314
14731
 
V 41 w(function],)k(page)d(145)g(are)g(to)g(b)s(e)e(used.)75
 
14731
V 41 w(function],)k(page)d(146)g(are)g(to)g(b)s(e)e(used.)75
14732
14732
b(Those)42 b(will)h(prin)m(t)f(v)m(erb)s(ose)150 4424
14733
14733
y(information)31 b(on)f(the)h Fu(Gn)n(uTLS)f FB(functions)g(in)m
14734
14734
(ternal)h(\015o)m(w.)150 4621 y Fv(7.1.5)63 b(Building)42
17930
17930
b(F)-8 b(unction)31 b(Reference)2237 b(120)150 299 y
17931
17931
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
17932
17932
299 V 52 w(activ)-7 b(ation)p 1646 299 V 53 w(time)p
17933
 
1939 299 V 54 w(p)s(eers)3350 501 y FB([F)f(unction])-3599
 
17933
1939 299 V 54 w(p)s(eers)3350 493 y FB([F)f(unction])-3599
17934
17934
b Fh(time_t)54 b(gnutls_certificate_act)q(iva)q(tio)q(n_t)q(ime_)q(pee)
17935
 
q(rs)565 610 y Fg(\()p Ff(gn)m(utls)p 846 610 28 4 v
17936
 
41 w(session)p 1156 610 V 40 w(t)31 b Fe(session)12 b
17937
 
Fg(\))390 720 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)
17938
 
390 860 y(This)k(function)g(will)h(return)e(the)i(p)s(eer's)f
 
17935
q(rs)565 602 y Fg(\()p Ff(gn)m(utls)p 846 602 28 4 v
 
17936
41 w(session)p 1156 602 V 40 w(t)31 b Fe(session)12 b
 
17937
Fg(\))390 712 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)
 
17938
390 845 y(This)k(function)g(will)h(return)e(the)i(p)s(eer's)f
17939
17939
(certi\014cate)i(activ)-5 b(ation)38 b(time.)57 b(This)34
17940
 
b(is)i(the)g(creation)390 969 y(time)31 b(for)f(op)s(enpgp)f(k)m(eys.)
17941
 
390 1109 y Fn(Returns:)40 b FB(\(time)p 995 1109 V 42
17942
 
w(t\)-1)31 b(on)g(error.)150 1314 y Fv(gn)m(utls)p 483
17943
 
1314 37 5 v 55 w(certi\014cate)p 1068 1314 V 52 w(allo)s(cate)p
17944
 
1531 1314 V 54 w(creden)m(tials)3350 1516 y FB([F)-8
17945
 
b(unction])-3599 b Fh(int)53 b(gnutls_certificate_al)q(loca)q(te_)q
17946
 
(cre)q(den)q(tial)q(s)565 1625 y Fg(\()p Ff(gn)m(utls)p
17947
 
846 1625 28 4 v 41 w(certi\014cate)p 1274 1625 V 42 w(creden)m(tials)p
17948
 
1737 1625 V 41 w(t)31 b(*)g Fe(res)12 b Fg(\))390 1735
 
17940
b(is)i(the)g(creation)390 954 y(time)31 b(for)f(op)s(enpgp)f(k)m(eys.)
 
17941
390 1087 y Fn(Returns:)40 b FB(\(time)p 995 1087 V 42
 
17942
w(t\)-1)31 b(on)g(error.)390 1220 y Fn(Deprecated:)42
 
17943
b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))24
 
17944
b FB(no)m(w)30 b(v)m(eri\014es)h(activ)-5 b(ation)33
 
17945
b(times.)150 1416 y Fv(gn)m(utls)p 483 1416 37 5 v 55
 
17946
w(certi\014cate)p 1068 1416 V 52 w(allo)s(cate)p 1531
 
17947
1416 V 54 w(creden)m(tials)3350 1610 y FB([F)-8 b(unction])-3599
 
17948
b Fh(int)53 b(gnutls_certificate_al)q(loca)q(te_)q(cre)q(den)q(tial)q
 
17949
(s)565 1720 y Fg(\()p Ff(gn)m(utls)p 846 1720 28 4 v
 
17950
41 w(certi\014cate)p 1274 1720 V 42 w(creden)m(tials)p
 
17951
1737 1720 V 41 w(t)31 b(*)g Fe(res)12 b Fg(\))390 1829
17949
17952
y Ff(res)t FB(:)40 b(is)31 b(a)f(p)s(oin)m(ter)h(to)g(an)f
17950
17953
Ft(gnutls_certificate_creden)o(tial)o(s_t)24 b FB(structure.)390
17951
 
1875 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
 
17954
1962 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
17952
17955
(directly)g(th)m(us)f(this)h(help)s(er)f(function)g(is)390
17953
 
1984 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i(it.)390
17954
 
2124 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
17955
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 2328 y Fv(gn)m(utls)p
17956
 
483 2328 37 5 v 55 w(certi\014cate)p 1068 2328 V 52 w(clien)m(t)p
17957
 
1412 2328 V 53 w(get)p 1630 2328 V 54 w(request)p 2075
17958
 
2328 V 55 w(status)3350 2531 y FB([F)-8 b(unction])-3599
 
17956
2072 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i(it.)390
 
17957
2205 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
17958
b(success,)f(or)h(an)f(error)g(co)s(de.)150 2401 y Fv(gn)m(utls)p
 
17959
483 2401 37 5 v 55 w(certi\014cate)p 1068 2401 V 52 w(clien)m(t)p
 
17960
1412 2401 V 53 w(get)p 1630 2401 V 54 w(request)p 2075
 
17961
2401 V 55 w(status)3350 2595 y FB([F)-8 b(unction])-3599
17959
17962
b Fh(int)53 b(gnutls_certificate_cl)q(ient)q(_ge)q(t_r)q(equ)q(est_)q
17960
 
(sta)q(tus)565 2640 y Fg(\()p Ff(gn)m(utls)p 846 2640
17961
 
28 4 v 41 w(session)p 1156 2640 V 40 w(t)31 b Fe(session)12
17962
 
b Fg(\))390 2750 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
17963
 
(session)390 2889 y(Get)g(whether)f(clien)m(t)i(certi\014cate)h(is)d
17964
 
(requested)g(or)h(not.)390 3029 y Fn(Returns:)48 b FB(0)34
 
17963
(sta)q(tus)565 2704 y Fg(\()p Ff(gn)m(utls)p 846 2704
 
17964
28 4 v 41 w(session)p 1156 2704 V 40 w(t)31 b Fe(session)12
 
17965
b Fg(\))390 2814 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
17966
(session)390 2947 y(Get)g(whether)f(clien)m(t)i(certi\014cate)h(is)d
 
17967
(requested)g(or)h(not.)390 3080 y Fn(Returns:)48 b FB(0)34
17965
17968
b(if)g(the)h(p)s(eer)e(\(serv)m(er\))i(did)e(not)i(request)f(clien)m(t)
17966
 
h(authen)m(tication)i(or)d(1)g(otherwise,)390 3139 y(or)c(a)h(negativ)m
17967
 
(e)i(v)-5 b(alue)31 b(in)f(case)h(of)g(error.)150 3343
17968
 
y Fv(gn)m(utls)p 483 3343 37 5 v 55 w(certi\014cate)p
17969
 
1068 3343 V 52 w(clien)m(t)p 1412 3343 V 53 w(set)p 1617
17970
 
3343 V 55 w(retriev)m(e)p 2084 3343 V 53 w(function)3350
17971
 
3545 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
17969
h(authen)m(tication)i(or)d(1)g(otherwise,)390 3189 y(or)c(a)h(negativ)m
 
17970
(e)i(v)-5 b(alue)31 b(in)f(case)h(of)g(error.)150 3386
 
17971
y Fv(gn)m(utls)p 483 3386 37 5 v 55 w(certi\014cate)p
 
17972
1068 3386 V 52 w(clien)m(t)p 1412 3386 V 53 w(set)p 1617
 
17973
3386 V 55 w(retriev)m(e)p 2084 3386 V 53 w(function)3350
 
17974
3579 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
17972
17975
(gnutls_certificate_clien)q(t_s)q(et_)q(ret)q(riev)q(e_f)q(unc)q(tion)
17973
 
565 3655 y Fg(\()p Ff(gn)m(utls)p 846 3655 28 4 v 41
17974
 
w(certi\014cate)p 1274 3655 V 42 w(creden)m(tials)p 1737
17975
 
3655 V 41 w(t)31 b Fe(cred)12 b Ff(,)31 b(gn)m(utls)p
17976
 
2360 3655 V 41 w(certi\014cate)p 2788 3655 V 42 w(clien)m(t)p
17977
 
3043 3655 V 42 w(retriev)m(e)p 3382 3655 V 41 w(function)565
17978
 
3764 y(*)g Fe(func)12 b Fg(\))390 3874 y Ff(cred)t FB(:)40
 
17976
565 3689 y Fg(\()p Ff(gn)m(utls)p 846 3689 28 4 v 41
 
17977
w(certi\014cate)p 1274 3689 V 42 w(creden)m(tials)p 1737
 
17978
3689 V 41 w(t)31 b Fe(cred)12 b Ff(,)31 b(gn)m(utls)p
 
17979
2360 3689 V 41 w(certi\014cate)p 2788 3689 V 42 w(clien)m(t)p
 
17980
3043 3689 V 42 w(retriev)m(e)p 3382 3689 V 41 w(function)565
 
17981
3798 y(*)g Fe(func)12 b Fg(\))390 3908 y Ff(cred)t FB(:)40
17979
17982
b(is)31 b(a)f Ft(gnutls_certificate_creden)o(tial)o(s_t)24
17980
 
b FB(structure.)390 4014 y Ff(func)6 b FB(:)39 b(is)31
17981
 
b(the)f(callbac)m(k)j(function)390 4154 y(This)58 b(function)h(sets)g
 
17983
b FB(structure.)390 4041 y Ff(func)6 b FB(:)39 b(is)31
 
17984
b(the)f(callbac)m(k)j(function)390 4174 y(This)58 b(function)h(sets)g
17982
17985
(a)h(callbac)m(k)h(to)f(b)s(e)e(called)i(in)f(order)f(to)i(retriev)m(e)
17983
 
h(the)e(certi\014cate)390 4263 y(to)72 b(b)s(e)e(used)h(in)f(the)i
 
17986
h(the)e(certi\014cate)390 4284 y(to)72 b(b)s(e)e(used)h(in)f(the)i
17984
17987
(handshak)m(e.)162 b(The)71 b(callbac)m(k's)i(function)e(protot)m(yp)s
17985
 
(e)g(is:)122 b(in)m(t)390 4373 y(\(*callbac)m(k\)\(gn)m(utls)p
17986
 
1102 4373 V 44 w(session)p 1415 4373 V 40 w(t,)73 b(const)64
17987
 
b(gn)m(utls)p 2099 4373 V 40 w(datum)p 2397 4373 V 40
17988
 
w(t*)g(req)p 2705 4373 V 40 w(ca)p 2830 4373 V 41 w(dn,)71
17989
 
b(in)m(t)64 b(nreqs,)71 b(const)390 4482 y(gn)m(utls)p
17990
 
636 4482 V 40 w(pk)p 775 4482 V 40 w(algorithm)p 1198
17991
 
4482 V 41 w(t*)31 b(pk)p 1449 4482 V 40 w(algos,)h(in)m(t)e(pk)p
17992
 
1979 4482 V 40 w(algos)p 2215 4482 V 41 w(length,)h(gn)m(utls)p
17993
 
2799 4482 V 41 w(retr)p 2987 4482 V 40 w(st*)g(st\);)390
17994
 
4622 y Ft(req_ca_cert)h FB(is)i(only)h(used)f(in)g(X.509)j
 
17988
(e)g(is:)122 b(in)m(t)390 4393 y(\(*callbac)m(k\)\(gn)m(utls)p
 
17989
1102 4393 V 44 w(session)p 1415 4393 V 40 w(t,)73 b(const)64
 
17990
b(gn)m(utls)p 2099 4393 V 40 w(datum)p 2397 4393 V 40
 
17991
w(t*)g(req)p 2705 4393 V 40 w(ca)p 2830 4393 V 41 w(dn,)71
 
17992
b(in)m(t)64 b(nreqs,)71 b(const)390 4503 y(gn)m(utls)p
 
17993
636 4503 V 40 w(pk)p 775 4503 V 40 w(algorithm)p 1198
 
17994
4503 V 41 w(t*)31 b(pk)p 1449 4503 V 40 w(algos,)h(in)m(t)e(pk)p
 
17995
1979 4503 V 40 w(algos)p 2215 4503 V 41 w(length,)h(gn)m(utls)p
 
17996
2799 4503 V 41 w(retr)p 2987 4503 V 40 w(st*)g(st\);)390
 
17997
4636 y Ft(req_ca_cert)h FB(is)i(only)h(used)f(in)g(X.509)j
17995
17998
(certi\014cates.)55 b(Con)m(tains)35 b(a)g(list)g(with)g(the)g(CA)f
17996
 
(names)390 4732 y(that)26 b(the)g(serv)m(er)g(considers)g(trusted.)38
 
17999
(names)390 4745 y(that)26 b(the)g(serv)m(er)g(considers)g(trusted.)38
17997
18000
b(Normally)27 b(w)m(e)f(should)f(send)g(a)h(certi\014cate)i(that)e(is)g
17998
 
(signed)390 4841 y(b)m(y)f(one)g(of)g(these)h(CAs.)38
 
18001
(signed)390 4855 y(b)m(y)f(one)g(of)g(these)h(CAs.)38
17999
18002
b(These)25 b(names)g(are)h(DER)f(enco)s(ded.)38 b(T)-8
18000
18003
b(o)26 b(get)g(a)f(more)h(meaningful)e(v)-5 b(alue)390
18001
 
4951 y(use)30 b(the)h(function)f Ft(gnutls_x509_rdn_get\(\))p
18002
 
FB(.)390 5091 y Ft(pk_algos)21 b FB(con)m(tains)j(a)f(list)h(with)f
 
18004
4964 y(use)30 b(the)h(function)f Ft(gnutls_x509_rdn_get\(\))p
 
18005
FB(.)390 5097 y Ft(pk_algos)21 b FB(con)m(tains)j(a)f(list)h(with)f
18003
18006
(serv)m(er's)g(acceptable)i(signature)e(algorithms.)39
18004
 
b(The)23 b(certi\014cate)390 5200 y(returned)29 b(should)h(supp)s(ort)e
 
18007
b(The)23 b(certi\014cate)390 5207 y(returned)29 b(should)h(supp)s(ort)e
18005
18008
(the)j(serv)m(er's)g(giv)m(en)g(algorithms.)390 5340
18006
18009
y Ft(st)f FB(should)f(con)m(tain)j(the)e(certi\014cates)j(and)c(priv)-5
18007
18010
b(ate)31 b(k)m(eys.)p eop end
18011
18014
b(the)h(callbac)m(k)i(function)e(is)f(pro)m(vided)h(then)f(gn)m(utls)h
18012
18015
(will)h(call)g(it,)h(in)d(the)h(handshak)m(e,)h(after)390
18013
18016
408 y(the)31 b(certi\014cate)h(request)e(message)i(has)e(b)s(een)g
18014
 
(receiv)m(ed.)390 538 y(The)23 b(callbac)m(k)j(function)d(should)f(set)
 
18017
(receiv)m(ed.)390 571 y(The)23 b(callbac)m(k)j(function)d(should)f(set)
18015
18018
i(the)g(certi\014cate)i(list)e(to)g(b)s(e)f(sen)m(t,)j(and)d(return)f
18016
 
(0)i(on)f(success.)390 648 y(If)37 b(no)h(certi\014cate)i(w)m(as)e
 
18019
(0)i(on)f(success.)390 680 y(If)37 b(no)h(certi\014cate)i(w)m(as)e
18017
18020
(selected)h(then)f(the)g(n)m(um)m(b)s(er)e(of)i(certi\014cates)i
18018
 
(should)d(b)s(e)g(set)h(to)h(zero.)390 757 y(The)30 b(v)-5
 
18021
(should)d(b)s(e)g(set)h(to)h(zero.)390 790 y(The)30 b(v)-5
18019
18022
b(alue)31 b(\(-1\))g(indicates)h(error)e(and)g(the)g(handshak)m(e)g
18020
 
(will)h(b)s(e)e(terminated.)150 947 y Fv(gn)m(utls)p
18021
 
483 947 37 5 v 55 w(certi\014cate)p 1068 947 V 52 w(expiration)p
18022
 
1664 947 V 54 w(time)p 1958 947 V 54 w(p)s(eers)3350
18023
 
1134 y FB([F)-8 b(unction])-3599 b Fh(time_t)54 b
 
18023
(will)h(b)s(e)e(terminated.)150 1017 y Fv(gn)m(utls)p
 
18024
483 1017 37 5 v 55 w(certi\014cate)p 1068 1017 V 52 w(expiration)p
 
18025
1664 1017 V 54 w(time)p 1958 1017 V 54 w(p)s(eers)3350
 
18026
1241 y FB([F)-8 b(unction])-3599 b Fh(time_t)54 b
18024
18027
(gnutls_certificate_exp)q(ira)q(tio)q(n_t)q(ime_)q(pee)q(rs)565
18025
 
1244 y Fg(\()p Ff(gn)m(utls)p 846 1244 28 4 v 41 w(session)p
18026
 
1156 1244 V 40 w(t)31 b Fe(session)12 b Fg(\))390 1353
 
18028
1351 y Fg(\()p Ff(gn)m(utls)p 846 1351 28 4 v 41 w(session)p
 
18029
1156 1351 V 40 w(t)31 b Fe(session)12 b Fg(\))390 1460
18027
18030
y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
18028
 
1483 y(This)f(function)g(will)g(return)g(the)g(p)s(eer's)g
18029
 
(certi\014cate)j(expiration)e(time.)390 1613 y Fn(Returns:)40
18030
 
b FB(\(time)p 995 1613 V 42 w(t\)-1)31 b(on)g(error.)150
18031
 
1802 y Fv(gn)m(utls)p 483 1802 37 5 v 55 w(certi\014cate)p
18032
 
1068 1802 V 52 w(free)p 1319 1802 V 55 w(ca)p 1489 1802
18033
 
V 53 w(names)3350 1989 y FB([F)-8 b(unction])-3599 b
 
18031
1623 y(This)f(function)g(will)g(return)g(the)g(p)s(eer's)g
 
18032
(certi\014cate)j(expiration)e(time.)390 1785 y Fn(Returns:)40
 
18033
b FB(\(time)p 995 1785 V 42 w(t\)-1)31 b(on)g(error.)390
 
18034
1947 y Fn(Deprecated:)42 b Ft(gnutls_certificate_veri)o(fy_)o(peer)o
 
18035
(s2\(\))24 b FB(no)m(w)30 b(v)m(eri\014es)h(expiration)g(times.)150
 
18036
2174 y Fv(gn)m(utls)p 483 2174 37 5 v 55 w(certi\014cate)p
 
18037
1068 2174 V 52 w(free)p 1319 2174 V 55 w(ca)p 1489 2174
 
18038
V 53 w(names)3350 2398 y FB([F)-8 b(unction])-3599 b
18034
18039
Fh(void)54 b(gnutls_certificate_free_)q(ca_)q(nam)q(es)565
18035
 
2099 y Fg(\()p Ff(gn)m(utls)p 846 2099 28 4 v 41 w(certi\014cate)p
18036
 
1274 2099 V 42 w(creden)m(tials)p 1737 2099 V 41 w(t)31
18037
 
b Fe(sc)12 b Fg(\))390 2209 y Ff(sc)6 b FB(:)40 b(is)31
 
18040
2508 y Fg(\()p Ff(gn)m(utls)p 846 2508 28 4 v 41 w(certi\014cate)p
 
18041
1274 2508 V 42 w(creden)m(tials)p 1737 2508 V 41 w(t)31
 
18042
b Fe(sc)12 b Fg(\))390 2617 y Ff(sc)6 b FB(:)40 b(is)31
18038
18043
b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24 b
18039
 
FB(structure.)390 2338 y(This)32 b(function)h(will)h(delete)g(all)g
 
18044
FB(structure.)390 2780 y(This)32 b(function)h(will)h(delete)g(all)g
18040
18045
(the)g(CA)f(name)g(in)g(the)g(giv)m(en)h(creden)m(tials.)51
18041
 
b(Clien)m(ts)34 b(ma)m(y)g(call)390 2448 y(this)c(to)h(sa)m(v)m(e)h
 
18046
b(Clien)m(ts)34 b(ma)m(y)g(call)390 2889 y(this)c(to)h(sa)m(v)m(e)h
18042
18047
(some)f(memory)f(since)h(in)f(clien)m(t)i(side)e(the)h(CA)f(names)g
18043
 
(are)h(not)g(used.)390 2577 y(CA)f(names)g(are)h(used)f(b)m(y)g(serv)m
 
18048
(are)h(not)g(used.)390 3051 y(CA)f(names)g(are)h(used)f(b)m(y)g(serv)m
18044
18049
(ers)h(to)g(adv)m(ertize)h(the)e(CAs)g(they)h(supp)s(ort)e(to)i(clien)m
18045
 
(ts.)150 2767 y Fv(gn)m(utls)p 483 2767 37 5 v 55 w(certi\014cate)p
18046
 
1068 2767 V 52 w(free)p 1319 2767 V 55 w(cas)3350 2954
 
18050
(ts.)150 3278 y Fv(gn)m(utls)p 483 3278 37 5 v 55 w(certi\014cate)p
 
18051
1068 3278 V 52 w(free)p 1319 3278 V 55 w(cas)3350 3503
18047
18052
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_certificate_free_)q
18048
 
(cas)e Fg(\()p Ff(gn)m(utls)p 2150 2954 28 4 v 41 w(certi\014cate)p
18049
 
2578 2954 V 42 w(creden)m(tials)p 3041 2954 V 42 w(t)565
18050
 
3064 y Fe(sc)12 b Fg(\))390 3173 y Ff(sc)6 b FB(:)40
 
18053
(cas)e Fg(\()p Ff(gn)m(utls)p 2150 3503 28 4 v 41 w(certi\014cate)p
 
18054
2578 3503 V 42 w(creden)m(tials)p 3041 3503 V 42 w(t)565
 
18055
3612 y Fe(sc)12 b Fg(\))390 3722 y Ff(sc)6 b FB(:)40
18051
18056
b(is)31 b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24
18052
 
b FB(structure.)390 3303 y(This)35 b(function)g(will)h(delete)h(all)f
 
18057
b FB(structure.)390 3884 y(This)35 b(function)g(will)h(delete)h(all)f
18053
18058
(the)g(CAs)f(asso)s(ciated)j(with)d(the)h(giv)m(en)g(creden)m(tials.)58
18054
 
b(Serv)m(ers)390 3413 y(that)33 b(do)f(not)h(use)f Ft
 
18059
b(Serv)m(ers)390 3994 y(that)33 b(do)f(not)h(use)f Ft
18055
18060
(gnutls_certificate_verify)o(_pee)o(rs2)o(\(\))26 b FB(ma)m(y)33
18056
 
b(call)h(this)e(to)i(sa)m(v)m(e)g(some)390 3522 y(memory)-8
18057
 
b(.)150 3712 y Fv(gn)m(utls)p 483 3712 37 5 v 55 w(certi\014cate)p
18058
 
1068 3712 V 52 w(free)p 1319 3712 V 55 w(creden)m(tials)3350
18059
 
3899 y FB([F)g(unction])-3599 b Fh(void)54 b(gnutls_certificate_free_)q
18060
 
(cre)q(den)q(tia)q(ls)565 4009 y Fg(\()p Ff(gn)m(utls)p
18061
 
846 4009 28 4 v 41 w(certi\014cate)p 1274 4009 V 42 w(creden)m(tials)p
18062
 
1737 4009 V 41 w(t)31 b Fe(sc)12 b Fg(\))390 4118 y Ff(sc)6
 
18061
b(call)h(this)e(to)i(sa)m(v)m(e)g(some)390 4103 y(memory)-8
 
18062
b(.)150 4330 y Fv(gn)m(utls)p 483 4330 37 5 v 55 w(certi\014cate)p
 
18063
1068 4330 V 52 w(free)p 1319 4330 V 55 w(creden)m(tials)3350
 
18064
4555 y FB([F)g(unction])-3599 b Fh(void)54 b(gnutls_certificate_free_)q
 
18065
(cre)q(den)q(tia)q(ls)565 4664 y Fg(\()p Ff(gn)m(utls)p
 
18066
846 4664 28 4 v 41 w(certi\014cate)p 1274 4664 V 42 w(creden)m(tials)p
 
18067
1737 4664 V 41 w(t)31 b Fe(sc)12 b Fg(\))390 4774 y Ff(sc)6
18063
18068
b FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24
18064
 
b FB(structure.)390 4248 y(This)31 b(structure)g(is)h(complex)g(enough)
 
18069
b FB(structure.)390 4936 y(This)31 b(structure)g(is)h(complex)g(enough)
18065
18070
f(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f(function)g
18066
 
(is)390 4357 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s
18067
 
(cate\))i(it.)390 4487 y(This)c(function)g(do)s(es)g(not)h(free)g(an)m
 
18071
(is)390 5045 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s
 
18072
(cate\))i(it.)390 5208 y(This)c(function)g(do)s(es)g(not)h(free)g(an)m
18068
18073
(y)g(temp)s(orary)f(parameters)h(asso)s(ciated)h(with)e(this)g
18069
 
(structure)390 4597 y(\(ie)i(RSA)f(and)g(DH)h(parameters)g(are)f(not)h
18070
 
(freed)f(b)m(y)g(this)h(function\).)150 4786 y Fv(gn)m(utls)p
18071
 
483 4786 37 5 v 55 w(certi\014cate)p 1068 4786 V 52 w(free)p
18072
 
1319 4786 V 55 w(crls)3350 4973 y FB([F)-8 b(unction])-3599
18073
 
b Fh(void)54 b(gnutls_certificate_free_)q(crl)q(s)d Fg(\()p
18074
 
Ff(gn)m(utls)p 2202 4973 28 4 v 41 w(certi\014cate)p
18075
 
2630 4973 V 42 w(creden)m(tials)p 3093 4973 V 42 w(t)565
18076
 
5083 y Fe(sc)12 b Fg(\))390 5193 y Ff(sc)6 b FB(:)40
18077
 
b(is)31 b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24
18078
 
b FB(structure.)390 5322 y(This)30 b(function)g(will)g(delete)i(all)f
18079
 
(the)g(CRLs)e(asso)s(ciated)j(with)e(the)h(giv)m(en)g(creden)m(tials.)p
18080
 
eop end
 
18074
(structure)390 5317 y(\(ie)i(RSA)f(and)g(DH)h(parameters)g(are)f(not)h
 
18075
(freed)f(b)m(y)g(this)h(function\).)p eop end
18081
18076
%%Page: 122 128
18082
18077
TeXDict begin 122 127 bop 150 -116 a FB(Chapter)30 b(9:)41
18083
18078
b(F)-8 b(unction)31 b(Reference)2237 b(122)150 299 y
18084
18079
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
18085
 
299 V 52 w(free)p 1319 299 V 55 w(k)m(eys)3350 493 y
18086
 
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_certificate_free_)q
18087
 
(key)q(s)d Fg(\()p Ff(gn)m(utls)p 2202 493 28 4 v 41
18088
 
w(certi\014cate)p 2630 493 V 42 w(creden)m(tials)p 3093
18089
 
493 V 42 w(t)565 603 y Fe(sc)12 b Fg(\))390 712 y Ff(sc)6
18090
 
b FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24
18091
 
b FB(structure.)390 846 y(This)36 b(function)h(will)g(delete)i(all)f
18092
 
(the)f(k)m(eys)h(and)e(the)h(certi\014cates)i(asso)s(ciated)g(with)e
18093
 
(the)g(giv)m(en)390 955 y(creden)m(tials.)49 b(This)31
18094
 
b(function)i(m)m(ust)f(not)h(b)s(e)f(called)i(when)d(a)i(TLS)f
18095
 
(negotiation)i(that)g(uses)e(the)390 1065 y(creden)m(tials)g(is)e(in)g
18096
 
(progress.)150 1262 y Fv(gn)m(utls)p 483 1262 37 5 v
18097
 
55 w(certi\014cate)p 1068 1262 V 52 w(get)p 1285 1262
18098
 
V 54 w(op)s(enpgp)p 1792 1262 V 56 w(k)m(eyring)3350
18099
 
1456 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
18100
 
(gnutls_certificate_get_o)q(pen)q(pgp)q(_ke)q(yrin)q(g)565
18101
 
1566 y Fg(\()p Ff(gn)m(utls)p 846 1566 28 4 v 41 w(certi\014cate)p
18102
 
1274 1566 V 42 w(creden)m(tials)p 1737 1566 V 41 w(t)31
18103
 
b Fe(sc)12 b Ff(,)31 b(gn)m(utls)p 2256 1566 V 40 w(op)s(enpgp)p
18104
 
2633 1566 V 39 w(k)m(eyring)p 2962 1566 V 41 w(t)f(*)h
18105
 
Fe(keyring)12 b Fg(\))390 1675 y Ff(sc)6 b FB(:)40 b(is)31
 
18080
299 V 52 w(free)p 1319 299 V 55 w(crls)3350 492 y FB([F)-8
 
18081
b(unction])-3599 b Fh(void)54 b(gnutls_certificate_free_)q(crl)q(s)d
 
18082
Fg(\()p Ff(gn)m(utls)p 2202 492 28 4 v 41 w(certi\014cate)p
 
18083
2630 492 V 42 w(creden)m(tials)p 3093 492 V 42 w(t)565
 
18084
601 y Fe(sc)12 b Fg(\))390 711 y Ff(sc)6 b FB(:)40 b(is)31
18106
18085
b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24 b
18107
 
FB(structure.)390 1809 y(This)g(function)g(will)h(exp)s(ort)g(the)g(Op)
18108
 
s(enPGP)e(k)m(eyring)i(asso)s(ciated)h(with)f(the)g(giv)m(en)g(creden)m
18109
 
(tials.)390 1942 y Fn(Since:)41 b FB(2.4.0)150 2139 y
18110
 
Fv(gn)m(utls)p 483 2139 37 5 v 55 w(certi\014cate)p 1068
18111
 
2139 V 52 w(get)p 1285 2139 V 54 w(ours)3350 2333 y FB([F)-8
18112
 
b(unction])-3599 b Fh(const)54 b(gnutls_datum_t)i(*)d
18113
 
(gnutls_certificate_get)q(_ou)q(rs)565 2443 y Fg(\()p
18114
 
Ff(gn)m(utls)p 846 2443 28 4 v 41 w(session)p 1156 2443
18115
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 2552 y Ff(session)p
18116
 
FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390 2686 y(Get)d(the)f
 
18086
FB(structure.)390 843 y(This)30 b(function)g(will)g(delete)i(all)f(the)
 
18087
g(CRLs)e(asso)s(ciated)j(with)e(the)h(giv)m(en)g(creden)m(tials.)150
 
18088
1038 y Fv(gn)m(utls)p 483 1038 37 5 v 55 w(certi\014cate)p
 
18089
1068 1038 V 52 w(free)p 1319 1038 V 55 w(k)m(eys)3350
 
18090
1231 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
18091
(gnutls_certificate_free_)q(key)q(s)d Fg(\()p Ff(gn)m(utls)p
 
18092
2202 1231 28 4 v 41 w(certi\014cate)p 2630 1231 V 42
 
18093
w(creden)m(tials)p 3093 1231 V 42 w(t)565 1341 y Fe(sc)12
 
18094
b Fg(\))390 1450 y Ff(sc)6 b FB(:)40 b(is)31 b(an)f Ft
 
18095
(gnutls_certificate_creden)o(tia)o(ls_t)24 b FB(structure.)390
 
18096
1583 y(This)36 b(function)h(will)g(delete)i(all)f(the)f(k)m(eys)h(and)e
 
18097
(the)h(certi\014cates)i(asso)s(ciated)g(with)e(the)g(giv)m(en)390
 
18098
1692 y(creden)m(tials.)49 b(This)31 b(function)i(m)m(ust)f(not)h(b)s(e)
 
18099
f(called)i(when)d(a)i(TLS)f(negotiation)i(that)g(uses)e(the)390
 
18100
1802 y(creden)m(tials)g(is)e(in)g(progress.)150 1997
 
18101
y Fv(gn)m(utls)p 483 1997 37 5 v 55 w(certi\014cate)p
 
18102
1068 1997 V 52 w(get)p 1285 1997 V 54 w(op)s(enpgp)p
 
18103
1792 1997 V 56 w(k)m(eyring)3350 2190 y FB([F)-8 b(unction])-3599
 
18104
b Fh(void)54 b(gnutls_certificate_get_o)q(pen)q(pgp)q(_ke)q(yrin)q(g)
 
18105
565 2299 y Fg(\()p Ff(gn)m(utls)p 846 2299 28 4 v 41
 
18106
w(certi\014cate)p 1274 2299 V 42 w(creden)m(tials)p 1737
 
18107
2299 V 41 w(t)31 b Fe(sc)12 b Ff(,)31 b(gn)m(utls)p 2256
 
18108
2299 V 40 w(op)s(enpgp)p 2633 2299 V 39 w(k)m(eyring)p
 
18109
2962 2299 V 41 w(t)f(*)h Fe(keyring)12 b Fg(\))390 2409
 
18110
y Ff(sc)6 b FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_creden)o(tia)o
 
18111
(ls_t)24 b FB(structure.)390 2541 y(This)g(function)g(will)h(exp)s(ort)
 
18112
g(the)g(Op)s(enPGP)e(k)m(eyring)i(asso)s(ciated)h(with)f(the)g(giv)m
 
18113
(en)g(creden)m(tials.)390 2674 y Fn(Since:)41 b FB(2.4.0)150
 
18114
2869 y Fv(gn)m(utls)p 483 2869 37 5 v 55 w(certi\014cate)p
 
18115
1068 2869 V 52 w(get)p 1285 2869 V 54 w(ours)3350 3062
 
18116
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(gnutls_datum_t)i(*)d
 
18117
(gnutls_certificate_get)q(_ou)q(rs)565 3171 y Fg(\()p
 
18118
Ff(gn)m(utls)p 846 3171 28 4 v 41 w(session)p 1156 3171
 
18119
V 40 w(t)31 b Fe(session)12 b Fg(\))390 3281 y Ff(session)p
 
18120
FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390 3413 y(Get)d(the)f
18117
18121
(certi\014cate)i(as)e(sen)m(t)h(to)f(the)g(p)s(eer,)h(in)e(the)h(last)h
18118
18122
(handshak)m(e.)39 b(These)27 b(certi\014cates)i(are)e(in)390
18119
 
2795 y(ra)m(w)h(format.)40 b(In)27 b(X.509)i(this)f(is)g(a)g
 
18123
3523 y(ra)m(w)h(format.)40 b(In)27 b(X.509)i(this)f(is)g(a)g
18120
18124
(certi\014cate)i(list.)40 b(In)27 b(Op)s(enPGP)g(this)g(is)h(a)g
18121
 
(single)h(certi\014cate.)390 2928 y Fn(Returns:)46 b
 
18125
(single)h(certi\014cate.)390 3655 y Fn(Returns:)46 b
18122
18126
FB(return)32 b(a)h(p)s(oin)m(ter)g(to)h(a)f Ft(gnutls_datum_t)c
18123
18127
FB(con)m(taining)35 b(our)d(certi\014cates,)k(or)d Ft(NULL)390
18124
 
3038 y FB(in)d(case)h(of)g(an)f(error)g(or)h(if)f(no)g(certi\014cate)j
18125
 
(w)m(as)d(used.)150 3235 y Fv(gn)m(utls)p 483 3235 37
18126
 
5 v 55 w(certi\014cate)p 1068 3235 V 52 w(get)p 1285
18127
 
3235 V 54 w(p)s(eers)3350 3429 y FB([F)-8 b(unction])-3599
 
18128
3765 y FB(in)d(case)h(of)g(an)f(error)g(or)h(if)f(no)g(certi\014cate)j
 
18129
(w)m(as)d(used.)150 3960 y Fv(gn)m(utls)p 483 3960 37
 
18130
5 v 55 w(certi\014cate)p 1068 3960 V 52 w(get)p 1285
 
18131
3960 V 54 w(p)s(eers)3350 4153 y FB([F)-8 b(unction])-3599
18128
18132
b Fh(const)54 b(gnutls_datum_t)i(*)d(gnutls_certificate_get)q(_pe)q
18129
 
(ers)565 3539 y Fg(\()p Ff(gn)m(utls)p 846 3539 28 4
18130
 
v 41 w(session)p 1156 3539 V 40 w(t)31 b Fe(session)12
 
18133
(ers)565 4262 y Fg(\()p Ff(gn)m(utls)p 846 4262 28 4
 
18134
v 41 w(session)p 1156 4262 V 40 w(t)31 b Fe(session)12
18131
18135
b Ff(,)32 b(unsigned)d(in)m(t)i(*)g Fe(list_size)12 b
18132
 
Fg(\))390 3648 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
18133
 
(session)390 3782 y Ff(list)p 517 3782 V 41 w(size)5
 
18136
Fg(\))390 4372 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
18137
(session)390 4504 y Ff(list)p 517 4504 V 41 w(size)5
18134
18138
b FB(:)41 b(is)31 b(the)f(length)h(of)g(the)f(certi\014cate)j(list)390
18135
 
3915 y(Get)26 b(the)f(p)s(eer's)f(ra)m(w)h(certi\014cate)i(\(c)m
 
18139
4637 y(Get)26 b(the)f(p)s(eer's)f(ra)m(w)h(certi\014cate)i(\(c)m
18136
18140
(hain\))f(as)f(sen)m(t)h(b)m(y)e(the)h(p)s(eer.)39 b(These)24
18137
 
b(certi\014cates)j(are)e(in)g(ra)m(w)390 4025 y(format)36
 
18141
b(certi\014cates)j(are)e(in)g(ra)m(w)390 4746 y(format)36
18138
18142
b(\(DER)g(enco)s(ded)f(for)h(X.509\).)58 b(In)35 b(case)i(of)f(a)g
18139
18143
(X.509)h(then)e(a)h(certi\014cate)i(list)e(ma)m(y)h(b)s(e)390
18140
 
4134 y(presen)m(t.)45 b(The)31 b(\014rst)g(certi\014cate)j(in)d(the)h
 
18144
4856 y(presen)m(t.)45 b(The)31 b(\014rst)g(certi\014cate)j(in)d(the)h
18141
18145
(list)h(is)f(the)g(p)s(eer's)f(certi\014cate,)j(follo)m(wing)f(the)f
18142
 
(issuer's)390 4244 y(certi\014cate,)h(then)d(the)g(issuer's)g(issuer)g
18143
 
(etc.)390 4377 y(In)g(case)h(of)g(Op)s(enPGP)e(k)m(eys)i(a)f(single)h
 
18146
(issuer's)390 4965 y(certi\014cate,)h(then)d(the)g(issuer's)g(issuer)g
 
18147
(etc.)390 5098 y(In)g(case)h(of)g(Op)s(enPGP)e(k)m(eys)i(a)f(single)h
18144
18148
(k)m(ey)h(will)e(b)s(e)g(returned)f(in)h(ra)m(w)h(format.)390
18145
 
4510 y Fn(Returns:)46 b FB(return)32 b(a)h(p)s(oin)m(ter)g(to)h(a)f
 
18149
5230 y Fn(Returns:)46 b FB(return)32 b(a)h(p)s(oin)m(ter)g(to)h(a)f
18146
18150
Ft(gnutls_datum_t)c FB(con)m(taining)35 b(our)d(certi\014cates,)k(or)d
18147
 
Ft(NULL)390 4620 y FB(in)d(case)h(of)g(an)f(error)g(or)h(if)f(no)g
18148
 
(certi\014cate)j(w)m(as)d(used.)150 4817 y Fv(gn)m(utls)p
18149
 
483 4817 37 5 v 55 w(certi\014cate)p 1068 4817 V 52 w(get)p
18150
 
1285 4817 V 54 w(x509)p 1587 4817 V 55 w(cas)3350 5011
 
18151
Ft(NULL)390 5340 y FB(in)d(case)h(of)g(an)f(error)g(or)h(if)f(no)g
 
18152
(certi\014cate)j(w)m(as)d(used.)p eop end
 
18153
%%Page: 123 129
 
18154
TeXDict begin 123 128 bop 150 -116 a FB(Chapter)30 b(9:)41
 
18155
b(F)-8 b(unction)31 b(Reference)2237 b(123)150 299 y
 
18156
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
 
18157
299 V 52 w(get)p 1285 299 V 54 w(x509)p 1587 299 V 55
 
18158
w(cas)3350 498 y FB([F)-8 b(unction])-3599 b Fh(void)54
 
18159
b(gnutls_certificate_get_x)q(509)q(_ca)q(s)565 607 y
 
18160
Fg(\()p Ff(gn)m(utls)p 846 607 28 4 v 41 w(certi\014cate)p
 
18161
1274 607 V 42 w(creden)m(tials)p 1737 607 V 41 w(t)31
 
18162
b Fe(sc)12 b Ff(,)31 b(gn)m(utls)p 2256 607 V 40 w(x509)p
 
18163
2479 607 V 42 w(crt)p 2632 607 V 40 w(t)g(**)g Fe(x509_ca_list)12
 
18164
b Ff(,)565 717 y(unsigned)29 b(in)m(t)i(*)g Fe(ncas)12
 
18165
b Fg(\))390 827 y Ff(sc)6 b FB(:)40 b(is)31 b(an)f Ft
 
18166
(gnutls_certificate_creden)o(tia)o(ls_t)24 b FB(structure.)390
 
18167
963 y Ff(x509)p 579 963 V 41 w(ca)p 705 963 V 41 w(list)r
 
18168
FB(:)42 b(will)30 b(p)s(oin)m(t)h(to)g(the)f(CA)g(list.)42
 
18169
b(Should)29 b(b)s(e)h(treated)h(as)g(constan)m(t)390
 
18170
1100 y Ff(ncas)t FB(:)41 b(the)30 b(n)m(um)m(b)s(er)f(of)i(CAs)390
 
18171
1237 y(This)f(function)g(will)g(exp)s(ort)g(all)i(the)e(CAs)g(asso)s
 
18172
(ciated)i(with)e(the)h(giv)m(en)g(creden)m(tials.)390
 
18173
1374 y Fn(Since:)41 b FB(2.4.0)150 1575 y Fv(gn)m(utls)p
 
18174
483 1575 37 5 v 55 w(certi\014cate)p 1068 1575 V 52 w(get)p
 
18175
1285 1575 V 54 w(x509)p 1587 1575 V 55 w(crls)3350 1774
18151
18176
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_certificate_get_x)q
18152
 
(509)q(_ca)q(s)565 5121 y Fg(\()p Ff(gn)m(utls)p 846
18153
 
5121 28 4 v 41 w(certi\014cate)p 1274 5121 V 42 w(creden)m(tials)p
18154
 
1737 5121 V 41 w(t)31 b Fe(sc)12 b Ff(,)31 b(gn)m(utls)p
18155
 
2256 5121 V 40 w(x509)p 2479 5121 V 42 w(crt)p 2632 5121
18156
 
V 40 w(t)g(**)g Fe(x509_ca_list)12 b Ff(,)565 5230 y(unsigned)29
18157
 
b(in)m(t)i(*)g Fe(ncas)12 b Fg(\))390 5340 y Ff(sc)6
 
18177
(509)q(_cr)q(ls)565 1884 y Fg(\()p Ff(gn)m(utls)p 846
 
18178
1884 28 4 v 41 w(certi\014cate)p 1274 1884 V 42 w(creden)m(tials)p
 
18179
1737 1884 V 41 w(t)31 b Fe(sc)12 b Ff(,)31 b(gn)m(utls)p
 
18180
2256 1884 V 40 w(x509)p 2479 1884 V 42 w(crl)p 2622 1884
 
18181
V 40 w(t)g(**)g Fe(x509_crl_list)12 b Ff(,)565 1993 y(unsigned)29
 
18182
b(in)m(t)i(*)g Fe(ncrls)12 b Fg(\))390 2103 y Ff(sc)6
18158
18183
b FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_creden)o(tia)o(ls_t)24
18159
 
b FB(structure.)p eop end
18160
 
%%Page: 123 129
18161
 
TeXDict begin 123 128 bop 150 -116 a FB(Chapter)30 b(9:)h(F)-8
18162
 
b(unction)31 b(Reference)2247 b(123)390 299 y Ff(x509)p
18163
 
579 299 28 4 v 41 w(ca)p 705 299 V 41 w(list)r FB(:)42
18164
 
b(will)30 b(p)s(oin)m(t)h(to)g(the)f(CA)g(list.)42 b(Should)29
18165
 
b(b)s(e)h(treated)h(as)g(constan)m(t)390 433 y Ff(ncas)t
18166
 
FB(:)41 b(the)30 b(n)m(um)m(b)s(er)f(of)i(CAs)390 566
18167
 
y(This)f(function)g(will)g(exp)s(ort)g(all)i(the)e(CAs)g(asso)s(ciated)
18168
 
i(with)e(the)h(giv)m(en)g(creden)m(tials.)390 700 y Fn(Since:)41
18169
 
b FB(2.4.0)150 898 y Fv(gn)m(utls)p 483 898 37 5 v 55
18170
 
w(certi\014cate)p 1068 898 V 52 w(get)p 1285 898 V 54
18171
 
w(x509)p 1587 898 V 55 w(crls)3350 1093 y FB([F)-8 b(unction])-3599
18172
 
b Fh(void)54 b(gnutls_certificate_get_x)q(509)q(_cr)q(ls)565
18173
 
1203 y Fg(\()p Ff(gn)m(utls)p 846 1203 28 4 v 41 w(certi\014cate)p
18174
 
1274 1203 V 42 w(creden)m(tials)p 1737 1203 V 41 w(t)31
18175
 
b Fe(sc)12 b Ff(,)31 b(gn)m(utls)p 2256 1203 V 40 w(x509)p
18176
 
2479 1203 V 42 w(crl)p 2622 1203 V 40 w(t)g(**)g Fe(x509_crl_list)12
18177
 
b Ff(,)565 1313 y(unsigned)29 b(in)m(t)i(*)g Fe(ncrls)12
18178
 
b Fg(\))390 1422 y Ff(sc)6 b FB(:)40 b(is)31 b(an)f Ft
18179
 
(gnutls_certificate_creden)o(tia)o(ls_t)24 b FB(structure.)390
18180
 
1556 y Ff(x509)p 579 1556 V 41 w(crl)p 721 1556 V 41
18181
 
w(list)r FB(:)41 b(the)31 b(exp)s(orted)f(CRL)f(list.)42
 
18184
b FB(structure.)390 2240 y Ff(x509)p 579 2240 V 41 w(crl)p
 
18185
721 2240 V 41 w(list)r FB(:)41 b(the)31 b(exp)s(orted)f(CRL)f(list.)42
18182
18186
b(Should)29 b(b)s(e)g(treated)j(as)e(constan)m(t)390
18183
 
1690 y Ff(ncrls)t FB(:)40 b(the)31 b(n)m(um)m(b)s(er)e(of)h(exp)s
18184
 
(orted)g(CRLs)390 1824 y(This)g(function)g(will)g(exp)s(ort)g(all)i
 
18187
2376 y Ff(ncrls)t FB(:)40 b(the)31 b(n)m(um)m(b)s(er)e(of)h(exp)s
 
18188
(orted)g(CRLs)390 2513 y(This)g(function)g(will)g(exp)s(ort)g(all)i
18185
18189
(the)e(CRLs)g(asso)s(ciated)i(with)e(the)g(giv)m(en)i(creden)m(tials.)
18186
 
390 1957 y Fn(Since:)41 b FB(2.4.0)150 2155 y Fv(gn)m(utls)p
18187
 
483 2155 37 5 v 55 w(certi\014cate)p 1068 2155 V 52 w(send)p
18188
 
1360 2155 V 55 w(x509)p 1663 2155 V 55 w(rdn)p 1904 2155
18189
 
V 54 w(sequence)3350 2350 y FB([F)-8 b(unction])-3599
 
18190
390 2650 y Fn(Since:)41 b FB(2.4.0)150 2851 y Fv(gn)m(utls)p
 
18191
483 2851 37 5 v 55 w(certi\014cate)p 1068 2851 V 52 w(send)p
 
18192
1360 2851 V 55 w(x509)p 1663 2851 V 55 w(rdn)p 1904 2851
 
18193
V 54 w(sequence)3350 3050 y FB([F)-8 b(unction])-3599
18190
18194
b Fh(void)54 b(gnutls_certificate_send_)q(x50)q(9_r)q(dn_)q(sequ)q(enc)
18191
 
q(e)565 2460 y Fg(\()p Ff(gn)m(utls)p 846 2460 28 4 v
18192
 
41 w(session)p 1156 2460 V 40 w(t)31 b Fe(session)12
18193
 
b Ff(,)32 b(in)m(t)f Fe(status)12 b Fg(\))390 2570 y
 
18195
q(e)565 3160 y Fg(\()p Ff(gn)m(utls)p 846 3160 28 4 v
 
18196
41 w(session)p 1156 3160 V 40 w(t)31 b Fe(session)12
 
18197
b Ff(,)32 b(in)m(t)f Fe(status)12 b Fg(\))390 3269 y
18194
18198
Ff(session)p FB(:)41 b(is)30 b(a)h(p)s(oin)m(ter)f(to)i(a)e
18195
 
Ft(gnutls_session_t)c FB(structure.)390 2703 y Ff(status)t
18196
 
FB(:)41 b(is)30 b(0)h(or)f(1)390 2837 y(If)k(status)h(is)f(non)g(zero,)
 
18199
Ft(gnutls_session_t)c FB(structure.)390 3406 y Ff(status)t
 
18200
FB(:)41 b(is)30 b(0)h(or)f(1)390 3543 y(If)k(status)h(is)f(non)g(zero,)
18197
18201
i(this)e(function)g(will)h(order)f(gn)m(utls)h(not)f(to)h(send)f(the)g
18198
 
(rdnSequence)f(in)390 2947 y(the)c(certi\014cate)j(request)d(message.)
 
18202
(rdnSequence)f(in)390 3653 y(the)c(certi\014cate)j(request)d(message.)
18199
18203
41 b(That)30 b(is)f(the)g(serv)m(er)h(will)f(not)h(adv)m(ertize)h(it's)
18200
 
f(trusted)e(CAs)390 3056 y(to)34 b(the)g(p)s(eer.)49
 
18204
f(trusted)e(CAs)390 3762 y(to)34 b(the)g(p)s(eer.)49
18201
18205
b(If)33 b(status)h(is)g(zero)g(then)f(the)h(default)f(b)s(eha)m(viour)h
18202
18206
(will)f(tak)m(e)i(e\013ect,)h(whic)m(h)e(is)f(to)390
18203
 
3166 y(adv)m(ertize)f(the)f(serv)m(er's)f(trusted)g(CAs.)390
18204
 
3300 y(This)45 b(function)g(has)g(no)g(e\013ect)i(in)e(clien)m(ts,)51
 
18207
3872 y(adv)m(ertize)f(the)f(serv)m(er's)f(trusted)g(CAs.)390
 
18208
4008 y(This)45 b(function)g(has)g(no)g(e\013ect)i(in)e(clien)m(ts,)51
18205
18209
b(and)44 b(in)h(authen)m(tication)j(metho)s(ds)d(other)g(than)390
18206
 
3409 y(certi\014cate)32 b(with)f(X.509)h(certi\014cates.)150
18207
 
3607 y Fv(gn)m(utls)p 483 3607 37 5 v 55 w(certi\014cate)p
18208
 
1068 3607 V 52 w(serv)m(er)p 1442 3607 V 54 w(set)p 1648
18209
 
3607 V 54 w(request)3350 3803 y FB([F)-8 b(unction])-3599
 
18210
4118 y(certi\014cate)32 b(with)f(X.509)h(certi\014cates.)150
 
18211
4320 y Fv(gn)m(utls)p 483 4320 37 5 v 55 w(certi\014cate)p
 
18212
1068 4320 V 52 w(serv)m(er)p 1442 4320 V 54 w(set)p 1648
 
18213
4320 V 54 w(request)3350 4519 y FB([F)-8 b(unction])-3599
18210
18214
b Fh(void)54 b(gnutls_certificate_serve)q(r_s)q(et_)q(req)q(uest)e
18211
 
Fg(\()p Ff(gn)m(utls)p 2673 3803 28 4 v 41 w(session)p
18212
 
2983 3803 V 40 w(t)565 3912 y Fe(session)12 b Ff(,)32
18213
 
b(gn)m(utls)p 1244 3912 V 41 w(certi\014cate)p 1672 3912
18214
 
V 42 w(request)p 2000 3912 V 40 w(t)f Fe(req)12 b Fg(\))390
18215
 
4022 y Ff(session)p FB(:)41 b(is)30 b(an)h Ft(gnutls_session_t)25
18216
 
b FB(structure.)390 4155 y Ff(req)r FB(:)41 b(is)30 b(one)h(of)f
18217
 
(GNUTLS)p 1330 4155 V 40 w(CER)-8 b(T)p 1623 4155 V 40
18218
 
w(REQUEST,)29 b(GNUTLS)p 2545 4155 V 40 w(CER)-8 b(T)p
18219
 
2838 4155 V 39 w(REQUIRE)390 4289 y(This)25 b(function)g(sp)s
 
18215
Fg(\()p Ff(gn)m(utls)p 2673 4519 28 4 v 41 w(session)p
 
18216
2983 4519 V 40 w(t)565 4628 y Fe(session)12 b Ff(,)32
 
18217
b(gn)m(utls)p 1244 4628 V 41 w(certi\014cate)p 1672 4628
 
18218
V 42 w(request)p 2000 4628 V 40 w(t)f Fe(req)12 b Fg(\))390
 
18219
4738 y Ff(session)p FB(:)41 b(is)30 b(an)h Ft(gnutls_session_t)25
 
18220
b FB(structure.)390 4874 y Ff(req)r FB(:)41 b(is)30 b(one)h(of)f
 
18221
(GNUTLS)p 1330 4874 V 40 w(CER)-8 b(T)p 1623 4874 V 40
 
18222
w(REQUEST,)29 b(GNUTLS)p 2545 4874 V 40 w(CER)-8 b(T)p
 
18223
2838 4874 V 39 w(REQUIRE)390 5011 y(This)25 b(function)g(sp)s
18220
18224
(eci\014es)g(if)g(w)m(e)h(\(in)g(case)g(of)g(a)f(serv)m(er\))h(are)g
18221
18225
(going)h(to)f(send)f(a)g(certi\014cate)j(request)390
18222
 
4399 y(message)44 b(to)g(the)f(clien)m(t.)81 b(If)42
18223
 
b Ft(req)h FB(is)g(GNUTLS)p 2145 4399 V 39 w(CER)-8 b(T)p
18224
 
2437 4399 V 40 w(REQUIRE)42 b(then)h(the)g(serv)m(er)h(will)390
18225
 
4508 y(return)d(an)h(error)f(if)h(the)g(p)s(eer)f(do)s(es)h(not)g(pro)m
 
18226
5121 y(message)44 b(to)g(the)f(clien)m(t.)81 b(If)42
 
18227
b Ft(req)h FB(is)g(GNUTLS)p 2145 5121 V 39 w(CER)-8 b(T)p
 
18228
2437 5121 V 40 w(REQUIRE)42 b(then)h(the)g(serv)m(er)h(will)390
 
18229
5230 y(return)d(an)h(error)f(if)h(the)g(p)s(eer)f(do)s(es)h(not)g(pro)m
18226
18230
(vide)g(a)h(certi\014cate.)77 b(If)42 b(y)m(ou)g(do)g(not)g(call)h
18227
 
(this)390 4618 y(function)30 b(then)g(the)h(clien)m(t)h(will)e(not)h(b)
18228
 
s(e)f(ask)m(ed)h(to)g(send)e(a)i(certi\014cate.)150 4816
18229
 
y Fv(gn)m(utls)p 483 4816 37 5 v 55 w(certi\014cate)p
18230
 
1068 4816 V 52 w(serv)m(er)p 1442 4816 V 54 w(set)p 1648
18231
 
4816 V 54 w(retriev)m(e)p 2114 4816 V 54 w(function)3350
18232
 
5011 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
18233
 
(gnutls_certificate_serve)q(r_s)q(et_)q(ret)q(riev)q(e_f)q(unc)q(tion)
18234
 
565 5121 y Fg(\()p Ff(gn)m(utls)p 846 5121 28 4 v 41
18235
 
w(certi\014cate)p 1274 5121 V 42 w(creden)m(tials)p 1737
18236
 
5121 V 41 w(t)31 b Fe(cred)12 b Ff(,)565 5230 y(gn)m(utls)p
18237
 
811 5230 V 41 w(certi\014cate)p 1239 5230 V 42 w(serv)m(er)p
18238
 
1514 5230 V 40 w(retriev)m(e)p 1851 5230 V 41 w(function)31
18239
 
b(*)f Fe(func)12 b Fg(\))390 5340 y Ff(cred)t FB(:)40
18240
 
b(is)31 b(a)f Ft(gnutls_certificate_creden)o(tial)o(s_t)24
18241
 
b FB(structure.)p eop end
 
18231
(this)390 5340 y(function)30 b(then)g(the)h(clien)m(t)h(will)e(not)h(b)
 
18232
s(e)f(ask)m(ed)h(to)g(send)e(a)i(certi\014cate.)p eop
 
18233
end
18242
18234
%%Page: 124 130
18243
18235
TeXDict begin 124 129 bop 150 -116 a FB(Chapter)30 b(9:)41
18244
 
b(F)-8 b(unction)31 b(Reference)2237 b(124)390 299 y
18245
 
Ff(func)6 b FB(:)39 b(is)31 b(the)f(callbac)m(k)j(function)390
18246
 
435 y(This)58 b(function)h(sets)g(a)h(callbac)m(k)h(to)f(b)s(e)e
18247
 
(called)i(in)f(order)f(to)i(retriev)m(e)h(the)e(certi\014cate)390
18248
 
545 y(to)72 b(b)s(e)e(used)h(in)f(the)i(handshak)m(e.)162
18249
 
b(The)71 b(callbac)m(k's)i(function)e(protot)m(yp)s(e)g(is:)122
18250
 
b(in)m(t)390 654 y(\(*callbac)m(k\)\(gn)m(utls)p 1102
18251
 
654 28 4 v 44 w(session)p 1415 654 V 40 w(t,)31 b(gn)m(utls)p
18252
 
1786 654 V 41 w(retr)p 1974 654 V 40 w(st*)g(st\);)390
18253
 
790 y Ft(st)f FB(should)f(con)m(tain)j(the)e(certi\014cates)j(and)c
18254
 
(priv)-5 b(ate)31 b(k)m(eys.)390 927 y(If)36 b(the)h(callbac)m(k)i
 
18236
b(F)-8 b(unction)31 b(Reference)2237 b(124)150 299 y
 
18237
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
 
18238
299 V 52 w(serv)m(er)p 1442 299 V 54 w(set)p 1648 299
 
18239
V 54 w(retriev)m(e)p 2114 299 V 54 w(function)3350 493
 
18240
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_certificate_serve)q
 
18241
(r_s)q(et_)q(ret)q(riev)q(e_f)q(unc)q(tion)565 603 y
 
18242
Fg(\()p Ff(gn)m(utls)p 846 603 28 4 v 41 w(certi\014cate)p
 
18243
1274 603 V 42 w(creden)m(tials)p 1737 603 V 41 w(t)31
 
18244
b Fe(cred)12 b Ff(,)565 712 y(gn)m(utls)p 811 712 V 41
 
18245
w(certi\014cate)p 1239 712 V 42 w(serv)m(er)p 1514 712
 
18246
V 40 w(retriev)m(e)p 1851 712 V 41 w(function)31 b(*)f
 
18247
Fe(func)12 b Fg(\))390 822 y Ff(cred)t FB(:)40 b(is)31
 
18248
b(a)f Ft(gnutls_certificate_creden)o(tial)o(s_t)24 b
 
18249
FB(structure.)390 955 y Ff(func)6 b FB(:)39 b(is)31 b(the)f(callbac)m
 
18250
(k)j(function)390 1088 y(This)58 b(function)h(sets)g(a)h(callbac)m(k)h
 
18251
(to)f(b)s(e)e(called)i(in)f(order)f(to)i(retriev)m(e)h(the)e
 
18252
(certi\014cate)390 1198 y(to)72 b(b)s(e)e(used)h(in)f(the)i(handshak)m
 
18253
(e.)162 b(The)71 b(callbac)m(k's)i(function)e(protot)m(yp)s(e)g(is:)122
 
18254
b(in)m(t)390 1307 y(\(*callbac)m(k\)\(gn)m(utls)p 1102
 
18255
1307 V 44 w(session)p 1415 1307 V 40 w(t,)31 b(gn)m(utls)p
 
18256
1786 1307 V 41 w(retr)p 1974 1307 V 40 w(st*)g(st\);)390
 
18257
1441 y Ft(st)f FB(should)f(con)m(tain)j(the)e(certi\014cates)j(and)c
 
18258
(priv)-5 b(ate)31 b(k)m(eys.)390 1574 y(If)36 b(the)h(callbac)m(k)i
18255
18259
(function)e(is)f(pro)m(vided)h(then)f(gn)m(utls)h(will)h(call)g(it,)h
18256
 
(in)d(the)h(handshak)m(e,)h(after)390 1036 y(the)31 b(certi\014cate)h
 
18260
(in)d(the)h(handshak)m(e,)h(after)390 1683 y(the)31 b(certi\014cate)h
18257
18261
(request)e(message)i(has)e(b)s(een)g(receiv)m(ed.)390
18258
 
1172 y(The)23 b(callbac)m(k)j(function)d(should)f(set)i(the)g
 
18262
1817 y(The)23 b(callbac)m(k)j(function)d(should)f(set)i(the)g
18259
18263
(certi\014cate)i(list)e(to)g(b)s(e)f(sen)m(t,)j(and)d(return)f(0)i(on)f
18260
 
(success.)390 1282 y(The)30 b(v)-5 b(alue)31 b(\(-1\))g(indicates)h
 
18264
(success.)390 1926 y(The)30 b(v)-5 b(alue)31 b(\(-1\))g(indicates)h
18261
18265
(error)e(and)g(the)g(handshak)m(e)g(will)h(b)s(e)e(terminated.)150
18262
 
1483 y Fv(gn)m(utls)p 483 1483 37 5 v 55 w(certi\014cate)p
18263
 
1068 1483 V 52 w(set)p 1272 1483 V 54 w(dh)p 1462 1483
18264
 
V 55 w(params)3350 1681 y FB([F)-8 b(unction])-3599 b
 
18266
2123 y Fv(gn)m(utls)p 483 2123 37 5 v 55 w(certi\014cate)p
 
18267
1068 2123 V 52 w(set)p 1272 2123 V 54 w(dh)p 1462 2123
 
18268
V 55 w(params)3350 2317 y FB([F)-8 b(unction])-3599 b
18265
18269
Fh(void)54 b(gnutls_certificate_set_d)q(h_p)q(ara)q(ms)565
18266
 
1791 y Fg(\()p Ff(gn)m(utls)p 846 1791 28 4 v 41 w(certi\014cate)p
18267
 
1274 1791 V 42 w(creden)m(tials)p 1737 1791 V 41 w(t)31
18268
 
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2308 1791 V 41 w(dh)p
18269
 
2451 1791 V 39 w(params)p 2779 1791 V 39 w(t)g Fe(dh_params)12
18270
 
b Fg(\))390 1900 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
18271
 
984 1900 V 41 w(certi\014cate)p 1412 1900 V 42 w(creden)m(tials)p
18272
 
1875 1900 V 41 w(t)h(structure)390 2037 y Ff(dh)p 498
18273
 
2037 V 39 w(params)t FB(:)40 b(is)30 b(a)h(structure)f(that)h(holds)f
18274
 
(di\016e)g(hellman)h(parameters.)390 2173 y(This)39 b(function)h(will)h
 
18270
2426 y Fg(\()p Ff(gn)m(utls)p 846 2426 28 4 v 41 w(certi\014cate)p
 
18271
1274 2426 V 42 w(creden)m(tials)p 1737 2426 V 41 w(t)31
 
18272
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2308 2426 V 41 w(dh)p
 
18273
2451 2426 V 39 w(params)p 2779 2426 V 39 w(t)g Fe(dh_params)12
 
18274
b Fg(\))390 2536 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
 
18275
984 2536 V 41 w(certi\014cate)p 1412 2536 V 42 w(creden)m(tials)p
 
18276
1875 2536 V 41 w(t)h(structure)390 2669 y Ff(dh)p 498
 
18277
2669 V 39 w(params)t FB(:)40 b(is)30 b(a)h(structure)f(that)h(holds)f
 
18278
(di\016e)g(hellman)h(parameters.)390 2802 y(This)39 b(function)h(will)h
18275
18279
(set)g(the)f(di\016e)g(hellman)h(parameters)f(for)g(a)h(certi\014cate)h
18276
 
(serv)m(er)f(to)g(use.)390 2282 y(These)31 b(parameters)g(will)h(b)s(e)
 
18280
(serv)m(er)f(to)g(use.)390 2912 y(These)31 b(parameters)g(will)h(b)s(e)
18277
18281
e(used)h(in)f(Ephemeral)h(Di\016e)h(Hellman)g(cipher)f(suites.)43
18278
 
b(Note)32 b(that)390 2392 y(only)i(a)g(p)s(oin)m(ter)f(to)i(the)e
 
18282
b(Note)32 b(that)390 3022 y(only)i(a)g(p)s(oin)m(ter)f(to)i(the)e
18279
18283
(parameters)h(are)g(stored)g(in)f(the)h(certi\014cate)i(handle,)e(so)g
18280
 
(if)f(y)m(ou)h(deal-)390 2501 y(lo)s(cate)i(the)e(parameters)g(b)s
 
18284
(if)f(y)m(ou)h(deal-)390 3131 y(lo)s(cate)i(the)e(parameters)g(b)s
18281
18285
(efore)g(the)g(certi\014cate)i(is)e(deallo)s(cated,)j(y)m(ou)e(m)m(ust)
18282
 
e(c)m(hange)j(the)e(pa-)390 2611 y(rameters)d(stored)f(in)g(the)h
18283
 
(certi\014cate)h(\014rst.)150 2812 y Fv(gn)m(utls)p 483
18284
 
2812 37 5 v 55 w(certi\014cate)p 1068 2812 V 52 w(set)p
18285
 
1272 2812 V 54 w(params)p 1714 2812 V 55 w(function)3350
18286
 
3010 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
18286
e(c)m(hange)j(the)e(pa-)390 3241 y(rameters)d(stored)f(in)g(the)h
 
18287
(certi\014cate)h(\014rst.)150 3437 y Fv(gn)m(utls)p 483
 
18288
3437 37 5 v 55 w(certi\014cate)p 1068 3437 V 52 w(set)p
 
18289
1272 3437 V 54 w(params)p 1714 3437 V 55 w(function)3350
 
18290
3632 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
18287
18291
(gnutls_certificate_set_p)q(ara)q(ms_)q(fun)q(ctio)q(n)565
18288
 
3120 y Fg(\()p Ff(gn)m(utls)p 846 3120 28 4 v 41 w(certi\014cate)p
18289
 
1274 3120 V 42 w(creden)m(tials)p 1737 3120 V 41 w(t)31
18290
 
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2308 3120 V 41 w(params)p
18291
 
2638 3120 V 39 w(function)f(*)h Fe(func)12 b Fg(\))390
18292
 
3230 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984
18293
 
3230 V 41 w(certi\014cate)p 1412 3230 V 42 w(creden)m(tials)p
18294
 
1875 3230 V 41 w(t)h(structure)390 3366 y Ff(func)6 b
 
18292
3741 y Fg(\()p Ff(gn)m(utls)p 846 3741 28 4 v 41 w(certi\014cate)p
 
18293
1274 3741 V 42 w(creden)m(tials)p 1737 3741 V 41 w(t)31
 
18294
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2308 3741 V 41 w(params)p
 
18295
2638 3741 V 39 w(function)f(*)h Fe(func)12 b Fg(\))390
 
18296
3851 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984
 
18297
3851 V 41 w(certi\014cate)p 1412 3851 V 42 w(creden)m(tials)p
 
18298
1875 3851 V 41 w(t)h(structure)390 3984 y Ff(func)6 b
18295
18299
FB(:)39 b(is)31 b(the)f(function)g(to)i(b)s(e)d(called)390
18296
 
3502 y(This)35 b(function)h(will)g(set)h(a)f(callbac)m(k)i(in)e(order)f
 
18300
4117 y(This)35 b(function)h(will)g(set)h(a)f(callbac)m(k)i(in)e(order)f
18297
18301
(for)h(the)g(serv)m(er)g(to)h(get)g(the)f(di\016e)g(hellman)g(or)390
18298
 
3611 y(RSA)h(parameters)h(for)f(certi\014cate)j(authen)m(tication.)64
 
18302
4227 y(RSA)h(parameters)h(for)f(certi\014cate)j(authen)m(tication.)64
18299
18303
b(The)37 b(callbac)m(k)j(should)c(return)h(zero)h(on)390
18300
 
3721 y(success.)150 3922 y Fv(gn)m(utls)p 483 3922 37
18301
 
5 v 55 w(certi\014cate)p 1068 3922 V 52 w(set)p 1272
18302
 
3922 V 54 w(rsa)p 1484 3922 V 54 w(exp)s(ort)p 1889 3922
18303
 
V 55 w(params)3350 4120 y FB([F)-8 b(unction])-3599 b
 
18304
4336 y(success.)150 4533 y Fv(gn)m(utls)p 483 4533 37
 
18305
5 v 55 w(certi\014cate)p 1068 4533 V 52 w(set)p 1272
 
18306
4533 V 54 w(rsa)p 1484 4533 V 54 w(exp)s(ort)p 1889 4533
 
18307
V 55 w(params)3350 4727 y FB([F)-8 b(unction])-3599 b
18304
18308
Fh(void)54 b(gnutls_certificate_set_r)q(sa_)q(exp)q(ort)q(_par)q(ams)
18305
 
565 4230 y Fg(\()p Ff(gn)m(utls)p 846 4230 28 4 v 41
18306
 
w(certi\014cate)p 1274 4230 V 42 w(creden)m(tials)p 1737
18307
 
4230 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
18308
 
2308 4230 V 41 w(rsa)p 2466 4230 V 39 w(params)p 2794
18309
 
4230 V 40 w(t)g Fe(rsa_params)12 b Fg(\))390 4340 y Ff(res)t
18310
 
FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984 4340 V 41 w(certi\014cate)p
18311
 
1412 4340 V 42 w(creden)m(tials)p 1875 4340 V 41 w(t)h(structure)390
18312
 
4476 y Ff(rsa)p 513 4476 V 40 w(params)t FB(:)40 b(is)30
 
18309
565 4837 y Fg(\()p Ff(gn)m(utls)p 846 4837 28 4 v 41
 
18310
w(certi\014cate)p 1274 4837 V 42 w(creden)m(tials)p 1737
 
18311
4837 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
 
18312
2308 4837 V 41 w(rsa)p 2466 4837 V 39 w(params)p 2794
 
18313
4837 V 40 w(t)g Fe(rsa_params)12 b Fg(\))390 4946 y Ff(res)t
 
18314
FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984 4946 V 41 w(certi\014cate)p
 
18315
1412 4946 V 42 w(creden)m(tials)p 1875 4946 V 41 w(t)h(structure)390
 
18316
5080 y Ff(rsa)p 513 5080 V 40 w(params)t FB(:)40 b(is)30
18313
18317
b(a)h(structure)f(that)h(holds)f(temp)s(orary)g(RSA)g(parameters.)390
18314
 
4612 y(This)i(function)h(will)g(set)h(the)f(temp)s(orary)f(RSA)h
 
18318
5213 y(This)i(function)h(will)g(set)h(the)f(temp)s(orary)f(RSA)h
18315
18319
(parameters)g(for)g(a)g(certi\014cate)i(serv)m(er)e(to)h(use.)390
18316
 
4721 y(These)c(parameters)h(will)g(b)s(e)e(used)h(in)g(RSA-EXPOR)-8
18317
 
b(T)30 b(cipher)g(suites.)150 4922 y Fv(gn)m(utls)p 483
18318
 
4922 37 5 v 55 w(certi\014cate)p 1068 4922 V 52 w(set)p
18319
 
1272 4922 V 54 w(v)m(erify)p 1630 4922 V 54 w(\015ags)3350
18320
 
5121 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
18321
 
(gnutls_certificate_set_v)q(eri)q(fy_)q(fla)q(gs)565
18322
 
5230 y Fg(\()p Ff(gn)m(utls)p 846 5230 28 4 v 41 w(certi\014cate)p
18323
 
1274 5230 V 42 w(creden)m(tials)p 1737 5230 V 41 w(t)31
18324
 
b Fe(res)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(flags)12
18325
 
b Fg(\))390 5340 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
18326
 
984 5340 V 41 w(certi\014cate)p 1412 5340 V 42 w(creden)m(tials)p
18327
 
1875 5340 V 41 w(t)h(structure)p eop end
 
18320
5322 y(These)c(parameters)h(will)g(b)s(e)e(used)h(in)g(RSA-EXPOR)-8
 
18321
b(T)30 b(cipher)g(suites.)p eop end
18328
18322
%%Page: 125 131
18329
18323
TeXDict begin 125 130 bop 150 -116 a FB(Chapter)30 b(9:)41
18330
 
b(F)-8 b(unction)31 b(Reference)2237 b(125)390 299 y
18331
 
Ff(\015ags)t FB(:)41 b(are)30 b(the)h(\015ags)390 447
18332
 
y(This)38 b(function)g(will)h(set)h(the)e(\015ags)h(to)h(b)s(e)e(used)g
18333
 
(at)h(v)m(eri\014cation)h(of)f(the)g(certi\014cates.)68
18334
 
b(Flags)390 557 y(m)m(ust)30 b(b)s(e)g(OR)g(of)g(the)h
18335
 
Ft(gnutls_certificate_verif)o(y_fl)o(ags)24 b FB(en)m(umerations.)150
18336
 
770 y Fv(gn)m(utls)p 483 770 37 5 v 55 w(certi\014cate)p
18337
 
1068 770 V 52 w(set)p 1272 770 V 54 w(v)m(erify)p 1630
18338
 
770 V 54 w(limits)3350 980 y FB([F)-8 b(unction])-3599
18339
 
b Fh(void)54 b(gnutls_certificate_set_v)q(eri)q(fy_)q(lim)q(its)565
18340
 
1090 y Fg(\()p Ff(gn)m(utls)p 846 1090 28 4 v 41 w(certi\014cate)p
18341
 
1274 1090 V 42 w(creden)m(tials)p 1737 1090 V 41 w(t)31
 
18324
b(F)-8 b(unction)31 b(Reference)2237 b(125)150 299 y
 
18325
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
 
18326
299 V 52 w(set)p 1272 299 V 54 w(v)m(erify)p 1630 299
 
18327
V 54 w(\015ags)3350 499 y FB([F)-8 b(unction])-3599 b
 
18328
Fh(void)54 b(gnutls_certificate_set_v)q(eri)q(fy_)q(fla)q(gs)565
 
18329
609 y Fg(\()p Ff(gn)m(utls)p 846 609 28 4 v 41 w(certi\014cate)p
 
18330
1274 609 V 42 w(creden)m(tials)p 1737 609 V 41 w(t)31
 
18331
b Fe(res)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(flags)12
 
18332
b Fg(\))390 718 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
 
18333
984 718 V 41 w(certi\014cate)p 1412 718 V 42 w(creden)m(tials)p
 
18334
1875 718 V 41 w(t)h(structure)390 857 y Ff(\015ags)t
 
18335
FB(:)41 b(are)30 b(the)h(\015ags)390 995 y(This)38 b(function)g(will)h
 
18336
(set)h(the)e(\015ags)h(to)h(b)s(e)e(used)g(at)h(v)m(eri\014cation)h(of)
 
18337
f(the)g(certi\014cates.)68 b(Flags)390 1104 y(m)m(ust)30
 
18338
b(b)s(e)g(OR)g(of)g(the)h Ft(gnutls_certificate_verif)o(y_fl)o(ags)24
 
18339
b FB(en)m(umerations.)150 1307 y Fv(gn)m(utls)p 483 1307
 
18340
37 5 v 55 w(certi\014cate)p 1068 1307 V 52 w(set)p 1272
 
18341
1307 V 54 w(v)m(erify)p 1630 1307 V 54 w(limits)3350
 
18342
1508 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
18343
(gnutls_certificate_set_v)q(eri)q(fy_)q(lim)q(its)565
 
18344
1617 y Fg(\()p Ff(gn)m(utls)p 846 1617 28 4 v 41 w(certi\014cate)p
 
18345
1274 1617 V 42 w(creden)m(tials)p 1737 1617 V 41 w(t)31
18342
18346
b Fe(res)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(max_bits)12
18343
 
b Ff(,)33 b(unsigned)c(in)m(t)565 1200 y Fe(max_depth)12
18344
 
b Fg(\))390 1309 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
18345
 
984 1309 V 41 w(certi\014cate)p 1412 1309 V 42 w(creden)m(tials)i
18346
 
(structure)390 1458 y Ff(max)p 565 1458 V 40 w(bits)t
 
18347
b Ff(,)33 b(unsigned)c(in)m(t)565 1727 y Fe(max_depth)12
 
18348
b Fg(\))390 1837 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
 
18349
984 1837 V 41 w(certi\014cate)p 1412 1837 V 42 w(creden)m(tials)i
 
18350
(structure)390 1975 y Ff(max)p 565 1975 V 40 w(bits)t
18347
18351
FB(:)41 b(is)30 b(the)h(n)m(um)m(b)s(er)e(of)h(bits)g(of)h(an)f
18348
18352
(acceptable)j(certi\014cate)f(\(default)f(8200\))390
18349
 
1606 y Ff(max)p 565 1606 V 40 w(depth)p FB(:)40 b(is)31
 
18353
2113 y Ff(max)p 565 2113 V 40 w(depth)p FB(:)40 b(is)31
18350
18354
b(maxim)m(um)f(depth)f(of)i(the)f(v)m(eri\014cation)i(of)f(a)g
18351
 
(certi\014cate)h(c)m(hain)f(\(default)g(5\))390 1754
 
18355
(certi\014cate)h(c)m(hain)f(\(default)g(5\))390 2251
18352
18356
y(This)26 b(function)g(will)h(set)g(some)g(upp)s(er)d(limits)k(for)e
18353
18357
(the)h(default)g(v)m(eri\014cation)h(function,)f Ft(gnutls_)390
18354
 
1864 y(certificate_verify_peers)o(2\(\))p FB(,)20 b(to)26
 
18358
2361 y(certificate_verify_peers)o(2\(\))p FB(,)20 b(to)26
18355
18359
b(a)m(v)m(oid)g(denial)f(of)h(service)f(attac)m(ks.)42
18356
 
b(Y)-8 b(ou)25 b(can)g(set)h(them)390 1973 y(to)31 b(zero)g(to)g
18357
 
(disable)g(limits.)150 2186 y Fv(gn)m(utls)p 483 2186
18358
 
37 5 v 55 w(certi\014cate)p 1068 2186 V 52 w(set)p 1272
18359
 
2186 V 54 w(x509)p 1574 2186 V 55 w(crl)p 1768 2186 V
18360
 
54 w(\014le)3350 2397 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
18360
b(Y)-8 b(ou)25 b(can)g(set)h(them)390 2470 y(to)31 b(zero)g(to)g
 
18361
(disable)g(limits.)150 2673 y Fv(gn)m(utls)p 483 2673
 
18362
37 5 v 55 w(certi\014cate)p 1068 2673 V 52 w(set)p 1272
 
18363
2673 V 54 w(x509)p 1574 2673 V 55 w(crl)p 1768 2673 V
 
18364
54 w(\014le)3350 2874 y FB([F)-8 b(unction])-3599 b Fh(int)53
18361
18365
b(gnutls_certificate_se)q(t_x5)q(09_)q(crl)q(_fi)q(le)565
18362
 
2507 y Fg(\()p Ff(gn)m(utls)p 846 2507 28 4 v 41 w(certi\014cate)p
18363
 
1274 2507 V 42 w(creden)m(tials)p 1737 2507 V 41 w(t)31
 
18366
2983 y Fg(\()p Ff(gn)m(utls)p 846 2983 28 4 v 41 w(certi\014cate)p
 
18367
1274 2983 V 42 w(creden)m(tials)p 1737 2983 V 41 w(t)31
18364
18368
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(crlfile)12
18365
 
b Ff(,)565 2616 y(gn)m(utls)p 811 2616 V 41 w(x509)p
18366
 
1035 2616 V 41 w(crt)p 1187 2616 V 40 w(fm)m(t)p 1363
18367
 
2616 V 41 w(t)30 b Fe(type)12 b Fg(\))390 2726 y Ff(res)t
 
18369
b Ff(,)565 3093 y(gn)m(utls)p 811 3093 V 41 w(x509)p
 
18370
1035 3093 V 41 w(crt)p 1187 3093 V 40 w(fm)m(t)p 1363
 
18371
3093 V 41 w(t)30 b Fe(type)12 b Fg(\))390 3202 y Ff(res)t
18368
18372
FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18369
 
b FB(structure.)390 2874 y Ff(crl\014le)5 b FB(:)41 b(is)31
 
18373
b FB(structure.)390 3340 y Ff(crl\014le)5 b FB(:)41 b(is)31
18370
18374
b(a)f(\014le)h(con)m(taining)h(the)e(list)h(of)g(v)m(eri\014ed)f(CRLs)g
18371
 
(\(DER)h(or)f(PEM)g(list\))390 3022 y Ff(t)m(yp)s(e)5
18372
 
b FB(:)41 b(is)30 b(PEM)h(or)f(DER)390 3171 y(This)36
 
18375
(\(DER)h(or)f(PEM)g(list\))390 3479 y Ff(t)m(yp)s(e)5
 
18376
b FB(:)41 b(is)30 b(PEM)h(or)f(DER)390 3617 y(This)36
18373
18377
b(function)g(adds)g(the)g(trusted)g(CRLs)g(in)g(order)g(to)h(v)m(erify)
18374
 
g(clien)m(t)h(or)f(serv)m(er)g(certi\014cates.)390 3280
 
18378
g(clien)m(t)h(or)f(serv)m(er)g(certi\014cates.)390 3726
18375
18379
y(In)c(case)h(of)g(a)g(clien)m(t)h(this)f(is)f(not)h(required)f(to)h(b)
18376
18380
s(e)f(called)h(if)g(the)g(certi\014cates)h(are)f(not)g(v)m(eri\014ed)
18377
 
390 3390 y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))
 
18381
390 3836 y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))
18378
18382
o FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e(called)i(m)m(ultiple)
18379
 
390 3500 y(times.)390 3648 y Fn(Returns:)40 b FB(n)m(um)m(b)s(er)29
 
18383
390 3946 y(times.)390 4084 y Fn(Returns:)40 b FB(n)m(um)m(b)s(er)29
18380
18384
b(of)i(CRLs)f(pro)s(cessed)f(or)i(a)f(negativ)m(e)j(v)-5
18381
 
b(alue)31 b(on)f(error.)150 3861 y Fv(gn)m(utls)p 483
18382
 
3861 37 5 v 55 w(certi\014cate)p 1068 3861 V 52 w(set)p
18383
 
1272 3861 V 54 w(x509)p 1574 3861 V 55 w(crl)p 1768 3861
18384
 
V 54 w(mem)3350 4071 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
18385
b(alue)31 b(on)f(error.)150 4287 y Fv(gn)m(utls)p 483
 
18386
4287 37 5 v 55 w(certi\014cate)p 1068 4287 V 52 w(set)p
 
18387
1272 4287 V 54 w(x509)p 1574 4287 V 55 w(crl)p 1768 4287
 
18388
V 54 w(mem)3350 4487 y FB([F)-8 b(unction])-3599 b Fh(int)53
18385
18389
b(gnutls_certificate_se)q(t_x5)q(09_)q(crl)q(_me)q(m)565
18386
 
4181 y Fg(\()p Ff(gn)m(utls)p 846 4181 28 4 v 41 w(certi\014cate)p
18387
 
1274 4181 V 42 w(creden)m(tials)p 1737 4181 V 41 w(t)31
18388
 
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 4181
18389
 
V 40 w(datum)p 2844 4181 V 40 w(t)g(*)f Fe(CRL)12 b Ff(,)565
18390
 
4291 y(gn)m(utls)p 811 4291 V 41 w(x509)p 1035 4291 V
18391
 
41 w(crt)p 1187 4291 V 40 w(fm)m(t)p 1363 4291 V 41 w(t)30
18392
 
b Fe(type)12 b Fg(\))390 4400 y Ff(res)t FB(:)40 b(is)31
 
18390
4597 y Fg(\()p Ff(gn)m(utls)p 846 4597 28 4 v 41 w(certi\014cate)p
 
18391
1274 4597 V 42 w(creden)m(tials)p 1737 4597 V 41 w(t)31
 
18392
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 4597
 
18393
V 40 w(datum)p 2844 4597 V 40 w(t)g(*)f Fe(CRL)12 b Ff(,)565
 
18394
4706 y(gn)m(utls)p 811 4706 V 41 w(x509)p 1035 4706 V
 
18395
41 w(crt)p 1187 4706 V 40 w(fm)m(t)p 1363 4706 V 41 w(t)30
 
18396
b Fe(type)12 b Fg(\))390 4816 y Ff(res)t FB(:)40 b(is)31
18393
18397
b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18394
 
b FB(structure.)390 4549 y Ff(CRL)p FB(:)30 b(is)g(a)h(list)g(of)g
 
18398
b FB(structure.)390 4954 y Ff(CRL)p FB(:)30 b(is)g(a)h(list)g(of)g
18395
18399
(trusted)f(CRLs.)39 b(They)30 b(should)g(ha)m(v)m(e)h(b)s(een)f(v)m
18396
 
(eri\014ed)g(b)s(efore.)390 4697 y Ff(t)m(yp)s(e)5 b
18397
 
FB(:)41 b(is)30 b(DER)h(or)f(PEM)390 4845 y(This)36 b(function)g(adds)g
 
18400
(eri\014ed)g(b)s(efore.)390 5092 y Ff(t)m(yp)s(e)5 b
 
18401
FB(:)41 b(is)30 b(DER)h(or)f(PEM)390 5230 y(This)36 b(function)g(adds)g
18398
18402
(the)g(trusted)g(CRLs)g(in)g(order)g(to)h(v)m(erify)g(clien)m(t)h(or)f
18399
 
(serv)m(er)g(certi\014cates.)390 4955 y(In)c(case)h(of)g(a)g(clien)m(t)
 
18403
(serv)m(er)g(certi\014cates.)390 5340 y(In)c(case)h(of)g(a)g(clien)m(t)
18400
18404
h(this)f(is)f(not)h(required)f(to)h(b)s(e)f(called)h(if)g(the)g
18401
 
(certi\014cates)h(are)f(not)g(v)m(eri\014ed)390 5064
18402
 
y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))o
18403
 
FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e(called)i(m)m(ultiple)
18404
 
390 5174 y(times.)390 5322 y Fn(Returns:)40 b FB(n)m(um)m(b)s(er)29
18405
 
b(of)i(CRLs)f(pro)s(cessed,)g(or)g(a)h(negativ)m(e)h(v)-5
18406
 
b(alue)31 b(on)f(error.)p eop end
 
18405
(certi\014cates)h(are)f(not)g(v)m(eri\014ed)p eop end
18407
18406
%%Page: 126 132
18408
18407
TeXDict begin 126 131 bop 150 -116 a FB(Chapter)30 b(9:)41
18409
 
b(F)-8 b(unction)31 b(Reference)2237 b(126)150 299 y
18410
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
18411
 
299 V 52 w(set)p 1272 299 V 54 w(x509)p 1574 299 V 55
18412
 
w(crl)3350 499 y FB([F)-8 b(unction])-3599 b Fh(int)53
18413
 
b(gnutls_certificate_se)q(t_x5)q(09_)q(crl)565 608 y
18414
 
Fg(\()p Ff(gn)m(utls)p 846 608 28 4 v 41 w(certi\014cate)p
18415
 
1274 608 V 42 w(creden)m(tials)p 1737 608 V 41 w(t)31
18416
 
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2308 608 V 41 w(x509)p
18417
 
2532 608 V 41 w(crl)p 2674 608 V 40 w(t)g(*)g Fe(crl_list)12
18418
 
b Ff(,)32 b(in)m(t)565 718 y Fe(crl_list_size)12 b Fg(\))390
18419
 
828 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o
18420
 
(ntia)o(ls_)o(t)25 b FB(structure.)390 965 y Ff(crl)p
18421
 
497 965 V 40 w(list)r FB(:)42 b(is)30 b(a)h(list)g(of)f(trusted)g
18422
 
(CRLs.)40 b(They)30 b(should)f(ha)m(v)m(e)j(b)s(een)e(v)m(eri\014ed)g
18423
 
(b)s(efore.)390 1103 y Ff(crl)p 497 1103 V 40 w(list)p
18424
 
658 1103 V 41 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
18425
 
(crl)p 1839 1103 V 41 w(list)390 1240 y(This)36 b(function)g(adds)g
18426
 
(the)g(trusted)g(CRLs)g(in)g(order)g(to)h(v)m(erify)g(clien)m(t)h(or)f
18427
 
(serv)m(er)g(certi\014cates.)390 1350 y(In)c(case)h(of)g(a)g(clien)m(t)
18428
 
h(this)f(is)f(not)h(required)f(to)h(b)s(e)f(called)h(if)g(the)g
18429
 
(certi\014cates)h(are)f(not)g(v)m(eri\014ed)390 1460
 
18408
b(F)-8 b(unction)31 b(Reference)2237 b(126)390 299 y(using)25
 
18409
b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))o
 
18410
FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e(called)i(m)m(ultiple)
 
18411
390 408 y(times.)390 542 y Fn(Returns:)40 b FB(n)m(um)m(b)s(er)29
 
18412
b(of)i(CRLs)f(pro)s(cessed,)g(or)g(a)h(negativ)m(e)h(v)-5
 
18413
b(alue)31 b(on)f(error.)150 739 y Fv(gn)m(utls)p 483
 
18414
739 37 5 v 55 w(certi\014cate)p 1068 739 V 52 w(set)p
 
18415
1272 739 V 54 w(x509)p 1574 739 V 55 w(crl)3350 934 y
 
18416
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q(t_x5)q
 
18417
(09_)q(crl)565 1043 y Fg(\()p Ff(gn)m(utls)p 846 1043
 
18418
28 4 v 41 w(certi\014cate)p 1274 1043 V 42 w(creden)m(tials)p
 
18419
1737 1043 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
 
18420
2308 1043 V 41 w(x509)p 2532 1043 V 41 w(crl)p 2674 1043
 
18421
V 40 w(t)g(*)g Fe(crl_list)12 b Ff(,)32 b(in)m(t)565
 
18422
1153 y Fe(crl_list_size)12 b Fg(\))390 1263 y Ff(res)t
 
18423
FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
 
18424
b FB(structure.)390 1396 y Ff(crl)p 497 1396 V 40 w(list)r
 
18425
FB(:)42 b(is)30 b(a)h(list)g(of)f(trusted)g(CRLs.)40
 
18426
b(They)30 b(should)f(ha)m(v)m(e)j(b)s(een)e(v)m(eri\014ed)g(b)s(efore.)
 
18427
390 1530 y Ff(crl)p 497 1530 V 40 w(list)p 658 1530 V
 
18428
41 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f(crl)p
 
18429
1839 1530 V 41 w(list)390 1663 y(This)36 b(function)g(adds)g(the)g
 
18430
(trusted)g(CRLs)g(in)g(order)g(to)h(v)m(erify)g(clien)m(t)h(or)f(serv)m
 
18431
(er)g(certi\014cates.)390 1773 y(In)c(case)h(of)g(a)g(clien)m(t)h(this)
 
18432
f(is)f(not)h(required)f(to)h(b)s(e)f(called)h(if)g(the)g
 
18433
(certi\014cates)h(are)f(not)g(v)m(eri\014ed)390 1882
18430
18434
y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))o
18431
18435
FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e(called)i(m)m(ultiple)
18432
 
390 1569 y(times.)390 1707 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
18436
390 1992 y(times.)390 2125 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
18433
18437
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)390
18434
 
1844 y Fn(Since:)41 b FB(2.4.0)150 2047 y Fv(gn)m(utls)p
18435
 
483 2047 37 5 v 55 w(certi\014cate)p 1068 2047 V 52 w(set)p
18436
 
1272 2047 V 54 w(x509)p 1574 2047 V 55 w(k)m(ey)p 1812
18437
 
2047 V 53 w(\014le)3350 2247 y FB([F)-8 b(unction])-3599
 
18438
2259 y Fn(Since:)41 b FB(2.4.0)150 2456 y Fv(gn)m(utls)p
 
18439
483 2456 37 5 v 55 w(certi\014cate)p 1068 2456 V 52 w(set)p
 
18440
1272 2456 V 54 w(x509)p 1574 2456 V 55 w(k)m(ey)p 1812
 
18441
2456 V 53 w(\014le)3350 2651 y FB([F)-8 b(unction])-3599
18438
18442
b Fh(int)53 b(gnutls_certificate_se)q(t_x5)q(09_)q(key)q(_fi)q(le)565
18439
 
2356 y Fg(\()p Ff(gn)m(utls)p 846 2356 28 4 v 41 w(certi\014cate)p
18440
 
1274 2356 V 42 w(creden)m(tials)p 1737 2356 V 41 w(t)31
 
18443
2760 y Fg(\()p Ff(gn)m(utls)p 846 2760 28 4 v 41 w(certi\014cate)p
 
18444
1274 2760 V 42 w(creden)m(tials)p 1737 2760 V 41 w(t)31
18441
18445
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(CERTFILE)12
18442
 
b Ff(,)32 b(const)f(c)m(har)g(*)565 2466 y Fe(KEYFILE)12
18443
 
b Ff(,)32 b(gn)m(utls)p 1244 2466 V 41 w(x509)p 1468
18444
 
2466 V 41 w(crt)p 1620 2466 V 40 w(fm)m(t)p 1796 2466
18445
 
V 41 w(t)e Fe(type)12 b Fg(\))390 2575 y Ff(res)t FB(:)40
 
18446
b Ff(,)32 b(const)f(c)m(har)g(*)565 2870 y Fe(KEYFILE)12
 
18447
b Ff(,)32 b(gn)m(utls)p 1244 2870 V 41 w(x509)p 1468
 
18448
2870 V 41 w(crt)p 1620 2870 V 40 w(fm)m(t)p 1796 2870
 
18449
V 41 w(t)e Fe(type)12 b Fg(\))390 2980 y Ff(res)t FB(:)40
18446
18450
b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18447
 
b FB(structure.)390 2713 y Ff(CER)-8 b(TFILE)5 b FB(:)25
 
18451
b FB(structure.)390 3113 y Ff(CER)-8 b(TFILE)5 b FB(:)25
18448
18452
b(is)h(a)f(\014le)h(that)g(con)m(taining)h(the)e(certi\014cate)i(list)f
18449
18453
(\(path\))g(for)f(the)h(sp)s(eci\014ed)e(priv)-5 b(ate)390
18450
 
2823 y(k)m(ey)d(,)32 b(in)e(PK)m(CS7)g(format,)h(or)f(a)h(list)g(of)f
18451
 
(certi\014cates)390 2960 y Ff(KEYFILE)5 b FB(:)30 b(is)h(a)g(\014le)f
 
18454
3223 y(k)m(ey)d(,)32 b(in)e(PK)m(CS7)g(format,)h(or)f(a)h(list)g(of)f
 
18455
(certi\014cates)390 3356 y Ff(KEYFILE)5 b FB(:)30 b(is)h(a)g(\014le)f
18452
18456
(that)h(con)m(tains)h(the)e(priv)-5 b(ate)31 b(k)m(ey)390
18453
 
3098 y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30 b(PEM)h(or)f(DER)390
18454
 
3235 y(This)d(function)h(sets)h(a)g(certi\014cate/priv)-5
 
18457
3490 y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30 b(PEM)h(or)f(DER)390
 
18458
3623 y(This)d(function)h(sets)h(a)g(certi\014cate/priv)-5
18455
18459
b(ate)31 b(k)m(ey)e(pair)f(in)g(the)h(gn)m(utls)p 2789
18456
 
3235 V 40 w(certi\014cate)p 3216 3235 V 42 w(creden)m(tials)p
18457
 
3679 3235 V 42 w(t)390 3345 y(structure.)153 b(This)67
 
18460
3623 V 40 w(certi\014cate)p 3216 3623 V 42 w(creden)m(tials)p
 
18461
3679 3623 V 42 w(t)390 3733 y(structure.)153 b(This)67
18458
18462
b(function)g(ma)m(y)h(b)s(e)g(called)h(more)f(than)f(once)i(\(in)e
18459
 
(case)i(m)m(ultiple)390 3455 y(k)m(eys/certi\014cates)33
18460
 
b(exist)f(for)e(the)g(serv)m(er\).)390 3592 y(Curren)m(tly)40
 
18463
(case)i(m)m(ultiple)390 3842 y(k)m(eys/certi\014cates)33
 
18464
b(exist)f(for)e(the)g(serv)m(er\).)390 3976 y(Curren)m(tly)40
18461
18465
b(only)h(PK)m(CS-1)g(enco)s(ded)g(RSA)f(and)h(DSA)g(priv)-5
18462
18466
b(ate)41 b(k)m(eys)h(are)f(accepted)h(b)m(y)f(this)390
18463
 
3702 y(function.)390 3839 y Fn(Returns:)f Ft(GNUTLS_E_SUCCESS)26
 
18467
4085 y(function.)390 4219 y Fn(Returns:)f Ft(GNUTLS_E_SUCCESS)26
18464
18468
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
18465
 
4042 y Fv(gn)m(utls)p 483 4042 37 5 v 55 w(certi\014cate)p
18466
 
1068 4042 V 52 w(set)p 1272 4042 V 54 w(x509)p 1574 4042
18467
 
V 55 w(k)m(ey)p 1812 4042 V 53 w(mem)3350 4242 y FB([F)-8
 
18469
4416 y Fv(gn)m(utls)p 483 4416 37 5 v 55 w(certi\014cate)p
 
18470
1068 4416 V 52 w(set)p 1272 4416 V 54 w(x509)p 1574 4416
 
18471
V 55 w(k)m(ey)p 1812 4416 V 53 w(mem)3350 4611 y FB([F)-8
18468
18472
b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q(t_x5)q(09_)q
18469
 
(key)q(_me)q(m)565 4351 y Fg(\()p Ff(gn)m(utls)p 846
18470
 
4351 28 4 v 41 w(certi\014cate)p 1274 4351 V 42 w(creden)m(tials)p
18471
 
1737 4351 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p
18472
 
2546 4351 V 40 w(datum)p 2844 4351 V 40 w(t)g(*)f Fe(cert)12
18473
 
b Ff(,)32 b(const)565 4461 y(gn)m(utls)p 811 4461 V 41
18474
 
w(datum)p 1110 4461 V 39 w(t)f(*)g Fe(key)12 b Ff(,)31
18475
 
b(gn)m(utls)p 1755 4461 V 40 w(x509)p 1978 4461 V 41
18476
 
w(crt)p 2130 4461 V 41 w(fm)m(t)p 2307 4461 V 40 w(t)g
18477
 
Fe(type)12 b Fg(\))390 4570 y Ff(res)t FB(:)40 b(is)31
 
18473
(key)q(_me)q(m)565 4720 y Fg(\()p Ff(gn)m(utls)p 846
 
18474
4720 28 4 v 41 w(certi\014cate)p 1274 4720 V 42 w(creden)m(tials)p
 
18475
1737 4720 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p
 
18476
2546 4720 V 40 w(datum)p 2844 4720 V 40 w(t)g(*)f Fe(cert)12
 
18477
b Ff(,)32 b(const)565 4830 y(gn)m(utls)p 811 4830 V 41
 
18478
w(datum)p 1110 4830 V 39 w(t)f(*)g Fe(key)12 b Ff(,)31
 
18479
b(gn)m(utls)p 1755 4830 V 40 w(x509)p 1978 4830 V 41
 
18480
w(crt)p 2130 4830 V 41 w(fm)m(t)p 2307 4830 V 40 w(t)g
 
18481
Fe(type)12 b Fg(\))390 4940 y Ff(res)t FB(:)40 b(is)31
18478
18482
b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18479
 
b FB(structure.)390 4708 y Ff(cert)r FB(:)41 b(con)m(tains)32
 
18483
b FB(structure.)390 5073 y Ff(cert)r FB(:)41 b(con)m(tains)32
18480
18484
b(a)f(certi\014cate)h(list)f(\(path\))g(for)f(the)h(sp)s(eci\014ed)e
18481
 
(priv)-5 b(ate)31 b(k)m(ey)390 4846 y Ff(k)m(ey)8 b FB(:)41
 
18485
(priv)-5 b(ate)31 b(k)m(ey)390 5206 y Ff(k)m(ey)8 b FB(:)41
18482
18486
b(is)31 b(the)f(priv)-5 b(ate)31 b(k)m(ey)-8 b(,)32 b(or)e
18483
 
Ft(NULL)390 4983 y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30
18484
 
b(PEM)h(or)f(DER)390 5121 y(This)d(function)h(sets)h(a)g
18485
 
(certi\014cate/priv)-5 b(ate)31 b(k)m(ey)e(pair)f(in)g(the)h(gn)m(utls)
18486
 
p 2789 5121 V 40 w(certi\014cate)p 3216 5121 V 42 w(creden)m(tials)p
18487
 
3679 5121 V 42 w(t)390 5230 y(structure.)153 b(This)67
18488
 
b(function)g(ma)m(y)h(b)s(e)g(called)h(more)f(than)f(once)i(\(in)e
18489
 
(case)i(m)m(ultiple)390 5340 y(k)m(eys/certi\014cates)33
18490
 
b(exist)f(for)e(the)g(serv)m(er\).)p eop end
 
18487
Ft(NULL)390 5340 y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30
 
18488
b(PEM)h(or)f(DER)p eop end
18491
18489
%%Page: 127 133
18492
18490
TeXDict begin 127 132 bop 150 -116 a FB(Chapter)30 b(9:)41
18493
 
b(F)-8 b(unction)31 b(Reference)2237 b(127)390 299 y
18494
 
Fn(Curren)m(tly)30 b(are)h(supp)s(orted:)39 b FB(RSA)30
18495
 
b(PK)m(CS-1)h(enco)s(ded)f(priv)-5 b(ate)30 b(k)m(eys,)i(DSA)e(priv)-5
18496
 
b(ate)31 b(k)m(eys.)390 433 y(DSA)i(priv)-5 b(ate)33
18497
 
b(k)m(eys)g(are)g(enco)s(ded)g(the)g(Op)s(enSSL)d(w)m(a)m(y)-8
18498
 
b(,)35 b(whic)m(h)d(is)h(an)f(ASN.1)i(DER)f(sequence)390
18499
 
543 y(of)e(6)f(INTEGERs)g(-)h(v)m(ersion,)g(p,)f(q,)g(g,)h(pub,)e
18500
 
(priv.)390 677 y(Note)d(that)f(the)g(k)m(eyUsage)i(\(2.5.29.15\))h
18501
 
(PKIX)c(extension)i(in)e(X.509)i(certi\014cates)h(is)e(supp)s(orted.)
18502
 
390 786 y(This)i(means)h(that)h(certi\014cates)h(in)m(tended)e(for)f
18503
 
(signing)i(cannot)f(b)s(e)f(used)h(for)f(ciphersuites)h(that)390
18504
 
896 y(require)i(encryption.)390 1030 y(If)d(the)g(certi\014cate)i(and)e
18505
 
(the)g(priv)-5 b(ate)28 b(k)m(ey)g(are)f(giv)m(en)h(in)f(PEM)g(enco)s
18506
 
(ding)g(then)g(the)g(strings)g(that)390 1140 y(hold)j(their)g(v)-5
18507
 
b(alues)31 b(m)m(ust)f(b)s(e)g(n)m(ull)g(terminated.)390
18508
 
1274 y(The)i Ft(key)f FB(ma)m(y)i(b)s(e)f Ft(NULL)f FB(if)i(y)m(ou)g
18509
 
(are)f(using)g(a)h(sign)f(callbac)m(k,)k(see)d Ft
18510
 
(gnutls_sign_callback_)390 1383 y(set\(\))p FB(.)390
18511
 
1517 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
18512
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 1716 y Fv(gn)m(utls)p
18513
 
483 1716 37 5 v 55 w(certi\014cate)p 1068 1716 V 52 w(set)p
18514
 
1272 1716 V 54 w(x509)p 1574 1716 V 55 w(k)m(ey)3350
18515
 
1912 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q
18516
 
(t_x5)q(09_)q(key)565 2021 y Fg(\()p Ff(gn)m(utls)p 846
18517
 
2021 28 4 v 41 w(certi\014cate)p 1274 2021 V 42 w(creden)m(tials)p
18518
 
1737 2021 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
18519
 
2308 2021 V 41 w(x509)p 2532 2021 V 41 w(crt)p 2684 2021
 
18491
b(F)-8 b(unction)31 b(Reference)2237 b(127)390 299 y(This)27
 
18492
b(function)h(sets)h(a)g(certi\014cate/priv)-5 b(ate)31
 
18493
b(k)m(ey)e(pair)f(in)g(the)h(gn)m(utls)p 2789 299 28
 
18494
4 v 40 w(certi\014cate)p 3216 299 V 42 w(creden)m(tials)p
 
18495
3679 299 V 42 w(t)390 408 y(structure.)153 b(This)67
 
18496
b(function)g(ma)m(y)h(b)s(e)g(called)h(more)f(than)f(once)i(\(in)e
 
18497
(case)i(m)m(ultiple)390 518 y(k)m(eys/certi\014cates)33
 
18498
b(exist)f(for)e(the)g(serv)m(er\).)390 648 y Fn(Curren)m(tly)g(are)h
 
18499
(supp)s(orted:)39 b FB(RSA)30 b(PK)m(CS-1)h(enco)s(ded)f(priv)-5
 
18500
b(ate)30 b(k)m(eys,)i(DSA)e(priv)-5 b(ate)31 b(k)m(eys.)390
 
18501
777 y(DSA)i(priv)-5 b(ate)33 b(k)m(eys)g(are)g(enco)s(ded)g(the)g(Op)s
 
18502
(enSSL)d(w)m(a)m(y)-8 b(,)35 b(whic)m(h)d(is)h(an)f(ASN.1)i(DER)f
 
18503
(sequence)390 887 y(of)e(6)f(INTEGERs)g(-)h(v)m(ersion,)g(p,)f(q,)g(g,)
 
18504
h(pub,)e(priv.)390 1017 y(Note)d(that)f(the)g(k)m(eyUsage)i
 
18505
(\(2.5.29.15\))h(PKIX)c(extension)i(in)e(X.509)i(certi\014cates)h(is)e
 
18506
(supp)s(orted.)390 1126 y(This)i(means)h(that)h(certi\014cates)h(in)m
 
18507
(tended)e(for)f(signing)i(cannot)f(b)s(e)f(used)h(for)f(ciphersuites)h
 
18508
(that)390 1236 y(require)i(encryption.)390 1366 y(If)d(the)g
 
18509
(certi\014cate)i(and)e(the)g(priv)-5 b(ate)28 b(k)m(ey)g(are)f(giv)m
 
18510
(en)h(in)f(PEM)g(enco)s(ding)g(then)g(the)g(strings)g(that)390
 
18511
1475 y(hold)j(their)g(v)-5 b(alues)31 b(m)m(ust)f(b)s(e)g(n)m(ull)g
 
18512
(terminated.)390 1605 y(The)i Ft(key)f FB(ma)m(y)i(b)s(e)f
 
18513
Ft(NULL)f FB(if)i(y)m(ou)g(are)f(using)g(a)h(sign)f(callbac)m(k,)k(see)
 
18514
d Ft(gnutls_sign_callback_)390 1715 y(set\(\))p FB(.)390
 
18515
1844 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
18516
b(success,)f(or)h(an)f(error)g(co)s(de.)150 2034 y Fv(gn)m(utls)p
 
18517
483 2034 37 5 v 55 w(certi\014cate)p 1068 2034 V 52 w(set)p
 
18518
1272 2034 V 54 w(x509)p 1574 2034 V 55 w(k)m(ey)3350
 
18519
2221 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q
 
18520
(t_x5)q(09_)q(key)565 2331 y Fg(\()p Ff(gn)m(utls)p 846
 
18521
2331 28 4 v 41 w(certi\014cate)p 1274 2331 V 42 w(creden)m(tials)p
 
18522
1737 2331 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
 
18523
2308 2331 V 41 w(x509)p 2532 2331 V 41 w(crt)p 2684 2331
18520
18524
V 40 w(t)g(*)g Fe(cert_list)12 b Ff(,)32 b(in)m(t)565
18521
 
2131 y Fe(cert_list_size)12 b Ff(,)34 b(gn)m(utls)p 1610
18522
 
2131 V 41 w(x509)p 1834 2131 V 41 w(privk)m(ey)p 2168
18523
 
2131 V 40 w(t)d Fe(key)12 b Fg(\))390 2240 y Ff(res)t
 
18525
2440 y Fe(cert_list_size)12 b Ff(,)34 b(gn)m(utls)p 1610
 
18526
2440 V 41 w(x509)p 1834 2440 V 41 w(privk)m(ey)p 2168
 
18527
2440 V 40 w(t)d Fe(key)12 b Fg(\))390 2550 y Ff(res)t
18524
18528
FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18525
 
b FB(structure.)390 2375 y Ff(cert)p 547 2375 V 41 w(list)r
 
18529
b FB(structure.)390 2680 y Ff(cert)p 547 2680 V 41 w(list)r
18526
18530
FB(:)41 b(con)m(tains)32 b(a)e(certi\014cate)j(list)e(\(path\))g(for)f
18527
18531
(the)g(sp)s(eci\014ed)g(priv)-5 b(ate)31 b(k)m(ey)390
18528
 
2509 y Ff(cert)p 547 2509 V 41 w(list)p 709 2509 V 40
 
18532
2809 y Ff(cert)p 547 2809 V 41 w(list)p 709 2809 V 40
18529
18533
w(size)5 b FB(:)42 b(holds)30 b(the)h(size)g(of)f(the)h(certi\014cate)h
18530
 
(list)390 2643 y Ff(k)m(ey)8 b FB(:)41 b(is)31 b(a)f(gn)m(utls)p
18531
 
1010 2643 V 41 w(x509)p 1234 2643 V 41 w(privk)m(ey)p
18532
 
1568 2643 V 40 w(t)h(k)m(ey)390 2777 y(This)c(function)h(sets)h(a)g
 
18534
(list)390 2939 y Ff(k)m(ey)8 b FB(:)41 b(is)31 b(a)f(gn)m(utls)p
 
18535
1010 2939 V 41 w(x509)p 1234 2939 V 41 w(privk)m(ey)p
 
18536
1568 2939 V 40 w(t)h(k)m(ey)390 3069 y(This)c(function)h(sets)h(a)g
18533
18537
(certi\014cate/priv)-5 b(ate)31 b(k)m(ey)e(pair)f(in)g(the)h(gn)m(utls)
18534
 
p 2789 2777 V 40 w(certi\014cate)p 3216 2777 V 42 w(creden)m(tials)p
18535
 
3679 2777 V 42 w(t)390 2886 y(structure.)153 b(This)67
 
18538
p 2789 3069 V 40 w(certi\014cate)p 3216 3069 V 42 w(creden)m(tials)p
 
18539
3679 3069 V 42 w(t)390 3178 y(structure.)153 b(This)67
18536
18540
b(function)g(ma)m(y)h(b)s(e)g(called)h(more)f(than)f(once)i(\(in)e
18537
 
(case)i(m)m(ultiple)390 2996 y(k)m(eys/certi\014cates)33
18538
 
b(exist)f(for)e(the)g(serv)m(er\).)390 3130 y Fn(Returns:)40
 
18541
(case)i(m)m(ultiple)390 3288 y(k)m(eys/certi\014cates)33
 
18542
b(exist)f(for)e(the)g(serv)m(er\).)390 3418 y Fn(Returns:)40
18539
18543
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
18540
 
(de.)390 3264 y Fn(Since:)41 b FB(2.4.0)150 3463 y Fv(gn)m(utls)p
18541
 
483 3463 37 5 v 55 w(certi\014cate)p 1068 3463 V 52 w(set)p
18542
 
1272 3463 V 54 w(x509)p 1574 3463 V 55 w(simple)p 1971
18543
 
3463 V 55 w(pk)m(cs12)p 2381 3463 V 54 w(\014le)3350
18544
 
3659 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q
18545
 
(t_x5)q(09_)q(sim)q(ple)q(_pkc)q(s12)q(_fi)q(le)565 3768
18546
 
y Fg(\()p Ff(gn)m(utls)p 846 3768 28 4 v 41 w(certi\014cate)p
18547
 
1274 3768 V 42 w(creden)m(tials)p 1737 3768 V 41 w(t)31
 
18544
(de.)390 3547 y Fn(Since:)41 b FB(2.4.0)150 3737 y Fv(gn)m(utls)p
 
18545
483 3737 37 5 v 55 w(certi\014cate)p 1068 3737 V 52 w(set)p
 
18546
1272 3737 V 54 w(x509)p 1574 3737 V 55 w(simple)p 1971
 
18547
3737 V 55 w(pk)m(cs12)p 2381 3737 V 54 w(\014le)3350
 
18548
3924 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q
 
18549
(t_x5)q(09_)q(sim)q(ple)q(_pkc)q(s12)q(_fi)q(le)565 4034
 
18550
y Fg(\()p Ff(gn)m(utls)p 846 4034 28 4 v 41 w(certi\014cate)p
 
18551
1274 4034 V 42 w(creden)m(tials)p 1737 4034 V 41 w(t)31
18548
18552
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(pkcs12file)12
18549
 
b Ff(,)565 3878 y(gn)m(utls)p 811 3878 V 41 w(x509)p
18550
 
1035 3878 V 41 w(crt)p 1187 3878 V 40 w(fm)m(t)p 1363
18551
 
3878 V 41 w(t)30 b Fe(type)12 b Ff(,)32 b(const)e(c)m(har)h(*)g
18552
 
Fe(password)12 b Fg(\))390 3987 y Ff(res)t FB(:)40 b(is)31
 
18553
b Ff(,)565 4143 y(gn)m(utls)p 811 4143 V 41 w(x509)p
 
18554
1035 4143 V 41 w(crt)p 1187 4143 V 40 w(fm)m(t)p 1363
 
18555
4143 V 41 w(t)30 b Fe(type)12 b Ff(,)32 b(const)e(c)m(har)h(*)g
 
18556
Fe(password)12 b Fg(\))390 4253 y Ff(res)t FB(:)40 b(is)31
18553
18557
b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18554
 
b FB(structure.)390 4122 y Ff(pk)m(cs12\014le)5 b FB(:)42
 
18558
b FB(structure.)390 4383 y Ff(pk)m(cs12\014le)5 b FB(:)42
18555
18559
b(\014lename)31 b(of)f(\014le)h(con)m(taining)h(PK)m(CS)p
18556
 
Ft(12)d FB(blob.)390 4256 y Ff(t)m(yp)s(e)5 b FB(:)41
 
18560
Ft(12)d FB(blob.)390 4512 y Ff(t)m(yp)s(e)5 b FB(:)41
18557
18561
b(is)30 b(PEM)h(or)f(DER)h(of)f(the)h Ft(pkcs12file)p
18558
 
FB(.)390 4390 y Ff(passw)m(ord)t FB(:)40 b(optional)31
 
18562
FB(.)390 4642 y Ff(passw)m(ord)t FB(:)40 b(optional)31
18559
18563
b(passw)m(ord)f(used)f(to)j(decrypt)e(PK)m(CS)p Ft(12)f
18560
 
FB(\014le,)h(bags)h(and)f(k)m(eys.)390 4524 y(This)86
 
18564
FB(\014le,)h(bags)h(and)f(k)m(eys.)390 4772 y(This)86
18561
18565
b(function)g(sets)i(a)f(certi\014cate/priv)-5 b(ate)89
18562
 
b(k)m(ey)f(pair)e(and/or)h(a)g(CRL)f(in)h(the)390 4633
18563
 
y(gn)m(utls)p 636 4633 V 40 w(certi\014cate)p 1063 4633
18564
 
V 43 w(creden)m(tials)p 1527 4633 V 41 w(t)45 b(structure.)84
 
18566
b(k)m(ey)f(pair)e(and/or)h(a)g(CRL)f(in)h(the)390 4881
 
18567
y(gn)m(utls)p 636 4881 V 40 w(certi\014cate)p 1063 4881
 
18568
V 43 w(creden)m(tials)p 1527 4881 V 41 w(t)45 b(structure.)84
18565
18569
b(This)44 b(function)h(ma)m(y)h(b)s(e)e(called)i(more)f(than)390
18566
 
4743 y(once)31 b(\(in)f(case)i(m)m(ultiple)f(k)m(eys/certi\014cates)i
18567
 
(exist)f(for)e(the)g(serv)m(er\).)390 4877 y Fn(MA)m(C:)i
 
18570
4991 y(once)31 b(\(in)f(case)i(m)m(ultiple)f(k)m(eys/certi\014cates)i
 
18571
(exist)f(for)e(the)g(serv)m(er\).)390 5121 y Fn(MA)m(C:)i
18568
18572
FB(ed)f(PK)m(CS)p Ft(12)f FB(\014les)h(are)h(supp)s(orted.)42
18569
18573
b(Encrypted)31 b(PK)m(CS)p Ft(12)f FB(bags)h(are)h(supp)s(orted.)42
18570
 
b(En-)390 4987 y(crypted)32 b(PK)m(CS)p Ft(8)f FB(priv)-5
 
18574
b(En-)390 5230 y(crypted)32 b(PK)m(CS)p Ft(8)f FB(priv)-5
18571
18575
b(ate)32 b(k)m(eys)h(are)f(supp)s(orted.)44 b(Ho)m(w)m(ev)m(er,)35
18572
18576
b(only)d(passw)m(ord)g(based)f(securit)m(y)-8 b(,)390
18573
 
5096 y(and)30 b(the)g(same)h(passw)m(ord)f(for)g(all)h(op)s(erations,)g
18574
 
(are)g(supp)s(orted.)390 5230 y(The)e(priv)-5 b(ate)29
18575
 
b(k)m(eys)h(ma)m(y)g(b)s(e)f(RSA)g(PK)m(CS)p Ft(1)f FB(or)h(DSA)h(priv)
18576
 
-5 b(ate)29 b(k)m(eys)h(enco)s(ded)f(in)g(the)h(Op)s(enSSL)390
18577
 
5340 y(w)m(a)m(y)-8 b(.)p eop end
 
18577
5340 y(and)30 b(the)g(same)h(passw)m(ord)f(for)g(all)h(op)s(erations,)g
 
18578
(are)g(supp)s(orted.)p eop end
18578
18579
%%Page: 128 134
18579
18580
TeXDict begin 128 133 bop 150 -116 a FB(Chapter)30 b(9:)41
18580
 
b(F)-8 b(unction)31 b(Reference)2237 b(128)390 299 y(PK)m(CS)p
18581
 
Ft(12)44 b FB(\014le)i(ma)m(y)g(con)m(tain)h(man)m(y)e(k)m(eys)h
18582
 
(and/or)g(certi\014cates,)51 b(and)45 b(there)h(is)f(no)h(w)m(a)m(y)g
18583
 
(to)390 408 y(iden)m(tify)31 b(whic)m(h)f(k)m(ey/certi\014cate)k(pair)d
18584
 
(y)m(ou)g(w)m(an)m(t.)42 b(Y)-8 b(ou)31 b(should)f(mak)m(e)i(sure)e
18585
 
(the)h(PK)m(CS)p Ft(12)e FB(\014le)390 518 y(only)h(con)m(tain)i(one)f
18586
 
(k)m(ey/certi\014cate)j(pair)c(and/or)g(one)h(CRL.)390
18587
 
645 y(It)j(is)h(b)s(eliev)m(ed)g(that)g(the)f(limitations)i(of)f(this)f
 
18581
b(F)-8 b(unction)31 b(Reference)2237 b(128)390 299 y(The)29
 
18582
b(priv)-5 b(ate)29 b(k)m(eys)h(ma)m(y)g(b)s(e)f(RSA)g(PK)m(CS)p
 
18583
Ft(1)f FB(or)h(DSA)h(priv)-5 b(ate)29 b(k)m(eys)h(enco)s(ded)f(in)g
 
18584
(the)h(Op)s(enSSL)390 408 y(w)m(a)m(y)-8 b(.)390 560
 
18585
y(PK)m(CS)p Ft(12)44 b FB(\014le)i(ma)m(y)g(con)m(tain)h(man)m(y)e(k)m
 
18586
(eys)h(and/or)g(certi\014cates,)51 b(and)45 b(there)h(is)f(no)h(w)m(a)m
 
18587
(y)g(to)390 670 y(iden)m(tify)31 b(whic)m(h)f(k)m(ey/certi\014cate)k
 
18588
(pair)d(y)m(ou)g(w)m(an)m(t.)42 b(Y)-8 b(ou)31 b(should)f(mak)m(e)i
 
18589
(sure)e(the)h(PK)m(CS)p Ft(12)e FB(\014le)390 779 y(only)h(con)m(tain)i
 
18590
(one)f(k)m(ey/certi\014cate)j(pair)c(and/or)g(one)h(CRL.)390
 
18591
931 y(It)j(is)h(b)s(eliev)m(ed)g(that)g(the)f(limitations)i(of)f(this)f
18588
18592
(function)g(is)g(acceptable)j(for)d(most)g(usage,)j(and)390
18589
 
755 y(that)g(an)m(y)g(more)f(\015exibilit)m(y)h(w)m(ould)g(in)m(tro)s
 
18593
1040 y(that)g(an)m(y)g(more)f(\015exibilit)m(y)h(w)m(ould)g(in)m(tro)s
18590
18594
(duce)f(complexit)m(y)i(that)f(w)m(ould)f(mak)m(e)h(it)g(harder)e(to)
18591
 
390 865 y(use)30 b(this)g(functionalit)m(y)i(at)f(all.)390
18592
 
992 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
18593
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 1177 y Fv(gn)m(utls)p
18594
 
483 1177 37 5 v 55 w(certi\014cate)p 1068 1177 V 52 w(set)p
18595
 
1272 1177 V 54 w(x509)p 1574 1177 V 55 w(trust)p 1891
18596
 
1177 V 54 w(\014le)3350 1359 y FB([F)-8 b(unction])-3599
 
18595
390 1150 y(use)30 b(this)g(functionalit)m(y)i(at)f(all.)390
 
18596
1302 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
18597
b(success,)f(or)h(an)f(error)g(co)s(de.)150 1518 y Fv(gn)m(utls)p
 
18598
483 1518 37 5 v 55 w(certi\014cate)p 1068 1518 V 52 w(set)p
 
18599
1272 1518 V 54 w(x509)p 1574 1518 V 55 w(trust)p 1891
 
18600
1518 V 54 w(\014le)3350 1732 y FB([F)-8 b(unction])-3599
18597
18601
b Fh(int)53 b(gnutls_certificate_se)q(t_x5)q(09_)q(tru)q(st_)q(file)565
18598
 
1469 y Fg(\()p Ff(gn)m(utls)p 846 1469 28 4 v 41 w(certi\014cate)p
18599
 
1274 1469 V 42 w(creden)m(tials)p 1737 1469 V 41 w(t)31
 
18602
1842 y Fg(\()p Ff(gn)m(utls)p 846 1842 28 4 v 41 w(certi\014cate)p
 
18603
1274 1842 V 42 w(creden)m(tials)p 1737 1842 V 41 w(t)31
18600
18604
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(cafile)12
18601
 
b Ff(,)565 1578 y(gn)m(utls)p 811 1578 V 41 w(x509)p
18602
 
1035 1578 V 41 w(crt)p 1187 1578 V 40 w(fm)m(t)p 1363
18603
 
1578 V 41 w(t)30 b Fe(type)12 b Fg(\))390 1688 y Ff(res)t
 
18605
b Ff(,)565 1951 y(gn)m(utls)p 811 1951 V 41 w(x509)p
 
18606
1035 1951 V 41 w(crt)p 1187 1951 V 40 w(fm)m(t)p 1363
 
18607
1951 V 41 w(t)30 b Fe(type)12 b Fg(\))390 2061 y Ff(res)t
18604
18608
FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18605
 
b FB(structure.)390 1815 y Ff(ca\014le)5 b FB(:)42 b(is)30
 
18609
b FB(structure.)390 2212 y Ff(ca\014le)5 b FB(:)42 b(is)30
18606
18610
b(a)h(\014le)f(con)m(taining)i(the)f(list)g(of)f(trusted)g(CAs)g(\(DER)
18607
 
h(or)g(PEM)f(list\))390 1943 y Ff(t)m(yp)s(e)5 b FB(:)41
18608
 
b(is)30 b(PEM)h(or)f(DER)390 2070 y(This)40 b(function)g(adds)g(the)h
 
18611
h(or)g(PEM)f(list\))390 2364 y Ff(t)m(yp)s(e)5 b FB(:)41
 
18612
b(is)30 b(PEM)h(or)f(DER)390 2516 y(This)40 b(function)g(adds)g(the)h
18609
18613
(trusted)g(CAs)f(in)h(order)f(to)h(v)m(erify)h(clien)m(t)g(or)f(serv)m
18610
 
(er)g(certi\014cates.)390 2180 y(In)33 b(case)h(of)g(a)g(clien)m(t)h
 
18614
(er)g(certi\014cates.)390 2625 y(In)33 b(case)h(of)g(a)g(clien)m(t)h
18611
18615
(this)f(is)f(not)h(required)f(to)h(b)s(e)f(called)h(if)g(the)g
18612
 
(certi\014cates)h(are)f(not)g(v)m(eri\014ed)390 2289
 
18616
(certi\014cates)h(are)f(not)g(v)m(eri\014ed)390 2735
18613
18617
y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))o
18614
18618
FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e(called)i(m)m(ultiple)
18615
 
390 2399 y(times.)390 2526 y(In)21 b(case)i(of)f(a)g(serv)m(er)h(the)f
 
18619
390 2844 y(times.)390 2996 y(In)21 b(case)i(of)f(a)g(serv)m(er)h(the)f
18616
18620
(names)g(of)g(the)g(CAs)f(set)i(here)f(will)g(b)s(e)f(sen)m(t)h(to)h
18617
 
(the)f(clien)m(t)i(if)e(a)g(certi\014cate)390 2636 y(request)37
 
18621
(the)f(clien)m(t)i(if)e(a)g(certi\014cate)390 3106 y(request)37
18618
18622
b(is)f(sen)m(t.)60 b(This)36 b(can)h(b)s(e)f(disabled)g(using)g
18619
 
Ft(gnutls_certificate_send_)o(x509)o(_rdn)o(_)390 2745
18620
 
y(sequence\(\))p FB(.)390 2873 y Fn(Returns:)k FB(n)m(um)m(b)s(er)29
 
18623
Ft(gnutls_certificate_send_)o(x509)o(_rdn)o(_)390 3215
 
18624
y(sequence\(\))p FB(.)390 3367 y Fn(Returns:)k FB(n)m(um)m(b)s(er)29
18621
18625
b(of)i(certi\014cates)h(pro)s(cessed,)e(or)h(a)f(negativ)m(e)j(v)-5
18622
 
b(alue)31 b(on)f(error.)150 3058 y Fv(gn)m(utls)p 483
18623
 
3058 37 5 v 55 w(certi\014cate)p 1068 3058 V 52 w(set)p
18624
 
1272 3058 V 54 w(x509)p 1574 3058 V 55 w(trust)p 1891
18625
 
3058 V 54 w(mem)3350 3240 y FB([F)-8 b(unction])-3599
 
18626
b(alue)31 b(on)f(error.)150 3583 y Fv(gn)m(utls)p 483
 
18627
3583 37 5 v 55 w(certi\014cate)p 1068 3583 V 52 w(set)p
 
18628
1272 3583 V 54 w(x509)p 1574 3583 V 55 w(trust)p 1891
 
18629
3583 V 54 w(mem)3350 3797 y FB([F)-8 b(unction])-3599
18626
18630
b Fh(int)53 b(gnutls_certificate_se)q(t_x5)q(09_)q(tru)q(st_)q(mem)565
18627
 
3350 y Fg(\()p Ff(gn)m(utls)p 846 3350 28 4 v 41 w(certi\014cate)p
18628
 
1274 3350 V 42 w(creden)m(tials)p 1737 3350 V 41 w(t)31
18629
 
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 3350
18630
 
V 40 w(datum)p 2844 3350 V 40 w(t)g(*)f Fe(ca)12 b Ff(,)565
18631
 
3459 y(gn)m(utls)p 811 3459 V 41 w(x509)p 1035 3459 V
18632
 
41 w(crt)p 1187 3459 V 40 w(fm)m(t)p 1363 3459 V 41 w(t)30
18633
 
b Fe(type)12 b Fg(\))390 3569 y Ff(res)t FB(:)40 b(is)31
 
18631
3907 y Fg(\()p Ff(gn)m(utls)p 846 3907 28 4 v 41 w(certi\014cate)p
 
18632
1274 3907 V 42 w(creden)m(tials)p 1737 3907 V 41 w(t)31
 
18633
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 3907
 
18634
V 40 w(datum)p 2844 3907 V 40 w(t)g(*)f Fe(ca)12 b Ff(,)565
 
18635
4016 y(gn)m(utls)p 811 4016 V 41 w(x509)p 1035 4016 V
 
18636
41 w(crt)p 1187 4016 V 40 w(fm)m(t)p 1363 4016 V 41 w(t)30
 
18637
b Fe(type)12 b Fg(\))390 4126 y Ff(res)t FB(:)40 b(is)31
18634
18638
b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18635
 
b FB(structure.)390 3696 y Ff(ca)p FB(:)42 b(is)30 b(a)h(list)g(of)f
18636
 
(trusted)g(CAs)g(or)g(a)h(DER)g(certi\014cate)390 3823
 
18639
b FB(structure.)390 4277 y Ff(ca)p FB(:)42 b(is)30 b(a)h(list)g(of)f
 
18640
(trusted)g(CAs)g(or)g(a)h(DER)g(certi\014cate)390 4429
18637
18641
y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30 b(DER)h(or)f(PEM)390
18638
 
3951 y(This)40 b(function)g(adds)g(the)h(trusted)g(CAs)f(in)h(order)f
 
18642
4581 y(This)40 b(function)g(adds)g(the)h(trusted)g(CAs)f(in)h(order)f
18639
18643
(to)h(v)m(erify)h(clien)m(t)g(or)f(serv)m(er)g(certi\014cates.)390
18640
 
4060 y(In)33 b(case)h(of)g(a)g(clien)m(t)h(this)f(is)f(not)h(required)f
 
18644
4690 y(In)33 b(case)h(of)g(a)g(clien)m(t)h(this)f(is)f(not)h(required)f
18641
18645
(to)h(b)s(e)f(called)h(if)g(the)g(certi\014cates)h(are)f(not)g(v)m
18642
 
(eri\014ed)390 4170 y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o
 
18646
(eri\014ed)390 4800 y(using)25 b Ft(gnutls_certificate_veri)o(fy_)o
18643
18647
(peer)o(s2\(\))o FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e
18644
 
(called)i(m)m(ultiple)390 4280 y(times.)390 4407 y(In)i(case)h(of)f(a)h
 
18648
(called)i(m)m(ultiple)390 4909 y(times.)390 5061 y(In)i(case)h(of)f(a)h
18645
18649
(serv)m(er)g(the)f(CAs)g(set)h(here)f(will)h(b)s(e)f(sen)m(t)h(to)g
18646
18650
(the)f(clien)m(t)i(if)e(a)h(certi\014cate)i(request)d(is)390
18647
 
4517 y(sen)m(t.)39 b(This)24 b(can)g(b)s(e)g(disabled)g(using)f
 
18651
5171 y(sen)m(t.)39 b(This)24 b(can)g(b)s(e)g(disabled)g(using)f
18648
18652
Ft(gnutls_certificate_send_x5)o(09_r)o(dn_)o(sequ)o(ence)o(\(\))p
18649
 
FB(.)390 4644 y Fn(Returns:)40 b FB(the)31 b(n)m(um)m(b)s(er)e(of)i
 
18653
FB(.)390 5322 y Fn(Returns:)40 b FB(the)31 b(n)m(um)m(b)s(er)e(of)i
18650
18654
(certi\014cates)h(pro)s(cessed)e(or)g(a)h(negativ)m(e)h(v)-5
18651
 
b(alue)31 b(on)f(error.)150 4829 y Fv(gn)m(utls)p 483
18652
 
4829 37 5 v 55 w(certi\014cate)p 1068 4829 V 52 w(set)p
18653
 
1272 4829 V 54 w(x509)p 1574 4829 V 55 w(trust)3350 5011
18654
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q(t_x5)
18655
 
q(09_)q(tru)q(st)565 5121 y Fg(\()p Ff(gn)m(utls)p 846
18656
 
5121 28 4 v 41 w(certi\014cate)p 1274 5121 V 42 w(creden)m(tials)p
18657
 
1737 5121 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
18658
 
2308 5121 V 41 w(x509)p 2532 5121 V 41 w(crt)p 2684 5121
18659
 
V 40 w(t)g(*)g Fe(ca_list)12 b Ff(,)32 b(in)m(t)565 5230
18660
 
y Fe(ca_list_size)12 b Fg(\))390 5340 y Ff(res)t FB(:)40
18661
 
b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o(ls_)o(t)25
18662
 
b FB(structure.)p eop end
 
18655
b(alue)31 b(on)f(error.)p eop end
18663
18656
%%Page: 129 135
18664
18657
TeXDict begin 129 134 bop 150 -116 a FB(Chapter)30 b(9:)41
18665
 
b(F)-8 b(unction)31 b(Reference)2237 b(129)390 299 y
18666
 
Ff(ca)p 481 299 28 4 v 41 w(list)r FB(:)41 b(is)31 b(a)f(list)h(of)g
18667
 
(trusted)f(CAs)390 437 y Ff(ca)p 481 437 V 41 w(list)p
18668
 
643 437 V 41 w(size)5 b FB(:)41 b(holds)30 b(the)h(size)g(of)f(the)h
18669
 
(CA)f(list)390 575 y(This)40 b(function)g(adds)g(the)h(trusted)g(CAs)f
18670
 
(in)h(order)f(to)h(v)m(erify)h(clien)m(t)g(or)f(serv)m(er)g
18671
 
(certi\014cates.)390 685 y(In)33 b(case)h(of)g(a)g(clien)m(t)h(this)f
18672
 
(is)f(not)h(required)f(to)h(b)s(e)f(called)h(if)g(the)g(certi\014cates)
18673
 
h(are)f(not)g(v)m(eri\014ed)390 794 y(using)25 b Ft
18674
 
(gnutls_certificate_veri)o(fy_)o(peer)o(s2\(\))o FB(.)33
18675
 
b(This)24 b(function)h(ma)m(y)h(b)s(e)e(called)i(m)m(ultiple)390
18676
 
904 y(times.)390 1042 y(In)i(case)h(of)f(a)h(serv)m(er)g(the)f(CAs)g
18677
 
(set)h(here)f(will)h(b)s(e)f(sen)m(t)h(to)g(the)f(clien)m(t)i(if)e(a)h
18678
 
(certi\014cate)i(request)d(is)390 1152 y(sen)m(t.)39
18679
 
b(This)24 b(can)g(b)s(e)g(disabled)g(using)f Ft
18680
 
(gnutls_certificate_send_x5)o(09_r)o(dn_)o(sequ)o(ence)o(\(\))p
18681
 
FB(.)390 1290 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
18658
b(F)-8 b(unction)31 b(Reference)2237 b(129)150 299 y
 
18659
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
 
18660
299 V 52 w(set)p 1272 299 V 54 w(x509)p 1574 299 V 55
 
18661
w(trust)3350 516 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
18662
b(gnutls_certificate_se)q(t_x5)q(09_)q(tru)q(st)565 625
 
18663
y Fg(\()p Ff(gn)m(utls)p 846 625 28 4 v 41 w(certi\014cate)p
 
18664
1274 625 V 42 w(creden)m(tials)p 1737 625 V 41 w(t)31
 
18665
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2308 625 V 41 w(x509)p
 
18666
2532 625 V 41 w(crt)p 2684 625 V 40 w(t)g(*)g Fe(ca_list)12
 
18667
b Ff(,)32 b(in)m(t)565 735 y Fe(ca_list_size)12 b Fg(\))390
 
18668
844 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o
 
18669
(ntia)o(ls_)o(t)25 b FB(structure.)390 999 y Ff(ca)p
 
18670
481 999 V 41 w(list)r FB(:)41 b(is)31 b(a)f(list)h(of)g(trusted)f(CAs)
 
18671
390 1153 y Ff(ca)p 481 1153 V 41 w(list)p 643 1153 V
 
18672
41 w(size)5 b FB(:)41 b(holds)30 b(the)h(size)g(of)f(the)h(CA)f(list)
 
18673
390 1308 y(This)40 b(function)g(adds)g(the)h(trusted)g(CAs)f(in)h
 
18674
(order)f(to)h(v)m(erify)h(clien)m(t)g(or)f(serv)m(er)g(certi\014cates.)
 
18675
390 1417 y(In)33 b(case)h(of)g(a)g(clien)m(t)h(this)f(is)f(not)h
 
18676
(required)f(to)h(b)s(e)f(called)h(if)g(the)g(certi\014cates)h(are)f
 
18677
(not)g(v)m(eri\014ed)390 1527 y(using)25 b Ft(gnutls_certificate_veri)o
 
18678
(fy_)o(peer)o(s2\(\))o FB(.)33 b(This)24 b(function)h(ma)m(y)h(b)s(e)e
 
18679
(called)i(m)m(ultiple)390 1636 y(times.)390 1791 y(In)i(case)h(of)f(a)h
 
18680
(serv)m(er)g(the)f(CAs)g(set)h(here)f(will)h(b)s(e)f(sen)m(t)h(to)g
 
18681
(the)f(clien)m(t)i(if)e(a)h(certi\014cate)i(request)d(is)390
 
18682
1900 y(sen)m(t.)39 b(This)24 b(can)g(b)s(e)g(disabled)g(using)f
 
18683
Ft(gnutls_certificate_send_x5)o(09_r)o(dn_)o(sequ)o(ence)o(\(\))p
 
18684
FB(.)390 2055 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
18682
18685
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)390
18683
 
1428 y Fn(Since:)41 b FB(2.4.0)150 1631 y Fv(gn)m(utls)p
18684
 
483 1631 37 5 v 55 w(certi\014cate)p 1068 1631 V 52 w(t)m(yp)s(e)p
18685
 
1357 1631 V 54 w(get)p 1576 1631 V 54 w(id)3350 1831
 
18686
2209 y Fn(Since:)41 b FB(2.4.0)150 2428 y Fv(gn)m(utls)p
 
18687
483 2428 37 5 v 55 w(certi\014cate)p 1068 2428 V 52 w(t)m(yp)s(e)p
 
18688
1357 2428 V 54 w(get)p 1576 2428 V 54 w(id)3350 2645
18686
18689
y FB([F)-8 b(unction])-3599 b Fh(gnutls_certificate_typ)q(e_t)59
18687
 
b(gnutls_certificate_typ)q(e_ge)q(t_i)q(d)565 1941 y
 
18690
b(gnutls_certificate_typ)q(e_ge)q(t_i)q(d)565 2755 y
18688
18691
Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(name)12 b Fg(\))390
18689
 
2050 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(certi\014cate)h(t)m(yp)s(e)f
18690
 
(name)390 2188 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h
18691
 
(insensitiv)m(e)f(w)m(a)m(y)-8 b(.)390 2326 y Fn(Returns:)66
 
18692
2864 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(certi\014cate)h(t)m(yp)s(e)f
 
18693
(name)390 3019 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h
 
18694
(insensitiv)m(e)f(w)m(a)m(y)-8 b(.)390 3173 y Fn(Returns:)66
18692
18695
b FB(an)44 b Ft(gnutls_certificate_type)o(_t)37 b FB(for)43
18693
18696
b(the)h(sp)s(eci\014ed)f(in)g(a)h(string)f(certi\014cate)390
18694
 
2436 y(t)m(yp)s(e,)31 b(or)f Ft(GNUTLS_CRT_UNKNOWN)c
18695
 
FB(on)k(error.)150 2639 y Fv(gn)m(utls)p 483 2639 V 55
18696
 
w(certi\014cate)p 1068 2639 V 52 w(t)m(yp)s(e)p 1357
18697
 
2639 V 54 w(get)p 1576 2639 V 54 w(name)3350 2839 y FB([F)-8
 
18697
3283 y(t)m(yp)s(e,)31 b(or)f Ft(GNUTLS_CRT_UNKNOWN)c
 
18698
FB(on)k(error.)150 3502 y Fv(gn)m(utls)p 483 3502 V 55
 
18699
w(certi\014cate)p 1068 3502 V 52 w(t)m(yp)s(e)p 1357
 
18700
3502 V 54 w(get)p 1576 3502 V 54 w(name)3350 3718 y FB([F)-8
18698
18701
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_certificate_typ)q
18699
 
(e_g)q(et_n)q(ame)565 2949 y Fg(\()p Ff(gn)m(utls)p 846
18700
 
2949 28 4 v 41 w(certi\014cate)p 1274 2949 V 42 w(t)m(yp)s(e)p
18701
 
1490 2949 V 40 w(t)31 b Fe(type)12 b Fg(\))390 3058 y
 
18702
(e_g)q(et_n)q(ame)565 3828 y Fg(\()p Ff(gn)m(utls)p 846
 
18703
3828 28 4 v 41 w(certi\014cate)p 1274 3828 V 42 w(t)m(yp)s(e)p
 
18704
1490 3828 V 40 w(t)31 b Fe(type)12 b Fg(\))390 3938 y
18702
18705
Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30 b(a)h(certi\014cate)i(t)m(yp)s(e)390
18703
 
3196 y(Con)m(v)m(ert)e(a)g Ft(gnutls_certificate_type_)o(t)24
18704
 
b FB(t)m(yp)s(e)31 b(to)g(a)g(string.)390 3334 y Fn(Returns:)40
 
18706
4092 y(Con)m(v)m(ert)e(a)g Ft(gnutls_certificate_type_)o(t)24
 
18707
b FB(t)m(yp)s(e)31 b(to)g(a)g(string.)390 4246 y Fn(Returns:)40
18705
18708
b FB(a)31 b(string)g(that)g(con)m(tains)g(the)g(name)f(of)h(the)g(sp)s
18706
18709
(eci\014ed)e(certi\014cate)k(t)m(yp)s(e,)e(or)f Ft(NULL)f
18707
 
FB(in)390 3444 y(case)i(of)g(unkno)m(wn)e(t)m(yp)s(es.)150
18708
 
3647 y Fv(gn)m(utls)p 483 3647 37 5 v 55 w(certi\014cate)p
18709
 
1068 3647 V 52 w(t)m(yp)s(e)p 1357 3647 V 54 w(get)3350
18710
 
3847 y FB([F)-8 b(unction])-3599 b Fh(gnutls_certificate_typ)q(e_t)59
18711
 
b(gnutls_certificate_typ)q(e_ge)q(t)565 3957 y Fg(\()p
18712
 
Ff(gn)m(utls)p 846 3957 28 4 v 41 w(session)p 1156 3957
18713
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 4066 y Ff(session)p
 
18710
FB(in)390 4356 y(case)i(of)g(unkno)m(wn)e(t)m(yp)s(es.)150
 
18711
4575 y Fv(gn)m(utls)p 483 4575 37 5 v 55 w(certi\014cate)p
 
18712
1068 4575 V 52 w(t)m(yp)s(e)p 1357 4575 V 54 w(get)3350
 
18713
4792 y FB([F)-8 b(unction])-3599 b Fh(gnutls_certificate_typ)q(e_t)59
 
18714
b(gnutls_certificate_typ)q(e_ge)q(t)565 4901 y Fg(\()p
 
18715
Ff(gn)m(utls)p 846 4901 28 4 v 41 w(session)p 1156 4901
 
18716
V 40 w(t)31 b Fe(session)12 b Fg(\))390 5011 y Ff(session)p
18714
18717
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
18715
 
4205 y(The)k(certi\014cate)i(t)m(yp)s(e)f(is)f(b)m(y)h(default)f
 
18718
5165 y(The)k(certi\014cate)i(t)m(yp)s(e)f(is)f(b)m(y)h(default)f
18716
18719
(X.509,)i(unless)e(it)h(is)f(negotiated)j(as)e(a)f(TLS)g(extension.)390
18717
 
4343 y Fn(Returns:)40 b FB(the)31 b(curren)m(tly)f(used)g
 
18720
5320 y Fn(Returns:)40 b FB(the)31 b(curren)m(tly)f(used)g
18718
18721
Ft(gnutls_certificate_type_)o(t)24 b FB(certi\014cate)33
18719
 
b(t)m(yp)s(e.)150 4545 y Fv(gn)m(utls)p 483 4545 37 5
18720
 
v 55 w(certi\014cate)p 1068 4545 V 52 w(t)m(yp)s(e)p
18721
 
1357 4545 V 54 w(list)3350 4746 y FB([F)-8 b(unction])-3599
18722
 
b Fh(const)54 b(gnutls_certificate_type)q(_t)59 b(*)565
18723
 
4855 y(gnutls_certificate_typ)q(e_l)q(ist)52 b Fg(\()31
18724
 
b Fe(void)12 b Fg(\))390 4965 y FB(Get)30 b(a)g(list)f(of)h
18725
 
(certi\014cate)h(t)m(yp)s(es.)40 b(Note)31 b(that)e(to)h(b)s(e)f(able)h
18726
 
(to)f(use)g(Op)s(enPGP)f(certi\014cates,)k(y)m(ou)390
18727
 
5075 y(m)m(ust)e(link)h(to)g(libgn)m(utls-extra)g(and)f(call)i
18728
 
Ft(gnutls_global_init_extra)o(\(\))p FB(.)390 5213 y
18729
 
Fn(Returns:)48 b FB(a)34 b(zero-terminated)i(list)e(of)h
18730
 
Ft(gnutls_certificate_type)o(_t)28 b FB(in)m(tegers)35
18731
 
b(indicating)390 5322 y(the)c(a)m(v)-5 b(ailable)32 b(certi\014cate)h
18732
 
(t)m(yp)s(es.)p eop end
 
18722
b(t)m(yp)s(e.)p eop end
18733
18723
%%Page: 130 136
18734
18724
TeXDict begin 130 135 bop 150 -116 a FB(Chapter)30 b(9:)41
18735
18725
b(F)-8 b(unction)31 b(Reference)2237 b(130)150 299 y
18736
18726
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
18737
 
299 V 52 w(t)m(yp)s(e)p 1357 299 V 54 w(set)p 1563 299
18738
 
V 54 w(priorit)m(y)3350 507 y FB([F)-8 b(unction])-3599
 
18727
299 V 52 w(t)m(yp)s(e)p 1357 299 V 54 w(list)3350 503
 
18728
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(gnutls_certificate_type)q
 
18729
(_t)59 b(*)565 612 y(gnutls_certificate_typ)q(e_l)q(ist)52
 
18730
b Fg(\()31 b Fe(void)12 b Fg(\))390 722 y FB(Get)30 b(a)g(list)f(of)h
 
18731
(certi\014cate)h(t)m(yp)s(es.)40 b(Note)31 b(that)e(to)h(b)s(e)f(able)h
 
18732
(to)f(use)g(Op)s(enPGP)f(certi\014cates,)k(y)m(ou)390
 
18733
831 y(m)m(ust)e(link)h(to)g(libgn)m(utls-extra)g(and)f(call)i
 
18734
Ft(gnutls_global_init_extra)o(\(\))p FB(.)390 973 y Fn(Returns:)48
 
18735
b FB(a)34 b(zero-terminated)i(list)e(of)h Ft(gnutls_certificate_type)o
 
18736
(_t)28 b FB(in)m(tegers)35 b(indicating)390 1083 y(the)c(a)m(v)-5
 
18737
b(ailable)32 b(certi\014cate)h(t)m(yp)s(es.)150 1289
 
18738
y Fv(gn)m(utls)p 483 1289 V 55 w(certi\014cate)p 1068
 
18739
1289 V 52 w(t)m(yp)s(e)p 1357 1289 V 54 w(set)p 1563
 
18740
1289 V 54 w(priorit)m(y)3350 1493 y FB([F)-8 b(unction])-3599
18739
18741
b Fh(int)53 b(gnutls_certificate_ty)q(pe_s)q(et_)q(pri)q(ori)q(ty)f
18740
 
Fg(\()p Ff(gn)m(utls)p 2569 507 28 4 v 40 w(session)p
18741
 
2878 507 V 41 w(t)565 616 y Fe(session)12 b Ff(,)32 b(const)f(in)m(t)g
18742
 
(*)g Fe(list)12 b Fg(\))390 726 y Ff(session)p FB(:)41
18743
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
18744
 
872 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)m
18745
 
(utls)p 1789 872 V 40 w(certi\014cate)p 2216 872 V 42
18746
 
w(t)m(yp)s(e)p 2432 872 V 41 w(t)f(elemen)m(ts.)390 1017
18747
 
y(Sets)45 b(the)g(priorit)m(y)g(on)f(the)h(certi\014cate)i(t)m(yp)s(es)
18748
 
e(supp)s(orted)d(b)m(y)j(gn)m(utls.)84 b(Priorit)m(y)46
18749
 
b(is)e(higher)390 1127 y(for)34 b(elemen)m(ts)i(sp)s(eci\014ed)e(b)s
18750
 
(efore)g(others.)53 b(After)35 b(sp)s(ecifying)f(the)g(t)m(yp)s(es)h(y)
18751
 
m(ou)g(w)m(an)m(t,)h(y)m(ou)f(m)m(ust)390 1237 y(app)s(end)f(a)j(0.)58
18752
 
b(Note)38 b(that)f(the)f(certi\014cate)i(t)m(yp)s(e)f(priorit)m(y)f(is)
18753
 
g(set)h(on)f(the)g(clien)m(t.)60 b(The)36 b(serv)m(er)390
18754
 
1346 y(do)s(es)29 b(not)h(use)f(the)g(cert)h(t)m(yp)s(e)f(priorit)m(y)h
 
18742
Fg(\()p Ff(gn)m(utls)p 2569 1493 28 4 v 40 w(session)p
 
18743
2878 1493 V 41 w(t)565 1602 y Fe(session)12 b Ff(,)32
 
18744
b(const)f(in)m(t)g(*)g Fe(list)12 b Fg(\))390 1712 y
 
18745
Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
18746
b FB(structure.)390 1853 y Ff(list)r FB(:)41 b(is)31
 
18747
b(a)g(0)f(terminated)h(list)g(of)g(gn)m(utls)p 1789 1853
 
18748
V 40 w(certi\014cate)p 2216 1853 V 42 w(t)m(yp)s(e)p
 
18749
2432 1853 V 41 w(t)f(elemen)m(ts.)390 1995 y(Sets)45
 
18750
b(the)g(priorit)m(y)g(on)f(the)h(certi\014cate)i(t)m(yp)s(es)e(supp)s
 
18751
(orted)d(b)m(y)j(gn)m(utls.)84 b(Priorit)m(y)46 b(is)e(higher)390
 
18752
2104 y(for)34 b(elemen)m(ts)i(sp)s(eci\014ed)e(b)s(efore)g(others.)53
 
18753
b(After)35 b(sp)s(ecifying)f(the)g(t)m(yp)s(es)h(y)m(ou)g(w)m(an)m(t,)h
 
18754
(y)m(ou)f(m)m(ust)390 2214 y(app)s(end)f(a)j(0.)58 b(Note)38
 
18755
b(that)f(the)f(certi\014cate)i(t)m(yp)s(e)f(priorit)m(y)f(is)g(set)h
 
18756
(on)f(the)g(clien)m(t.)60 b(The)36 b(serv)m(er)390 2324
 
18757
y(do)s(es)29 b(not)h(use)f(the)g(cert)h(t)m(yp)s(e)f(priorit)m(y)h
18755
18758
(except)g(for)g(disabling)f(t)m(yp)s(es)g(that)h(w)m(ere)g(not)f(sp)s
18756
 
(eci\014ed.)390 1492 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
18759
(eci\014ed.)390 2465 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
18757
18760
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
18758
 
1702 y Fv(gn)m(utls)p 483 1702 37 5 v 55 w(certi\014cate)p
18759
 
1068 1702 V 52 w(v)m(erify)p 1424 1702 V 54 w(p)s(eers2)3350
18760
 
1910 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_ve)q
18761
 
(rify)q(_pe)q(ers)q(2)e Fg(\()p Ff(gn)m(utls)p 2359 1910
18762
 
28 4 v 41 w(session)p 2669 1910 V 40 w(t)31 b Fe(session)12
18763
 
b Ff(,)565 2020 y(unsigned)29 b(in)m(t)i(*)g Fe(status)12
18764
 
b Fg(\))390 2129 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
18765
 
(session)390 2275 y Ff(status)t FB(:)41 b(is)30 b(the)h(output)f(of)g
18766
 
(the)h(v)m(eri\014cation)390 2421 y(This)67 b(function)h(will)h(try)f
 
18761
2671 y Fv(gn)m(utls)p 483 2671 37 5 v 55 w(certi\014cate)p
 
18762
1068 2671 V 52 w(v)m(erify)p 1424 2671 V 54 w(p)s(eers2)3350
 
18763
2875 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_ve)q
 
18764
(rify)q(_pe)q(ers)q(2)e Fg(\()p Ff(gn)m(utls)p 2359 2875
 
18765
28 4 v 41 w(session)p 2669 2875 V 40 w(t)31 b Fe(session)12
 
18766
b Ff(,)565 2985 y(unsigned)29 b(in)m(t)i(*)g Fe(status)12
 
18767
b Fg(\))390 3094 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
18768
(session)390 3236 y Ff(status)t FB(:)41 b(is)30 b(the)h(output)f(of)g
 
18769
(the)h(v)m(eri\014cation)390 3377 y(This)67 b(function)h(will)h(try)f
18767
18770
(to)h(v)m(erify)g(the)f(p)s(eer's)g(certi\014cate)i(and)e(return)f(its)
18768
 
i(status)390 2530 y(\(trusted,)f(in)m(v)-5 b(alid)61
 
18771
i(status)390 3487 y(\(trusted,)f(in)m(v)-5 b(alid)61
18769
18772
b(etc.\).)133 b(The)61 b(v)-5 b(alue)61 b(of)f Ft(status)f
18770
 
FB(should)h(b)s(e)g(one)h(or)f(more)h(of)g(the)390 2640
18771
 
y(gn)m(utls)p 636 2640 V 40 w(certi\014cate)p 1063 2640
18772
 
V 43 w(status)p 1344 2640 V 40 w(t)50 b(en)m(umerated)h(elemen)m(ts)h
 
18773
FB(should)h(b)s(e)g(one)h(or)f(more)h(of)g(the)390 3597
 
18774
y(gn)m(utls)p 636 3597 V 40 w(certi\014cate)p 1063 3597
 
18775
V 43 w(status)p 1344 3597 V 40 w(t)50 b(en)m(umerated)h(elemen)m(ts)h
18773
18776
(bit)m(wise)f(or'd.)100 b(T)-8 b(o)50 b(a)m(v)m(oid)i(denial)f(of)390
18774
 
2750 y(service)31 b(attac)m(ks)i(some)e(default)f(upp)s(er)f(limits)i
 
18777
3706 y(service)31 b(attac)m(ks)i(some)e(default)f(upp)s(er)f(limits)i
18775
18778
(regarding)f(the)h(certi\014cate)h(k)m(ey)f(size)h(and)d(c)m(hain)390
18776
 
2859 y(size)i(are)g(set.)41 b(T)-8 b(o)31 b(o)m(v)m(erride)h(them)e
 
18779
3816 y(size)i(are)g(set.)41 b(T)-8 b(o)31 b(o)m(v)m(erride)h(them)e
18777
18780
(use)g Ft(gnutls_certificate_set_v)o(erif)o(y_l)o(imit)o(s\(\))p
18778
 
FB(.)390 3005 y(Note)35 b(that)f(y)m(ou)h(m)m(ust)e(also)i(c)m(hec)m(k)
 
18781
FB(.)390 3957 y(Note)35 b(that)f(y)m(ou)h(m)m(ust)e(also)i(c)m(hec)m(k)
18779
18782
g(the)f(p)s(eer's)f(name)h(in)g(order)f(to)h(c)m(hec)m(k)i(if)e(the)f
18780
 
(v)m(eri\014ed)h(cer-)390 3114 y(ti\014cate)e(b)s(elongs)e(to)h(the)g
18781
 
(actual)h(p)s(eer.)390 3260 y(This)j(is)h(the)g(same)g(as)h
 
18783
(v)m(eri\014ed)h(cer-)390 4067 y(ti\014cate)e(b)s(elongs)e(to)h(the)g
 
18784
(actual)h(p)s(eer.)390 4208 y(This)j(is)h(the)g(same)g(as)h
18782
18785
Ft(gnutls_x509_crt_list_ve)o(rif)o(y\(\))29 b FB(and)36
18783
 
b(uses)f(the)h(loaded)h(CAs)e(in)390 3370 y(the)c(creden)m(tials)g(as)g
18784
 
(trusted)f(CAs.)390 3515 y(Note)e(that)f(some)f(commonly)h(used)f
 
18786
b(uses)f(the)h(loaded)h(CAs)e(in)390 4318 y(the)c(creden)m(tials)g(as)g
 
18787
(trusted)f(CAs.)390 4460 y(Note)e(that)f(some)f(commonly)h(used)f
18785
18788
(X.509)i(Certi\014cate)g(Authorities)f(are)f(still)i(using)e(V)-8
18786
 
b(ersion)27 b(1)390 3625 y(certi\014cates.)42 b(If)27
 
18789
b(ersion)27 b(1)390 4569 y(certi\014cates.)42 b(If)27
18787
18790
b(y)m(ou)h(w)m(an)m(t)h(to)f(accept)i(them,)e(y)m(ou)g(need)g(to)g
18788
 
(call)h Ft(gnutls_certificate_set_)390 3735 y(verify_flags\(\))d
 
18791
(call)h Ft(gnutls_certificate_set_)390 4679 y(verify_flags\(\))d
18789
18792
FB(with,)31 b(e.g.,)h Ft(GNUTLS_VERIFY_ALLOW_X50)o(9_V1)o(_CA_)o(CRT)24
18790
 
b FB(parameter.)390 3880 y Fn(Returns:)40 b FB(a)31 b(negativ)m(e)i
 
18793
b FB(parameter.)390 4820 y Fn(Returns:)40 b FB(a)31 b(negativ)m(e)i
18791
18794
(error)d(co)s(de)g(on)h(error)f(and)f(zero)i(on)g(success.)150
18792
 
4091 y Fv(gn)m(utls)p 483 4091 37 5 v 55 w(certi\014cate)p
18793
 
1068 4091 V 52 w(v)m(erify)p 1424 4091 V 54 w(p)s(eers)3350
18794
 
4299 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_ve)q
18795
 
(rify)q(_pe)q(ers)f Fg(\()p Ff(gn)m(utls)p 2307 4299
18796
 
28 4 v 41 w(session)p 2617 4299 V 40 w(t)31 b Fe(session)12
18797
 
b Fg(\))390 4408 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
18798
 
(session)390 4554 y(This)36 b(function)g(will)h(try)f(to)h(v)m(erify)g
18799
 
(the)g(p)s(eer's)f(certi\014cate)j(and)d(return)f(its)i(status)g
18800
 
(\(trusted,)390 4664 y(in)m(v)-5 b(alid)35 b(etc.\).)54
18801
 
b(Ho)m(w)m(ev)m(er)36 b(y)m(ou)e(m)m(ust)g(also)h(c)m(hec)m(k)h(the)f
18802
 
(p)s(eer's)e(name)h(in)g(order)g(to)h(c)m(hec)m(k)h(if)e(the)390
18803
 
4773 y(v)m(eri\014ed)c(certi\014cate)j(b)s(elongs)d(to)h(the)g(actual)h
18804
 
(p)s(eer.)390 4919 y(The)27 b(return)f(v)-5 b(alue)28
18805
 
b(should)e(b)s(e)h(one)g(or)h(more)f(of)h(the)f(gn)m(utls)p
18806
 
2483 4919 V 41 w(certi\014cate)p 2911 4919 V 42 w(status)p
18807
 
3191 4919 V 40 w(t)h(en)m(umerated)390 5028 y(elemen)m(ts)k(bit)m(wise)
18808
 
f(or'd,)f(or)h(a)f(negativ)m(e)j(v)-5 b(alue)31 b(on)f(error.)390
18809
 
5174 y(This)g(is)g(the)h(same)f(as)h Ft(gnutls_x509_crt_list_ver)o
18810
 
(ify\()o(\))p FB(.)390 5320 y Fn(Deprecated:)42 b FB(Use)30
18811
 
b Ft(gnutls_certificate_verify_)o(pee)o(rs2\()o(\))24
18812
 
b FB(instead.)p eop end
 
18795
5027 y Fv(gn)m(utls)p 483 5027 37 5 v 55 w(certi\014cate)p
 
18796
1068 5027 V 52 w(v)m(erify)p 1424 5027 V 54 w(p)s(eers)3350
 
18797
5230 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_certificate_ve)q
 
18798
(rify)q(_pe)q(ers)f Fg(\()p Ff(gn)m(utls)p 2307 5230
 
18799
28 4 v 41 w(session)p 2617 5230 V 40 w(t)31 b Fe(session)12
 
18800
b Fg(\))390 5340 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
18801
(session)p eop end
18813
18802
%%Page: 131 137
18814
18803
TeXDict begin 131 136 bop 150 -116 a FB(Chapter)30 b(9:)41
18815
 
b(F)-8 b(unction)31 b(Reference)2237 b(131)150 299 y
18816
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(c)m(hec)m(k)p 831
18817
 
299 V 52 w(v)m(ersion)3350 501 y FB([F)-8 b(unction])-3599
18818
 
b Fh(const)54 b(char)f(*)g(gnutls_check_version)e Fg(\()p
18819
 
Ff(const)32 b(c)m(har)e(*)h Fe(req_version)12 b Fg(\))390
18820
 
611 y Ff(req)p 520 611 28 4 v 40 w(v)m(ersion)p FB(:)41
18821
 
b(the)31 b(v)m(ersion)g(to)g(c)m(hec)m(k)390 751 y(Chec)m(k)c(that)h
18822
 
(the)f(v)m(ersion)g(of)g(the)g(library)g(is)g(at)g(minim)m(um)g(the)g
18823
 
(requested)f(one)i(and)e(return)g(the)390 861 y(v)m(ersion)32
18824
 
b(string;)h(return)e(NULL)g(if)h(the)g(condition)g(is)g(not)g
18825
 
(satis\014ed.)45 b(If)31 b(a)h(NULL)g(is)g(passed)f(to)390
18826
 
971 y(this)f(function,)h(no)f(c)m(hec)m(k)i(is)e(done,)h(but)e(the)i(v)
18827
 
m(ersion)g(string)f(is)g(simply)g(returned.)390 1111
 
18804
b(F)-8 b(unction)31 b(Reference)2237 b(131)390 299 y(This)36
 
18805
b(function)g(will)h(try)f(to)h(v)m(erify)g(the)g(p)s(eer's)f
 
18806
(certi\014cate)j(and)d(return)f(its)i(status)g(\(trusted,)390
 
18807
408 y(in)m(v)-5 b(alid)35 b(etc.\).)54 b(Ho)m(w)m(ev)m(er)36
 
18808
b(y)m(ou)e(m)m(ust)g(also)h(c)m(hec)m(k)h(the)f(p)s(eer's)e(name)h(in)g
 
18809
(order)g(to)h(c)m(hec)m(k)h(if)e(the)390 518 y(v)m(eri\014ed)c
 
18810
(certi\014cate)j(b)s(elongs)d(to)h(the)g(actual)h(p)s(eer.)390
 
18811
656 y(The)27 b(return)f(v)-5 b(alue)28 b(should)e(b)s(e)h(one)g(or)h
 
18812
(more)f(of)h(the)f(gn)m(utls)p 2483 656 28 4 v 41 w(certi\014cate)p
 
18813
2911 656 V 42 w(status)p 3191 656 V 40 w(t)h(en)m(umerated)390
 
18814
766 y(elemen)m(ts)k(bit)m(wise)f(or'd,)f(or)h(a)f(negativ)m(e)j(v)-5
 
18815
b(alue)31 b(on)f(error.)390 904 y(This)g(is)g(the)h(same)f(as)h
 
18816
Ft(gnutls_x509_crt_list_ver)o(ify\()o(\))p FB(.)390 1042
 
18817
y Fn(Deprecated:)42 b FB(Use)30 b Ft(gnutls_certificate_verify_)o(pee)o
 
18818
(rs2\()o(\))24 b FB(instead.)150 1245 y Fv(gn)m(utls)p
 
18819
483 1245 37 5 v 55 w(c)m(hec)m(k)p 831 1245 V 52 w(v)m(ersion)3350
 
18820
1445 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
18821
(gnutls_check_version)e Fg(\()p Ff(const)32 b(c)m(har)e(*)h
 
18822
Fe(req_version)12 b Fg(\))390 1555 y Ff(req)p 520 1555
 
18823
28 4 v 40 w(v)m(ersion)p FB(:)41 b(the)31 b(v)m(ersion)g(to)g(c)m(hec)m
 
18824
(k)390 1693 y(Chec)m(k)c(that)h(the)f(v)m(ersion)g(of)g(the)g(library)g
 
18825
(is)g(at)g(minim)m(um)g(the)g(requested)f(one)i(and)e(return)g(the)390
 
18826
1802 y(v)m(ersion)32 b(string;)h(return)e(NULL)g(if)h(the)g(condition)g
 
18827
(is)g(not)g(satis\014ed.)45 b(If)31 b(a)h(NULL)g(is)g(passed)f(to)390
 
18828
1912 y(this)f(function,)h(no)f(c)m(hec)m(k)i(is)e(done,)h(but)e(the)i
 
18829
(v)m(ersion)g(string)f(is)g(simply)g(returned.)390 2050
18828
18830
y(See)h Ft(LIBGNUTLS_VERSION)25 b FB(for)30 b(a)h(suitable)g
18829
 
Ft(req_version)c FB(string.)390 1251 y Fn(Return)d(v)-5
 
18831
Ft(req_version)c FB(string.)390 2188 y Fn(Return)d(v)-5
18830
18832
b(alue:)38 b FB(V)-8 b(ersion)24 b(string)g(of)g(run-time)g(library)-8
18831
18833
b(,)26 b(or)e(NULL)g(if)g(the)g(run-time)g(library)f(do)s(es)390
18832
 
1361 y(not)32 b(meet)g(the)g(required)e(v)m(ersion)i(n)m(um)m(b)s(er.)
 
18834
2298 y(not)32 b(meet)g(the)g(required)e(v)m(ersion)i(n)m(um)m(b)s(er.)
18833
18835
43 b(If)31 b Ft(NULL)f FB(is)i(passed)f(to)h(this)f(function)g(no)h(c)m
18834
 
(hec)m(k)h(is)390 1470 y(done)d(and)g(only)g(the)h(v)m(ersion)g(string)
18835
 
f(is)h(returned.)150 1676 y Fv(gn)m(utls)p 483 1676 37
18836
 
5 v 55 w(cipher)p 869 1676 V 54 w(get)p 1088 1676 V 54
18837
 
w(id)3350 1878 y FB([F)-8 b(unction])-3599 b Fh(gnutls_cipher_algorith)
 
18836
(hec)m(k)h(is)390 2407 y(done)d(and)g(only)g(the)h(v)m(ersion)g(string)
 
18837
f(is)h(returned.)150 2610 y Fv(gn)m(utls)p 483 2610 37
 
18838
5 v 55 w(cipher)p 869 2610 V 54 w(get)p 1088 2610 V 54
 
18839
w(id)3350 2811 y FB([F)-8 b(unction])-3599 b Fh(gnutls_cipher_algorith)
18838
18840
q(m_t)59 b(gnutls_cipher_get_id)51 b Fg(\()p Ff(const)32
18839
 
b(c)m(har)e(*)565 1988 y Fe(name)12 b Fg(\))390 2097
 
18841
b(c)m(har)e(*)565 2920 y Fe(name)12 b Fg(\))390 3030
18840
18842
y Ff(name)5 b FB(:)41 b(is)30 b(a)h(MA)m(C)g(algorithm)g(name)390
18841
 
2238 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h(insensitiv)m(e)f
18842
 
(w)m(a)m(y)-8 b(.)390 2378 y Fn(Returns:)38 b FB(return)26
 
18843
3168 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h(insensitiv)m(e)f
 
18844
(w)m(a)m(y)-8 b(.)390 3306 y Fn(Returns:)38 b FB(return)26
18843
18845
b(a)h Ft(gnutls_cipher_algorithm)o(_t)20 b FB(v)-5 b(alue)27
18844
 
b(corresp)s(onding)f(to)h(the)g(sp)s(eci\014ed)390 2488
 
18846
b(corresp)s(onding)f(to)h(the)g(sp)s(eci\014ed)390 3416
18845
18847
y(cipher,)j(or)h Ft(GNUTLS_CIPHER_UNKNOWN)24 b FB(on)30
18846
 
b(error.)150 2693 y Fv(gn)m(utls)p 483 2693 V 55 w(cipher)p
18847
 
869 2693 V 54 w(get)p 1088 2693 V 54 w(k)m(ey)p 1325
18848
 
2693 V 53 w(size)3350 2895 y FB([F)-8 b(unction])-3599
 
18848
b(error.)150 3618 y Fv(gn)m(utls)p 483 3618 V 55 w(cipher)p
 
18849
869 3618 V 54 w(get)p 1088 3618 V 54 w(k)m(ey)p 1325
 
18850
3618 V 53 w(size)3350 3819 y FB([F)-8 b(unction])-3599
18849
18851
b Fh(size_t)54 b(gnutls_cipher_get_key_)q(siz)q(e)d Fg(\()p
18850
 
Ff(gn)m(utls)p 2202 2895 28 4 v 41 w(cipher)p 2486 2895
18851
 
V 40 w(algorithm)p 2909 2895 V 41 w(t)565 3005 y Fe(algorithm)12
18852
 
b Fg(\))390 3114 y Ff(algorithm)p FB(:)42 b(is)30 b(an)g(encryption)h
18853
 
(algorithm)390 3255 y(Get)g(k)m(ey)h(size)f(for)f(cipher.)390
18854
 
3395 y Fn(Returns:)51 b FB(length)35 b(\(in)h(b)m(ytes\))g(of)g(the)f
 
18852
Ff(gn)m(utls)p 2202 3819 28 4 v 41 w(cipher)p 2486 3819
 
18853
V 40 w(algorithm)p 2909 3819 V 41 w(t)565 3928 y Fe(algorithm)12
 
18854
b Fg(\))390 4038 y Ff(algorithm)p FB(:)42 b(is)30 b(an)g(encryption)h
 
18855
(algorithm)390 4176 y(Get)g(k)m(ey)h(size)f(for)f(cipher.)390
 
18856
4314 y Fn(Returns:)51 b FB(length)35 b(\(in)h(b)m(ytes\))g(of)g(the)f
18855
18857
(giv)m(en)i(cipher's)e(k)m(ey)h(size,)i(or)e(0)f(if)h(the)f(giv)m(en)i
18856
 
(cipher)e(is)390 3505 y(in)m(v)-5 b(alid.)150 3710 y
18857
 
Fv(gn)m(utls)p 483 3710 37 5 v 55 w(cipher)p 869 3710
18858
 
V 54 w(get)p 1088 3710 V 54 w(name)3350 3912 y FB([F)d(unction])-3599
 
18858
(cipher)e(is)390 4424 y(in)m(v)-5 b(alid.)150 4627 y
 
18859
Fv(gn)m(utls)p 483 4627 37 5 v 55 w(cipher)p 869 4627
 
18860
V 54 w(get)p 1088 4627 V 54 w(name)3350 4827 y FB([F)d(unction])-3599
18859
18861
b Fh(const)54 b(char)f(*)g(gnutls_cipher_get_name)f Fg(\()p
18860
 
Ff(gn)m(utls)p 2307 3912 28 4 v 41 w(cipher)p 2591 3912
18861
 
V 40 w(algorithm)p 3014 3912 V 41 w(t)565 4022 y Fe(algorithm)12
18862
 
b Fg(\))390 4132 y Ff(algorithm)p FB(:)42 b(is)30 b(an)g(encryption)h
18863
 
(algorithm)390 4272 y(Con)m(v)m(ert)g(a)g Ft(gnutls_cipher_algorithm_)o
18864
 
(t)24 b FB(t)m(yp)s(e)31 b(to)g(a)g(string.)390 4412
 
18862
Ff(gn)m(utls)p 2307 4827 28 4 v 41 w(cipher)p 2591 4827
 
18863
V 40 w(algorithm)p 3014 4827 V 41 w(t)565 4937 y Fe(algorithm)12
 
18864
b Fg(\))390 5046 y Ff(algorithm)p FB(:)42 b(is)30 b(an)g(encryption)h
 
18865
(algorithm)390 5184 y(Con)m(v)m(ert)g(a)g Ft(gnutls_cipher_algorithm_)o
 
18866
(t)24 b FB(t)m(yp)s(e)31 b(to)g(a)g(string.)390 5322
18865
18867
y Fn(Returns:)38 b FB(a)26 b(p)s(oin)m(ter)g(to)g(a)g(string)g(that)g
18866
18868
(con)m(tains)h(the)f(name)f(of)h(the)g(sp)s(eci\014ed)f(cipher,)h(or)g
18867
 
Ft(NULL)p FB(.)150 4617 y Fv(gn)m(utls)p 483 4617 37
18868
 
5 v 55 w(cipher)p 869 4617 V 54 w(get)3350 4820 y FB([F)-8
18869
 
b(unction])-3599 b Fh(gnutls_cipher_algorith)q(m_t)59
18870
 
b(gnutls_cipher_get)50 b Fg(\()p Ff(gn)m(utls)p 2725
18871
 
4820 28 4 v 41 w(session)p 3035 4820 V 40 w(t)565 4930
18872
 
y Fe(session)12 b Fg(\))390 5039 y Ff(session)p FB(:)41
18873
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
18874
 
5179 y(Get)31 b(curren)m(tly)g(used)e(cipher.)390 5320
18875
 
y Fn(Returns:)40 b FB(the)31 b(curren)m(tly)f(used)g(cipher,)g(an)g
18876
 
Ft(gnutls_cipher_algorithm_t)24 b FB(t)m(yp)s(e.)p eop
18877
 
end
 
18869
Ft(NULL)p FB(.)p eop end
18878
18870
%%Page: 132 138
18879
18871
TeXDict begin 132 137 bop 150 -116 a FB(Chapter)30 b(9:)41
18880
18872
b(F)-8 b(unction)31 b(Reference)2237 b(132)150 299 y
18881
18873
Fv(gn)m(utls)p 483 299 37 5 v 55 w(cipher)p 869 299 V
18882
 
54 w(list)3350 499 y FB([F)-8 b(unction])-3599 b Fh(const)54
18883
 
b(gnutls_cipher_algorithm)q(_t)59 b(*)52 b(gnutls_cipher_list)f
18884
 
Fg(\()565 609 y Fe(void)12 b Fg(\))390 718 y FB(Get)37
18885
 
b(a)e(list)i(of)e(supp)s(orted)f(cipher)h(algorithms.)57
18886
 
b(Note)37 b(that)f(not)g(necessarily)g(all)h(ciphers)e(are)390
18887
 
828 y(supp)s(orted)24 b(as)j(TLS)e(cipher)h(suites.)39
 
18874
54 w(get)3350 521 y FB([F)-8 b(unction])-3599 b Fh
 
18875
(gnutls_cipher_algorith)q(m_t)59 b(gnutls_cipher_get)50
 
18876
b Fg(\()p Ff(gn)m(utls)p 2725 521 28 4 v 41 w(session)p
 
18877
3035 521 V 40 w(t)565 631 y Fe(session)12 b Fg(\))390
 
18878
740 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
18879
b FB(structure.)390 900 y(Get)31 b(curren)m(tly)g(used)e(cipher.)390
 
18880
1060 y Fn(Returns:)40 b FB(the)31 b(curren)m(tly)f(used)g(cipher,)g(an)
 
18881
g Ft(gnutls_cipher_algorithm_t)24 b FB(t)m(yp)s(e.)150
 
18882
1284 y Fv(gn)m(utls)p 483 1284 37 5 v 55 w(cipher)p 869
 
18883
1284 V 54 w(list)3350 1506 y FB([F)-8 b(unction])-3599
 
18884
b Fh(const)54 b(gnutls_cipher_algorithm)q(_t)59 b(*)52
 
18885
b(gnutls_cipher_list)f Fg(\()565 1616 y Fe(void)12 b
 
18886
Fg(\))390 1726 y FB(Get)37 b(a)e(list)i(of)e(supp)s(orted)f(cipher)h
 
18887
(algorithms.)57 b(Note)37 b(that)f(not)g(necessarily)g(all)h(ciphers)e
 
18888
(are)390 1835 y(supp)s(orted)24 b(as)j(TLS)e(cipher)h(suites.)39
18888
18889
b(F)-8 b(or)27 b(example,)h(DES)e(is)h(not)f(supp)s(orted)e(as)j(a)g
18889
 
(cipher)e(suite,)390 938 y(but)30 b(is)g(supp)s(orted)f(for)h(other)g
 
18890
(cipher)e(suite,)390 1945 y(but)30 b(is)g(supp)s(orted)f(for)h(other)g
18890
18891
(purp)s(oses)f(\(e.g.,)j(PK)m(CS)p Ft(8)d FB(or)i(similar\).)390
18891
 
1076 y Fn(Returns:)48 b FB(a)34 b(zero-terminated)i(list)e(of)h
 
18892
2105 y Fn(Returns:)48 b FB(a)34 b(zero-terminated)i(list)e(of)h
18892
18893
Ft(gnutls_cipher_algorithm)o(_t)28 b FB(in)m(tegers)35
18893
 
b(indicating)390 1185 y(the)c(a)m(v)-5 b(ailable)32 b(ciphers.)150
18894
 
1388 y Fv(gn)m(utls)p 483 1388 V 55 w(cipher)p 869 1388
18895
 
V 54 w(set)p 1075 1388 V 54 w(priorit)m(y)3350 1589 y
 
18894
b(indicating)390 2214 y(the)c(a)m(v)-5 b(ailable)32 b(ciphers.)150
 
18895
2439 y Fv(gn)m(utls)p 483 2439 V 55 w(cipher)p 869 2439
 
18896
V 54 w(set)p 1075 2439 V 54 w(priorit)m(y)3350 2661 y
18896
18897
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_cipher_set_pri)q(orit)q
18897
 
(y)f Fg(\()p Ff(gn)m(utls)p 2046 1589 28 4 v 40 w(session)p
18898
 
2355 1589 V 41 w(t)30 b Fe(session)12 b Ff(,)32 b(const)565
18899
 
1698 y(in)m(t)f(*)g Fe(list)12 b Fg(\))390 1808 y Ff(session)p
 
18898
(y)f Fg(\()p Ff(gn)m(utls)p 2046 2661 28 4 v 40 w(session)p
 
18899
2355 2661 V 41 w(t)30 b Fe(session)12 b Ff(,)32 b(const)565
 
18900
2771 y(in)m(t)f(*)g Fe(list)12 b Fg(\))390 2880 y Ff(session)p
18900
18901
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
18901
 
1946 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
18902
 
m(utls)p 1789 1946 V 40 w(cipher)p 2072 1946 V 40 w(algorithm)p
18903
 
2495 1946 V 41 w(t)g(elemen)m(ts.)390 2084 y(Sets)i(the)g(priorit)m(y)h
 
18902
3040 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
 
18903
m(utls)p 1789 3040 V 40 w(cipher)p 2072 3040 V 40 w(algorithm)p
 
18904
2495 3040 V 41 w(t)g(elemen)m(ts.)390 3200 y(Sets)i(the)g(priorit)m(y)h
18904
18905
(on)f(the)g(ciphers)g(supp)s(orted)e(b)m(y)i(gn)m(utls.)49
18905
18906
b(Priorit)m(y)34 b(is)f(higher)g(for)g(elemen)m(ts)390
18906
 
2194 y(sp)s(eci\014ed)d(b)s(efore)g(others.)41 b(After)31
 
18907
3309 y(sp)s(eci\014ed)d(b)s(efore)g(others.)41 b(After)31
18907
18908
b(sp)s(ecifying)g(the)f(ciphers)g(y)m(ou)h(w)m(an)m(t,)h(y)m(ou)f(m)m
18908
 
(ust)f(app)s(end)f(a)i(0.)390 2303 y(Note)37 b(that)f(the)f(priorit)m
 
18909
(ust)f(app)s(end)f(a)i(0.)390 3419 y(Note)37 b(that)f(the)f(priorit)m
18909
18910
(y)h(is)g(set)g(on)f(the)g(clien)m(t.)58 b(The)35 b(serv)m(er)g(do)s
18910
 
(es)g(not)h(use)f(the)h(algorithm's)390 2413 y(priorit)m(y)31
 
18911
(es)g(not)h(use)f(the)h(algorithm's)390 3529 y(priorit)m(y)31
18911
18912
b(except)g(for)f(disabling)h(algorithms)g(that)g(w)m(ere)g(not)f(sp)s
18912
 
(eci\014ed.)390 2551 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
18913
(eci\014ed.)390 3688 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
18913
18914
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
18914
 
2754 y Fv(gn)m(utls)p 483 2754 37 5 v 55 w(cipher)p 869
18915
 
2754 V 54 w(suite)p 1177 2754 V 54 w(get)p 1396 2754
18916
 
V 54 w(name)3350 2955 y FB([F)-8 b(unction])-3599 b Fh(const)54
18917
 
b(char)f(*)g(gnutls_cipher_suite_ge)q(t_n)q(ame)565 3064
18918
 
y Fg(\()p Ff(gn)m(utls)p 846 3064 28 4 v 41 w(kx)p 983
18919
 
3064 V 40 w(algorithm)p 1406 3064 V 41 w(t)31 b Fe(kx_algorithm)12
18920
 
b Ff(,)33 b(gn)m(utls)p 2447 3064 V 41 w(cipher)p 2731
18921
 
3064 V 39 w(algorithm)p 3153 3064 V 41 w(t)565 3174 y
18922
 
Fe(cipher_algorithm)12 b Ff(,)35 b(gn)m(utls)p 1715 3174
18923
 
V 40 w(mac)p 1916 3174 V 41 w(algorithm)p 2340 3174 V
18924
 
41 w(t)c Fe(mac_algorithm)12 b Fg(\))390 3283 y Ff(kx)p
18925
 
492 3283 V 40 w(algorithm)p FB(:)42 b(is)30 b(a)h(Key)f(exc)m(hange)i
18926
 
(algorithm)390 3422 y Ff(cipher)p 639 3422 V 40 w(algorithm)p
18927
 
FB(:)41 b(is)31 b(a)g(cipher)f(algorithm)390 3560 y Ff(mac)p
18928
 
557 3560 V 41 w(algorithm)p FB(:)41 b(is)31 b(a)g(MA)m(C)f(algorithm)
18929
 
390 3698 y(Note)f(that)g(the)f(full)g(cipher)f(suite)i(name)f(m)m(ust)g
 
18915
3913 y Fv(gn)m(utls)p 483 3913 37 5 v 55 w(cipher)p 869
 
18916
3913 V 54 w(suite)p 1177 3913 V 54 w(get)p 1396 3913
 
18917
V 54 w(name)3350 4135 y FB([F)-8 b(unction])-3599 b Fh(const)54
 
18918
b(char)f(*)g(gnutls_cipher_suite_ge)q(t_n)q(ame)565 4245
 
18919
y Fg(\()p Ff(gn)m(utls)p 846 4245 28 4 v 41 w(kx)p 983
 
18920
4245 V 40 w(algorithm)p 1406 4245 V 41 w(t)31 b Fe(kx_algorithm)12
 
18921
b Ff(,)33 b(gn)m(utls)p 2447 4245 V 41 w(cipher)p 2731
 
18922
4245 V 39 w(algorithm)p 3153 4245 V 41 w(t)565 4354 y
 
18923
Fe(cipher_algorithm)12 b Ff(,)35 b(gn)m(utls)p 1715 4354
 
18924
V 40 w(mac)p 1916 4354 V 41 w(algorithm)p 2340 4354 V
 
18925
41 w(t)c Fe(mac_algorithm)12 b Fg(\))390 4464 y Ff(kx)p
 
18926
492 4464 V 40 w(algorithm)p FB(:)42 b(is)30 b(a)h(Key)f(exc)m(hange)i
 
18927
(algorithm)390 4624 y Ff(cipher)p 639 4624 V 40 w(algorithm)p
 
18928
FB(:)41 b(is)31 b(a)g(cipher)f(algorithm)390 4783 y Ff(mac)p
 
18929
557 4783 V 41 w(algorithm)p FB(:)41 b(is)31 b(a)g(MA)m(C)f(algorithm)
 
18930
390 4943 y(Note)f(that)g(the)f(full)g(cipher)f(suite)i(name)f(m)m(ust)g
18930
18931
(b)s(e)f(prep)s(ended)f(b)m(y)i(TLS)f(or)h(SSL)e(dep)s(ending)h(of)390
18931
 
3807 y(the)k(proto)s(col)g(in)f(use.)390 3946 y Fn(Returns:)38
 
18932
5053 y(the)k(proto)s(col)g(in)f(use.)390 5213 y Fn(Returns:)38
18932
18933
b FB(a)26 b(string)f(that)h(con)m(tains)h(the)f(name)f(of)h(a)g(TLS)e
18933
18934
(cipher)h(suite,)i(sp)s(eci\014ed)e(b)m(y)g(the)h(giv)m(en)390
18934
 
4055 y(algorithms,)32 b(or)e Ft(NULL)p FB(.)150 4258
18935
 
y Fv(gn)m(utls)p 483 4258 37 5 v 55 w(cipher)p 869 4258
18936
 
V 54 w(suite)p 1177 4258 V 54 w(info)3350 4459 y FB([F)-8
18937
 
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_cipher_suite_in)q
18938
 
(fo)f Fg(\()p Ff(size)p 2313 4459 28 4 v 41 w(t)31 b
18939
 
Fe(idx)12 b Ff(,)31 b(c)m(har)f(*)565 4568 y Fe(cs_id)12
18940
 
b Ff(,)32 b(gn)m(utls)p 1140 4568 V 40 w(kx)p 1276 4568
18941
 
V 40 w(algorithm)p 1699 4568 V 41 w(t)f(*)g Fe(kx)12
18942
 
b Ff(,)30 b(gn)m(utls)p 2293 4568 V 41 w(cipher)p 2577
18943
 
4568 V 39 w(algorithm)p 2999 4568 V 41 w(t)h(*)g Fe(cipher)12
18944
 
b Ff(,)565 4678 y(gn)m(utls)p 811 4678 V 41 w(mac)p 1013
18945
 
4678 V 40 w(algorithm)p 1436 4678 V 41 w(t)31 b(*)g Fe(mac)12
18946
 
b Ff(,)31 b(gn)m(utls)p 2083 4678 V 40 w(proto)s(col)p
18947
 
2448 4678 V 41 w(t)g(*)f Fe(version)12 b Fg(\))390 4787
18948
 
y Ff(idx)6 b FB(:)41 b(index)30 b(of)g(cipher)g(suite)h(to)g(get)g
18949
 
(information)g(ab)s(out,)f(starts)h(on)g(0.)390 4925
18950
 
y Ff(cs)p 472 4925 V 40 w(id)t FB(:)40 b(output)30 b(bu\013er)g(with)g
18951
 
(ro)s(om)g(for)g(2)h(b)m(ytes,)g(indicating)g(cipher)f(suite)h(v)-5
18952
 
b(alue)390 5064 y Ff(kx)6 b FB(:)41 b(output)30 b(v)-5
18953
 
b(ariable)31 b(indicating)g(k)m(ey)g(exc)m(hange)h(algorithm,)g(or)e
18954
 
Ft(NULL)p FB(.)390 5202 y Ff(cipher)7 b FB(:)40 b(output)30
18955
 
b(v)-5 b(ariable)31 b(indicating)g(cipher,)f(or)h Ft(NULL)p
18956
 
FB(.)390 5340 y Ff(mac)6 b FB(:)41 b(output)30 b(v)-5
18957
 
b(ariable)31 b(indicating)g(MA)m(C)g(algorithm,)h(or)e
18958
 
Ft(NULL)p FB(.)p eop end
 
18935
5322 y(algorithms,)32 b(or)e Ft(NULL)p FB(.)p eop end
18959
18936
%%Page: 133 139
18960
18937
TeXDict begin 133 138 bop 150 -116 a FB(Chapter)30 b(9:)41
18961
 
b(F)-8 b(unction)31 b(Reference)2237 b(133)390 299 y
18962
 
Ff(v)m(ersion)p FB(:)41 b(output)30 b(v)-5 b(ariable)31
 
18938
b(F)-8 b(unction)31 b(Reference)2237 b(133)150 299 y
 
18939
Fv(gn)m(utls)p 483 299 37 5 v 55 w(cipher)p 869 299 V
 
18940
54 w(suite)p 1177 299 V 54 w(info)3350 509 y FB([F)-8
 
18941
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_cipher_suite_in)q
 
18942
(fo)f Fg(\()p Ff(size)p 2313 509 28 4 v 41 w(t)31 b Fe(idx)12
 
18943
b Ff(,)31 b(c)m(har)f(*)565 618 y Fe(cs_id)12 b Ff(,)32
 
18944
b(gn)m(utls)p 1140 618 V 40 w(kx)p 1276 618 V 40 w(algorithm)p
 
18945
1699 618 V 41 w(t)f(*)g Fe(kx)12 b Ff(,)30 b(gn)m(utls)p
 
18946
2293 618 V 41 w(cipher)p 2577 618 V 39 w(algorithm)p
 
18947
2999 618 V 41 w(t)h(*)g Fe(cipher)12 b Ff(,)565 728 y(gn)m(utls)p
 
18948
811 728 V 41 w(mac)p 1013 728 V 40 w(algorithm)p 1436
 
18949
728 V 41 w(t)31 b(*)g Fe(mac)12 b Ff(,)31 b(gn)m(utls)p
 
18950
2083 728 V 40 w(proto)s(col)p 2448 728 V 41 w(t)g(*)f
 
18951
Fe(version)12 b Fg(\))390 838 y Ff(idx)6 b FB(:)41 b(index)30
 
18952
b(of)g(cipher)g(suite)h(to)g(get)g(information)g(ab)s(out,)f(starts)h
 
18953
(on)g(0.)390 985 y Ff(cs)p 472 985 V 40 w(id)t FB(:)40
 
18954
b(output)30 b(bu\013er)g(with)g(ro)s(om)g(for)g(2)h(b)m(ytes,)g
 
18955
(indicating)g(cipher)f(suite)h(v)-5 b(alue)390 1133 y
 
18956
Ff(kx)6 b FB(:)41 b(output)30 b(v)-5 b(ariable)31 b(indicating)g(k)m
 
18957
(ey)g(exc)m(hange)h(algorithm,)g(or)e Ft(NULL)p FB(.)390
 
18958
1281 y Ff(cipher)7 b FB(:)40 b(output)30 b(v)-5 b(ariable)31
 
18959
b(indicating)g(cipher,)f(or)h Ft(NULL)p FB(.)390 1428
 
18960
y Ff(mac)6 b FB(:)41 b(output)30 b(v)-5 b(ariable)31
 
18961
b(indicating)g(MA)m(C)g(algorithm,)h(or)e Ft(NULL)p FB(.)390
 
18962
1576 y Ff(v)m(ersion)p FB(:)41 b(output)30 b(v)-5 b(ariable)31
18963
18963
b(indicating)h(TLS)d(proto)s(col)i(v)m(ersion,)g(or)g
18964
 
Ft(NULL)p FB(.)390 461 y(Get)38 b(information)g(ab)s(out)f(supp)s
 
18964
Ft(NULL)p FB(.)390 1724 y(Get)38 b(information)g(ab)s(out)f(supp)s
18965
18965
(orted)e(cipher)i(suites.)61 b(Use)38 b(the)f(function)g(iterativ)m
18966
 
(ely)j(to)e(get)390 571 y(information)g(ab)s(out)g(all)h(supp)s(orted)d
18967
 
(cipher)h(suites.)63 b(Call)39 b(with)e(idx=0)h(to)h(get)g(information)
18968
 
390 681 y(ab)s(out)30 b(\014rst)g(cipher)g(suite,)h(then)f(idx=1)g(and)
18969
 
g(so)g(on)h(un)m(til)f(the)h(function)f(returns)f(NULL.)390
18970
 
843 y Fn(Returns:)38 b FB(the)26 b(name)f(of)h Ft(idx)e
 
18966
(ely)j(to)e(get)390 1833 y(information)g(ab)s(out)g(all)h(supp)s(orted)
 
18967
d(cipher)h(suites.)63 b(Call)39 b(with)e(idx=0)h(to)h(get)g
 
18968
(information)390 1943 y(ab)s(out)30 b(\014rst)g(cipher)g(suite,)h(then)
 
18969
f(idx=1)g(and)g(so)g(on)h(un)m(til)f(the)h(function)f(returns)f(NULL.)
 
18970
390 2091 y Fn(Returns:)38 b FB(the)26 b(name)f(of)h Ft(idx)e
18971
18971
FB(cipher)h(suite,)i(and)e(set)h(the)g(information)g(ab)s(out)f(the)h
18972
 
(cipher)f(suite)390 953 y(in)30 b(the)h(output)f(v)-5
 
18972
(cipher)f(suite)390 2200 y(in)30 b(the)h(output)f(v)-5
18973
18973
b(ariables.)41 b(If)30 b Ft(idx)f FB(is)i(out)f(of)h(b)s(ounds,)d
18974
 
Ft(NULL)i FB(is)g(returned.)150 1180 y Fv(gn)m(utls)p
18975
 
483 1180 37 5 v 55 w(compression)p 1189 1180 V 55 w(get)p
18976
 
1409 1180 V 55 w(id)3350 1405 y FB([F)-8 b(unction])-3599
 
18974
Ft(NULL)i FB(is)g(returned.)150 2413 y Fv(gn)m(utls)p
 
18975
483 2413 37 5 v 55 w(compression)p 1189 2413 V 55 w(get)p
 
18976
1409 2413 V 55 w(id)3350 2623 y FB([F)-8 b(unction])-3599
18977
18977
b Fh(gnutls_compression_met)q(hod)q(_t)58 b(gnutls_compression_g)q
18978
 
(et_i)q(d)565 1514 y Fg(\()p Ff(const)31 b(c)m(har)g(*)g
18979
 
Fe(name)12 b Fg(\))390 1624 y Ff(name)5 b FB(:)41 b(is)30
18980
 
b(a)h(compression)f(metho)s(d)g(name)390 1786 y(The)g(names)g(are)h
 
18978
(et_i)q(d)565 2732 y Fg(\()p Ff(const)31 b(c)m(har)g(*)g
 
18979
Fe(name)12 b Fg(\))390 2842 y Ff(name)5 b FB(:)41 b(is)30
 
18980
b(a)h(compression)f(metho)s(d)g(name)390 2990 y(The)g(names)g(are)h
18981
18981
(compared)f(in)g(a)h(case)h(insensitiv)m(e)f(w)m(a)m(y)-8
18982
 
b(.)390 1949 y Fn(Returns:)59 b FB(an)39 b(id)g(of)h(the)g(sp)s
 
18982
b(.)390 3137 y Fn(Returns:)59 b FB(an)39 b(id)g(of)h(the)g(sp)s
18983
18983
(eci\014ed)e(in)i(a)f(string)h(compression)f(metho)s(d,)j(or)d
18984
 
Ft(GNUTLS_COMP_)390 2058 y(UNKNOWN)28 b FB(on)j(error.)150
18985
 
2285 y Fv(gn)m(utls)p 483 2285 V 55 w(compression)p 1189
18986
 
2285 V 55 w(get)p 1409 2285 V 55 w(name)3350 2510 y FB([F)-8
 
18984
Ft(GNUTLS_COMP_)390 3247 y(UNKNOWN)28 b FB(on)j(error.)150
 
18985
3459 y Fv(gn)m(utls)p 483 3459 V 55 w(compression)p 1189
 
18986
3459 V 55 w(get)p 1409 3459 V 55 w(name)3350 3669 y FB([F)-8
18987
18987
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_compression_get)q
18988
 
(_na)q(me)565 2620 y Fg(\()p Ff(gn)m(utls)p 846 2620
18989
 
28 4 v 41 w(compression)p 1368 2620 V 40 w(metho)s(d)p
18990
 
1709 2620 V 39 w(t)31 b Fe(algorithm)12 b Fg(\))390 2729
 
18988
(_na)q(me)565 3779 y Fg(\()p Ff(gn)m(utls)p 846 3779
 
18989
28 4 v 41 w(compression)p 1368 3779 V 40 w(metho)s(d)p
 
18990
1709 3779 V 39 w(t)31 b Fe(algorithm)12 b Fg(\))390 3888
18991
18991
y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(Compression)f(algorithm)390
18992
 
2892 y(Con)m(v)m(ert)h(a)g Ft(gnutls_compression_metho)o(d_t)24
18993
 
b FB(v)-5 b(alue)31 b(to)g(a)g(string.)390 3054 y Fn(Returns:)51
 
18992
4036 y(Con)m(v)m(ert)h(a)g Ft(gnutls_compression_metho)o(d_t)24
 
18993
b FB(v)-5 b(alue)31 b(to)g(a)g(string.)390 4184 y Fn(Returns:)51
18994
18994
b FB(a)37 b(p)s(oin)m(ter)e(to)i(a)f(string)g(that)h(con)m(tains)g(the)
18995
18995
f(name)g(of)g(the)g(sp)s(eci\014ed)f(compression)390
18996
 
3164 y(algorithm,)d(or)e Ft(NULL)p FB(.)150 3391 y Fv(gn)m(utls)p
18997
 
483 3391 37 5 v 55 w(compression)p 1189 3391 V 55 w(get)3350
18998
 
3616 y FB([F)-8 b(unction])-3599 b Fh(gnutls_compression_met)q(hod)q
18999
 
(_t)58 b(gnutls_compression_g)q(et)565 3725 y Fg(\()p
19000
 
Ff(gn)m(utls)p 846 3725 28 4 v 41 w(session)p 1156 3725
19001
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 3835 y Ff(session)p
 
18996
4293 y(algorithm,)d(or)e Ft(NULL)p FB(.)150 4506 y Fv(gn)m(utls)p
 
18997
483 4506 37 5 v 55 w(compression)p 1189 4506 V 55 w(get)3350
 
18998
4716 y FB([F)-8 b(unction])-3599 b Fh(gnutls_compression_met)q(hod)q
 
18999
(_t)58 b(gnutls_compression_g)q(et)565 4825 y Fg(\()p
 
19000
Ff(gn)m(utls)p 846 4825 28 4 v 41 w(session)p 1156 4825
 
19001
V 40 w(t)31 b Fe(session)12 b Fg(\))390 4935 y Ff(session)p
19002
19002
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
19003
 
3997 y(Get)31 b(curren)m(tly)g(used)e(compression)i(algorithm.)390
19004
 
4160 y Fn(Returns:)39 b FB(the)29 b(curren)m(tly)f(used)f(compression)h
 
19003
5083 y(Get)31 b(curren)m(tly)g(used)e(compression)i(algorithm.)390
 
19004
5230 y Fn(Returns:)39 b FB(the)29 b(curren)m(tly)f(used)f(compression)h
19005
19005
(metho)s(d,)h(a)f Ft(gnutls_compression_method_)o(t)390
19006
 
4270 y FB(v)-5 b(alue.)150 4497 y Fv(gn)m(utls)p 483
19007
 
4497 37 5 v 55 w(compression)p 1189 4497 V 55 w(list)3350
19008
 
4721 y FB([F)d(unction])-3599 b Fh(const)54 b(gnutls_compression_meth)q
19009
 
(od_)q(t)k(*)565 4831 y(gnutls_compression_lis)q(t)52
19010
 
b Fg(\()30 b Fe(void)12 b Fg(\))390 4941 y FB(Get)38
19011
 
b(a)f(list)h(of)f(compression)g(metho)s(ds.)60 b(Note)39
19012
 
b(that)e(to)h(b)s(e)f(able)g(to)h(use)f(LZO)f(compression,)390
19013
 
5050 y(y)m(ou)31 b(m)m(ust)f(link)g(to)h(libgn)m(utls-extra)h(and)e
19014
 
(call)i Ft(gnutls_global_init_extr)o(a\(\))p FB(.)390
19015
 
5213 y Fn(Returns:)47 b FB(a)33 b(zero-terminated)j(list)e(of)f
19016
 
Ft(gnutls_compression_method)o(_t)27 b FB(in)m(tegers)35
19017
 
b(indicat-)390 5322 y(ing)c(the)f(a)m(v)-5 b(ailable)33
19018
 
b(compression)d(metho)s(ds.)p eop end
 
19006
5340 y FB(v)-5 b(alue.)p eop end
19019
19007
%%Page: 134 140
19020
19008
TeXDict begin 134 139 bop 150 -116 a FB(Chapter)30 b(9:)41
19021
19009
b(F)-8 b(unction)31 b(Reference)2237 b(134)150 299 y
19022
19010
Fv(gn)m(utls)p 483 299 37 5 v 55 w(compression)p 1189
19023
 
299 V 55 w(set)p 1396 299 V 55 w(priorit)m(y)3350 499
19024
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_compression_se)q(t_pr)
19025
 
q(ior)q(ity)f Fg(\()p Ff(gn)m(utls)p 2307 499 28 4 v
19026
 
41 w(session)p 2617 499 V 40 w(t)31 b Fe(session)12 b
19027
 
Ff(,)565 609 y(const)31 b(in)m(t)g(*)g Fe(list)12 b Fg(\))390
19028
 
718 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
19029
 
b FB(structure.)390 857 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f
19030
 
(terminated)h(list)g(of)g(gn)m(utls)p 1789 857 V 40 w(compression)p
19031
 
2310 857 V 40 w(metho)s(d)p 2651 857 V 40 w(t)f(elemen)m(ts.)390
19032
 
995 y(Sets)21 b(the)h(priorit)m(y)g(on)f(the)h(compression)f
19033
 
(algorithms)i(supp)s(orted)c(b)m(y)j(gn)m(utls.)38 b(Priorit)m(y)22
19034
 
b(is)f(higher)390 1104 y(for)36 b(elemen)m(ts)h(sp)s(eci\014ed)e(b)s
19035
 
(efore)h(others.)57 b(After)36 b(sp)s(ecifying)g(the)g(algorithms)h(y)m
19036
 
(ou)f(w)m(an)m(t,)j(y)m(ou)390 1214 y(m)m(ust)29 b(app)s(end)f(a)i(0.)
19037
 
41 b(Note)30 b(that)g(the)g(priorit)m(y)g(is)f(set)h(on)f(the)h(clien)m
 
19011
299 V 55 w(list)3350 483 y FB([F)-8 b(unction])-3599
 
19012
b Fh(const)54 b(gnutls_compression_meth)q(od_)q(t)k(*)565
 
19013
592 y(gnutls_compression_lis)q(t)52 b Fg(\()30 b Fe(void)12
 
19014
b Fg(\))390 702 y FB(Get)38 b(a)f(list)h(of)f(compression)g(metho)s
 
19015
(ds.)60 b(Note)39 b(that)e(to)h(b)s(e)f(able)g(to)h(use)f(LZO)f
 
19016
(compression,)390 812 y(y)m(ou)31 b(m)m(ust)f(link)g(to)h(libgn)m
 
19017
(utls-extra)h(and)e(call)i Ft(gnutls_global_init_extr)o(a\(\))p
 
19018
FB(.)390 940 y Fn(Returns:)47 b FB(a)33 b(zero-terminated)j(list)e(of)f
 
19019
Ft(gnutls_compression_method)o(_t)27 b FB(in)m(tegers)35
 
19020
b(indicat-)390 1049 y(ing)c(the)f(a)m(v)-5 b(ailable)33
 
19021
b(compression)d(metho)s(ds.)150 1236 y Fv(gn)m(utls)p
 
19022
483 1236 V 55 w(compression)p 1189 1236 V 55 w(set)p
 
19023
1396 1236 V 55 w(priorit)m(y)3350 1420 y FB([F)-8 b(unction])-3599
 
19024
b Fh(int)53 b(gnutls_compression_se)q(t_pr)q(ior)q(ity)f
 
19025
Fg(\()p Ff(gn)m(utls)p 2307 1420 28 4 v 41 w(session)p
 
19026
2617 1420 V 40 w(t)31 b Fe(session)12 b Ff(,)565 1529
 
19027
y(const)31 b(in)m(t)g(*)g Fe(list)12 b Fg(\))390 1639
 
19028
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
19029
b FB(structure.)390 1767 y Ff(list)r FB(:)41 b(is)31
 
19030
b(a)g(0)f(terminated)h(list)g(of)g(gn)m(utls)p 1789 1767
 
19031
V 40 w(compression)p 2310 1767 V 40 w(metho)s(d)p 2651
 
19032
1767 V 40 w(t)f(elemen)m(ts.)390 1895 y(Sets)21 b(the)h(priorit)m(y)g
 
19033
(on)f(the)h(compression)f(algorithms)i(supp)s(orted)c(b)m(y)j(gn)m
 
19034
(utls.)38 b(Priorit)m(y)22 b(is)f(higher)390 2004 y(for)36
 
19035
b(elemen)m(ts)h(sp)s(eci\014ed)e(b)s(efore)h(others.)57
 
19036
b(After)36 b(sp)s(ecifying)g(the)g(algorithms)h(y)m(ou)f(w)m(an)m(t,)j
 
19037
(y)m(ou)390 2114 y(m)m(ust)29 b(app)s(end)f(a)i(0.)41
 
19038
b(Note)30 b(that)g(the)g(priorit)m(y)g(is)f(set)h(on)f(the)h(clien)m
19038
19039
(t.)42 b(The)29 b(serv)m(er)h(do)s(es)f(not)g(use)390
19039
 
1324 y(the)i(algorithm's)g(priorit)m(y)g(except)g(for)f(disabling)h
 
19040
2224 y(the)i(algorithm's)g(priorit)m(y)g(except)g(for)f(disabling)h
19040
19041
(algorithms)g(that)g(w)m(ere)g(not)f(sp)s(eci\014ed.)390
19041
 
1462 y(TLS)21 b(1.0)j(do)s(es)e(not)h(de\014ne)e(an)m(y)i(compression)g
 
19042
2352 y(TLS)21 b(1.0)j(do)s(es)e(not)h(de\014ne)e(an)m(y)i(compression)g
19042
19043
(algorithms)g(except)g(NULL.)g(Other)f(compression)390
19043
 
1571 y(algorithms)31 b(are)g(to)g(b)s(e)f(considered)g(as)h(gn)m(utls)f
19044
 
(extensions.)390 1710 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19044
2461 y(algorithms)31 b(are)g(to)g(b)s(e)f(considered)g(as)h(gn)m(utls)f
 
19045
(extensions.)390 2589 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19045
19046
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
19046
 
1912 y Fv(gn)m(utls)p 483 1912 37 5 v 55 w(creden)m(tials)p
19047
 
1112 1912 V 53 w(clear)3350 2113 y FB([F)-8 b(unction])-3599
 
19047
2776 y Fv(gn)m(utls)p 483 2776 37 5 v 55 w(creden)m(tials)p
 
19048
1112 2776 V 53 w(clear)3350 2960 y FB([F)-8 b(unction])-3599
19048
19049
b Fh(void)54 b(gnutls_credentials_clear)e Fg(\()p Ff(gn)m(utls)p
19049
 
1993 2113 28 4 v 41 w(session)p 2303 2113 V 40 w(t)31
19050
 
b Fe(session)12 b Fg(\))390 2222 y Ff(session)p FB(:)41
 
19050
1993 2960 28 4 v 41 w(session)p 2303 2960 V 40 w(t)31
 
19051
b Fe(session)12 b Fg(\))390 3069 y Ff(session)p FB(:)41
19051
19052
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
19052
 
2361 y(Clears)31 b(all)g(the)f(creden)m(tials)i(previously)e(set)h(in)f
19053
 
(this)g(session.)150 2564 y Fv(gn)m(utls)p 483 2564 37
19054
 
5 v 55 w(creden)m(tials)p 1112 2564 V 53 w(set)3350 2764
 
19053
3197 y(Clears)31 b(all)g(the)f(creden)m(tials)i(previously)e(set)h(in)f
 
19054
(this)g(session.)150 3384 y Fv(gn)m(utls)p 483 3384 37
 
19055
5 v 55 w(creden)m(tials)p 1112 3384 V 53 w(set)3350 3568
19055
19056
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_credentials_se)q(t)e
19056
 
Fg(\()p Ff(gn)m(utls)p 1836 2764 28 4 v 41 w(session)p
19057
 
2146 2764 V 40 w(t)31 b Fe(session)12 b Ff(,)565 2874
19058
 
y(gn)m(utls)p 811 2874 V 41 w(creden)m(tials)p 1273 2874
19059
 
V 41 w(t)m(yp)s(e)p 1488 2874 V 40 w(t)31 b Fe(type)12
19060
 
b Ff(,)31 b(v)m(oid)g(*)g Fe(cred)12 b Fg(\))390 2983
 
19057
Fg(\()p Ff(gn)m(utls)p 1836 3568 28 4 v 41 w(session)p
 
19058
2146 3568 V 40 w(t)31 b Fe(session)12 b Ff(,)565 3677
 
19059
y(gn)m(utls)p 811 3677 V 41 w(creden)m(tials)p 1273 3677
 
19060
V 41 w(t)m(yp)s(e)p 1488 3677 V 40 w(t)31 b Fe(type)12
 
19061
b Ff(,)31 b(v)m(oid)g(*)g Fe(cred)12 b Fg(\))390 3787
19061
19062
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
19062
 
b FB(structure.)390 3121 y Ff(t)m(yp)s(e)5 b FB(:)41
 
19063
b FB(structure.)390 3915 y Ff(t)m(yp)s(e)5 b FB(:)41
19063
19064
b(is)30 b(the)h(t)m(yp)s(e)g(of)f(the)h(creden)m(tials)390
19064
 
3259 y Ff(cred)t FB(:)40 b(is)31 b(a)f(p)s(oin)m(ter)h(to)g(a)g
19065
 
(structure.)390 3398 y(Sets)e(the)f(needed)h(creden)m(tials)h(for)e
 
19065
4043 y Ff(cred)t FB(:)40 b(is)31 b(a)f(p)s(oin)m(ter)h(to)g(a)g
 
19066
(structure.)390 4171 y(Sets)e(the)f(needed)h(creden)m(tials)h(for)e
19066
19067
(the)h(sp)s(eci\014ed)f(t)m(yp)s(e.)40 b(Eg)29 b(username,)f(passw)m
19067
 
(ord)g(-)h(or)g(public)390 3507 y(and)h(priv)-5 b(ate)31
 
19068
(ord)g(-)h(or)g(public)390 4281 y(and)h(priv)-5 b(ate)31
19068
19069
b(k)m(eys)h(etc.)42 b(The)31 b(\(v)m(oid*)h(cred\))f(parameter)g(is)g
19069
 
(a)g(structure)f(that)h(dep)s(ends)e(on)i(the)390 3617
 
19070
(a)g(structure)f(that)h(dep)s(ends)e(on)i(the)390 4390
19070
19071
y(sp)s(eci\014ed)37 b(t)m(yp)s(e)g(and)g(on)g(the)g(curren)m(t)h
19071
19072
(session)f(\(clien)m(t)i(or)e(serv)m(er\).)63 b([)37
19072
 
b(In)g(order)f(to)i(minimize)390 3726 y(memory)32 b(usage,)i(and)e
 
19073
b(In)g(order)f(to)i(minimize)390 4500 y(memory)32 b(usage,)i(and)e
19073
19074
(share)g(creden)m(tials)h(b)s(et)m(w)m(een)g(sev)m(eral)h(threads)e(gn)
19074
 
m(utls)g(k)m(eeps)h(a)g(p)s(oin)m(ter)390 3836 y(to)g(cred,)g(and)f
 
19075
m(utls)g(k)m(eeps)h(a)g(p)s(oin)m(ter)390 4609 y(to)g(cred,)g(and)f
19075
19076
(not)g(the)h(whole)f(cred)h(structure.)46 b(Th)m(us)31
19076
19077
b(y)m(ou)i(will)f(ha)m(v)m(e)i(to)f(k)m(eep)g(the)f(structure)390
19077
 
3946 y(allo)s(cated)g(un)m(til)f(y)m(ou)g(call)g Ft(gnutls_deinit\(\))p
19078
 
FB(.)37 b(])390 4084 y(F)-8 b(or)39 b(GNUTLS)p 948 4084
19079
 
V 40 w(CRD)p 1190 4084 V 40 w(ANON)f(cred)h(should)e(b)s(e)h(gn)m(utls)
19080
 
p 2417 4084 V 40 w(anon)p 2649 4084 V 40 w(clien)m(t)p
19081
 
2902 4084 V 42 w(creden)m(tials)p 3365 4084 V 41 w(t)h(in)f(case)390
19082
 
4193 y(of)31 b(a)f(clien)m(t.)43 b(In)29 b(case)j(of)e(a)h(serv)m(er)g
19083
 
(it)f(should)g(b)s(e)g(gn)m(utls)p 2348 4193 V 40 w(anon)p
19084
 
2580 4193 V 40 w(serv)m(er)p 2853 4193 V 40 w(creden)m(tials)p
19085
 
3314 4193 V 42 w(t.)390 4332 y(F)-8 b(or)36 b(GNUTLS)p
19086
 
945 4332 V 40 w(CRD)p 1187 4332 V 40 w(SRP)e(cred)h(should)f(b)s(e)g
19087
 
(gn)m(utls)p 2304 4332 V 41 w(srp)p 2468 4332 V 39 w(clien)m(t)p
19088
 
2720 4332 V 41 w(creden)m(tials)p 3182 4332 V 42 w(t)h(in)g(case)h(of)g
19089
 
(a)390 4441 y(clien)m(t,)c(and)e(gn)m(utls)p 1083 4441
19090
 
V 40 w(srp)p 1246 4441 V 39 w(serv)m(er)p 1518 4441 V
19091
 
41 w(creden)m(tials)p 1980 4441 V 41 w(t,)h(in)f(case)i(of)e(a)h(serv)m
19092
 
(er.)390 4579 y(F)-8 b(or)31 b(GNUTLS)p 940 4579 V 40
19093
 
w(CRD)p 1182 4579 V 40 w(CER)-8 b(TIFICA)g(TE)29 b(cred)i(should)e(b)s
19094
 
(e)h(gn)m(utls)p 2733 4579 V 40 w(certi\014cate)p 3160
19095
 
4579 V 42 w(creden)m(tials)p 3623 4579 V 42 w(t.)150
19096
 
4782 y Fv(gn)m(utls)p 483 4782 37 5 v 55 w(crypto)p 885
19097
 
4782 V 53 w(bigin)m(t)p 1248 4782 V 54 w(register2)3350
19098
 
4983 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_crypto_bigint_)q
19099
 
(regi)q(ste)q(r2)f Fg(\()p Ff(in)m(t)31 b Fe(priority)12
19100
 
b Ff(,)33 b(in)m(t)d Fe(version)12 b Ff(,)565 5092 y(gn)m(utls)p
19101
 
811 5092 28 4 v 41 w(crypto)p 1107 5092 V 40 w(bigin)m(t)p
19102
 
1376 5092 V 41 w(st)30 b(*)h Fe(s)12 b Fg(\))390 5202
19103
 
y Ff(priorit)m(y)c FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(in)
19104
 
m(terface)390 5340 y Ff(v)m(ersion)p FB(:)41 b(should)30
19105
 
b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)p eop
 
19078
4719 y(allo)s(cated)g(un)m(til)f(y)m(ou)g(call)g Ft(gnutls_deinit\(\))p
 
19079
FB(.)37 b(])390 4847 y(F)-8 b(or)39 b(GNUTLS)p 948 4847
 
19080
V 40 w(CRD)p 1190 4847 V 40 w(ANON)f(cred)h(should)e(b)s(e)h(gn)m(utls)
 
19081
p 2417 4847 V 40 w(anon)p 2649 4847 V 40 w(clien)m(t)p
 
19082
2902 4847 V 42 w(creden)m(tials)p 3365 4847 V 41 w(t)h(in)f(case)390
 
19083
4957 y(of)31 b(a)f(clien)m(t.)43 b(In)29 b(case)j(of)e(a)h(serv)m(er)g
 
19084
(it)f(should)g(b)s(e)g(gn)m(utls)p 2348 4957 V 40 w(anon)p
 
19085
2580 4957 V 40 w(serv)m(er)p 2853 4957 V 40 w(creden)m(tials)p
 
19086
3314 4957 V 42 w(t.)390 5085 y(F)-8 b(or)36 b(GNUTLS)p
 
19087
945 5085 V 40 w(CRD)p 1187 5085 V 40 w(SRP)e(cred)h(should)f(b)s(e)g
 
19088
(gn)m(utls)p 2304 5085 V 41 w(srp)p 2468 5085 V 39 w(clien)m(t)p
 
19089
2720 5085 V 41 w(creden)m(tials)p 3182 5085 V 42 w(t)h(in)g(case)h(of)g
 
19090
(a)390 5194 y(clien)m(t,)c(and)e(gn)m(utls)p 1083 5194
 
19091
V 40 w(srp)p 1246 5194 V 39 w(serv)m(er)p 1518 5194 V
 
19092
41 w(creden)m(tials)p 1980 5194 V 41 w(t,)h(in)f(case)i(of)e(a)h(serv)m
 
19093
(er.)390 5322 y(F)-8 b(or)31 b(GNUTLS)p 940 5322 V 40
 
19094
w(CRD)p 1182 5322 V 40 w(CER)-8 b(TIFICA)g(TE)29 b(cred)i(should)e(b)s
 
19095
(e)h(gn)m(utls)p 2733 5322 V 40 w(certi\014cate)p 3160
 
19096
5322 V 42 w(creden)m(tials)p 3623 5322 V 42 w(t.)p eop
19106
19097
end
19107
19098
%%Page: 135 141
19108
19099
TeXDict begin 135 140 bop 150 -116 a FB(Chapter)30 b(9:)41
19109
 
b(F)-8 b(unction)31 b(Reference)2237 b(135)390 299 y
19110
 
Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e(in)m
19111
 
(terface's)j(data)390 426 y(This)39 b(function)h(will)g(register)h(an)f
19112
 
(in)m(terface)i(for)d(gn)m(utls)i(to)f(op)s(erate)h(on)f(big)g(in)m
19113
 
(tegers.)71 b(An)m(y)390 536 y(in)m(terface)29 b(registered)f(will)g(o)
19114
 
m(v)m(erride)h(the)f(included)f(in)m(terface.)41 b(The)27
19115
 
b(in)m(terface)i(with)e(the)h(lo)m(w)m(est)390 646 y(priorit)m(y)j
19116
 
(will)g(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)390 773 y(Note)j(that)f(the)g
19117
 
(bigin)m(t)g(in)m(terface)h(m)m(ust)f(in)m(terop)s(erate)h(with)e(the)h
19118
 
(public)f(k)m(ey)h(in)m(terface.)46 b(Th)m(us)390 883
 
19100
b(F)-8 b(unction)31 b(Reference)2237 b(135)150 299 y
 
19101
Fv(gn)m(utls)p 483 299 37 5 v 55 w(crypto)p 885 299 V
 
19102
53 w(bigin)m(t)p 1248 299 V 54 w(register2)3350 495 y
 
19103
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_crypto_bigint_)q(regi)q
 
19104
(ste)q(r2)f Fg(\()p Ff(in)m(t)31 b Fe(priority)12 b Ff(,)33
 
19105
b(in)m(t)d Fe(version)12 b Ff(,)565 604 y(gn)m(utls)p
 
19106
811 604 28 4 v 41 w(crypto)p 1107 604 V 40 w(bigin)m(t)p
 
19107
1376 604 V 41 w(st)30 b(*)h Fe(s)12 b Fg(\))390 714 y
 
19108
Ff(priorit)m(y)c FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(in)m
 
19109
(terface)390 848 y Ff(v)m(ersion)p FB(:)41 b(should)30
 
19110
b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)390
 
19111
982 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e(in)m
 
19112
(terface's)j(data)390 1116 y(This)39 b(function)h(will)g(register)h(an)
 
19113
f(in)m(terface)i(for)d(gn)m(utls)i(to)f(op)s(erate)h(on)f(big)g(in)m
 
19114
(tegers.)71 b(An)m(y)390 1226 y(in)m(terface)29 b(registered)f(will)g
 
19115
(o)m(v)m(erride)h(the)f(included)f(in)m(terface.)41 b(The)27
 
19116
b(in)m(terface)i(with)e(the)h(lo)m(w)m(est)390 1335 y(priorit)m(y)j
 
19117
(will)g(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)390 1469 y(Note)j(that)f(the)
 
19118
g(bigin)m(t)g(in)m(terface)h(m)m(ust)f(in)m(terop)s(erate)h(with)e(the)
 
19119
h(public)f(k)m(ey)h(in)m(terface.)46 b(Th)m(us)390 1579
19119
19120
y(if)30 b(this)h(in)m(terface)h(is)e(up)s(dated)f(the)i
19120
19121
Ft(gnutls_crypto_pk_regist)o(er\()o(\))25 b FB(should)k(also)i(b)s(e)f
19121
 
(used.)390 1010 y(This)g(function)g(should)f(b)s(e)h(called)h(b)s
19122
 
(efore)f Ft(gnutls_global_init\(\))p FB(.)390 1138 y(F)-8
 
19122
(used.)390 1713 y(This)g(function)g(should)f(b)s(e)h(called)h(b)s
 
19123
(efore)f Ft(gnutls_global_init\(\))p FB(.)390 1847 y(F)-8
19123
19124
b(or)53 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)g(con)m(v)m(enience)
19124
 
i Ft(gnutls_crypto_bigint_regis)o(ter\()o(\))390 1247
19125
 
y FB(macro.)390 1375 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19126
 
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 1503
19127
 
y Fn(Since:)41 b FB(2.6.0)150 1688 y Fv(gn)m(utls)p 483
19128
 
1688 37 5 v 55 w(crypto)p 885 1688 V 53 w(cipher)p 1269
19129
 
1688 V 54 w(register2)3350 1871 y FB([F)-8 b(unction])-3599
 
19125
i Ft(gnutls_crypto_bigint_regis)o(ter\()o(\))390 1957
 
19126
y FB(macro.)390 2091 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19127
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 2225
 
19128
y Fn(Since:)41 b FB(2.6.0)150 2423 y Fv(gn)m(utls)p 483
 
19129
2423 37 5 v 55 w(crypto)p 885 2423 V 53 w(cipher)p 1269
 
19130
2423 V 54 w(register2)3350 2619 y FB([F)-8 b(unction])-3599
19130
19131
b Fh(int)53 b(gnutls_crypto_cipher_)q(regi)q(ste)q(r2)f
19131
19132
Fg(\()p Ff(in)m(t)31 b Fe(priority)12 b Ff(,)33 b(in)m(t)d
19132
 
Fe(version)12 b Ff(,)565 1980 y(gn)m(utls)p 811 1980
19133
 
28 4 v 41 w(crypto)p 1107 1980 V 40 w(cipher)p 1390 1980
19134
 
V 39 w(st)31 b(*)g Fe(s)12 b Fg(\))390 2090 y Ff(priorit)m(y)c
 
19133
Fe(version)12 b Ff(,)565 2729 y(gn)m(utls)p 811 2729
 
19134
28 4 v 41 w(crypto)p 1107 2729 V 40 w(cipher)p 1390 2729
 
19135
V 39 w(st)31 b(*)g Fe(s)12 b Fg(\))390 2838 y Ff(priorit)m(y)c
19135
19136
FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(cipher)f(in)m(terface)
19136
 
390 2218 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
19137
 
Ft(GNUTLS_CRYPTO_API_VERSION)390 2345 y Ff(s)t FB(:)40
 
19137
390 2972 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
 
19138
Ft(GNUTLS_CRYPTO_API_VERSION)390 3106 y Ff(s)t FB(:)40
19138
19139
b(is)31 b(a)f(structure)g(holding)h(new)e(in)m(terface's)j(data)390
19139
 
2473 y(This)41 b(function)h(will)g(register)h(a)g(cipher)e(in)m
 
19140
3240 y(This)41 b(function)h(will)g(register)h(a)g(cipher)e(in)m
19140
19141
(terface)j(to)f(b)s(e)e(used)g(b)m(y)h(gn)m(utls.)76
19141
 
b(An)m(y)42 b(in)m(terface)390 2582 y(registered)e(will)g(o)m(v)m
 
19142
b(An)m(y)42 b(in)m(terface)390 3350 y(registered)e(will)g(o)m(v)m
19142
19143
(erride)g(the)g(included)f(engine)h(and)f(b)m(y)g(con)m(v)m(en)m(tion)i
19143
 
(k)m(ernel)f(implemen)m(ted)390 2692 y(in)m(terfaces)d(should)e(ha)m(v)
 
19144
(k)m(ernel)f(implemen)m(ted)390 3459 y(in)m(terfaces)d(should)e(ha)m(v)
19144
19145
m(e)i(priorit)m(y)f(of)g(90.)58 b(The)36 b(in)m(terface)h(with)e(the)h
19145
 
(lo)m(w)m(est)i(priorit)m(y)e(will)h(b)s(e)390 2801 y(used)30
19146
 
b(b)m(y)g(gn)m(utls.)390 2929 y(This)g(function)g(should)f(b)s(e)h
 
19146
(lo)m(w)m(est)i(priorit)m(y)e(will)h(b)s(e)390 3569 y(used)30
 
19147
b(b)m(y)g(gn)m(utls.)390 3703 y(This)g(function)g(should)f(b)s(e)h
19147
19148
(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p FB(.)390
19148
 
3057 y(F)-8 b(or)53 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)g(con)m
 
19149
3837 y(F)-8 b(or)53 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)g(con)m
19149
19150
(v)m(enience)i Ft(gnutls_crypto_cipher_regis)o(ter\()o(\))390
19150
 
3166 y FB(macro.)390 3294 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19151
 
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 3421
19152
 
y Fn(Since:)41 b FB(2.6.0)150 3607 y Fv(gn)m(utls)p 483
19153
 
3607 37 5 v 55 w(crypto)p 885 3607 V 53 w(digest)p 1253
19154
 
3607 V 55 w(register2)3350 3790 y FB([F)-8 b(unction])-3599
 
19151
3947 y FB(macro.)390 4081 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19152
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 4215
 
19153
y Fn(Since:)41 b FB(2.6.0)150 4413 y Fv(gn)m(utls)p 483
 
19154
4413 37 5 v 55 w(crypto)p 885 4413 V 53 w(digest)p 1253
 
19155
4413 V 55 w(register2)3350 4609 y FB([F)-8 b(unction])-3599
19155
19156
b Fh(int)53 b(gnutls_crypto_digest_)q(regi)q(ste)q(r2)f
19156
19157
Fg(\()p Ff(in)m(t)31 b Fe(priority)12 b Ff(,)33 b(in)m(t)d
19157
 
Fe(version)12 b Ff(,)565 3899 y(gn)m(utls)p 811 3899
19158
 
28 4 v 41 w(crypto)p 1107 3899 V 40 w(digest)p 1379 3899
19159
 
V 41 w(st)30 b(*)h Fe(s)12 b Fg(\))390 4009 y Ff(priorit)m(y)c
 
19158
Fe(version)12 b Ff(,)565 4719 y(gn)m(utls)p 811 4719
 
19159
28 4 v 41 w(crypto)p 1107 4719 V 40 w(digest)p 1379 4719
 
19160
V 41 w(st)30 b(*)h Fe(s)12 b Fg(\))390 4828 y Ff(priorit)m(y)c
19160
19161
FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(digest)g(in)m(terface)
19161
 
390 4136 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
19162
 
Ft(GNUTLS_CRYPTO_API_VERSION)390 4264 y Ff(s)t FB(:)40
 
19162
390 4962 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
 
19163
Ft(GNUTLS_CRYPTO_API_VERSION)390 5096 y Ff(s)t FB(:)40
19163
19164
b(is)31 b(a)f(structure)g(holding)h(new)e(in)m(terface's)j(data)390
19164
 
4391 y(This)42 b(function)g(will)h(register)h(a)f(digest)g(in)m
 
19165
5230 y(This)42 b(function)g(will)h(register)h(a)f(digest)g(in)m
19165
19166
(terface)i(to)e(b)s(e)f(used)g(b)m(y)h(gn)m(utls.)78
19166
 
b(An)m(y)42 b(in)m(terface)390 4501 y(registered)e(will)g(o)m(v)m
 
19167
b(An)m(y)42 b(in)m(terface)390 5340 y(registered)e(will)g(o)m(v)m
19167
19168
(erride)g(the)g(included)f(engine)h(and)f(b)m(y)g(con)m(v)m(en)m(tion)i
19168
 
(k)m(ernel)f(implemen)m(ted)390 4611 y(in)m(terfaces)d(should)e(ha)m(v)
19169
 
m(e)i(priorit)m(y)f(of)g(90.)58 b(The)36 b(in)m(terface)h(with)e(the)h
19170
 
(lo)m(w)m(est)i(priorit)m(y)e(will)h(b)s(e)390 4720 y(used)30
19171
 
b(b)m(y)g(gn)m(utls.)390 4848 y(This)g(function)g(should)f(b)s(e)h
19172
 
(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p FB(.)390
19173
 
4975 y(F)-8 b(or)53 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)g(con)m
19174
 
(v)m(enience)i Ft(gnutls_crypto_digest_regis)o(ter\()o(\))390
19175
 
5085 y FB(macro.)390 5212 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19176
 
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 5340
19177
 
y Fn(Since:)41 b FB(2.6.0)p eop end
 
19169
(k)m(ernel)f(implemen)m(ted)p eop end
19178
19170
%%Page: 136 142
19179
19171
TeXDict begin 136 141 bop 150 -116 a FB(Chapter)30 b(9:)41
19180
 
b(F)-8 b(unction)31 b(Reference)2237 b(136)150 299 y
 
19172
b(F)-8 b(unction)31 b(Reference)2237 b(136)390 299 y(in)m(terfaces)37
 
19173
b(should)e(ha)m(v)m(e)i(priorit)m(y)f(of)g(90.)58 b(The)36
 
19174
b(in)m(terface)h(with)e(the)h(lo)m(w)m(est)i(priorit)m(y)e(will)h(b)s
 
19175
(e)390 408 y(used)30 b(b)m(y)g(gn)m(utls.)390 559 y(This)g(function)g
 
19176
(should)f(b)s(e)h(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p
 
19177
FB(.)390 710 y(F)-8 b(or)53 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)
 
19178
g(con)m(v)m(enience)i Ft(gnutls_crypto_digest_regis)o(ter\()o(\))390
 
19179
820 y FB(macro.)390 971 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19180
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 1122
 
19181
y Fn(Since:)41 b FB(2.6.0)150 1338 y Fv(gn)m(utls)p 483
 
19182
1338 37 5 v 55 w(crypto)p 885 1338 V 53 w(mac)p 1155
 
19183
1338 V 54 w(register2)3350 1551 y FB([F)-8 b(unction])-3599
 
19184
b Fh(int)53 b(gnutls_crypto_mac_reg)q(iste)q(r2)f Fg(\()p
 
19185
Ff(in)m(t)31 b Fe(priority)12 b Ff(,)33 b(in)m(t)e Fe(version)12
 
19186
b Ff(,)565 1660 y(gn)m(utls)p 811 1660 28 4 v 41 w(crypto)p
 
19187
1107 1660 V 40 w(mac)p 1308 1660 V 40 w(st)31 b(*)g Fe(s)12
 
19188
b Fg(\))390 1770 y Ff(priorit)m(y)c FB(:)41 b(is)30 b(the)h(priorit)m
 
19189
(y)g(of)f(the)h(mac)g(in)m(terface)390 1921 y Ff(v)m(ersion)p
 
19190
FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)
 
19191
390 2072 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e(in)
 
19192
m(terface's)j(data)390 2223 y(This)e(function)h(will)h(register)g(a)f
 
19193
(mac)h(in)m(terface)h(to)f(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)43
 
19194
b(An)m(y)31 b(in)m(terface)i(regis-)390 2332 y(tered)g(will)g(o)m(v)m
 
19195
(erride)h(the)f(included)g(engine)g(and)f(b)m(y)h(con)m(v)m(en)m(tion)i
 
19196
(k)m(ernel)f(implemen)m(ted)f(in)m(ter-)390 2442 y(faces)i(should)e(ha)
 
19197
m(v)m(e)i(priorit)m(y)g(of)f(90.)52 b(The)34 b(in)m(terface)i(with)d
 
19198
(the)i(lo)m(w)m(est)g(priorit)m(y)g(will)f(b)s(e)g(used)390
 
19199
2552 y(b)m(y)c(gn)m(utls.)390 2703 y(This)g(function)g(should)f(b)s(e)h
 
19200
(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p FB(.)390
 
19201
2854 y(F)-8 b(or)31 b(simplicit)m(y)g(y)m(ou)g(can)f(use)g(the)g(con)m
 
19202
(v)m(enience)j Ft(gnutls_crypto_mac_regis)o(ter\()o(\))24
 
19203
b FB(macro.)390 3004 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19204
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 3155
 
19205
y Fn(Since:)41 b FB(2.6.0)150 3371 y Fv(gn)m(utls)p 483
 
19206
3371 37 5 v 55 w(crypto)p 885 3371 V 53 w(pk)p 1071 3371
 
19207
V 54 w(register2)3350 3584 y FB([F)-8 b(unction])-3599
 
19208
b Fh(int)53 b(gnutls_crypto_pk_regi)q(ster)q(2)f Fg(\()p
 
19209
Ff(in)m(t)31 b Fe(priority)12 b Ff(,)32 b(in)m(t)f Fe(version)12
 
19210
b Ff(,)565 3694 y(gn)m(utls)p 811 3694 28 4 v 41 w(crypto)p
 
19211
1107 3694 V 40 w(pk)p 1246 3694 V 39 w(st)31 b(*)g Fe(s)12
 
19212
b Fg(\))390 3804 y Ff(priorit)m(y)c FB(:)41 b(is)30 b(the)h(priorit)m
 
19213
(y)g(of)f(the)h(in)m(terface)390 3955 y Ff(v)m(ersion)p
 
19214
FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)
 
19215
390 4105 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e(in)
 
19216
m(terface's)j(data)390 4256 y(This)26 b(function)h(will)h(register)g
 
19217
(an)f(in)m(terface)h(for)f(gn)m(utls)g(to)h(op)s(erate)g(on)f(public)g
 
19218
(k)m(ey)g(op)s(erations.)390 4366 y(An)m(y)34 b(in)m(terface)i
 
19219
(registered)f(will)g(o)m(v)m(erride)g(the)f(included)g(in)m(terface.)53
 
19220
b(The)34 b(in)m(terface)i(with)e(the)390 4476 y(lo)m(w)m(est)e(priorit)
 
19221
m(y)f(will)g(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)390 4627
 
19222
y(Note)c(that)g(the)f(bigin)m(t)h(in)m(terface)g(m)m(ust)f(in)m(terop)s
 
19223
(erate)h(with)f(the)g(bigin)m(t)h(in)m(terface.)40 b(Th)m(us)24
 
19224
b(if)h(this)390 4736 y(in)m(terface)32 b(is)e(up)s(dated)f(the)i
 
19225
Ft(gnutls_crypto_bigint_reg)o(iste)o(r\(\))24 b FB(should)29
 
19226
b(also)j(b)s(e)d(used.)390 4887 y(This)h(function)g(should)f(b)s(e)h
 
19227
(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p FB(.)390
 
19228
5038 y(F)-8 b(or)31 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)h(con)m
 
19229
(v)m(enience)h Ft(gnutls_crypto_pk_register)o(\(\))24
 
19230
b FB(macro.)390 5189 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19231
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 5340
 
19232
y Fn(Since:)41 b FB(2.6.0)p eop end
 
19233
%%Page: 137 143
 
19234
TeXDict begin 137 142 bop 150 -116 a FB(Chapter)30 b(9:)41
 
19235
b(F)-8 b(unction)31 b(Reference)2237 b(137)150 299 y
19181
19236
Fv(gn)m(utls)p 483 299 37 5 v 55 w(crypto)p 885 299 V
19182
 
53 w(mac)p 1155 299 V 54 w(register2)3350 495 y FB([F)-8
19183
 
b(unction])-3599 b Fh(int)53 b(gnutls_crypto_mac_reg)q(iste)q(r2)f
 
19237
53 w(rnd)p 1124 299 V 55 w(register2)3350 495 y FB([F)-8
 
19238
b(unction])-3599 b Fh(int)53 b(gnutls_crypto_rnd_reg)q(iste)q(r2)f
19184
19239
Fg(\()p Ff(in)m(t)31 b Fe(priority)12 b Ff(,)33 b(in)m(t)e
19185
19240
Fe(version)12 b Ff(,)565 604 y(gn)m(utls)p 811 604 28
19186
 
4 v 41 w(crypto)p 1107 604 V 40 w(mac)p 1308 604 V 40
 
19241
4 v 41 w(crypto)p 1107 604 V 40 w(rnd)p 1285 604 V 38
19187
19242
w(st)31 b(*)g Fe(s)12 b Fg(\))390 714 y Ff(priorit)m(y)c
19188
 
FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(mac)g(in)m(terface)390
 
19243
FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(generator)390
19189
19244
848 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
19190
19245
Ft(GNUTLS_CRYPTO_API_VERSION)390 982 y Ff(s)t FB(:)40
19191
 
b(is)31 b(a)f(structure)g(holding)h(new)e(in)m(terface's)j(data)390
19192
 
1116 y(This)e(function)h(will)h(register)g(a)f(mac)h(in)m(terface)h(to)
19193
 
f(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)43 b(An)m(y)31 b(in)m(terface)i
19194
 
(regis-)390 1226 y(tered)g(will)g(o)m(v)m(erride)h(the)f(included)g
19195
 
(engine)g(and)f(b)m(y)h(con)m(v)m(en)m(tion)i(k)m(ernel)f(implemen)m
19196
 
(ted)f(in)m(ter-)390 1335 y(faces)i(should)e(ha)m(v)m(e)i(priorit)m(y)g
19197
 
(of)f(90.)52 b(The)34 b(in)m(terface)i(with)d(the)i(lo)m(w)m(est)g
19198
 
(priorit)m(y)g(will)f(b)s(e)g(used)390 1445 y(b)m(y)c(gn)m(utls.)390
19199
 
1579 y(This)g(function)g(should)f(b)s(e)h(called)h(b)s(efore)f
 
19246
b(is)31 b(a)f(structure)g(holding)h(new)e(generator's)j(data)390
 
19247
1116 y(This)g(function)h(will)h(register)g(a)g(random)e(generator)j(to)
 
19248
f(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)49 b(An)m(y)34 b(generator)390
 
19249
1226 y(registered)28 b(will)g(o)m(v)m(erride)g(the)f(included)g
 
19250
(generator)h(and)f(b)m(y)g(con)m(v)m(en)m(tion)j(k)m(ernel)d(implemen)m
 
19251
(ted)390 1335 y(generators)i(ha)m(v)m(e)g(priorit)m(y)f(of)g(90.)41
 
19252
b(The)27 b(generator)i(with)e(the)h(lo)m(w)m(est)i(priorit)m(y)e(will)g
 
19253
(b)s(e)f(used)g(b)m(y)390 1445 y(gn)m(utls.)390 1579
 
19254
y(This)j(function)g(should)f(b)s(e)h(called)h(b)s(efore)f
19200
19255
Ft(gnutls_global_init\(\))p FB(.)390 1713 y(F)-8 b(or)31
19201
19256
b(simplicit)m(y)g(y)m(ou)g(can)f(use)g(the)g(con)m(v)m(enience)j
19202
 
Ft(gnutls_crypto_mac_regis)o(ter\()o(\))24 b FB(macro.)390
 
19257
Ft(gnutls_crypto_rnd_regis)o(ter\()o(\))24 b FB(macro.)390
19203
19258
1847 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
19204
19259
b(success,)f(otherwise)h(an)f(error.)390 1981 y Fn(Since:)41
19205
19260
b FB(2.6.0)150 2179 y Fv(gn)m(utls)p 483 2179 37 5 v
19206
 
55 w(crypto)p 885 2179 V 53 w(pk)p 1071 2179 V 54 w(register2)3350
19207
 
2375 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_crypto_pk_regi)q
19208
 
(ster)q(2)f Fg(\()p Ff(in)m(t)31 b Fe(priority)12 b Ff(,)32
19209
 
b(in)m(t)f Fe(version)12 b Ff(,)565 2485 y(gn)m(utls)p
19210
 
811 2485 28 4 v 41 w(crypto)p 1107 2485 V 40 w(pk)p 1246
19211
 
2485 V 39 w(st)31 b(*)g Fe(s)12 b Fg(\))390 2594 y Ff(priorit)m(y)c
19212
 
FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(in)m(terface)390
19213
 
2729 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
19214
 
Ft(GNUTLS_CRYPTO_API_VERSION)390 2863 y Ff(s)t FB(:)40
19215
 
b(is)31 b(a)f(structure)g(holding)h(new)e(in)m(terface's)j(data)390
19216
 
2997 y(This)26 b(function)h(will)h(register)g(an)f(in)m(terface)h(for)f
19217
 
(gn)m(utls)g(to)h(op)s(erate)g(on)f(public)g(k)m(ey)g(op)s(erations.)
19218
 
390 3106 y(An)m(y)34 b(in)m(terface)i(registered)f(will)g(o)m(v)m
19219
 
(erride)g(the)f(included)g(in)m(terface.)53 b(The)34
19220
 
b(in)m(terface)i(with)e(the)390 3216 y(lo)m(w)m(est)e(priorit)m(y)f
19221
 
(will)g(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)390 3350 y(Note)c(that)g(the)
19222
 
f(bigin)m(t)h(in)m(terface)g(m)m(ust)f(in)m(terop)s(erate)h(with)f(the)
19223
 
g(bigin)m(t)h(in)m(terface.)40 b(Th)m(us)24 b(if)h(this)390
19224
 
3459 y(in)m(terface)32 b(is)e(up)s(dated)f(the)i Ft
19225
 
(gnutls_crypto_bigint_reg)o(iste)o(r\(\))24 b FB(should)29
19226
 
b(also)j(b)s(e)d(used.)390 3593 y(This)h(function)g(should)f(b)s(e)h
19227
 
(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p FB(.)390
19228
 
3728 y(F)-8 b(or)31 b(simplicit)m(y)h(y)m(ou)e(can)h(use)f(the)h(con)m
19229
 
(v)m(enience)h Ft(gnutls_crypto_pk_register)o(\(\))24
19230
 
b FB(macro.)390 3862 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19231
 
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 3996
19232
 
y Fn(Since:)41 b FB(2.6.0)150 4194 y Fv(gn)m(utls)p 483
19233
 
4194 37 5 v 55 w(crypto)p 885 4194 V 53 w(rnd)p 1124
19234
 
4194 V 55 w(register2)3350 4390 y FB([F)-8 b(unction])-3599
19235
 
b Fh(int)53 b(gnutls_crypto_rnd_reg)q(iste)q(r2)f Fg(\()p
19236
 
Ff(in)m(t)31 b Fe(priority)12 b Ff(,)33 b(in)m(t)e Fe(version)12
19237
 
b Ff(,)565 4499 y(gn)m(utls)p 811 4499 28 4 v 41 w(crypto)p
19238
 
1107 4499 V 40 w(rnd)p 1285 4499 V 38 w(st)31 b(*)g Fe(s)12
19239
 
b Fg(\))390 4609 y Ff(priorit)m(y)c FB(:)41 b(is)30 b(the)h(priorit)m
19240
 
(y)g(of)f(the)h(generator)390 4743 y Ff(v)m(ersion)p
19241
 
FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)
19242
 
390 4877 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e
19243
 
(generator's)j(data)390 5011 y(This)g(function)h(will)h(register)g(a)g
19244
 
(random)e(generator)j(to)f(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)49
19245
 
b(An)m(y)34 b(generator)390 5121 y(registered)28 b(will)g(o)m(v)m
19246
 
(erride)g(the)f(included)g(generator)h(and)f(b)m(y)g(con)m(v)m(en)m
19247
 
(tion)j(k)m(ernel)d(implemen)m(ted)390 5230 y(generators)i(ha)m(v)m(e)g
19248
 
(priorit)m(y)f(of)g(90.)41 b(The)27 b(generator)i(with)e(the)h(lo)m(w)m
19249
 
(est)i(priorit)m(y)e(will)g(b)s(e)f(used)g(b)m(y)390
19250
 
5340 y(gn)m(utls.)p eop end
19251
 
%%Page: 137 143
19252
 
TeXDict begin 137 142 bop 150 -116 a FB(Chapter)30 b(9:)41
19253
 
b(F)-8 b(unction)31 b(Reference)2237 b(137)390 299 y(This)30
19254
 
b(function)g(should)f(b)s(e)h(called)h(b)s(efore)f Ft
19255
 
(gnutls_global_init\(\))p FB(.)390 440 y(F)-8 b(or)31
19256
 
b(simplicit)m(y)g(y)m(ou)g(can)f(use)g(the)g(con)m(v)m(enience)j
19257
 
Ft(gnutls_crypto_rnd_regis)o(ter\()o(\))24 b FB(macro.)390
19258
 
582 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
19259
 
b(success,)f(otherwise)h(an)f(error.)390 723 y Fn(Since:)41
19260
 
b FB(2.6.0)150 929 y Fv(gn)m(utls)p 483 929 37 5 v 55
19261
 
w(crypto)p 885 929 V 53 w(single)p 1239 929 V 55 w(cipher)p
19262
 
1625 929 V 55 w(register2)3350 1133 y FB([F)-8 b(unction])-3599
19263
 
b Fh(int)53 b(gnutls_crypto_single_)q(ciph)q(er_)q(reg)q(ist)q(er2)565
19264
 
1243 y Fg(\()p Ff(gn)m(utls)p 846 1243 28 4 v 41 w(cipher)p
19265
 
1130 1243 V 40 w(algorithm)p 1553 1243 V 41 w(t)30 b
 
19261
55 w(crypto)p 885 2179 V 53 w(single)p 1239 2179 V 55
 
19262
w(cipher)p 1625 2179 V 55 w(register2)3350 2375 y FB([F)-8
 
19263
b(unction])-3599 b Fh(int)53 b(gnutls_crypto_single_)q(ciph)q(er_)q
 
19264
(reg)q(ist)q(er2)565 2485 y Fg(\()p Ff(gn)m(utls)p 846
 
19265
2485 28 4 v 41 w(cipher)p 1130 2485 V 40 w(algorithm)p
 
19266
1553 2485 V 41 w(t)30 b Fe(algorithm)12 b Ff(,)33 b(in)m(t)e
 
19267
Fe(priority)12 b Ff(,)33 b(in)m(t)d Fe(version)12 b Ff(,)565
 
19268
2594 y(gn)m(utls)p 811 2594 V 41 w(crypto)p 1107 2594
 
19269
V 40 w(single)p 1369 2594 V 41 w(cipher)p 1653 2594 V
 
19270
39 w(st)31 b(*)g Fe(s)12 b Fg(\))390 2704 y Ff(algorithm)p
 
19271
FB(:)42 b(is)30 b(the)h(gn)m(utls)f(algorithm)i(iden)m(ti\014er)390
 
19272
2838 y Ff(priorit)m(y)8 b FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f
 
19273
(the)h(algorithm)390 2972 y Ff(v)m(ersion)p FB(:)41 b(should)30
 
19274
b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)390
 
19275
3106 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e
 
19276
(cipher's)i(data)390 3240 y(This)k(function)h(will)g(register)h(a)f
 
19277
(cipher)g(algorithm)h(to)g(b)s(e)e(used)g(b)m(y)h(gn)m(utls.)58
 
19278
b(An)m(y)36 b(algorithm)390 3350 y(registered)23 b(will)g(o)m(v)m
 
19279
(erride)h(the)f(included)f(algorithms)i(and)e(b)m(y)g(con)m(v)m(en)m
 
19280
(tion)j(k)m(ernel)e(implemen)m(ted)390 3459 y(algorithms)36
 
19281
b(ha)m(v)m(e)g(priorit)m(y)g(of)f(90.)56 b(The)35 b(algorithm)h(with)f
 
19282
(the)g(lo)m(w)m(est)i(priorit)m(y)f(will)f(b)s(e)g(used)390
 
19283
3569 y(b)m(y)30 b(gn)m(utls.)390 3703 y(This)g(function)g(should)f(b)s
 
19284
(e)h(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p
 
19285
FB(.)390 3837 y(F)-8 b(or)73 b(simplicit)m(y)h(y)m(ou)g(can)f(use)f
 
19286
(the)h(con)m(v)m(enience)i Ft(gnutls_crypto_single_ci)o(pher)o(_)390
 
19287
3947 y(register\(\))28 b FB(macro.)390 4081 y Fn(Returns:)40
 
19288
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(otherwise)h(an)f
 
19289
(error.)390 4215 y Fn(Since:)41 b FB(2.6.0)150 4413 y
 
19290
Fv(gn)m(utls)p 483 4413 37 5 v 55 w(crypto)p 885 4413
 
19291
V 53 w(single)p 1239 4413 V 55 w(digest)p 1609 4413 V
 
19292
55 w(register2)3350 4609 y FB([F)-8 b(unction])-3599
 
19293
b Fh(int)53 b(gnutls_crypto_single_)q(dige)q(st_)q(reg)q(ist)q(er2)565
 
19294
4719 y Fg(\()p Ff(gn)m(utls)p 846 4719 28 4 v 41 w(digest)p
 
19295
1119 4719 V 41 w(algorithm)p 1543 4719 V 41 w(t)30 b
19266
19296
Fe(algorithm)12 b Ff(,)33 b(in)m(t)e Fe(priority)12 b
19267
 
Ff(,)33 b(in)m(t)d Fe(version)12 b Ff(,)565 1352 y(gn)m(utls)p
19268
 
811 1352 V 41 w(crypto)p 1107 1352 V 40 w(single)p 1369
19269
 
1352 V 41 w(cipher)p 1653 1352 V 39 w(st)31 b(*)g Fe(s)12
19270
 
b Fg(\))390 1462 y Ff(algorithm)p FB(:)42 b(is)30 b(the)h(gn)m(utls)f
19271
 
(algorithm)i(iden)m(ti\014er)390 1603 y Ff(priorit)m(y)8
 
19297
Ff(,)33 b(in)m(t)e Fe(version)12 b Ff(,)565 4828 y(gn)m(utls)p
 
19298
811 4828 V 41 w(crypto)p 1107 4828 V 40 w(single)p 1369
 
19299
4828 V 41 w(digest)p 1642 4828 V 40 w(st)31 b(*)g Fe(s)12
 
19300
b Fg(\))390 4938 y Ff(algorithm)p FB(:)42 b(is)30 b(the)h(gn)m(utls)f
 
19301
(algorithm)i(iden)m(ti\014er)390 5072 y Ff(priorit)m(y)8
19272
19302
b FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h(algorithm)390
19273
 
1745 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
19274
 
Ft(GNUTLS_CRYPTO_API_VERSION)390 1886 y Ff(s)t FB(:)40
19275
 
b(is)31 b(a)f(structure)g(holding)h(new)e(cipher's)i(data)390
19276
 
2028 y(This)k(function)h(will)g(register)h(a)f(cipher)g(algorithm)h(to)
19277
 
g(b)s(e)e(used)g(b)m(y)h(gn)m(utls.)58 b(An)m(y)36 b(algorithm)390
19278
 
2137 y(registered)23 b(will)g(o)m(v)m(erride)h(the)f(included)f
19279
 
(algorithms)i(and)e(b)m(y)g(con)m(v)m(en)m(tion)j(k)m(ernel)e(implemen)
19280
 
m(ted)390 2247 y(algorithms)36 b(ha)m(v)m(e)g(priorit)m(y)g(of)f(90.)56
19281
 
b(The)35 b(algorithm)h(with)f(the)g(lo)m(w)m(est)i(priorit)m(y)f(will)f
19282
 
(b)s(e)g(used)390 2356 y(b)m(y)30 b(gn)m(utls.)390 2498
19283
 
y(This)g(function)g(should)f(b)s(e)h(called)h(b)s(efore)f
19284
 
Ft(gnutls_global_init\(\))p FB(.)390 2639 y(F)-8 b(or)73
19285
 
b(simplicit)m(y)h(y)m(ou)g(can)f(use)f(the)h(con)m(v)m(enience)i
19286
 
Ft(gnutls_crypto_single_ci)o(pher)o(_)390 2749 y(register\(\))28
19287
 
b FB(macro.)390 2890 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19288
 
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 3032
19289
 
y Fn(Since:)41 b FB(2.6.0)150 3238 y Fv(gn)m(utls)p 483
19290
 
3238 37 5 v 55 w(crypto)p 885 3238 V 53 w(single)p 1239
19291
 
3238 V 55 w(digest)p 1609 3238 V 55 w(register2)3350
19292
 
3441 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_crypto_single_)q
19293
 
(dige)q(st_)q(reg)q(ist)q(er2)565 3551 y Fg(\()p Ff(gn)m(utls)p
19294
 
846 3551 28 4 v 41 w(digest)p 1119 3551 V 41 w(algorithm)p
19295
 
1543 3551 V 41 w(t)30 b Fe(algorithm)12 b Ff(,)33 b(in)m(t)e
19296
 
Fe(priority)12 b Ff(,)33 b(in)m(t)e Fe(version)12 b Ff(,)565
19297
 
3661 y(gn)m(utls)p 811 3661 V 41 w(crypto)p 1107 3661
19298
 
V 40 w(single)p 1369 3661 V 41 w(digest)p 1642 3661 V
19299
 
40 w(st)31 b(*)g Fe(s)12 b Fg(\))390 3770 y Ff(algorithm)p
19300
 
FB(:)42 b(is)30 b(the)h(gn)m(utls)f(algorithm)i(iden)m(ti\014er)390
19301
 
3912 y Ff(priorit)m(y)8 b FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f
19302
 
(the)h(algorithm)390 4053 y Ff(v)m(ersion)p FB(:)41 b(should)30
19303
 
b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)390
19304
 
4194 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e
19305
 
(algorithms's)j(data)390 4336 y(This)45 b(function)g(will)g(register)i
19306
 
(a)e(digest)h(\(hash\))g(algorithm)g(to)g(b)s(e)f(used)g(b)m(y)g(gn)m
19307
 
(utls.)86 b(An)m(y)390 4446 y(algorithm)36 b(registered)g(will)f(o)m(v)
19308
 
m(erride)h(the)g(included)e(algorithms)i(and)e(b)m(y)h(con)m(v)m(en)m
19309
 
(tion)i(k)m(ernel)390 4555 y(implemen)m(ted)d(algorithms)g(ha)m(v)m(e)g
19310
 
(priorit)m(y)g(of)f(90.)50 b(The)33 b(algorithm)h(with)f(the)g(lo)m(w)m
19311
 
(est)j(priorit)m(y)390 4665 y(will)31 b(b)s(e)e(used)h(b)m(y)g(gn)m
19312
 
(utls.)390 4806 y(This)g(function)g(should)f(b)s(e)h(called)h(b)s
19313
 
(efore)f Ft(gnutls_global_init\(\))p FB(.)390 4948 y(F)-8
19314
 
b(or)73 b(simplicit)m(y)h(y)m(ou)g(can)f(use)f(the)h(con)m(v)m(enience)
19315
 
i Ft(gnutls_crypto_single_di)o(gest)o(_)390 5057 y(register\(\))28
19316
 
b FB(macro.)390 5199 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
19317
 
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 5340
19318
 
y Fn(Since:)41 b FB(2.6.0)p eop end
 
19303
5206 y Ff(v)m(ersion)p FB(:)41 b(should)30 b(b)s(e)f(set)i(to)g
 
19304
Ft(GNUTLS_CRYPTO_API_VERSION)390 5340 y Ff(s)t FB(:)40
 
19305
b(is)31 b(a)f(structure)g(holding)h(new)e(algorithms's)j(data)p
 
19306
eop end
19319
19307
%%Page: 138 144
19320
19308
TeXDict begin 138 143 bop 150 -116 a FB(Chapter)30 b(9:)41
19321
 
b(F)-8 b(unction)31 b(Reference)2237 b(138)150 299 y
19322
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(crypto)p 885 299 V
19323
 
53 w(single)p 1239 299 V 55 w(mac)p 1511 299 V 54 w(register2)3350
19324
 
494 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_crypto_single_)q
19325
 
(mac_)q(reg)q(ist)q(er2)f Fg(\()p Ff(gn)m(utls)p 2464
19326
 
494 28 4 v 41 w(mac)p 2666 494 V 40 w(algorithm)p 3089
19327
 
494 V 41 w(t)565 603 y Fe(algorithm)12 b Ff(,)33 b(in)m(t)e
 
19309
b(F)-8 b(unction)31 b(Reference)2237 b(138)390 299 y(This)45
 
19310
b(function)g(will)g(register)i(a)e(digest)h(\(hash\))g(algorithm)g(to)g
 
19311
(b)s(e)f(used)g(b)m(y)g(gn)m(utls.)86 b(An)m(y)390 408
 
19312
y(algorithm)36 b(registered)g(will)f(o)m(v)m(erride)h(the)g(included)e
 
19313
(algorithms)i(and)e(b)m(y)h(con)m(v)m(en)m(tion)i(k)m(ernel)390
 
19314
518 y(implemen)m(ted)d(algorithms)g(ha)m(v)m(e)g(priorit)m(y)g(of)f
 
19315
(90.)50 b(The)33 b(algorithm)h(with)f(the)g(lo)m(w)m(est)j(priorit)m(y)
 
19316
390 628 y(will)31 b(b)s(e)e(used)h(b)m(y)g(gn)m(utls.)390
 
19317
755 y(This)g(function)g(should)f(b)s(e)h(called)h(b)s(efore)f
 
19318
Ft(gnutls_global_init\(\))p FB(.)390 883 y(F)-8 b(or)73
 
19319
b(simplicit)m(y)h(y)m(ou)g(can)f(use)f(the)h(con)m(v)m(enience)i
 
19320
Ft(gnutls_crypto_single_di)o(gest)o(_)390 992 y(register\(\))28
 
19321
b FB(macro.)390 1120 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
19322
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 1247
 
19323
y Fn(Since:)41 b FB(2.6.0)150 1432 y Fv(gn)m(utls)p 483
 
19324
1432 37 5 v 55 w(crypto)p 885 1432 V 53 w(single)p 1239
 
19325
1432 V 55 w(mac)p 1511 1432 V 54 w(register2)3350 1615
 
19326
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_crypto_single_)q(mac_)
 
19327
q(reg)q(ist)q(er2)f Fg(\()p Ff(gn)m(utls)p 2464 1615
 
19328
28 4 v 41 w(mac)p 2666 1615 V 40 w(algorithm)p 3089 1615
 
19329
V 41 w(t)565 1724 y Fe(algorithm)12 b Ff(,)33 b(in)m(t)e
19328
19330
Fe(priority)12 b Ff(,)32 b(in)m(t)f Fe(version)12 b Ff(,)32
19329
 
b(gn)m(utls)p 2545 603 V 41 w(crypto)p 2841 603 V 40
19330
 
w(single)p 3103 603 V 41 w(mac)p 3305 603 V 40 w(st)f(*)g
19331
 
Fe(s)12 b Fg(\))390 713 y Ff(algorithm)p FB(:)42 b(is)30
19332
 
b(the)h(gn)m(utls)f(algorithm)i(iden)m(ti\014er)390 847
 
19331
b(gn)m(utls)p 2545 1724 V 41 w(crypto)p 2841 1724 V 40
 
19332
w(single)p 3103 1724 V 41 w(mac)p 3305 1724 V 40 w(st)f(*)g
 
19333
Fe(s)12 b Fg(\))390 1834 y Ff(algorithm)p FB(:)42 b(is)30
 
19334
b(the)h(gn)m(utls)f(algorithm)i(iden)m(ti\014er)390 1961
19333
19335
y Ff(priorit)m(y)8 b FB(:)41 b(is)30 b(the)h(priorit)m(y)g(of)f(the)h
19334
 
(algorithm)390 980 y Ff(v)m(ersion)p FB(:)41 b(should)30
 
19336
(algorithm)390 2089 y Ff(v)m(ersion)p FB(:)41 b(should)30
19335
19337
b(b)s(e)f(set)i(to)g Ft(GNUTLS_CRYPTO_API_VERSION)390
19336
 
1114 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e
19337
 
(algorithms's)j(data)390 1248 y(This)37 b(function)h(will)g(register)g
 
19338
2216 y Ff(s)t FB(:)40 b(is)31 b(a)f(structure)g(holding)h(new)e
 
19339
(algorithms's)j(data)390 2344 y(This)37 b(function)h(will)g(register)g
19338
19340
(a)h(MA)m(C)f(algorithm)h(to)g(b)s(e)e(used)g(b)m(y)h(gn)m(utls.)63
19339
 
b(An)m(y)38 b(algorithm)390 1357 y(registered)23 b(will)g(o)m(v)m
 
19341
b(An)m(y)38 b(algorithm)390 2453 y(registered)23 b(will)g(o)m(v)m
19340
19342
(erride)h(the)f(included)f(algorithms)i(and)e(b)m(y)g(con)m(v)m(en)m
19341
 
(tion)j(k)m(ernel)e(implemen)m(ted)390 1467 y(algorithms)36
 
19343
(tion)j(k)m(ernel)e(implemen)m(ted)390 2563 y(algorithms)36
19342
19344
b(ha)m(v)m(e)g(priorit)m(y)g(of)f(90.)56 b(The)35 b(algorithm)h(with)f
19343
19345
(the)g(lo)m(w)m(est)i(priorit)m(y)f(will)f(b)s(e)g(used)390
19344
 
1576 y(b)m(y)30 b(gn)m(utls.)390 1710 y(This)g(function)g(should)f(b)s
 
19346
2673 y(b)m(y)30 b(gn)m(utls.)390 2800 y(This)g(function)g(should)f(b)s
19345
19347
(e)h(called)h(b)s(efore)f Ft(gnutls_global_init\(\))p
19346
 
FB(.)390 1844 y(F)-8 b(or)26 b(simplicit)m(y)g(y)m(ou)f(can)h(use)e
 
19348
FB(.)390 2927 y(F)-8 b(or)26 b(simplicit)m(y)g(y)m(ou)f(can)h(use)e
19347
19349
(the)h(con)m(v)m(enience)j Ft(gnutls_crypto_single_ma)o(c_r)o(egis)o
19348
 
(ter\()o(\))390 1953 y FB(macro.)390 2087 y Fn(Returns:)40
 
19350
(ter\()o(\))390 3037 y FB(macro.)390 3164 y Fn(Returns:)40
19349
19351
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(otherwise)h(an)f
19350
 
(error.)390 2220 y Fn(Since:)41 b FB(2.6.0)150 2418 y
19351
 
Fv(gn)m(utls)p 483 2418 37 5 v 55 w(db)p 674 2418 V 54
19352
 
w(c)m(hec)m(k)p 1021 2418 V 52 w(en)m(try)3350 2613 y
 
19352
(error.)390 3292 y Fn(Since:)41 b FB(2.6.0)150 3477 y
 
19353
Fv(gn)m(utls)p 483 3477 37 5 v 55 w(db)p 674 3477 V 54
 
19354
w(c)m(hec)m(k)p 1021 3477 V 52 w(en)m(try)3350 3660 y
19353
19355
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_db_check_entry)f
19354
 
Fg(\()p Ff(gn)m(utls)p 1784 2613 28 4 v 41 w(session)p
19355
 
2094 2613 V 40 w(t)31 b Fe(session)12 b Ff(,)565 2723
19356
 
y(gn)m(utls)p 811 2723 V 41 w(datum)p 1110 2723 V 39
19357
 
w(t)31 b Fe(session_entry)12 b Fg(\))390 2832 y Ff(session)p
 
19356
Fg(\()p Ff(gn)m(utls)p 1784 3660 28 4 v 41 w(session)p
 
19357
2094 3660 V 40 w(t)31 b Fe(session)12 b Ff(,)565 3769
 
19358
y(gn)m(utls)p 811 3769 V 41 w(datum)p 1110 3769 V 39
 
19359
w(t)31 b Fe(session_entry)12 b Fg(\))390 3879 y Ff(session)p
19358
19360
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
19359
 
2966 y Ff(session)p 665 2966 V 40 w(en)m(try)8 b FB(:)41
 
19361
4006 y Ff(session)p 665 4006 V 40 w(en)m(try)8 b FB(:)41
19360
19362
b(is)30 b(the)h(session)f(data)i(\(not)e(k)m(ey\))390
19361
 
3099 y(Chec)m(k)k(if)g(database)h(en)m(try)f(has)f(expired.)51
 
19363
4134 y(Chec)m(k)k(if)g(database)h(en)m(try)f(has)f(expired.)51
19362
19364
b(This)33 b(function)h(is)g(to)g(b)s(e)f(used)g(when)g(y)m(ou)h(w)m(an)
19363
 
m(t)h(to)390 3209 y(clear)c(unnesessary)f(session)g(whic)m(h)g(o)s
 
19365
m(t)h(to)390 4243 y(clear)c(unnesessary)f(session)g(whic)m(h)g(o)s
19364
19366
(ccup)m(y)h(space)g(in)f(y)m(our)g(bac)m(k)m(end.)390
19365
 
3343 y Fn(Returns:)47 b FB(Returns)33 b Ft(GNUTLS_E_EXPIRED)p
 
19367
4371 y Fn(Returns:)47 b FB(Returns)33 b Ft(GNUTLS_E_EXPIRED)p
19366
19368
FB(,)e(if)i(the)i(database)f(en)m(try)g(has)g(expired)f(or)h(0)g
19367
 
(other-)390 3452 y(wise.)150 3650 y Fv(gn)m(utls)p 483
19368
 
3650 37 5 v 55 w(db)p 674 3650 V 54 w(get)p 893 3650
19369
 
V 54 w(ptr)3350 3845 y FB([F)-8 b(unction])-3599 b Fh(void)54
 
19369
(other-)390 4480 y(wise.)150 4666 y Fv(gn)m(utls)p 483
 
19370
4666 37 5 v 55 w(db)p 674 4666 V 54 w(get)p 893 4666
 
19371
V 54 w(ptr)3350 4848 y FB([F)-8 b(unction])-3599 b Fh(void)54
19370
19372
b(*)e(gnutls_db_get_ptr)f Fg(\()p Ff(gn)m(utls)p 1732
19371
 
3845 28 4 v 40 w(session)p 2041 3845 V 41 w(t)30 b Fe(session)12
19372
 
b Fg(\))390 3954 y Ff(session)p FB(:)41 b(is)30 b(a)h
19373
 
Ft(gnutls_session_t)26 b FB(structure.)390 4088 y(Get)31
19374
 
b(db)f(function)g(p)s(oin)m(ter.)390 4222 y Fn(Returns:)48
 
19373
4848 28 4 v 40 w(session)p 2041 4848 V 41 w(t)30 b Fe(session)12
 
19374
b Fg(\))390 4958 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
19375
Ft(gnutls_session_t)26 b FB(structure.)390 5085 y(Get)31
 
19376
b(db)f(function)g(p)s(oin)m(ter.)390 5213 y Fn(Returns:)48
19375
19377
b FB(the)35 b(p)s(oin)m(ter)f(that)h(will)g(b)s(e)f(sen)m(t)h(to)g(db)e
19376
19378
(store,)j(retriev)m(e)g(and)e(delete)i(functions,)f(as)390
19377
 
4331 y(the)c(\014rst)e(argumen)m(t.)150 4529 y Fv(gn)m(utls)p
19378
 
483 4529 37 5 v 55 w(db)p 674 4529 V 54 w(remo)m(v)m(e)p
19379
 
1112 4529 V 54 w(session)3350 4724 y FB([F)-8 b(unction])-3599
19380
 
b Fh(void)54 b(gnutls_db_remove_session)e Fg(\()p Ff(gn)m(utls)p
19381
 
1993 4724 28 4 v 41 w(session)p 2303 4724 V 40 w(t)31
19382
 
b Fe(session)12 b Fg(\))390 4833 y Ff(session)p FB(:)41
19383
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
19384
 
4967 y(This)35 b(function)g(will)h(remo)m(v)m(e)h(the)e(curren)m(t)h
19385
 
(session)f(data)h(from)f(the)h(session)g(database.)57
19386
 
b(This)390 5077 y(will)37 b(prev)m(en)m(t)g(future)e(handshak)m(es)h
19387
 
(reusing)f(these)i(session)g(data.)59 b(This)35 b(function)h(should)g
19388
 
(b)s(e)390 5186 y(called)29 b(if)e(a)h(session)g(w)m(as)g(terminated)g
19389
 
(abnormally)-8 b(,)29 b(and)d(b)s(efore)i Ft(gnutls_deinit\(\))23
19390
 
b FB(is)k(called.)390 5320 y(Normally)k Ft(gnutls_deinit\(\))26
19391
 
b FB(will)31 b(remo)m(v)m(e)h(abnormally)f(terminated)f(sessions.)p
19392
 
eop end
 
19379
5322 y(the)c(\014rst)e(argumen)m(t.)p eop end
19393
19380
%%Page: 139 145
19394
19381
TeXDict begin 139 144 bop 150 -116 a FB(Chapter)30 b(9:)41
19395
19382
b(F)-8 b(unction)31 b(Reference)2237 b(139)150 299 y
19396
19383
Fv(gn)m(utls)p 483 299 37 5 v 55 w(db)p 674 299 V 54
19397
 
w(set)p 880 299 V 54 w(cac)m(he)p 1225 299 V 53 w(expiration)3350
19398
 
497 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
19399
 
(gnutls_db_set_cache_expi)q(rat)q(ion)e Fg(\()p Ff(gn)m(utls)p
19400
 
2307 497 28 4 v 41 w(session)p 2617 497 V 40 w(t)31 b
19401
 
Fe(session)12 b Ff(,)565 607 y(in)m(t)31 b Fe(seconds)12
19402
 
b Fg(\))390 716 y Ff(session)p FB(:)41 b(is)30 b(a)h
19403
 
Ft(gnutls_session_t)26 b FB(structure.)390 852 y Ff(seconds)t
19404
 
FB(:)40 b(is)31 b(the)f(n)m(um)m(b)s(er)f(of)i(seconds.)390
19405
 
988 y(Set)j(the)g(expiration)h(time)f(for)g(resumed)f(sessions.)51
19406
 
b(The)33 b(default)h(is)g(3600)h(\(one)g(hour\))e(at)i(the)390
19407
 
1098 y(time)c(writing)f(this.)150 1298 y Fv(gn)m(utls)p
19408
 
483 1298 37 5 v 55 w(db)p 674 1298 V 54 w(set)p 880 1298
19409
 
V 54 w(ptr)3350 1496 y FB([F)-8 b(unction])-3599 b Fh(void)54
19410
 
b(gnutls_db_set_ptr)c Fg(\()p Ff(gn)m(utls)p 1627 1496
19411
 
28 4 v 41 w(session)p 1937 1496 V 40 w(t)31 b Fe(session)12
19412
 
b Ff(,)32 b(v)m(oid)f(*)g Fe(ptr)12 b Fg(\))390 1606
19413
 
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
19414
 
b FB(structure.)390 1742 y Ff(ptr)7 b FB(:)40 b(is)30
19415
 
b(the)h(p)s(oin)m(ter)390 1878 y(Sets)36 b(the)f(p)s(oin)m(ter)h(that)g
 
19384
w(remo)m(v)m(e)p 1112 299 V 54 w(session)3350 497 y FB([F)-8
 
19385
b(unction])-3599 b Fh(void)54 b(gnutls_db_remove_session)e
 
19386
Fg(\()p Ff(gn)m(utls)p 1993 497 28 4 v 41 w(session)p
 
19387
2303 497 V 40 w(t)31 b Fe(session)12 b Fg(\))390 607
 
19388
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
19389
b FB(structure.)390 742 y(This)35 b(function)g(will)h(remo)m(v)m(e)h
 
19390
(the)e(curren)m(t)h(session)f(data)h(from)f(the)h(session)g(database.)
 
19391
57 b(This)390 852 y(will)37 b(prev)m(en)m(t)g(future)e(handshak)m(es)h
 
19392
(reusing)f(these)i(session)g(data.)59 b(This)35 b(function)h(should)g
 
19393
(b)s(e)390 962 y(called)29 b(if)e(a)h(session)g(w)m(as)g(terminated)g
 
19394
(abnormally)-8 b(,)29 b(and)d(b)s(efore)i Ft(gnutls_deinit\(\))23
 
19395
b FB(is)k(called.)390 1098 y(Normally)k Ft(gnutls_deinit\(\))26
 
19396
b FB(will)31 b(remo)m(v)m(e)h(abnormally)f(terminated)f(sessions.)150
 
19397
1298 y Fv(gn)m(utls)p 483 1298 37 5 v 55 w(db)p 674 1298
 
19398
V 54 w(set)p 880 1298 V 54 w(cac)m(he)p 1225 1298 V 53
 
19399
w(expiration)3350 1496 y FB([F)-8 b(unction])-3599 b
 
19400
Fh(void)54 b(gnutls_db_set_cache_expi)q(rat)q(ion)e Fg(\()p
 
19401
Ff(gn)m(utls)p 2307 1496 28 4 v 41 w(session)p 2617 1496
 
19402
V 40 w(t)31 b Fe(session)12 b Ff(,)565 1606 y(in)m(t)31
 
19403
b Fe(seconds)12 b Fg(\))390 1715 y Ff(session)p FB(:)41
 
19404
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
 
19405
1851 y Ff(seconds)t FB(:)40 b(is)31 b(the)f(n)m(um)m(b)s(er)f(of)i
 
19406
(seconds.)390 1987 y(Set)j(the)g(expiration)h(time)f(for)g(resumed)f
 
19407
(sessions.)51 b(The)33 b(default)h(is)g(3600)h(\(one)g(hour\))e(at)i
 
19408
(the)390 2097 y(time)c(writing)f(this.)150 2297 y Fv(gn)m(utls)p
 
19409
483 2297 37 5 v 55 w(db)p 674 2297 V 54 w(set)p 880 2297
 
19410
V 54 w(ptr)3350 2496 y FB([F)-8 b(unction])-3599 b Fh(void)54
 
19411
b(gnutls_db_set_ptr)c Fg(\()p Ff(gn)m(utls)p 1627 2496
 
19412
28 4 v 41 w(session)p 1937 2496 V 40 w(t)31 b Fe(session)12
 
19413
b Ff(,)32 b(v)m(oid)f(*)g Fe(ptr)12 b Fg(\))390 2605
 
19414
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
19415
b FB(structure.)390 2741 y Ff(ptr)7 b FB(:)40 b(is)30
 
19416
b(the)h(p)s(oin)m(ter)390 2877 y(Sets)36 b(the)f(p)s(oin)m(ter)h(that)g
19416
19417
(will)g(b)s(e)e(pro)m(vided)h(to)i(db)d(store,)k(retriev)m(e)f(and)d
19417
 
(delete)j(functions,)g(as)390 1987 y(the)31 b(\014rst)e(argumen)m(t.)
19418
 
150 2188 y Fv(gn)m(utls)p 483 2188 37 5 v 55 w(db)p 674
19419
 
2188 V 54 w(set)p 880 2188 V 54 w(remo)m(v)m(e)p 1318
19420
 
2188 V 54 w(function)3350 2386 y FB([F)-8 b(unction])-3599
 
19418
(delete)j(functions,)g(as)390 2986 y(the)31 b(\014rst)e(argumen)m(t.)
 
19419
150 3187 y Fv(gn)m(utls)p 483 3187 37 5 v 55 w(db)p 674
 
19420
3187 V 54 w(set)p 880 3187 V 54 w(remo)m(v)m(e)p 1318
 
19421
3187 V 54 w(function)3350 3385 y FB([F)-8 b(unction])-3599
19421
19422
b Fh(void)54 b(gnutls_db_set_remove_fun)q(cti)q(on)e
19422
 
Fg(\()p Ff(gn)m(utls)p 2255 2386 28 4 v 41 w(session)p
19423
 
2565 2386 V 40 w(t)30 b Fe(session)12 b Ff(,)565 2496
19424
 
y(gn)m(utls)p 811 2496 V 41 w(db)p 954 2496 V 39 w(remo)m(v)m(e)p
19425
 
1272 2496 V 41 w(func)30 b Fe(rem_func)12 b Fg(\))390
19426
 
2605 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
19427
 
b FB(structure.)390 2741 y Ff(rem)p 548 2741 V 40 w(func)6
19428
 
b FB(:)39 b(is)31 b(the)f(function.)390 2877 y(Sets)22
 
19423
Fg(\()p Ff(gn)m(utls)p 2255 3385 28 4 v 41 w(session)p
 
19424
2565 3385 V 40 w(t)30 b Fe(session)12 b Ff(,)565 3495
 
19425
y(gn)m(utls)p 811 3495 V 41 w(db)p 954 3495 V 39 w(remo)m(v)m(e)p
 
19426
1272 3495 V 41 w(func)30 b Fe(rem_func)12 b Fg(\))390
 
19427
3604 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
19428
b FB(structure.)390 3740 y Ff(rem)p 548 3740 V 40 w(func)6
 
19429
b FB(:)39 b(is)31 b(the)f(function.)390 3876 y(Sets)22
19429
19430
b(the)h(function)f(that)g(will)h(b)s(e)e(used)h(to)h(remo)m(v)m(e)g
19430
19431
(data)g(from)f(the)g(resumed)g(sessions)g(database.)390
19431
 
2986 y(This)30 b(function)g(m)m(ust)g(return)f(0)i(on)f(success.)390
19432
 
3122 y(The)24 b(\014rst)f(argumen)m(t)i(to)g Ft(rem_func\(\))d
 
19432
3986 y(This)30 b(function)g(m)m(ust)g(return)f(0)i(on)f(success.)390
 
19433
4122 y(The)24 b(\014rst)f(argumen)m(t)i(to)g Ft(rem_func\(\))d
19433
19434
FB(will)i(b)s(e)g(n)m(ull)g(unless)g Ft(gnutls_db_set_ptr\(\))19
19434
 
b FB(has)24 b(b)s(een)390 3232 y(called.)150 3433 y Fv(gn)m(utls)p
19435
 
483 3433 37 5 v 55 w(db)p 674 3433 V 54 w(set)p 880 3433
19436
 
V 54 w(retriev)m(e)p 1346 3433 V 53 w(function)3350 3631
 
19435
b FB(has)24 b(b)s(een)390 4231 y(called.)150 4432 y Fv(gn)m(utls)p
 
19436
483 4432 37 5 v 55 w(db)p 674 4432 V 54 w(set)p 880 4432
 
19437
V 54 w(retriev)m(e)p 1346 4432 V 53 w(function)3350 4630
19437
19438
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_db_set_retrieve_f)q
19438
 
(unc)q(tio)q(n)d Fg(\()p Ff(gn)m(utls)p 2359 3631 28
19439
 
4 v 41 w(session)p 2669 3631 V 40 w(t)31 b Fe(session)12
19440
 
b Ff(,)565 3740 y(gn)m(utls)p 811 3740 V 41 w(db)p 954
19441
 
3740 V 39 w(retr)p 1140 3740 V 39 w(func)30 b Fe(retr_func)12
19442
 
b Fg(\))390 3850 y Ff(session)p FB(:)41 b(is)30 b(a)h
19443
 
Ft(gnutls_session_t)26 b FB(structure.)390 3986 y Ff(retr)p
19444
 
543 3986 V 40 w(func)6 b FB(:)39 b(is)31 b(the)f(function.)390
19445
 
4122 y(Sets)21 b(the)g(function)g(that)g(will)g(b)s(e)g(used)f(to)h
 
19439
(unc)q(tio)q(n)d Fg(\()p Ff(gn)m(utls)p 2359 4630 28
 
19440
4 v 41 w(session)p 2669 4630 V 40 w(t)31 b Fe(session)12
 
19441
b Ff(,)565 4739 y(gn)m(utls)p 811 4739 V 41 w(db)p 954
 
19442
4739 V 39 w(retr)p 1140 4739 V 39 w(func)30 b Fe(retr_func)12
 
19443
b Fg(\))390 4849 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
19444
Ft(gnutls_session_t)26 b FB(structure.)390 4985 y Ff(retr)p
 
19445
543 4985 V 40 w(func)6 b FB(:)39 b(is)31 b(the)f(function.)390
 
19446
5121 y(Sets)21 b(the)g(function)g(that)g(will)g(b)s(e)g(used)f(to)h
19446
19447
(retriev)m(e)i(data)e(from)g(the)g(resumed)f(sessions)h(database.)390
19447
 
4231 y(This)42 b(function)g(m)m(ust)h(return)e(a)i(gn)m(utls)p
19448
 
1840 4231 V 41 w(datum)p 2139 4231 V 39 w(t)g(con)m(taining)h(the)f
19449
 
(data)g(on)g(success,)j(or)d(a)390 4341 y(gn)m(utls)p
19450
 
636 4341 V 40 w(datum)p 934 4341 V 40 w(t)31 b(con)m(taining)h(n)m(ull)
19451
 
e(and)g(0)g(on)h(failure.)390 4477 y(The)f(datum's)g(data)h(m)m(ust)f
19452
 
(b)s(e)g(allo)s(cated)i(using)e(the)h(function)f Ft(gnutls_malloc\(\))p
19453
 
FB(.)390 4612 y(The)40 b(\014rst)f(argumen)m(t)i(to)g
19454
 
Ft(retr_func\(\))d FB(will)i(b)s(e)g(n)m(ull)g(unless)g
19455
 
Ft(gnutls_db_set_ptr\(\))35 b FB(has)390 4722 y(b)s(een)30
19456
 
b(called.)150 4923 y Fv(gn)m(utls)p 483 4923 37 5 v 55
19457
 
w(db)p 674 4923 V 54 w(set)p 880 4923 V 54 w(store)p
19458
 
1197 4923 V 55 w(function)3350 5121 y FB([F)-8 b(unction])-3599
19459
 
b Fh(void)54 b(gnutls_db_set_store_func)q(tio)q(n)d Fg(\()p
19460
 
Ff(gn)m(utls)p 2202 5121 28 4 v 41 w(session)p 2512 5121
19461
 
V 40 w(t)31 b Fe(session)12 b Ff(,)565 5230 y(gn)m(utls)p
19462
 
811 5230 V 41 w(db)p 954 5230 V 39 w(store)p 1185 5230
19463
 
V 40 w(func)30 b Fe(store_func)12 b Fg(\))390 5340 y
19464
 
Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
19465
 
b FB(structure.)p eop end
 
19448
5230 y(This)42 b(function)g(m)m(ust)h(return)e(a)i(gn)m(utls)p
 
19449
1840 5230 V 41 w(datum)p 2139 5230 V 39 w(t)g(con)m(taining)h(the)f
 
19450
(data)g(on)g(success,)j(or)d(a)390 5340 y(gn)m(utls)p
 
19451
636 5340 V 40 w(datum)p 934 5340 V 40 w(t)31 b(con)m(taining)h(n)m(ull)
 
19452
e(and)g(0)g(on)h(failure.)p eop end
19466
19453
%%Page: 140 146
19467
19454
TeXDict begin 140 145 bop 150 -116 a FB(Chapter)30 b(9:)41
19468
 
b(F)-8 b(unction)31 b(Reference)2237 b(140)390 299 y
19469
 
Ff(store)p 588 299 28 4 v 41 w(func)6 b FB(:)39 b(is)30
19470
 
b(the)h(function)390 434 y(Sets)e(the)f(function)g(that)h(will)g(b)s(e)
19471
 
f(used)g(to)h(store)g(data)g(from)f(the)h(resumed)e(sessions)i
19472
 
(database.)390 543 y(This)h(function)g(m)m(ust)g(remo)m(v)m(e)i(0)f(on)
19473
 
f(success.)390 678 y(The)35 b(\014rst)g(argumen)m(t)h(to)g
19474
 
Ft(store_func\(\))d FB(will)i(b)s(e)g(n)m(ull)h(unless)f
19475
 
Ft(gnutls_db_set_ptr\(\))30 b FB(has)390 788 y(b)s(een)g(called.)150
19476
 
987 y Fv(gn)m(utls)p 483 987 37 5 v 55 w(deinit)3350
19477
 
1184 y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_deinit)49
19478
 
b Fg(\()p Ff(gn)m(utls)p 1418 1184 28 4 v 41 w(session)p
19479
 
1728 1184 V 40 w(t)31 b Fe(session)12 b Fg(\))390 1294
 
19455
b(F)-8 b(unction)31 b(Reference)2237 b(140)390 299 y(The)30
 
19456
b(datum's)g(data)h(m)m(ust)f(b)s(e)g(allo)s(cated)i(using)e(the)h
 
19457
(function)f Ft(gnutls_malloc\(\))p FB(.)390 438 y(The)40
 
19458
b(\014rst)f(argumen)m(t)i(to)g Ft(retr_func\(\))d FB(will)i(b)s(e)g(n)m
 
19459
(ull)g(unless)g Ft(gnutls_db_set_ptr\(\))35 b FB(has)390
 
19460
548 y(b)s(een)30 b(called.)150 752 y Fv(gn)m(utls)p 483
 
19461
752 37 5 v 55 w(db)p 674 752 V 54 w(set)p 880 752 V 54
 
19462
w(store)p 1197 752 V 55 w(function)3350 954 y FB([F)-8
 
19463
b(unction])-3599 b Fh(void)54 b(gnutls_db_set_store_func)q(tio)q(n)d
 
19464
Fg(\()p Ff(gn)m(utls)p 2202 954 28 4 v 41 w(session)p
 
19465
2512 954 V 40 w(t)31 b Fe(session)12 b Ff(,)565 1064
 
19466
y(gn)m(utls)p 811 1064 V 41 w(db)p 954 1064 V 39 w(store)p
 
19467
1185 1064 V 40 w(func)30 b Fe(store_func)12 b Fg(\))390
 
19468
1173 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
19469
b FB(structure.)390 1313 y Ff(store)p 588 1313 V 41 w(func)6
 
19470
b FB(:)39 b(is)30 b(the)h(function)390 1453 y(Sets)e(the)f(function)g
 
19471
(that)h(will)g(b)s(e)f(used)g(to)h(store)g(data)g(from)f(the)h(resumed)
 
19472
e(sessions)i(database.)390 1562 y(This)h(function)g(m)m(ust)g(remo)m(v)
 
19473
m(e)i(0)f(on)f(success.)390 1702 y(The)35 b(\014rst)g(argumen)m(t)h(to)
 
19474
g Ft(store_func\(\))d FB(will)i(b)s(e)g(n)m(ull)h(unless)f
 
19475
Ft(gnutls_db_set_ptr\(\))30 b FB(has)390 1811 y(b)s(een)g(called.)150
 
19476
2016 y Fv(gn)m(utls)p 483 2016 37 5 v 55 w(deinit)3350
 
19477
2218 y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_deinit)49
 
19478
b Fg(\()p Ff(gn)m(utls)p 1418 2218 28 4 v 41 w(session)p
 
19479
1728 2218 V 40 w(t)31 b Fe(session)12 b Fg(\))390 2327
19480
19480
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
19481
 
b FB(structure.)390 1428 y(This)32 b(function)h(clears)h(all)g
 
19481
b FB(structure.)390 2467 y(This)32 b(function)h(clears)h(all)g
19482
19482
(bu\013ers)e(asso)s(ciated)i(with)f(the)g Ft(session)p
19483
 
FB(.)47 b(This)32 b(function)h(will)g(also)390 1538 y(remo)m(v)m(e)j
 
19483
FB(.)47 b(This)32 b(function)h(will)g(also)390 2576 y(remo)m(v)m(e)j
19484
19484
(session)g(data)f(from)g(the)g(session)g(database)h(if)f(the)g(session)
19485
 
g(w)m(as)h(terminated)f(abnor-)390 1648 y(mally)-8 b(.)150
19486
 
1847 y Fv(gn)m(utls)p 483 1847 37 5 v 55 w(dh)p 674 1847
19487
 
V 54 w(get)p 893 1847 V 54 w(group)3350 2044 y FB([F)g(unction])-3599
 
19485
g(w)m(as)h(terminated)f(abnor-)390 2686 y(mally)-8 b(.)150
 
19486
2890 y Fv(gn)m(utls)p 483 2890 37 5 v 55 w(dh)p 674 2890
 
19487
V 54 w(get)p 893 2890 V 54 w(group)3350 3092 y FB([F)g(unction])-3599
19488
19488
b Fh(int)53 b(gnutls_dh_get_group)e Fg(\()p Ff(gn)m(utls)p
19489
 
1679 2044 28 4 v 41 w(session)p 1989 2044 V 40 w(t)31
19490
 
b Fe(session)12 b Ff(,)32 b(gn)m(utls)p 2768 2044 V 41
19491
 
w(datum)p 3067 2044 V 39 w(t)565 2154 y(*)f Fe(raw_gen)12
19492
 
b Ff(,)32 b(gn)m(utls)p 1320 2154 V 40 w(datum)p 1618
19493
 
2154 V 40 w(t)f(*)f Fe(raw_prime)12 b Fg(\))390 2263
 
19489
1679 3092 28 4 v 41 w(session)p 1989 3092 V 40 w(t)31
 
19490
b Fe(session)12 b Ff(,)32 b(gn)m(utls)p 2768 3092 V 41
 
19491
w(datum)p 3067 3092 V 39 w(t)565 3202 y(*)f Fe(raw_gen)12
 
19492
b Ff(,)32 b(gn)m(utls)p 1320 3202 V 40 w(datum)p 1618
 
19493
3202 V 40 w(t)f(*)f Fe(raw_prime)12 b Fg(\))390 3311
19494
19494
y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
19495
 
2398 y Ff(ra)m(w)p 540 2398 V 40 w(gen)p FB(:)41 b(will)31
19496
 
b(hold)f(the)h(generator.)390 2533 y Ff(ra)m(w)p 540
19497
 
2533 V 40 w(prime)5 b FB(:)40 b(will)31 b(hold)f(the)h(prime.)390
19498
 
2668 y(This)23 b(function)g(will)h(return)f(the)h(group)f(parameters)h
 
19495
3451 y Ff(ra)m(w)p 540 3451 V 40 w(gen)p FB(:)41 b(will)31
 
19496
b(hold)f(the)h(generator.)390 3591 y Ff(ra)m(w)p 540
 
19497
3591 V 40 w(prime)5 b FB(:)40 b(will)31 b(hold)f(the)h(prime.)390
 
19498
3730 y(This)23 b(function)g(will)h(return)f(the)h(group)f(parameters)h
19499
19499
(used)f(in)h(the)f(last)i(Di\016e)g(Hellman)f(authen-)390
19500
 
2777 y(tication)37 b(with)e(the)h(p)s(eer.)55 b(These)35
 
19500
3840 y(tication)37 b(with)e(the)h(p)s(eer.)55 b(These)35
19501
19501
b(are)h(the)f(prime)g(and)g(the)g(generator)i(used.)55
19502
 
b(This)34 b(function)390 2887 y(should)g(b)s(e)h(used)g(for)g(b)s(oth)g
 
19502
b(This)34 b(function)390 3949 y(should)g(b)s(e)h(used)g(for)g(b)s(oth)g
19503
19503
(anon)m(ymous)g(and)g(ephemeral)g(di\016e)g(Hellman.)57
19504
 
b(The)35 b(output)g(pa-)390 2996 y(rameters)c(m)m(ust)f(b)s(e)g(freed)g
19505
 
(with)g Ft(gnutls_free\(\))p FB(.)390 3131 y Fn(Returns:)46
 
19504
b(The)35 b(output)g(pa-)390 4059 y(rameters)c(m)m(ust)f(b)s(e)g(freed)g
 
19505
(with)g Ft(gnutls_free\(\))p FB(.)390 4199 y Fn(Returns:)46
19506
19506
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
19507
19507
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
19508
 
3241 y(returned.)150 3440 y Fv(gn)m(utls)p 483 3440 37
19509
 
5 v 55 w(dh)p 674 3440 V 54 w(get)p 893 3440 V 54 w(p)s(eers)p
19510
 
1228 3440 V 55 w(public)p 1610 3440 V 54 w(bits)3350
19511
 
3637 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_peers_p)q
19512
 
(ubli)q(c_b)q(its)f Fg(\()p Ff(gn)m(utls)p 2307 3637
19513
 
28 4 v 41 w(session)p 2617 3637 V 40 w(t)31 b Fe(session)12
19514
 
b Fg(\))390 3747 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
19515
 
(session)390 3882 y(Get)41 b(the)f(Di\016e-Hellman)h(public)e(k)m(ey)h
 
19508
4308 y(returned.)150 4512 y Fv(gn)m(utls)p 483 4512 37
 
19509
5 v 55 w(dh)p 674 4512 V 54 w(get)p 893 4512 V 54 w(p)s(eers)p
 
19510
1228 4512 V 55 w(public)p 1610 4512 V 54 w(bits)3350
 
19511
4714 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_peers_p)q
 
19512
(ubli)q(c_b)q(its)f Fg(\()p Ff(gn)m(utls)p 2307 4714
 
19513
28 4 v 41 w(session)p 2617 4714 V 40 w(t)31 b Fe(session)12
 
19514
b Fg(\))390 4824 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
19515
(session)390 4964 y(Get)41 b(the)f(Di\016e-Hellman)h(public)e(k)m(ey)h
19516
19516
(bit)g(size.)70 b(Can)39 b(b)s(e)g(used)g(for)g(b)s(oth)g(anon)m(ymous)
19517
 
h(and)390 3991 y(ephemeral)31 b(di\016e)f(Hellman.)390
19518
 
4126 y Fn(Returns:)46 b FB(the)33 b(public)g(k)m(ey)h(bit)f(size)h
 
19517
h(and)390 5073 y(ephemeral)31 b(di\016e)f(Hellman.)390
 
19518
5213 y Fn(Returns:)46 b FB(the)33 b(public)g(k)m(ey)h(bit)f(size)h
19519
19519
(used)f(in)g(the)g(last)h(Di\016e)g(Hellman)g(authen)m(tication)h(with)
19520
 
390 4236 y(the)c(p)s(eer,)f(or)g(a)h(negativ)m(e)h(v)-5
19521
 
b(alue)31 b(in)f(case)i(of)e(error.)150 4435 y Fv(gn)m(utls)p
19522
 
483 4435 37 5 v 55 w(dh)p 674 4435 V 54 w(get)p 893 4435
19523
 
V 54 w(prime)p 1257 4435 V 55 w(bits)3350 4632 y FB([F)-8
19524
 
b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_prime_b)q(its)f
19525
 
Fg(\()p Ff(gn)m(utls)p 1941 4632 28 4 v 41 w(session)p
19526
 
2251 4632 V 40 w(t)31 b Fe(session)12 b Fg(\))390 4742
19527
 
y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
19528
 
4876 y(This)38 b(function)g(will)h(return)f(the)g(bits)h(of)g(the)g
19529
 
(prime)f(used)f(in)i(the)g(last)g(Di\016e)g(Hellman)h(au-)390
19530
 
4986 y(then)m(tication)31 b(with)e(the)h(p)s(eer.)39
19531
 
b(Should)28 b(b)s(e)h(used)f(for)h(b)s(oth)g(anon)m(ymous)g(and)g
19532
 
(ephemeral)g(di\016e)390 5096 y(Hellman.)390 5230 y Fn(Returns:)46
19533
 
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
19534
 
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
19535
 
5340 y(returned.)p eop end
 
19520
390 5322 y(the)c(p)s(eer,)f(or)g(a)h(negativ)m(e)h(v)-5
 
19521
b(alue)31 b(in)f(case)i(of)e(error.)p eop end
19536
19522
%%Page: 141 147
19537
19523
TeXDict begin 141 146 bop 150 -116 a FB(Chapter)30 b(9:)41
19538
19524
b(F)-8 b(unction)31 b(Reference)2237 b(141)150 299 y
19539
19525
Fv(gn)m(utls)p 483 299 37 5 v 55 w(dh)p 674 299 V 54
19540
 
w(get)p 893 299 V 54 w(pubk)m(ey)3350 502 y FB([F)-8
19541
 
b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_pubkey)f
19542
 
Fg(\()p Ff(gn)m(utls)p 1732 502 28 4 v 40 w(session)p
19543
 
2041 502 V 41 w(t)30 b Fe(session)12 b Ff(,)33 b(gn)m(utls)p
19544
 
2821 502 V 40 w(datum)p 3119 502 V 40 w(t)565 612 y(*)e
19545
 
Fe(raw_key)12 b Fg(\))390 722 y Ff(session)p FB(:)41
19546
 
b(is)30 b(a)h(gn)m(utls)g(session)390 863 y Ff(ra)m(w)p
19547
 
540 863 V 40 w(k)m(ey)8 b FB(:)41 b(will)31 b(hold)f(the)h(public)f(k)m
19548
 
(ey)-8 b(.)390 1004 y(This)38 b(function)h(will)g(return)f(the)h(p)s
 
19526
w(get)p 893 299 V 54 w(prime)p 1257 299 V 55 w(bits)3350
 
19527
509 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_prime_b)q
 
19528
(its)f Fg(\()p Ff(gn)m(utls)p 1941 509 28 4 v 41 w(session)p
 
19529
2251 509 V 40 w(t)31 b Fe(session)12 b Fg(\))390 619
 
19530
y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
 
19531
766 y(This)38 b(function)g(will)h(return)f(the)g(bits)h(of)g(the)g
 
19532
(prime)f(used)f(in)i(the)g(last)g(Di\016e)g(Hellman)h(au-)390
 
19533
876 y(then)m(tication)31 b(with)e(the)h(p)s(eer.)39 b(Should)28
 
19534
b(b)s(e)h(used)f(for)h(b)s(oth)g(anon)m(ymous)g(and)g(ephemeral)g
 
19535
(di\016e)390 986 y(Hellman.)390 1133 y Fn(Returns:)46
 
19536
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
 
19537
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
 
19538
1243 y(returned.)150 1456 y Fv(gn)m(utls)p 483 1456 37
 
19539
5 v 55 w(dh)p 674 1456 V 54 w(get)p 893 1456 V 54 w(pubk)m(ey)3350
 
19540
1666 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_pubkey)f
 
19541
Fg(\()p Ff(gn)m(utls)p 1732 1666 28 4 v 40 w(session)p
 
19542
2041 1666 V 41 w(t)30 b Fe(session)12 b Ff(,)33 b(gn)m(utls)p
 
19543
2821 1666 V 40 w(datum)p 3119 1666 V 40 w(t)565 1775
 
19544
y(*)e Fe(raw_key)12 b Fg(\))390 1885 y Ff(session)p FB(:)41
 
19545
b(is)30 b(a)h(gn)m(utls)g(session)390 2033 y Ff(ra)m(w)p
 
19546
540 2033 V 40 w(k)m(ey)8 b FB(:)41 b(will)31 b(hold)f(the)h(public)f(k)
 
19547
m(ey)-8 b(.)390 2181 y(This)38 b(function)h(will)g(return)f(the)h(p)s
19549
19548
(eer's)g(public)f(k)m(ey)i(used)e(in)h(the)g(last)h(Di\016e)g(Hellman)g
19550
 
(au-)390 1114 y(then)m(tication.)j(This)30 b(function)g(should)g(b)s(e)
 
19549
(au-)390 2290 y(then)m(tication.)j(This)30 b(function)g(should)g(b)s(e)
19551
19550
f(used)h(for)g(b)s(oth)g(anon)m(ymous)g(and)g(ephemeral)h(di\016e)390
19552
 
1224 y(Hellman.)41 b(The)30 b(output)g(parameters)h(m)m(ust)f(b)s(e)g
19553
 
(freed)g(with)g Ft(gnutls_free\(\))p FB(.)390 1365 y
 
19551
2400 y(Hellman.)41 b(The)30 b(output)g(parameters)h(m)m(ust)f(b)s(e)g
 
19552
(freed)g(with)g Ft(gnutls_free\(\))p FB(.)390 2548 y
19554
19553
Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
19555
19554
b FB(\(0\))34 b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)
19556
 
390 1474 y(returned.)150 1681 y Fv(gn)m(utls)p 483 1681
19557
 
37 5 v 55 w(dh)p 674 1681 V 54 w(get)p 893 1681 V 54
19558
 
w(secret)p 1260 1681 V 54 w(bits)3350 1884 y FB([F)-8
 
19555
390 2657 y(returned.)150 2870 y Fv(gn)m(utls)p 483 2870
 
19556
37 5 v 55 w(dh)p 674 2870 V 54 w(get)p 893 2870 V 54
 
19557
w(secret)p 1260 2870 V 54 w(bits)3350 3080 y FB([F)-8
19559
19558
b(unction])-3599 b Fh(int)53 b(gnutls_dh_get_secret_)q(bits)f
19560
 
Fg(\()p Ff(gn)m(utls)p 1993 1884 28 4 v 41 w(session)p
19561
 
2303 1884 V 40 w(t)31 b Fe(session)12 b Fg(\))390 1994
 
19559
Fg(\()p Ff(gn)m(utls)p 1993 3080 28 4 v 41 w(session)p
 
19560
2303 3080 V 40 w(t)31 b Fe(session)12 b Fg(\))390 3190
19562
19561
y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
19563
 
2135 y(This)e(function)g(will)g(return)g(the)g(bits)h(used)e(in)h(the)h
 
19562
3337 y(This)e(function)g(will)g(return)g(the)g(bits)h(used)e(in)h(the)h
19564
19563
(last)g(Di\016e)h(Hellman)f(authen)m(tication)h(with)390
19565
 
2245 y(the)g(p)s(eer.)40 b(Should)29 b(b)s(e)g(used)h(for)g(b)s(oth)g
 
19564
3447 y(the)g(p)s(eer.)40 b(Should)29 b(b)s(e)g(used)h(for)g(b)s(oth)g
19566
19565
(anon)m(ymous)g(and)g(ephemeral)g(di\016e)h(Hellman.)390
19567
 
2386 y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
 
19566
3595 y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
19568
19567
b FB(\(0\))34 b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)
19569
 
390 2496 y(returned.)150 2702 y Fv(gn)m(utls)p 483 2702
19570
 
37 5 v 55 w(dh)p 674 2702 V 54 w(params)p 1116 2702 V
19571
 
54 w(cp)m(y)3350 2905 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
19568
390 3705 y(returned.)150 3917 y Fv(gn)m(utls)p 483 3917
 
19569
37 5 v 55 w(dh)p 674 3917 V 54 w(params)p 1116 3917 V
 
19570
54 w(cp)m(y)3350 4127 y FB([F)-8 b(unction])-3599 b Fh(int)53
19572
19571
b(gnutls_dh_params_cpy)f Fg(\()p Ff(gn)m(utls)p 1732
19573
 
2905 28 4 v 40 w(dh)p 1874 2905 V 40 w(params)p 2203
19574
 
2905 V 39 w(t)31 b Fe(dst)12 b Ff(,)565 3015 y(gn)m(utls)p
19575
 
811 3015 V 41 w(dh)p 954 3015 V 39 w(params)p 1282 3015
19576
 
V 39 w(t)31 b Fe(src)12 b Fg(\))390 3125 y Ff(dst)r FB(:)40
 
19572
4127 28 4 v 40 w(dh)p 1874 4127 V 40 w(params)p 2203
 
19573
4127 V 39 w(t)31 b Fe(dst)12 b Ff(,)565 4237 y(gn)m(utls)p
 
19574
811 4237 V 41 w(dh)p 954 4237 V 39 w(params)p 1282 4237
 
19575
V 39 w(t)31 b Fe(src)12 b Fg(\))390 4346 y Ff(dst)r FB(:)40
19577
19576
b(Is)30 b(the)h(destination)g(structure,)f(whic)m(h)g(should)g(b)s(e)f
19578
 
(initialized.)390 3266 y Ff(src)6 b FB(:)40 b(Is)30 b(the)h(source)f
19579
 
(structure)390 3407 y(This)g(function)g(will)g(cop)m(y)h(the)g(DH)g
 
19577
(initialized.)390 4494 y Ff(src)6 b FB(:)40 b(Is)30 b(the)h(source)f
 
19578
(structure)390 4642 y(This)g(function)g(will)g(cop)m(y)h(the)g(DH)g
19580
19579
(parameters)g(structure)f(from)f(source)i(to)g(destination.)150
19581
 
3613 y Fv(gn)m(utls)p 483 3613 37 5 v 55 w(dh)p 674 3613
19582
 
V 54 w(params)p 1116 3613 V 54 w(deinit)3350 3817 y FB([F)-8
 
19580
4855 y Fv(gn)m(utls)p 483 4855 37 5 v 55 w(dh)p 674 4855
 
19581
V 54 w(params)p 1116 4855 V 54 w(deinit)3350 5065 y FB([F)-8
19583
19582
b(unction])-3599 b Fh(void)54 b(gnutls_dh_params_deinit)e
19584
 
Fg(\()p Ff(gn)m(utls)p 1941 3817 28 4 v 41 w(dh)p 2084
19585
 
3817 V 39 w(params)p 2412 3817 V 39 w(t)31 b Fe(dh_params)12
19586
 
b Fg(\))390 3927 y Ff(dh)p 498 3927 V 39 w(params)t FB(:)40
 
19583
Fg(\()p Ff(gn)m(utls)p 1941 5065 28 4 v 41 w(dh)p 2084
 
19584
5065 V 39 w(params)p 2412 5065 V 39 w(t)31 b Fe(dh_params)12
 
19585
b Fg(\))390 5174 y Ff(dh)p 498 5174 V 39 w(params)t FB(:)40
19587
19586
b(Is)30 b(a)h(structure)f(that)h(holds)f(the)g(prime)g(n)m(um)m(b)s
19588
 
(ers)390 4068 y(This)g(function)g(will)g(deinitialize)j(the)e(DH)f
19589
 
(parameters)h(structure.)150 4274 y Fv(gn)m(utls)p 483
19590
 
4274 37 5 v 55 w(dh)p 674 4274 V 54 w(params)p 1116 4274
19591
 
V 54 w(exp)s(ort)p 1521 4274 V 55 w(pk)m(cs3)3350 4478
19592
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_dh_params_expo)q(rt_p)
19593
 
q(kcs)q(3)e Fg(\()p Ff(gn)m(utls)p 2202 4478 28 4 v 41
19594
 
w(dh)p 2345 4478 V 39 w(params)p 2673 4478 V 40 w(t)31
19595
 
b Fe(params)12 b Ff(,)565 4587 y(gn)m(utls)p 811 4587
19596
 
V 41 w(x509)p 1035 4587 V 41 w(crt)p 1187 4587 V 40 w(fm)m(t)p
19597
 
1363 4587 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(unsigned)d(c)m(har)i
19598
 
(*)g Fe(params_data)12 b Ff(,)33 b(size)p 3288 4587 V
19599
 
41 w(t)e(*)565 4697 y Fe(params_data_size)12 b Fg(\))390
19600
 
4806 y Ff(params)t FB(:)40 b(Holds)31 b(the)f(DH)h(parameters)390
19601
 
4948 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
19602
 
b(One)30 b(of)h(PEM)f(or)g(DER.)390 5089 y Ff(params)p
19603
 
685 5089 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)g(a)g(PK)m(CS3)f
19604
 
(DHP)m(arams)i(structure)e(PEM)g(or)g(DER)h(enco)s(ded)390
19605
 
5230 y Ff(params)p 685 5230 V 40 w(data)p 901 5230 V
19606
 
40 w(size)5 b FB(:)43 b(holds)30 b(the)h(size)g(of)g(params)p
19607
 
2115 5230 V 40 w(data)g(\(and)g(will)g(b)s(e)f(replaced)h(b)m(y)g(the)g
19608
 
(actual)390 5340 y(size)g(of)g(parameters\))p eop end
 
19587
(ers)390 5322 y(This)g(function)g(will)g(deinitialize)j(the)e(DH)f
 
19588
(parameters)h(structure.)p eop end
19609
19589
%%Page: 142 148
19610
19590
TeXDict begin 142 147 bop 150 -116 a FB(Chapter)30 b(9:)41
19611
 
b(F)-8 b(unction)31 b(Reference)2237 b(142)390 299 y(This)28
19612
 
b(function)h(will)g(exp)s(ort)f(the)h(giv)m(en)h(dh)e(parameters)h(to)h
19613
 
(a)f(PK)m(CS3)f(DHP)m(arams)i(structure.)390 408 y(This)37
19614
 
b(is)h(the)f(format)h(generated)h(b)m(y)f Ft(")p FB(op)s(enssl)e
19615
 
(dhparam)p Ft(")g FB(to)s(ol.)64 b(If)37 b(the)h(bu\013er)f(pro)m
19616
 
(vided)g(is)390 518 y(not)26 b(long)g(enough)g(to)h(hold)e(the)h
19617
 
(output,)h(then)e(GNUTLS)p 2413 518 28 4 v 40 w(E)p 2515
19618
 
518 V 40 w(SHOR)-8 b(T)p 2870 518 V 39 w(MEMOR)g(Y)p
19619
 
3335 518 V 41 w(BUFFER)390 628 y(will)31 b(b)s(e)e(returned.)390
19620
 
761 y(If)37 b(the)g(structure)f(is)i(PEM)f(enco)s(ded,)h(it)g(will)f
19621
 
(ha)m(v)m(e)h(a)g(header)f(of)g Ft(")p FB(BEGIN)g(DH)h(P)-8
19622
 
b(ARAME-)390 871 y(TERS)p Ft(")p FB(.)390 1005 y(In)30
19623
 
b(case)h(of)g(failure)f(a)h(negativ)m(e)h(v)-5 b(alue)31
19624
 
b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
19625
 
1202 y Fv(gn)m(utls)p 483 1202 37 5 v 55 w(dh)p 674 1202
19626
 
V 54 w(params)p 1116 1202 V 54 w(exp)s(ort)p 1521 1202
19627
 
V 55 w(ra)m(w)3350 1398 y FB([F)-8 b(unction])-3599 b
19628
 
Fh(int)53 b(gnutls_dh_params_expo)q(rt_r)q(aw)f Fg(\()p
19629
 
Ff(gn)m(utls)p 2098 1398 28 4 v 41 w(dh)p 2241 1398 V
19630
 
39 w(params)p 2569 1398 V 39 w(t)31 b Fe(params)12 b
19631
 
Ff(,)565 1507 y(gn)m(utls)p 811 1507 V 41 w(datum)p 1110
19632
 
1507 V 39 w(t)31 b(*)g Fe(prime)12 b Ff(,)31 b(gn)m(utls)p
19633
 
1859 1507 V 41 w(datum)p 2158 1507 V 39 w(t)g(*)g Fe(generator)12
 
19591
b(F)-8 b(unction)31 b(Reference)2237 b(142)150 299 y
 
19592
Fv(gn)m(utls)p 483 299 37 5 v 55 w(dh)p 674 299 V 54
 
19593
w(params)p 1116 299 V 54 w(exp)s(ort)p 1521 299 V 55
 
19594
w(pk)m(cs3)3350 513 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
19595
b(gnutls_dh_params_expo)q(rt_p)q(kcs)q(3)e Fg(\()p Ff(gn)m(utls)p
 
19596
2202 513 28 4 v 41 w(dh)p 2345 513 V 39 w(params)p 2673
 
19597
513 V 40 w(t)31 b Fe(params)12 b Ff(,)565 623 y(gn)m(utls)p
 
19598
811 623 V 41 w(x509)p 1035 623 V 41 w(crt)p 1187 623
 
19599
V 40 w(fm)m(t)p 1363 623 V 41 w(t)30 b Fe(format)12 b
 
19600
Ff(,)32 b(unsigned)d(c)m(har)i(*)g Fe(params_data)12
 
19601
b Ff(,)33 b(size)p 3288 623 V 41 w(t)e(*)565 732 y Fe(params_data_size)
 
19602
12 b Fg(\))390 842 y Ff(params)t FB(:)40 b(Holds)31 b(the)f(DH)h
 
19603
(parameters)390 994 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h
 
19604
(output)f(params.)40 b(One)30 b(of)h(PEM)f(or)g(DER.)390
 
19605
1146 y Ff(params)p 685 1146 V 40 w(data)p FB(:)41 b(will)31
 
19606
b(con)m(tain)g(a)g(PK)m(CS3)f(DHP)m(arams)i(structure)e(PEM)g(or)g(DER)
 
19607
h(enco)s(ded)390 1298 y Ff(params)p 685 1298 V 40 w(data)p
 
19608
901 1298 V 40 w(size)5 b FB(:)43 b(holds)30 b(the)h(size)g(of)g(params)
 
19609
p 2115 1298 V 40 w(data)g(\(and)g(will)g(b)s(e)f(replaced)h(b)m(y)g
 
19610
(the)g(actual)390 1407 y(size)g(of)g(parameters\))390
 
19611
1559 y(This)d(function)h(will)g(exp)s(ort)f(the)h(giv)m(en)h(dh)e
 
19612
(parameters)h(to)h(a)f(PK)m(CS3)f(DHP)m(arams)i(structure.)390
 
19613
1669 y(This)37 b(is)h(the)f(format)h(generated)h(b)m(y)f
 
19614
Ft(")p FB(op)s(enssl)e(dhparam)p Ft(")g FB(to)s(ol.)64
 
19615
b(If)37 b(the)h(bu\013er)f(pro)m(vided)g(is)390 1778
 
19616
y(not)26 b(long)g(enough)g(to)h(hold)e(the)h(output,)h(then)e(GNUTLS)p
 
19617
2413 1778 V 40 w(E)p 2515 1778 V 40 w(SHOR)-8 b(T)p 2870
 
19618
1778 V 39 w(MEMOR)g(Y)p 3335 1778 V 41 w(BUFFER)390 1888
 
19619
y(will)31 b(b)s(e)e(returned.)390 2040 y(If)37 b(the)g(structure)f(is)i
 
19620
(PEM)f(enco)s(ded,)h(it)g(will)f(ha)m(v)m(e)h(a)g(header)f(of)g
 
19621
Ft(")p FB(BEGIN)g(DH)h(P)-8 b(ARAME-)390 2149 y(TERS)p
 
19622
Ft(")p FB(.)390 2301 y(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)h
 
19623
(v)-5 b(alue)31 b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)
 
19624
150 2518 y Fv(gn)m(utls)p 483 2518 37 5 v 55 w(dh)p 674
 
19625
2518 V 54 w(params)p 1116 2518 V 54 w(exp)s(ort)p 1521
 
19626
2518 V 55 w(ra)m(w)3350 2732 y FB([F)-8 b(unction])-3599
 
19627
b Fh(int)53 b(gnutls_dh_params_expo)q(rt_r)q(aw)f Fg(\()p
 
19628
Ff(gn)m(utls)p 2098 2732 28 4 v 41 w(dh)p 2241 2732 V
 
19629
39 w(params)p 2569 2732 V 39 w(t)31 b Fe(params)12 b
 
19630
Ff(,)565 2842 y(gn)m(utls)p 811 2842 V 41 w(datum)p 1110
 
19631
2842 V 39 w(t)31 b(*)g Fe(prime)12 b Ff(,)31 b(gn)m(utls)p
 
19632
1859 2842 V 41 w(datum)p 2158 2842 V 39 w(t)g(*)g Fe(generator)12
19634
19633
b Ff(,)32 b(unsigned)e(in)m(t)h(*)f Fe(bits)12 b Fg(\))390
19635
 
1617 y Ff(params)t FB(:)40 b(Holds)31 b(the)f(DH)h(parameters)390
19636
 
1750 y Ff(prime)5 b FB(:)40 b(will)31 b(hold)f(the)h(new)e(prime)390
19637
 
1884 y Ff(generator)7 b FB(:)41 b(will)31 b(hold)f(the)h(new)f
19638
 
(generator)390 2018 y Ff(bits)t FB(:)40 b(if)31 b(non)e(n)m(ull)i(will)
 
19634
2951 y Ff(params)t FB(:)40 b(Holds)31 b(the)f(DH)h(parameters)390
 
19635
3103 y Ff(prime)5 b FB(:)40 b(will)31 b(hold)f(the)h(new)e(prime)390
 
19636
3255 y Ff(generator)7 b FB(:)41 b(will)31 b(hold)f(the)h(new)f
 
19637
(generator)390 3407 y Ff(bits)t FB(:)40 b(if)31 b(non)e(n)m(ull)i(will)
19639
19638
f(hold)h(is)f(the)g(prime's)g(n)m(um)m(b)s(er)f(of)i(bits)390
19640
 
2152 y(This)24 b(function)g(will)h(exp)s(ort)f(the)h(pair)g(of)f(prime)
 
19639
3559 y(This)24 b(function)g(will)h(exp)s(ort)f(the)h(pair)g(of)f(prime)
19641
19640
g(and)g(generator)i(for)f(use)f(in)g(the)h(Di\016e-Hellman)390
19642
 
2261 y(k)m(ey)h(exc)m(hange.)40 b(The)24 b(new)h(parameters)g(will)g(b)
 
19641
3669 y(k)m(ey)h(exc)m(hange.)40 b(The)24 b(new)h(parameters)g(will)g(b)
19643
19642
s(e)f(allo)s(cated)j(using)e Ft(gnutls_malloc\(\))20
19644
 
b FB(and)25 b(will)390 2371 y(b)s(e)30 b(stored)g(in)g(the)h
19645
 
(appropriate)f(datum.)150 2569 y Fv(gn)m(utls)p 483 2569
19646
 
37 5 v 55 w(dh)p 674 2569 V 54 w(params)p 1116 2569 V
19647
 
54 w(generate2)3350 2764 y FB([F)-8 b(unction])-3599
 
19643
b FB(and)25 b(will)390 3778 y(b)s(e)30 b(stored)g(in)g(the)h
 
19644
(appropriate)f(datum.)150 3995 y Fv(gn)m(utls)p 483 3995
 
19645
37 5 v 55 w(dh)p 674 3995 V 54 w(params)p 1116 3995 V
 
19646
54 w(generate2)3350 4209 y FB([F)-8 b(unction])-3599
19648
19647
b Fh(int)53 b(gnutls_dh_params_gene)q(rate)q(2)f Fg(\()p
19649
 
Ff(gn)m(utls)p 2046 2764 28 4 v 40 w(dh)p 2188 2764 V
19650
 
39 w(params)p 2516 2764 V 40 w(t)31 b Fe(params)12 b
19651
 
Ff(,)565 2873 y(unsigned)29 b(in)m(t)i Fe(bits)12 b Fg(\))390
19652
 
2983 y Ff(params)t FB(:)40 b(Is)30 b(the)h(structure)e(that)i(the)g(DH)
19653
 
g(parameters)g(will)f(b)s(e)g(stored)390 3117 y Ff(bits)t
 
19648
Ff(gn)m(utls)p 2046 4209 28 4 v 40 w(dh)p 2188 4209 V
 
19649
39 w(params)p 2516 4209 V 40 w(t)31 b Fe(params)12 b
 
19650
Ff(,)565 4319 y(unsigned)29 b(in)m(t)i Fe(bits)12 b Fg(\))390
 
19651
4428 y Ff(params)t FB(:)40 b(Is)30 b(the)h(structure)e(that)i(the)g(DH)
 
19652
g(parameters)g(will)f(b)s(e)g(stored)390 4580 y Ff(bits)t
19654
19653
FB(:)40 b(is)31 b(the)f(prime's)g(n)m(um)m(b)s(er)f(of)i(bits)390
19655
 
3250 y(This)j(function)h(will)g(generate)h(a)g(new)e(pair)h(of)g(prime)
 
19654
4732 y(This)j(function)h(will)g(generate)h(a)g(new)e(pair)h(of)g(prime)
19656
19655
f(and)h(generator)h(for)e(use)h(in)g(the)g(Di\016e-)390
19657
 
3360 y(Hellman)24 b(k)m(ey)f(exc)m(hange.)40 b(The)23
 
19656
4842 y(Hellman)24 b(k)m(ey)f(exc)m(hange.)40 b(The)23
19658
19657
b(new)f(parameters)h(will)g(b)s(e)g(allo)s(cated)i(using)d
19659
 
Ft(gnutls_malloc\(\))390 3470 y FB(and)30 b(will)g(b)s(e)g(stored)h(in)
 
19658
Ft(gnutls_malloc\(\))390 4951 y FB(and)30 b(will)g(b)s(e)g(stored)h(in)
19660
19659
f(the)g(appropriate)h(datum.)40 b(This)30 b(function)g(is)g(normally)h
19661
 
(slo)m(w.)390 3603 y(Note)36 b(that)f(the)g(bits)f(v)-5
 
19660
(slo)m(w.)390 5103 y(Note)36 b(that)f(the)g(bits)f(v)-5
19662
19661
b(alue)35 b(should)f(b)s(e)g(one)g(of)h(768,)i(1024,)h(2048,)f(3072)g
19663
 
(or)d(4096.)55 b(Also)35 b(note)390 3713 y(that)e(the)h(DH)f
 
19662
(or)d(4096.)55 b(Also)35 b(note)390 5213 y(that)e(the)h(DH)f
19664
19663
(parameters)g(are)h(only)f(useful)f(to)h(serv)m(ers.)49
19665
19664
b(Since)33 b(clien)m(ts)h(use)f(the)g(parameters)390
19666
 
3822 y(sen)m(t)e(b)m(y)f(the)h(serv)m(er,)g(it's)g(of)f(no)g(use)h(to)g
19667
 
(call)g(this)g(in)f(clien)m(t)i(side.)150 4020 y Fv(gn)m(utls)p
19668
 
483 4020 37 5 v 55 w(dh)p 674 4020 V 54 w(params)p 1116
19669
 
4020 V 54 w(imp)s(ort)p 1536 4020 V 55 w(pk)m(cs3)3350
19670
 
4215 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_dh_params_impo)q
19671
 
(rt_p)q(kcs)q(3)e Fg(\()p Ff(gn)m(utls)p 2202 4215 28
19672
 
4 v 41 w(dh)p 2345 4215 V 39 w(params)p 2673 4215 V 40
19673
 
w(t)31 b Fe(params)12 b Ff(,)565 4325 y(const)31 b(gn)m(utls)p
19674
 
1049 4325 V 40 w(datum)p 1347 4325 V 40 w(t)g(*)f Fe(pkcs3_params)12
19675
 
b Ff(,)34 b(gn)m(utls)p 2463 4325 V 41 w(x509)p 2687
19676
 
4325 V 41 w(crt)p 2839 4325 V 40 w(fm)m(t)p 3015 4325
19677
 
V 41 w(t)c Fe(format)12 b Fg(\))390 4435 y Ff(params)t
 
19665
5322 y(sen)m(t)e(b)m(y)f(the)h(serv)m(er,)g(it's)g(of)f(no)g(use)h(to)g
 
19666
(call)g(this)g(in)f(clien)m(t)i(side.)p eop end
 
19667
%%Page: 143 149
 
19668
TeXDict begin 143 148 bop 150 -116 a FB(Chapter)30 b(9:)41
 
19669
b(F)-8 b(unction)31 b(Reference)2237 b(143)150 299 y
 
19670
Fv(gn)m(utls)p 483 299 37 5 v 55 w(dh)p 674 299 V 54
 
19671
w(params)p 1116 299 V 54 w(imp)s(ort)p 1536 299 V 55
 
19672
w(pk)m(cs3)3350 521 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
19673
b(gnutls_dh_params_impo)q(rt_p)q(kcs)q(3)e Fg(\()p Ff(gn)m(utls)p
 
19674
2202 521 28 4 v 41 w(dh)p 2345 521 V 39 w(params)p 2673
 
19675
521 V 40 w(t)31 b Fe(params)12 b Ff(,)565 631 y(const)31
 
19676
b(gn)m(utls)p 1049 631 V 40 w(datum)p 1347 631 V 40 w(t)g(*)f
 
19677
Fe(pkcs3_params)12 b Ff(,)34 b(gn)m(utls)p 2463 631 V
 
19678
41 w(x509)p 2687 631 V 41 w(crt)p 2839 631 V 40 w(fm)m(t)p
 
19679
3015 631 V 41 w(t)c Fe(format)12 b Fg(\))390 741 y Ff(params)t
19678
19680
FB(:)40 b(A)31 b(structure)e(where)h(the)h(parameters)g(will)f(b)s(e)g
19679
 
(copied)h(to)390 4568 y Ff(pk)m(cs3)p 613 4568 V 41 w(params)t
 
19681
(copied)h(to)390 901 y Ff(pk)m(cs3)p 613 901 V 41 w(params)t
19680
19682
FB(:)39 b(should)28 b(con)m(tain)i(a)f(PK)m(CS3)f(DHP)m(arams)i
19681
 
(structure)e(PEM)h(or)f(DER)h(enco)s(ded)390 4702 y Ff(format)r
 
19683
(structure)e(PEM)h(or)f(DER)h(enco)s(ded)390 1061 y Ff(format)r
19682
19684
FB(:)41 b(the)31 b(format)f(of)h(params.)40 b(PEM)31
19683
 
b(or)f(DER.)390 4836 y(This)41 b(function)h(will)g(extract)h(the)f(DHP)
 
19685
b(or)f(DER.)390 1222 y(This)41 b(function)h(will)g(extract)h(the)f(DHP)
19684
19686
m(arams)h(found)e(in)g(a)h(PK)m(CS3)g(formatted)g(structure.)390
19685
 
4945 y(This)30 b(is)g(the)h(format)f(generated)i(b)m(y)e
 
19687
1331 y(This)30 b(is)g(the)h(format)f(generated)i(b)m(y)e
19686
19688
Ft(")p FB(op)s(enssl)f(dhparam)p Ft(")g FB(to)s(ol.)390
19687
 
5079 y(If)f(the)h(structure)g(is)g(PEM)f(enco)s(ded,)h(it)h(should)e
 
19689
1491 y(If)f(the)h(structure)g(is)g(PEM)f(enco)s(ded,)h(it)h(should)e
19688
19690
(ha)m(v)m(e)i(a)f(header)f(of)h Ft(")p FB(BEGIN)h(DH)f(P)-8
19689
 
b(ARAME-)390 5189 y(TERS)p Ft(")p FB(.)390 5322 y(In)30
 
19691
b(ARAME-)390 1601 y(TERS)p Ft(")p FB(.)390 1761 y(In)30
19690
19692
b(case)h(of)g(failure)f(a)h(negativ)m(e)h(v)-5 b(alue)31
19691
 
b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)p
19692
 
eop end
19693
 
%%Page: 143 149
19694
 
TeXDict begin 143 148 bop 150 -116 a FB(Chapter)30 b(9:)41
19695
 
b(F)-8 b(unction)31 b(Reference)2237 b(143)150 299 y
19696
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(dh)p 674 299 V 54
19697
 
w(params)p 1116 299 V 54 w(imp)s(ort)p 1536 299 V 55
19698
 
w(ra)m(w)3350 497 y FB([F)-8 b(unction])-3599 b Fh(int)53
19699
 
b(gnutls_dh_params_impo)q(rt_r)q(aw)f Fg(\()p Ff(gn)m(utls)p
19700
 
2098 497 28 4 v 41 w(dh)p 2241 497 V 39 w(params)p 2569
19701
 
497 V 39 w(t)31 b Fe(dh_params)12 b Ff(,)565 607 y(const)31
19702
 
b(gn)m(utls)p 1049 607 V 40 w(datum)p 1347 607 V 40 w(t)g(*)f
19703
 
Fe(prime)12 b Ff(,)32 b(const)f(gn)m(utls)p 2335 607
19704
 
V 40 w(datum)p 2633 607 V 40 w(t)g(*)f Fe(generator)12
19705
 
b Fg(\))390 716 y Ff(dh)p 498 716 V 39 w(params)t FB(:)40
19706
 
b(Is)30 b(a)h(structure)f(that)h(will)f(hold)g(the)h(prime)f(n)m(um)m
19707
 
(b)s(ers)390 852 y Ff(prime)5 b FB(:)40 b(holds)30 b(the)h(new)f(prime)
19708
 
390 988 y Ff(generator)7 b FB(:)41 b(holds)30 b(the)h(new)f(generator)
19709
 
390 1124 y(This)22 b(function)h(will)h(replace)g(the)f(pair)g(of)g
19710
 
(prime)g(and)g(generator)h(for)f(use)g(in)g(the)g(Di\016e-Hellman)390
19711
 
1233 y(k)m(ey)h(exc)m(hange.)40 b(The)22 b(new)h(parameters)h(should)e
 
19693
b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
 
19694
1986 y Fv(gn)m(utls)p 483 1986 37 5 v 55 w(dh)p 674 1986
 
19695
V 54 w(params)p 1116 1986 V 54 w(imp)s(ort)p 1536 1986
 
19696
V 55 w(ra)m(w)3350 2209 y FB([F)-8 b(unction])-3599 b
 
19697
Fh(int)53 b(gnutls_dh_params_impo)q(rt_r)q(aw)f Fg(\()p
 
19698
Ff(gn)m(utls)p 2098 2209 28 4 v 41 w(dh)p 2241 2209 V
 
19699
39 w(params)p 2569 2209 V 39 w(t)31 b Fe(dh_params)12
 
19700
b Ff(,)565 2319 y(const)31 b(gn)m(utls)p 1049 2319 V
 
19701
40 w(datum)p 1347 2319 V 40 w(t)g(*)f Fe(prime)12 b Ff(,)32
 
19702
b(const)f(gn)m(utls)p 2335 2319 V 40 w(datum)p 2633 2319
 
19703
V 40 w(t)g(*)f Fe(generator)12 b Fg(\))390 2428 y Ff(dh)p
 
19704
498 2428 V 39 w(params)t FB(:)40 b(Is)30 b(a)h(structure)f(that)h(will)
 
19705
f(hold)g(the)h(prime)f(n)m(um)m(b)s(ers)390 2588 y Ff(prime)5
 
19706
b FB(:)40 b(holds)30 b(the)h(new)f(prime)390 2749 y Ff(generator)7
 
19707
b FB(:)41 b(holds)30 b(the)h(new)f(generator)390 2909
 
19708
y(This)22 b(function)h(will)h(replace)g(the)f(pair)g(of)g(prime)g(and)g
 
19709
(generator)h(for)f(use)g(in)g(the)g(Di\016e-Hellman)390
 
19710
3019 y(k)m(ey)h(exc)m(hange.)40 b(The)22 b(new)h(parameters)h(should)e
19712
19711
(b)s(e)g(stored)h(in)g(the)h(appropriate)f(gn)m(utls)p
19713
 
3433 1233 V 40 w(datum.)150 1434 y Fv(gn)m(utls)p 483
19714
 
1434 37 5 v 55 w(dh)p 674 1434 V 54 w(params)p 1116 1434
19715
 
V 54 w(init)3350 1632 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
19712
3433 3019 V 40 w(datum.)150 3244 y Fv(gn)m(utls)p 483
 
19713
3244 37 5 v 55 w(dh)p 674 3244 V 54 w(params)p 1116 3244
 
19714
V 54 w(init)3350 3466 y FB([F)-8 b(unction])-3599 b Fh(int)53
19716
19715
b(gnutls_dh_params_init)f Fg(\()p Ff(gn)m(utls)p 1784
19717
 
1632 28 4 v 41 w(dh)p 1927 1632 V 39 w(params)p 2255
19718
 
1632 V 39 w(t)31 b(*)g Fe(dh_params)12 b Fg(\))390 1742
19719
 
y Ff(dh)p 498 1742 V 39 w(params)t FB(:)40 b(Is)30 b(a)h(structure)f
 
19716
3466 28 4 v 41 w(dh)p 1927 3466 V 39 w(params)p 2255
 
19717
3466 V 39 w(t)31 b(*)g Fe(dh_params)12 b Fg(\))390 3576
 
19718
y Ff(dh)p 498 3576 V 39 w(params)t FB(:)40 b(Is)30 b(a)h(structure)f
19720
19719
(that)h(will)f(hold)g(the)h(prime)f(n)m(um)m(b)s(ers)390
19721
 
1878 y(This)g(function)g(will)g(initialize)j(the)e(DH)g(parameters)f
19722
 
(structure.)150 2078 y Fv(gn)m(utls)p 483 2078 37 5 v
19723
 
55 w(dh)p 674 2078 V 54 w(set)p 880 2078 V 54 w(prime)p
19724
 
1244 2078 V 55 w(bits)3350 2276 y FB([F)-8 b(unction])-3599
 
19720
3736 y(This)g(function)g(will)g(initialize)j(the)e(DH)g(parameters)f
 
19721
(structure.)150 3961 y Fv(gn)m(utls)p 483 3961 37 5 v
 
19722
55 w(dh)p 674 3961 V 54 w(set)p 880 3961 V 54 w(prime)p
 
19723
1244 3961 V 55 w(bits)3350 4184 y FB([F)-8 b(unction])-3599
19725
19724
b Fh(void)54 b(gnutls_dh_set_prime_bits)e Fg(\()p Ff(gn)m(utls)p
19726
 
1993 2276 28 4 v 41 w(session)p 2303 2276 V 40 w(t)31
19727
 
b Fe(session)12 b Ff(,)32 b(unsigned)565 2386 y(in)m(t)f
19728
 
Fe(bits)12 b Fg(\))390 2496 y Ff(session)p FB(:)41 b(is)30
19729
 
b(a)h Ft(gnutls_session_t)26 b FB(structure.)390 2631
 
19725
1993 4184 28 4 v 41 w(session)p 2303 4184 V 40 w(t)31
 
19726
b Fe(session)12 b Ff(,)32 b(unsigned)565 4293 y(in)m(t)f
 
19727
Fe(bits)12 b Fg(\))390 4403 y Ff(session)p FB(:)41 b(is)30
 
19728
b(a)h Ft(gnutls_session_t)26 b FB(structure.)390 4563
19730
19729
y Ff(bits)t FB(:)40 b(is)31 b(the)f(n)m(um)m(b)s(er)f(of)i(bits)390
19731
 
2767 y(This)25 b(function)g(sets)g(the)h(n)m(um)m(b)s(er)e(of)h(bits,)i
 
19730
4724 y(This)25 b(function)g(sets)g(the)h(n)m(um)m(b)s(er)e(of)h(bits,)i
19732
19731
(for)e(use)g(in)g(an)g(Di\016e)h(Hellman)g(k)m(ey)g(exc)m(hange.)41
19733
 
b(This)390 2877 y(is)c(used)g(b)s(oth)f(in)h(DH)h(ephemeral)f(and)f(DH)
 
19732
b(This)390 4833 y(is)c(used)g(b)s(oth)f(in)h(DH)h(ephemeral)f(and)f(DH)
19734
19733
i(anon)m(ymous)f(cipher)g(suites.)61 b(This)37 b(will)g(set)h(the)390
19735
 
2986 y(minim)m(um)30 b(size)h(of)f(the)h(prime)f(that)h(will)f(b)s(e)g
19736
 
(used)g(for)g(the)g(handshak)m(e.)390 3122 y(In)35 b(the)g(clien)m(t)i
 
19734
4943 y(minim)m(um)30 b(size)h(of)f(the)h(prime)f(that)h(will)f(b)s(e)g
 
19735
(used)g(for)g(the)g(handshak)m(e.)390 5103 y(In)35 b(the)g(clien)m(t)i
19737
19736
(side)f(it)g(sets)f(the)h(minim)m(um)f(accepted)h(n)m(um)m(b)s(er)e(of)
19738
 
i(bits.)56 b(If)35 b(a)g(serv)m(er)h(sends)f(a)390 3232
 
19737
i(bits.)56 b(If)35 b(a)g(serv)m(er)h(sends)f(a)390 5213
19739
19738
y(prime)g(with)g(less)g(bits)h(than)f(that)h Ft
19740
19739
(GNUTLS_E_DH_PRIME_UNACC)o(EPTA)o(BLE)29 b FB(will)35
19741
 
b(b)s(e)g(returned)390 3341 y(b)m(y)30 b(the)h(handshak)m(e.)150
19742
 
3542 y Fv(gn)m(utls)p 483 3542 37 5 v 55 w(error)p 805
19743
 
3542 V 54 w(is)p 941 3542 V 55 w(fatal)3350 3740 y FB([F)-8
19744
 
b(unction])-3599 b Fh(int)53 b(gnutls_error_is_fatal)f
19745
 
Fg(\()p Ff(in)m(t)31 b Fe(error)12 b Fg(\))390 3850 y
19746
 
Ff(error)7 b FB(:)40 b(is)30 b(a)h(Gn)m(uTLS)e(error)h(co)s(de,)h(a)g
19747
 
(negativ)m(e)h(v)-5 b(alue)390 3986 y(If)22 b(a)g(Gn)m(uTLS)f(function)
19748
 
h(returns)f(a)h(negativ)m(e)j(v)-5 b(alue)22 b(y)m(ou)h(ma)m(y)g(feed)f
19749
 
(that)h(v)-5 b(alue)22 b(to)h(this)f(function)390 4095
19750
 
y(to)31 b(see)g(if)f(the)h(error)f(condition)h(is)f(fatal.)390
19751
 
4231 y(Note)d(that)f(y)m(ou)f(ma)m(y)h(w)m(an)m(t)g(to)g(c)m(hec)m(k)h
19752
 
(the)f(error)f(co)s(de)g(man)m(ually)-8 b(,)28 b(since)d(some)h
19753
 
(non-fatal)g(errors)390 4341 y(to)31 b(the)g(proto)s(col)g(ma)m(y)g(b)s
19754
 
(e)f(fatal)h(for)f(y)m(ou)h(program.)390 4477 y(This)c(function)g(is)g
19755
 
(only)g(useful)g(if)g(y)m(ou)h(are)g(dealing)g(with)f(errors)g(from)g
19756
 
(the)g(record)g(la)m(y)m(er)i(or)f(the)390 4586 y(handshak)m(e)i(la)m
19757
 
(y)m(er.)390 4722 y Fn(Returns:)57 b FB(1)39 b(if)f(the)h(error)f(co)s
19758
 
(de)h(is)g(fatal,)j(for)c(p)s(ositiv)m(e)i Ft(error)d
19759
 
FB(v)-5 b(alues,)41 b(0)e(is)g(returned.)64 b(F)-8 b(or)390
19760
 
4832 y(unkno)m(wn)29 b Ft(error)g FB(v)-5 b(alues,)31
19761
 
b(-1)g(is)f(returned.)150 5032 y Fv(gn)m(utls)p 483 5032
19762
 
V 55 w(error)p 805 5032 V 54 w(to)p 968 5032 V 54 w(alert)3350
19763
 
5230 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_error_to_alert)f
19764
 
Fg(\()p Ff(in)m(t)31 b Fe(err)12 b Ff(,)31 b(in)m(t)g(*)g
19765
 
Fe(level)12 b Fg(\))390 5340 y Ff(err)7 b FB(:)40 b(is)30
19766
 
b(a)h(negativ)m(e)i(in)m(teger)p eop end
 
19740
b(b)s(e)g(returned)390 5322 y(b)m(y)30 b(the)h(handshak)m(e.)p
 
19741
eop end
19767
19742
%%Page: 144 150
19768
19743
TeXDict begin 144 149 bop 150 -116 a FB(Chapter)30 b(9:)41
19769
 
b(F)-8 b(unction)31 b(Reference)2237 b(144)390 299 y
19770
 
Ff(lev)m(el)t FB(:)42 b(the)31 b(alert)g(lev)m(el)h(will)f(b)s(e)e
19771
 
(stored)i(there)390 427 y(Get)37 b(an)f(alert)h(dep)s(ending)e(on)h
19772
 
(the)g(error)g(co)s(de)g(returned)f(b)m(y)h(a)g(gn)m(utls)h(function.)
19773
 
57 b(All)37 b(alerts)390 536 y(sen)m(t)d(b)m(y)g(this)f(function)g
19774
 
(should)g(b)s(e)g(considered)h(fatal.)51 b(The)33 b(only)h(exception)h
19775
 
(is)f(when)e Ft(err)h FB(is)390 646 y Ft(GNUTLS_E_REHANDSHAKE)p
19776
 
FB(,)24 b(where)29 b(a)h(w)m(arning)f(alert)i(should)d(b)s(e)h(sen)m(t)
19777
 
h(to)g(the)f(p)s(eer)g(indicating)390 755 y(that)i(no)f(renegotiation)j
19778
 
(will)e(b)s(e)e(p)s(erformed.)390 883 y(If)g(there)h(is)g(no)f(mapping)
19779
 
g(to)i(a)f(v)-5 b(alid)29 b(alert)i(the)f(alert)h(to)f(indicate)h(in)m
19780
 
(ternal)f(error)f(is)h(returned.)390 1011 y Fn(Returns:)40
19781
 
b FB(the)31 b(alert)g(co)s(de)g(to)g(use)f(for)g(a)h(particular)g
19782
 
(error)f(co)s(de.)150 1197 y Fv(gn)m(utls)p 483 1197
19783
 
37 5 v 55 w(ext)p 707 1197 V 53 w(register)3350 1380
 
19744
b(F)-8 b(unction)31 b(Reference)2237 b(144)150 299 y
 
19745
Fv(gn)m(utls)p 483 299 37 5 v 55 w(error)p 805 299 V
 
19746
54 w(is)p 941 299 V 55 w(fatal)3350 494 y FB([F)-8 b(unction])-3599
 
19747
b Fh(int)53 b(gnutls_error_is_fatal)f Fg(\()p Ff(in)m(t)31
 
19748
b Fe(error)12 b Fg(\))390 603 y Ff(error)7 b FB(:)40
 
19749
b(is)30 b(a)h(Gn)m(uTLS)e(error)h(co)s(de,)h(a)g(negativ)m(e)h(v)-5
 
19750
b(alue)390 737 y(If)22 b(a)g(Gn)m(uTLS)f(function)h(returns)f(a)h
 
19751
(negativ)m(e)j(v)-5 b(alue)22 b(y)m(ou)h(ma)m(y)g(feed)f(that)h(v)-5
 
19752
b(alue)22 b(to)h(this)f(function)390 846 y(to)31 b(see)g(if)f(the)h
 
19753
(error)f(condition)h(is)f(fatal.)390 980 y(Note)d(that)f(y)m(ou)f(ma)m
 
19754
(y)h(w)m(an)m(t)g(to)g(c)m(hec)m(k)h(the)f(error)f(co)s(de)g(man)m
 
19755
(ually)-8 b(,)28 b(since)d(some)h(non-fatal)g(errors)390
 
19756
1089 y(to)31 b(the)g(proto)s(col)g(ma)m(y)g(b)s(e)f(fatal)h(for)f(y)m
 
19757
(ou)h(program.)390 1223 y(This)c(function)g(is)g(only)g(useful)g(if)g
 
19758
(y)m(ou)h(are)g(dealing)g(with)f(errors)g(from)g(the)g(record)g(la)m(y)
 
19759
m(er)i(or)f(the)390 1333 y(handshak)m(e)i(la)m(y)m(er.)390
 
19760
1466 y Fn(Returns:)57 b FB(1)39 b(if)f(the)h(error)f(co)s(de)h(is)g
 
19761
(fatal,)j(for)c(p)s(ositiv)m(e)i Ft(error)d FB(v)-5 b(alues,)41
 
19762
b(0)e(is)g(returned.)64 b(F)-8 b(or)390 1576 y(unkno)m(wn)29
 
19763
b Ft(error)g FB(v)-5 b(alues,)31 b(-1)g(is)f(returned.)150
 
19764
1773 y Fv(gn)m(utls)p 483 1773 V 55 w(error)p 805 1773
 
19765
V 54 w(to)p 968 1773 V 54 w(alert)3350 1968 y FB([F)-8
 
19766
b(unction])-3599 b Fh(int)53 b(gnutls_error_to_alert)f
 
19767
Fg(\()p Ff(in)m(t)31 b Fe(err)12 b Ff(,)31 b(in)m(t)g(*)g
 
19768
Fe(level)12 b Fg(\))390 2077 y Ff(err)7 b FB(:)40 b(is)30
 
19769
b(a)h(negativ)m(e)i(in)m(teger)390 2211 y Ff(lev)m(el)t
 
19770
FB(:)42 b(the)31 b(alert)g(lev)m(el)h(will)f(b)s(e)e(stored)i(there)390
 
19771
2344 y(Get)37 b(an)f(alert)h(dep)s(ending)e(on)h(the)g(error)g(co)s(de)
 
19772
g(returned)f(b)m(y)h(a)g(gn)m(utls)h(function.)57 b(All)37
 
19773
b(alerts)390 2454 y(sen)m(t)d(b)m(y)g(this)f(function)g(should)g(b)s(e)
 
19774
g(considered)h(fatal.)51 b(The)33 b(only)h(exception)h(is)f(when)e
 
19775
Ft(err)h FB(is)390 2563 y Ft(GNUTLS_E_REHANDSHAKE)p FB(,)24
 
19776
b(where)29 b(a)h(w)m(arning)f(alert)i(should)d(b)s(e)h(sen)m(t)h(to)g
 
19777
(the)f(p)s(eer)g(indicating)390 2673 y(that)i(no)f(renegotiation)j
 
19778
(will)e(b)s(e)e(p)s(erformed.)390 2806 y(If)g(there)h(is)g(no)f
 
19779
(mapping)g(to)i(a)f(v)-5 b(alid)29 b(alert)i(the)f(alert)h(to)f
 
19780
(indicate)h(in)m(ternal)f(error)f(is)h(returned.)390
 
19781
2940 y Fn(Returns:)40 b FB(the)31 b(alert)g(co)s(de)g(to)g(use)f(for)g
 
19782
(a)h(particular)g(error)f(co)s(de.)150 3137 y Fv(gn)m(utls)p
 
19783
483 3137 V 55 w(ext)p 707 3137 V 53 w(register)3350 3332
19784
19784
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_ext_register)e
19785
19785
Fg(\()p Ff(in)m(t)32 b Fe(type)12 b Ff(,)31 b(const)g(c)m(har)g(*)f
19786
 
Fe(name)12 b Ff(,)565 1490 y(gn)m(utls)p 811 1490 28
19787
 
4 v 41 w(ext)p 975 1490 V 40 w(parse)p 1223 1490 V 40
19788
 
w(t)m(yp)s(e)p 1437 1490 V 40 w(t)31 b Fe(parse_type)12
19789
 
b Ff(,)33 b(gn)m(utls)p 2373 1490 V 41 w(ext)p 2537 1490
19790
 
V 40 w(recv)p 2741 1490 V 41 w(func)c Fe(recv_func)12
19791
 
b Ff(,)565 1599 y(gn)m(utls)p 811 1599 V 41 w(ext)p 975
19792
 
1599 V 40 w(send)p 1193 1599 V 40 w(func)29 b Fe(send_func)12
19793
 
b Fg(\))390 1709 y Ff(t)m(yp)s(e)5 b FB(:)41 b(the)31
 
19786
Fe(name)12 b Ff(,)565 3442 y(gn)m(utls)p 811 3442 28
 
19787
4 v 41 w(ext)p 975 3442 V 40 w(parse)p 1223 3442 V 40
 
19788
w(t)m(yp)s(e)p 1437 3442 V 40 w(t)31 b Fe(parse_type)12
 
19789
b Ff(,)33 b(gn)m(utls)p 2373 3442 V 41 w(ext)p 2537 3442
 
19790
V 40 w(recv)p 2741 3442 V 41 w(func)c Fe(recv_func)12
 
19791
b Ff(,)565 3551 y(gn)m(utls)p 811 3551 V 41 w(ext)p 975
 
19792
3551 V 40 w(send)p 1193 3551 V 40 w(func)29 b Fe(send_func)12
 
19793
b Fg(\))390 3661 y Ff(t)m(yp)s(e)5 b FB(:)41 b(the)31
19794
19794
b(16-bit)g(in)m(teger)h(referring)e(to)h(the)g(extension)g(t)m(yp)s(e)
19795
 
390 1837 y Ff(name)5 b FB(:)41 b(h)m(uman)29 b(prin)m(table)i(name)f
19796
 
(of)h(the)g(extension)g(used)e(for)h(debugging)390 1965
19797
 
y Ff(parse)p 604 1965 V 40 w(t)m(yp)s(e)5 b FB(:)41 b(either)31
 
19795
390 3794 y Ff(name)5 b FB(:)41 b(h)m(uman)29 b(prin)m(table)i(name)f
 
19796
(of)h(the)g(extension)g(used)e(for)h(debugging)390 3928
 
19797
y Ff(parse)p 604 3928 V 40 w(t)m(yp)s(e)5 b FB(:)41 b(either)31
19798
19798
b Ft(GNUTLS_EXT_TLS)26 b FB(or)k Ft(GNUTLS_EXT_APPLICATION)p
19799
 
FB(.)390 2092 y Ff(recv)p 560 2092 V 40 w(func)6 b FB(:)40
 
19799
FB(.)390 4061 y Ff(recv)p 560 4061 V 40 w(func)6 b FB(:)40
19800
19800
b(a)31 b(function)f(to)h(receiv)m(e)h(extension)f(data)390
19801
 
2220 y Ff(send)p 574 2220 V 39 w(func)6 b FB(:)40 b(a)30
19802
 
b(function)g(to)i(send)d(extension)i(data)390 2348 y(This)f(function)g
 
19801
4195 y Ff(send)p 574 4195 V 39 w(func)6 b FB(:)40 b(a)30
 
19802
b(function)g(to)i(send)d(extension)i(data)390 4328 y(This)f(function)g
19803
19803
(is)g(used)g(to)h(register)g(a)g(new)f(TLS)f(extension)i(handler.)390
19804
 
2476 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
19805
 
b(success,)f(or)h(an)f(error)g(co)s(de.)390 2604 y Fn(Since:)41
19806
 
b FB(2.6.0)150 2789 y Fv(gn)m(utls)p 483 2789 37 5 v
19807
 
55 w(\014ngerprin)m(t)3350 2973 y FB([F)-8 b(unction])-3599
 
19804
4462 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
19805
b(success,)f(or)h(an)f(error)g(co)s(de.)390 4595 y Fn(Since:)41
 
19806
b FB(2.6.0)150 4793 y Fv(gn)m(utls)p 483 4793 37 5 v
 
19807
55 w(\014ngerprin)m(t)3350 4987 y FB([F)-8 b(unction])-3599
19808
19808
b Fh(int)53 b(gnutls_fingerprint)e Fg(\()p Ff(gn)m(utls)p
19809
 
1627 2973 28 4 v 41 w(digest)p 1900 2973 V 41 w(algorithm)p
19810
 
2324 2973 V 41 w(t)30 b Fe(algo)12 b Ff(,)32 b(const)565
19811
 
3082 y(gn)m(utls)p 811 3082 V 41 w(datum)p 1110 3082
 
19809
1627 4987 28 4 v 41 w(digest)p 1900 4987 V 41 w(algorithm)p
 
19810
2324 4987 V 41 w(t)30 b Fe(algo)12 b Ff(,)32 b(const)565
 
19811
5097 y(gn)m(utls)p 811 5097 V 41 w(datum)p 1110 5097
19812
19812
V 39 w(t)f(*)g Fe(data)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(result)12
19813
 
b Ff(,)31 b(size)p 2361 3082 V 41 w(t)g(*)g Fe(result_size)12
19814
 
b Fg(\))390 3192 y Ff(algo)5 b FB(:)42 b(is)30 b(a)h(digest)g
19815
 
(algorithm)390 3320 y Ff(data)p FB(:)41 b(is)31 b(the)f(data)390
19816
 
3448 y Ff(result)r FB(:)41 b(is)30 b(the)h(place)g(where)f(the)g
19817
 
(result)h(will)f(b)s(e)g(copied)h(\(ma)m(y)g(b)s(e)f(n)m(ull\).)390
19818
 
3575 y Ff(result)p 619 3575 V 40 w(size)5 b FB(:)45 b(should)32
19819
 
b(hold)g(the)g(size)h(of)g(the)f(result.)46 b(The)32
19820
 
b(actual)i(size)f(of)f(the)h(returned)e(result)390 3685
19821
 
y(will)g(also)g(b)s(e)f(copied)h(there.)390 3813 y(This)36
 
19813
b Ff(,)31 b(size)p 2361 5097 V 41 w(t)g(*)g Fe(result_size)12
 
19814
b Fg(\))390 5206 y Ff(algo)5 b FB(:)42 b(is)30 b(a)h(digest)g
 
19815
(algorithm)390 5340 y Ff(data)p FB(:)41 b(is)31 b(the)f(data)p
 
19816
eop end
 
19817
%%Page: 145 151
 
19818
TeXDict begin 145 150 bop 150 -116 a FB(Chapter)30 b(9:)41
 
19819
b(F)-8 b(unction)31 b(Reference)2237 b(145)390 299 y
 
19820
Ff(result)r FB(:)41 b(is)30 b(the)h(place)g(where)f(the)g(result)h
 
19821
(will)f(b)s(e)g(copied)h(\(ma)m(y)g(b)s(e)f(n)m(ull\).)390
 
19822
434 y Ff(result)p 619 434 28 4 v 40 w(size)5 b FB(:)45
 
19823
b(should)32 b(hold)g(the)g(size)h(of)g(the)f(result.)46
 
19824
b(The)32 b(actual)i(size)f(of)f(the)h(returned)e(result)390
 
19825
544 y(will)g(also)g(b)s(e)f(copied)h(there.)390 679 y(This)36
19822
19826
b(function)g(will)h(calculate)i(a)e(\014ngerprin)m(t)f(\(actually)j(a)e
19823
 
(hash\),)h(of)f(the)f(giv)m(en)i(data.)60 b(The)390 3922
 
19827
(hash\),)h(of)f(the)f(giv)m(en)i(data.)60 b(The)390 789
19824
19828
y(result)45 b(is)f(not)h(prin)m(table)g(data.)85 b(Y)-8
19825
19829
b(ou)45 b(should)e(con)m(v)m(ert)k(it)e(to)g(hex,)k(or)44
19826
 
b(to)i(something)f(else)390 4032 y(prin)m(table.)390
19827
 
4160 y(This)29 b(is)g(the)g(usual)g(w)m(a)m(y)i(to)f(calculate)h(a)f
 
19830
b(to)i(something)f(else)390 898 y(prin)m(table.)390 1034
 
19831
y(This)29 b(is)g(the)g(usual)g(w)m(a)m(y)i(to)f(calculate)h(a)f
19828
19832
(\014ngerprin)m(t)e(of)i(an)f(X.509)i(DER)f(enco)s(ded)f
19829
 
(certi\014cate.)390 4269 y(Note)34 b(ho)m(w)m(ev)m(er)g(that)f(the)f
 
19833
(certi\014cate.)390 1143 y(Note)34 b(ho)m(w)m(ev)m(er)g(that)f(the)f
19830
19834
(\014ngerprin)m(t)g(of)h(an)f(Op)s(enPGP)f(is)h(not)h(just)f(a)h(hash)f
19831
 
(and)f(cannot)j(b)s(e)390 4379 y(calculated)e(with)e(this)h(function.)
19832
 
390 4507 y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)
 
19835
(and)f(cannot)j(b)s(e)390 1253 y(calculated)e(with)e(this)h(function.)
 
19836
390 1388 y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)
19833
19837
29 b FB(\(0\))34 b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g
19834
 
(is)390 4616 y(returned.)150 4802 y Fv(gn)m(utls)p 483
19835
 
4802 37 5 v 55 w(free)3350 4985 y FB([F)-8 b(unction])-3599
 
19838
(is)390 1498 y(returned.)150 1698 y Fv(gn)m(utls)p 483
 
19839
1698 37 5 v 55 w(free)3350 1895 y FB([F)-8 b(unction])-3599
19836
19840
b Fh(void)54 b(gnutls_free)48 b Fg(\()p Ff(v)m(oid)32
19837
 
b(*)e Fe(ptr)12 b Fg(\))390 5095 y FB(This)30 b(function)g(will)g(free)
19838
 
h(data)g(p)s(oin)m(ted)f(b)m(y)g(ptr.)390 5223 y(The)71
 
19841
b(*)e Fe(ptr)12 b Fg(\))390 2005 y FB(This)30 b(function)g(will)g(free)
 
19842
h(data)g(p)s(oin)m(ted)f(b)m(y)g(ptr.)390 2140 y(The)71
19839
19843
b(deallo)s(cation)i(function)f(used)e(is)i(the)f(one)h(set)g(b)m(y)f
19840
 
Ft(gnutls_global_set_mem_)390 5332 y(functions\(\))p
19841
 
FB(.)p eop end
19842
 
%%Page: 145 151
19843
 
TeXDict begin 145 150 bop 150 -116 a FB(Chapter)30 b(9:)41
19844
 
b(F)-8 b(unction)31 b(Reference)2237 b(145)150 299 y
19845
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(global)p 856 299 V
19846
 
54 w(deinit)3350 488 y FB([F)-8 b(unction])-3599 b Fh(void)54
19847
 
b(gnutls_global_deinit)d Fg(\()31 b Fe(void)12 b Fg(\))390
19848
 
597 y FB(This)21 b(function)g(deinitializes)i(the)f(global)h(data,)h
19849
 
(that)e(w)m(ere)g(initialized)h(using)e Ft(gnutls_global_)390
19850
 
707 y(init\(\))p FB(.)390 837 y(Note!)40 b(This)24 b(function)h(is)g
19851
 
(not)g(thread)g(safe.)39 b(See)25 b(the)g(discussion)g(for)f
19852
 
Ft(gnutls_global_init\(\))390 947 y FB(for)30 b(more)h(information.)150
19853
 
1138 y Fv(gn)m(utls)p 483 1138 V 55 w(global)p 856 1138
19854
 
V 54 w(init)3350 1327 y FB([F)-8 b(unction])-3599 b Fh(int)53
19855
 
b(gnutls_global_init)e Fg(\()31 b Fe(void)12 b Fg(\))390
19856
 
1436 y FB(This)34 b(function)h(initializes)i(the)e(global)h(data)g(to)f
19857
 
(defaults.)54 b(Ev)m(ery)36 b(gn)m(utls)f(application)h(has)f(a)390
19858
 
1546 y(global)27 b(data)f(whic)m(h)f(holds)g(common)h(parameters)g
 
19844
Ft(gnutls_global_set_mem_)390 2250 y(functions\(\))p
 
19845
FB(.)150 2450 y Fv(gn)m(utls)p 483 2450 V 55 w(global)p
 
19846
856 2450 V 54 w(deinit)3350 2648 y FB([F)-8 b(unction])-3599
 
19847
b Fh(void)54 b(gnutls_global_deinit)d Fg(\()31 b Fe(void)12
 
19848
b Fg(\))390 2757 y FB(This)21 b(function)g(deinitializes)i(the)f
 
19849
(global)h(data,)h(that)e(w)m(ere)g(initialized)h(using)e
 
19850
Ft(gnutls_global_)390 2867 y(init\(\))p FB(.)390 3002
 
19851
y(Note!)40 b(This)24 b(function)h(is)g(not)g(thread)g(safe.)39
 
19852
b(See)25 b(the)g(discussion)g(for)f Ft(gnutls_global_init\(\))390
 
19853
3112 y FB(for)30 b(more)h(information.)150 3312 y Fv(gn)m(utls)p
 
19854
483 3312 V 55 w(global)p 856 3312 V 54 w(init)3350 3509
 
19855
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_global_init)e
 
19856
Fg(\()31 b Fe(void)12 b Fg(\))390 3619 y FB(This)34 b(function)h
 
19857
(initializes)i(the)e(global)h(data)g(to)f(defaults.)54
 
19858
b(Ev)m(ery)36 b(gn)m(utls)f(application)h(has)f(a)390
 
19859
3729 y(global)27 b(data)f(whic)m(h)f(holds)g(common)h(parameters)g
19859
19860
(shared)f(b)m(y)g(gn)m(utls)h(session)g(structures.)38
19860
 
b(Y)-8 b(ou)390 1656 y(should)29 b(call)j Ft(gnutls_global_deinit\(\))
 
19861
b(Y)-8 b(ou)390 3838 y(should)29 b(call)j Ft(gnutls_global_deinit\(\))
19861
19862
24 b FB(when)30 b(gn)m(utls)g(usage)h(is)g(no)f(longer)h(needed)390
19862
 
1786 y(Note)45 b(that)f(this)f(function)g(will)h(also)h(initialize)h
 
19863
3973 y(Note)45 b(that)f(this)f(function)g(will)h(also)h(initialize)h
19863
19864
(libgcrypt,)h(if)c(it)h(has)g(not)f(b)s(een)g(initialized)390
19864
 
1896 y(b)s(efore.)c(Th)m(us)25 b(if)g(y)m(ou)h(w)m(an)m(t)h(to)g(man)m
 
19865
4083 y(b)s(efore.)c(Th)m(us)25 b(if)g(y)m(ou)h(w)m(an)m(t)h(to)g(man)m
19865
19866
(ually)f(initialize)i(libgcrypt)e(y)m(ou)g(m)m(ust)g(do)g(it)g(b)s
19866
 
(efore)f(calling)390 2005 y(this)k(function.)40 b(This)29
 
19867
(efore)f(calling)390 4193 y(this)k(function.)40 b(This)29
19867
19868
b(is)h(useful)e(in)h(cases)i(y)m(ou)f(w)m(an)m(t)g(to)g(disable)g
19868
 
(libgcrypt's)g(in)m(ternal)g(lo)s(c)m(kings)390 2115
19869
 
y(etc.)390 2245 y(This)43 b(function)g(incremen)m(t)h(a)g(global)h
 
19869
(libgcrypt's)g(in)m(ternal)g(lo)s(c)m(kings)390 4302
 
19870
y(etc.)390 4438 y(This)43 b(function)g(incremen)m(t)h(a)g(global)h
19870
19871
(coun)m(ter,)i(so)d(that)g Ft(gnutls_global_deinit\(\))38
19871
 
b FB(only)390 2355 y(releases)30 b(resources)f(when)f(it)h(has)g(b)s
 
19872
b FB(only)390 4547 y(releases)30 b(resources)f(when)f(it)h(has)g(b)s
19872
19873
(een)f(called)i(as)g(man)m(y)f(times)g(as)g Ft(gnutls_global_init\(\))p
19873
 
FB(.)390 2464 y(This)d(is)h(useful)f(when)f(Gn)m(uTLS)h(is)h(used)f(b)m
 
19874
FB(.)390 4657 y(This)d(is)h(useful)f(when)f(Gn)m(uTLS)h(is)h(used)f(b)m
19874
19875
(y)g(more)h(than)g(one)g(library)f(in)g(an)h(application.)41
19875
 
b(This)390 2574 y(function)30 b(can)h(b)s(e)e(called)j(man)m(y)f
 
19876
b(This)390 4766 y(function)30 b(can)h(b)s(e)e(called)j(man)m(y)f
19876
19877
(times,)g(but)e(will)i(only)g(do)f(something)h(the)f(\014rst)g(time.)
19877
 
390 2705 y(Note!)39 b(This)20 b(function)h(is)h(not)f(thread)g(safe.)38
 
19878
390 4902 y(Note!)39 b(This)20 b(function)h(is)h(not)f(thread)g(safe.)38
19878
19879
b(If)21 b(t)m(w)m(o)i(threads)e(call)h(this)f(function)g(sim)m
19879
 
(ultaneously)-8 b(,)390 2814 y(they)21 b(can)h(cause)f(a)h(race)g(b)s
 
19880
(ultaneously)-8 b(,)390 5011 y(they)21 b(can)h(cause)f(a)h(race)g(b)s
19880
19881
(et)m(w)m(een)f(c)m(hec)m(king)i(the)e(global)i(coun)m(ter)e(and)g
19881
 
(incremen)m(ting)h(it,)i(causing)390 2924 y(b)s(oth)j(threads)g(to)h
 
19882
(incremen)m(ting)h(it,)i(causing)390 5121 y(b)s(oth)j(threads)g(to)h
19882
19883
(execute)h(the)f(library)f(initialization)j(co)s(de.)40
19883
 
b(That)28 b(w)m(ould)f(lead)h(to)g(a)g(memory)390 3033
 
19884
b(That)28 b(w)m(ould)f(lead)h(to)g(a)g(memory)390 5230
19884
19885
y(leak.)75 b(T)-8 b(o)41 b(handle)g(this,)k(y)m(our)c(application)h
19885
19886
(could)g(in)m(v)m(ok)m(e)h(this)e(function)g(after)h(aquiring)g(a)390
19886
 
3143 y(thread)30 b(m)m(utex.)41 b(T)-8 b(o)31 b(ignore)g(the)g(p)s
19887
 
(oten)m(tial)g(memory)g(leak)g(is)g(also)g(an)f(option.)390
19888
 
3273 y Fn(Returns:)42 b FB(On)30 b(success,)i Ft(GNUTLS_E_SUCCESS)27
 
19887
5340 y(thread)30 b(m)m(utex.)41 b(T)-8 b(o)31 b(ignore)g(the)g(p)s
 
19888
(oten)m(tial)g(memory)g(leak)g(is)g(also)g(an)f(option.)p
 
19889
eop end
 
19890
%%Page: 146 152
 
19891
TeXDict begin 146 151 bop 150 -116 a FB(Chapter)30 b(9:)41
 
19892
b(F)-8 b(unction)31 b(Reference)2237 b(146)390 299 y
 
19893
Fn(Returns:)42 b FB(On)30 b(success,)i Ft(GNUTLS_E_SUCCESS)27
19889
19894
b FB(\(zero\))33 b(is)e(returned,)f(otherwise)i(an)f(error)g(co)s(de)
19890
 
390 3383 y(is)f(returned.)150 3574 y Fv(gn)m(utls)p 483
19891
 
3574 V 55 w(global)p 856 3574 V 54 w(set)p 1062 3574
19892
 
V 54 w(log)p 1272 3574 V 55 w(function)3350 3763 y FB([F)-8
 
19895
390 408 y(is)f(returned.)150 609 y Fv(gn)m(utls)p 483
 
19896
609 37 5 v 55 w(global)p 856 609 V 54 w(set)p 1062 609
 
19897
V 54 w(log)p 1272 609 V 55 w(function)3350 808 y FB([F)-8
19893
19898
b(unction])-3599 b Fh(void)54 b(gnutls_global_set_log_fu)q(nct)q(ion)e
19894
 
Fg(\()p Ff(gn)m(utls)p 2307 3763 28 4 v 41 w(log)p 2463
19895
 
3763 V 41 w(func)29 b Fe(log_func)12 b Fg(\))390 3872
19896
 
y Ff(log)p 511 3872 V 41 w(func)6 b FB(:)40 b(it's)31
19897
 
b(a)f(log)i(function)390 4003 y(This)h(is)h(the)g(function)g(where)f(y)
19898
 
m(ou)i(set)f(the)g(logging)i(function)e(gn)m(utls)g(is)g(going)h(to)g
19899
 
(use.)51 b(This)390 4113 y(function)25 b(only)g(accepts)h(a)g(c)m
19900
 
(haracter)h(arra)m(y)-8 b(.)40 b(Normally)25 b(y)m(ou)h(ma)m(y)g(not)f
19901
 
(use)g(this)g(function)g(since)390 4222 y(it)31 b(is)f(only)h(used)e
19902
 
(for)i(debugging)f(purp)s(oses.)390 4353 y(gn)m(utls)p
19903
 
636 4353 V 40 w(log)p 791 4353 V 42 w(func)f(is)h(of)h(the)g(form,)f(v)
19904
 
m(oid)h(\(*gn)m(utls)p 2141 4353 V 41 w(log)p 2297 4353
 
19899
Fg(\()p Ff(gn)m(utls)p 2307 808 28 4 v 41 w(log)p 2463
 
19900
808 V 41 w(func)29 b Fe(log_func)12 b Fg(\))390 917 y
 
19901
Ff(log)p 511 917 V 41 w(func)6 b FB(:)40 b(it's)31 b(a)f(log)i
 
19902
(function)390 1054 y(This)h(is)h(the)g(function)g(where)f(y)m(ou)i(set)
 
19903
f(the)g(logging)i(function)e(gn)m(utls)g(is)g(going)h(to)g(use.)51
 
19904
b(This)390 1163 y(function)25 b(only)g(accepts)h(a)g(c)m(haracter)h
 
19905
(arra)m(y)-8 b(.)40 b(Normally)25 b(y)m(ou)h(ma)m(y)g(not)f(use)g(this)
 
19906
g(function)g(since)390 1273 y(it)31 b(is)f(only)h(used)e(for)i
 
19907
(debugging)f(purp)s(oses.)390 1409 y(gn)m(utls)p 636
 
19908
1409 V 40 w(log)p 791 1409 V 42 w(func)f(is)h(of)h(the)g(form,)f(v)m
 
19909
(oid)h(\(*gn)m(utls)p 2141 1409 V 41 w(log)p 2297 1409
19905
19910
V 41 w(func\)\()f(in)m(t)h(lev)m(el,)h(const)f(c)m(har*\);)150
19906
 
4544 y Fv(gn)m(utls)p 483 4544 37 5 v 55 w(global)p 856
19907
 
4544 V 54 w(set)p 1062 4544 V 54 w(log)p 1272 4544 V
19908
 
55 w(lev)m(el)3350 4733 y FB([F)-8 b(unction])-3599 b
 
19911
1610 y Fv(gn)m(utls)p 483 1610 37 5 v 55 w(global)p 856
 
19912
1610 V 54 w(set)p 1062 1610 V 54 w(log)p 1272 1610 V
 
19913
55 w(lev)m(el)3350 1808 y FB([F)-8 b(unction])-3599 b
19909
19914
Fh(void)54 b(gnutls_global_set_log_le)q(vel)e Fg(\()p
19910
 
Ff(in)m(t)31 b Fe(level)12 b Fg(\))390 4842 y Ff(lev)m(el)t
 
19915
Ff(in)m(t)31 b Fe(level)12 b Fg(\))390 1918 y Ff(lev)m(el)t
19911
19916
FB(:)42 b(it's)31 b(an)f(in)m(teger)i(from)e(0)h(to)g(9.)390
19912
 
4973 y(This)22 b(is)h(the)g(function)g(that)g(allo)m(ws)h(y)m(ou)f(to)h
 
19917
2054 y(This)22 b(is)h(the)g(function)g(that)g(allo)m(ws)h(y)m(ou)f(to)h
19913
19918
(set)f(the)h(log)g(lev)m(el.)39 b(The)23 b(lev)m(el)h(is)f(an)g(in)m
19914
 
(teger)h(b)s(et)m(w)m(een)390 5082 y(0)35 b(and)f(9.)53
 
19919
(teger)h(b)s(et)m(w)m(een)390 2164 y(0)35 b(and)f(9.)53
19915
19920
b(Higher)34 b(v)-5 b(alues)35 b(mean)g(more)f(v)m(erb)s(osit)m(y)-8
19916
19921
b(.)54 b(The)34 b(default)h(v)-5 b(alue)34 b(is)h(0.)53
19917
 
b(Larger)35 b(v)-5 b(alues)390 5192 y(should)29 b(only)i(b)s(e)f(used)f
 
19922
b(Larger)35 b(v)-5 b(alues)390 2273 y(should)29 b(only)i(b)s(e)f(used)f
19918
19923
(with)h(care,)i(since)e(they)h(ma)m(y)g(rev)m(eal)h(sensitiv)m(e)f
19919
 
(information.)390 5322 y(Use)g(a)g(log)g(lev)m(el)h(o)m(v)m(er)g(10)f
19920
 
(to)g(enable)g(all)g(debugging)f(options.)p eop end
19921
 
%%Page: 146 152
19922
 
TeXDict begin 146 151 bop 150 -116 a FB(Chapter)30 b(9:)41
19923
 
b(F)-8 b(unction)31 b(Reference)2237 b(146)150 299 y
19924
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(global)p 856 299 V
19925
 
54 w(set)p 1062 299 V 54 w(mem)p 1376 299 V 55 w(functions)3350
19926
 
497 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
19924
(information.)390 2409 y(Use)g(a)g(log)g(lev)m(el)h(o)m(v)m(er)g(10)f
 
19925
(to)g(enable)g(all)g(debugging)f(options.)150 2610 y
 
19926
Fv(gn)m(utls)p 483 2610 V 55 w(global)p 856 2610 V 54
 
19927
w(set)p 1062 2610 V 54 w(mem)p 1376 2610 V 55 w(functions)3350
 
19928
2809 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
19927
19929
(gnutls_global_set_mem_fu)q(nct)q(ion)q(s)d Fg(\()p Ff(gn)m(utls)p
19928
 
2359 497 28 4 v 41 w(allo)s(c)p 2583 497 V 41 w(function)565
19929
 
607 y Fe(alloc_func)12 b Ff(,)33 b(gn)m(utls)p 1401 607
19930
 
V 41 w(allo)s(c)p 1625 607 V 41 w(function)d Fe(secure_alloc_func)12
19931
 
b Ff(,)565 716 y(gn)m(utls)p 811 716 V 41 w(is)p 913
19932
 
716 V 40 w(secure)p 1196 716 V 40 w(function)30 b Fe(is_secure_func)12
19933
 
b Ff(,)34 b(gn)m(utls)p 2631 716 V 41 w(reallo)s(c)p
19934
 
2931 716 V 41 w(function)565 826 y Fe(realloc_func)12
19935
 
b Ff(,)34 b(gn)m(utls)p 1506 826 V 40 w(free)p 1690 826
19936
 
V 40 w(function)c Fe(free_func)12 b Fg(\))390 936 y Ff(allo)s(c)p
19937
 
579 936 V 41 w(func)6 b FB(:)40 b(it's)31 b(the)f(default)h(memory)f
19938
 
(allo)s(cation)j(function.)40 b(Lik)m(e)31 b Ft(malloc\(\))p
19939
 
FB(.)390 1072 y Ff(secure)p 639 1072 V 40 w(allo)s(c)p
19940
 
862 1072 V 42 w(func)6 b FB(:)38 b(This)27 b(is)h(the)h(memory)f(allo)s
19941
 
(cation)j(function)c(that)i(will)g(b)s(e)e(used)h(for)g(sensi-)390
19942
 
1181 y(tiv)m(e)k(data.)390 1317 y Ff(is)p 457 1317 V
19943
 
40 w(secure)p 740 1317 V 40 w(func)6 b FB(:)43 b(a)32
 
19930
2359 2809 28 4 v 41 w(allo)s(c)p 2583 2809 V 41 w(function)565
 
19931
2918 y Fe(alloc_func)12 b Ff(,)33 b(gn)m(utls)p 1401
 
19932
2918 V 41 w(allo)s(c)p 1625 2918 V 41 w(function)d Fe
 
19933
(secure_alloc_func)12 b Ff(,)565 3028 y(gn)m(utls)p 811
 
19934
3028 V 41 w(is)p 913 3028 V 40 w(secure)p 1196 3028 V
 
19935
40 w(function)30 b Fe(is_secure_func)12 b Ff(,)34 b(gn)m(utls)p
 
19936
2631 3028 V 41 w(reallo)s(c)p 2931 3028 V 41 w(function)565
 
19937
3137 y Fe(realloc_func)12 b Ff(,)34 b(gn)m(utls)p 1506
 
19938
3137 V 40 w(free)p 1690 3137 V 40 w(function)c Fe(free_func)12
 
19939
b Fg(\))390 3247 y Ff(allo)s(c)p 579 3247 V 41 w(func)6
 
19940
b FB(:)40 b(it's)31 b(the)f(default)h(memory)f(allo)s(cation)j
 
19941
(function.)40 b(Lik)m(e)31 b Ft(malloc\(\))p FB(.)390
 
19942
3383 y Ff(secure)p 639 3383 V 40 w(allo)s(c)p 862 3383
 
19943
V 42 w(func)6 b FB(:)38 b(This)27 b(is)h(the)h(memory)f(allo)s(cation)j
 
19944
(function)c(that)i(will)g(b)s(e)e(used)h(for)g(sensi-)390
 
19945
3493 y(tiv)m(e)k(data.)390 3629 y Ff(is)p 457 3629 V
 
19946
40 w(secure)p 740 3629 V 40 w(func)6 b FB(:)43 b(a)32
19944
19947
b(function)g(that)h(returns)e(0)h(if)g(the)g(memory)g(giv)m(en)h(is)f
19945
 
(not)h(secure.)45 b(Ma)m(y)34 b(b)s(e)390 1427 y(NULL.)390
19946
 
1563 y Ff(reallo)s(c)p 655 1563 V 41 w(func)6 b FB(:)40
19947
 
b(A)30 b(reallo)s(c)i(function)390 1699 y Ff(free)p 540
19948
 
1699 V 40 w(func)6 b FB(:)40 b(The)29 b(function)h(that)h(frees)g(allo)
 
19948
(not)h(secure.)45 b(Ma)m(y)34 b(b)s(e)390 3738 y(NULL.)390
 
19949
3875 y Ff(reallo)s(c)p 655 3875 V 41 w(func)6 b FB(:)40
 
19950
b(A)30 b(reallo)s(c)i(function)390 4011 y Ff(free)p 540
 
19951
4011 V 40 w(func)6 b FB(:)40 b(The)29 b(function)h(that)h(frees)g(allo)
19949
19952
s(cated)h(data.)42 b(Must)30 b(accept)i(a)f(NULL)f(p)s(oin)m(ter.)390
19950
 
1835 y(This)40 b(is)h(the)g(function)f(w)m(ere)h(y)m(ou)g(set)g(the)g
 
19953
4147 y(This)40 b(is)h(the)g(function)f(w)m(ere)h(y)m(ou)g(set)g(the)g
19951
19954
(memory)g(allo)s(cation)i(functions)d(gn)m(utls)h(is)g(going)390
19952
 
1945 y(to)d(use.)62 b(By)38 b(default)f(the)h(lib)s(c's)f(allo)s
 
19955
4257 y(to)d(use.)62 b(By)38 b(default)f(the)h(lib)s(c's)f(allo)s
19953
19956
(cation)j(functions)d(\()p Ft(malloc\(\))p FB(,)g Ft(free\(\))p
19954
 
FB(\),)i(are)e(used)g(b)m(y)390 2055 y(gn)m(utls,)i(to)f(allo)s(cate)h
 
19957
FB(\),)i(are)e(used)g(b)m(y)390 4366 y(gn)m(utls,)i(to)f(allo)s(cate)h
19955
19958
(b)s(oth)d(sensitiv)m(e)j(and)d(not)h(sensitiv)m(e)h(data.)62
19956
 
b(This)36 b(function)g(is)h(pro)m(vided)390 2164 y(to)d(set)g(the)g
 
19959
b(This)36 b(function)g(is)h(pro)m(vided)390 4476 y(to)d(set)g(the)g
19957
19960
(memory)f(allo)s(cation)j(functions)d(to)h(something)g(other)f(than)g
19958
 
(the)h(defaults)f(\(ie)i(the)390 2274 y(gcrypt)c(allo)s(cation)h
19959
 
(functions\).)390 2410 y(This)e(function)g(m)m(ust)g(b)s(e)g(called)h
 
19961
(the)h(defaults)f(\(ie)i(the)390 4585 y(gcrypt)c(allo)s(cation)h
 
19962
(functions\).)390 4721 y(This)e(function)g(m)m(ust)g(b)s(e)g(called)h
19960
19963
(b)s(efore)f Ft(gnutls_global_init\(\))25 b FB(is)30
19961
 
b(called.)150 2611 y Fv(gn)m(utls)p 483 2611 37 5 v 55
19962
 
w(handshak)m(e)p 1096 2611 V 53 w(get)p 1314 2611 V 54
19963
 
w(last)p 1558 2611 V 54 w(in)3350 2809 y FB([F)-8 b(unction])-3599
19964
 
b Fh(gnutls_handshake_descr)q(ipt)q(ion_)q(t)565 2919
 
19964
b(called.)150 4922 y Fv(gn)m(utls)p 483 4922 37 5 v 55
 
19965
w(handshak)m(e)p 1096 4922 V 53 w(get)p 1314 4922 V 54
 
19966
w(last)p 1558 4922 V 54 w(in)3350 5121 y FB([F)-8 b(unction])-3599
 
19967
b Fh(gnutls_handshake_descr)q(ipt)q(ion_)q(t)565 5230
19965
19968
y(gnutls_handshake_get_l)q(ast)q(_in)52 b Fg(\()p Ff(gn)m(utls)p
19966
 
2356 2919 28 4 v 41 w(session)p 2666 2919 V 40 w(t)31
19967
 
b Fe(session)12 b Fg(\))390 3028 y Ff(session)p FB(:)41
19968
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
19969
 
3164 y(This)35 b(function)g(is)g(only)h(useful)f(to)h(c)m(hec)m(k)h
19970
 
(where)e(the)h(last)g(p)s(erformed)e(handshak)m(e)h(failed.)56
19971
 
b(If)390 3274 y(the)26 b(previous)g(handshak)m(e)f(succeed)i(or)f(w)m
19972
 
(as)g(not)g(p)s(erformed)f(at)h(all)h(then)f(no)g(meaningful)f(v)-5
19973
 
b(alue)390 3383 y(will)31 b(b)s(e)e(returned.)390 3520
 
19969
2356 5230 28 4 v 41 w(session)p 2666 5230 V 40 w(t)31
 
19970
b Fe(session)12 b Fg(\))390 5340 y Ff(session)p FB(:)41
 
19971
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)p
 
19972
eop end
 
19973
%%Page: 147 153
 
19974
TeXDict begin 147 152 bop 150 -116 a FB(Chapter)30 b(9:)41
 
19975
b(F)-8 b(unction)31 b(Reference)2237 b(147)390 299 y(This)35
 
19976
b(function)g(is)g(only)h(useful)f(to)h(c)m(hec)m(k)h(where)e(the)h
 
19977
(last)g(p)s(erformed)e(handshak)m(e)h(failed.)56 b(If)390
 
19978
408 y(the)26 b(previous)g(handshak)m(e)f(succeed)i(or)f(w)m(as)g(not)g
 
19979
(p)s(erformed)f(at)h(all)h(then)f(no)g(meaningful)f(v)-5
 
19980
b(alue)390 518 y(will)31 b(b)s(e)e(returned.)390 651
19974
19981
y(Chec)m(k)43 b Ft(gnutls_handshake_descripti)o(on_)o(t)37
19975
19982
b FB(in)43 b(gn)m(utls.h)g(for)g(the)g(a)m(v)-5 b(ailable)45
19976
 
b(handshak)m(e)390 3629 y(descriptions.)390 3765 y Fn(Returns:)123
 
19983
b(handshak)m(e)390 761 y(descriptions.)390 893 y Fn(Returns:)123
19977
19984
b FB(the)72 b(last)h(handshak)m(e)e(message)i(t)m(yp)s(e)f(receiv)m
19978
 
(ed,)84 b(a)72 b Ft(gnutls_handshake_)390 3875 y(description_t)p
19979
 
FB(.)150 4076 y Fv(gn)m(utls)p 483 4076 37 5 v 55 w(handshak)m(e)p
19980
 
1096 4076 V 53 w(get)p 1314 4076 V 54 w(last)p 1558 4076
19981
 
V 54 w(out)3350 4274 y FB([F)-8 b(unction])-3599 b Fh
19982
 
(gnutls_handshake_descr)q(ipt)q(ion_)q(t)565 4384 y
 
19985
(ed,)84 b(a)72 b Ft(gnutls_handshake_)390 1003 y(description_t)p
 
19986
FB(.)150 1199 y Fv(gn)m(utls)p 483 1199 37 5 v 55 w(handshak)m(e)p
 
19987
1096 1199 V 53 w(get)p 1314 1199 V 54 w(last)p 1558 1199
 
19988
V 54 w(out)3350 1392 y FB([F)-8 b(unction])-3599 b Fh
 
19989
(gnutls_handshake_descr)q(ipt)q(ion_)q(t)565 1502 y
19983
19990
(gnutls_handshake_get_l)q(ast)q(_ou)q(t)51 b Fg(\()p
19984
 
Ff(gn)m(utls)p 2408 4384 28 4 v 41 w(session)p 2718 4384
19985
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 4493 y Ff(session)p
 
19991
Ff(gn)m(utls)p 2408 1502 28 4 v 41 w(session)p 2718 1502
 
19992
V 40 w(t)31 b Fe(session)12 b Fg(\))390 1612 y Ff(session)p
19986
19993
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
19987
 
4629 y(This)35 b(function)g(is)g(only)h(useful)f(to)h(c)m(hec)m(k)h
 
19994
1745 y(This)35 b(function)g(is)g(only)h(useful)f(to)h(c)m(hec)m(k)h
19988
19995
(where)e(the)h(last)g(p)s(erformed)e(handshak)m(e)h(failed.)56
19989
 
b(If)390 4739 y(the)26 b(previous)g(handshak)m(e)f(succeed)i(or)f(w)m
 
19996
b(If)390 1854 y(the)26 b(previous)g(handshak)m(e)f(succeed)i(or)f(w)m
19990
19997
(as)g(not)g(p)s(erformed)f(at)h(all)h(then)f(no)g(meaningful)f(v)-5
19991
 
b(alue)390 4849 y(will)31 b(b)s(e)e(returned.)390 4985
 
19998
b(alue)390 1964 y(will)31 b(b)s(e)e(returned.)390 2097
19992
19999
y(Chec)m(k)43 b Ft(gnutls_handshake_descripti)o(on_)o(t)37
19993
20000
b FB(in)43 b(gn)m(utls.h)g(for)g(the)g(a)m(v)-5 b(ailable)45
19994
 
b(handshak)m(e)390 5094 y(descriptions.)390 5230 y Fn(Returns:)38
 
20001
b(handshak)m(e)390 2206 y(descriptions.)390 2339 y Fn(Returns:)38
19995
20002
b FB(the)27 b(last)g(handshak)m(e)e(message)i(t)m(yp)s(e)g(sen)m(t,)g
19996
 
(a)g Ft(gnutls_handshake_descrip)o(tion)o(_)390 5340
19997
 
y(t)p FB(.)p eop end
19998
 
%%Page: 147 153
19999
 
TeXDict begin 147 152 bop 150 -116 a FB(Chapter)30 b(9:)41
20000
 
b(F)-8 b(unction)31 b(Reference)2237 b(147)150 299 y
20001
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(handshak)m(e)p 1096
20002
 
299 V 53 w(set)p 1301 299 V 55 w(max)p 1583 299 V 53
20003
 
w(pac)m(k)m(et)p 1982 299 V 52 w(length)3350 512 y FB([F)-8
20004
 
b(unction])-3599 b Fh(void)54 b(gnutls_handshake_set_max)q(_pa)q(cke)q
20005
 
(t_l)q(engt)q(h)d Fg(\()p Ff(gn)m(utls)p 2725 512 28
20006
 
4 v 41 w(session)p 3035 512 V 40 w(t)565 621 y Fe(session)12
20007
 
b Ff(,)32 b(size)p 1145 621 V 41 w(t)f Fe(max)12 b Fg(\))390
20008
 
731 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
20009
 
b FB(structure.)390 881 y Ff(max)6 b FB(:)41 b(is)31
20010
 
b(the)f(maxim)m(um)g(n)m(um)m(b)s(er.)390 1031 y(This)d(function)h
 
20003
(a)g Ft(gnutls_handshake_descrip)o(tion)o(_)390 2449
 
20004
y(t)p FB(.)150 2645 y Fv(gn)m(utls)p 483 2645 37 5 v
 
20005
55 w(handshak)m(e)p 1096 2645 V 53 w(set)p 1301 2645
 
20006
V 55 w(max)p 1583 2645 V 53 w(pac)m(k)m(et)p 1982 2645
 
20007
V 52 w(length)3350 2838 y FB([F)-8 b(unction])-3599 b
 
20008
Fh(void)54 b(gnutls_handshake_set_max)q(_pa)q(cke)q(t_l)q(engt)q(h)d
 
20009
Fg(\()p Ff(gn)m(utls)p 2725 2838 28 4 v 41 w(session)p
 
20010
3035 2838 V 40 w(t)565 2948 y Fe(session)12 b Ff(,)32
 
20011
b(size)p 1145 2948 V 41 w(t)f Fe(max)12 b Fg(\))390 3057
 
20012
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
20013
b FB(structure.)390 3190 y Ff(max)6 b FB(:)41 b(is)31
 
20014
b(the)f(maxim)m(um)g(n)m(um)m(b)s(er.)390 3323 y(This)d(function)h
20011
20015
(will)g(set)g(the)g(maxim)m(um)g(size)h(of)f(all)g(handshak)m(e)g
20012
 
(messages.)41 b(Handshak)m(es)28 b(o)m(v)m(er)390 1141
 
20016
(messages.)41 b(Handshak)m(es)28 b(o)m(v)m(er)390 3433
20013
20017
y(this)k(size)g(are)g(rejected)g(with)g Ft(GNUTLS_E_HANDSHAKE_TOO_)o
20014
20018
(LARG)o(E)26 b FB(error)31 b(co)s(de.)45 b(The)31 b(default)390
20015
 
1251 y(v)-5 b(alue)31 b(is)g(48kb)h(whic)m(h)e(is)h(t)m(ypically)i
 
20019
3542 y(v)-5 b(alue)31 b(is)g(48kb)h(whic)m(h)e(is)h(t)m(ypically)i
20016
20020
(large)f(enough.)43 b(Set)31 b(this)g(to)g(0)h(if)f(y)m(ou)g(do)g(not)g
20017
 
(w)m(an)m(t)h(to)f(set)390 1360 y(an)f(upp)s(er)f(limit.)390
20018
 
1511 y(The)h(reason)h(for)g(restricting)h(the)f(handshak)m(e)f(message)
 
20021
(w)m(an)m(t)h(to)f(set)390 3652 y(an)f(upp)s(er)f(limit.)390
 
20022
3785 y(The)h(reason)h(for)g(restricting)h(the)f(handshak)m(e)f(message)
20019
20023
i(sizes)f(are)g(to)h(limit)f(Denial)i(of)d(Service)390
20020
 
1620 y(attac)m(ks.)150 1835 y Fv(gn)m(utls)p 483 1835
20021
 
37 5 v 55 w(handshak)m(e)p 1096 1835 V 53 w(set)p 1301
20022
 
1835 V 55 w(p)s(ost)p 1584 1835 V 55 w(clien)m(t)p 1931
20023
 
1835 V 53 w(hello)p 2237 1835 V 55 w(function)3350 2048
 
20024
3894 y(attac)m(ks.)150 4090 y Fv(gn)m(utls)p 483 4090
 
20025
37 5 v 55 w(handshak)m(e)p 1096 4090 V 53 w(set)p 1301
 
20026
4090 V 55 w(p)s(ost)p 1584 4090 V 55 w(clien)m(t)p 1931
 
20027
4090 V 53 w(hello)p 2237 4090 V 55 w(function)3350 4284
20024
20028
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_handshake_set_pos)q
20025
 
(t_c)q(lie)q(nt_)q(hell)q(o_f)q(unc)q(tion)565 2157 y
20026
 
Fg(\()p Ff(gn)m(utls)p 846 2157 28 4 v 41 w(session)p
20027
 
1156 2157 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(gn)m(utls)p
20028
 
1935 2157 V 40 w(handshak)m(e)p 2390 2157 V 40 w(p)s(ost)p
20029
 
2600 2157 V 40 w(clien)m(t)p 2853 2157 V 41 w(hello)p
20030
 
3080 2157 V 41 w(func)e Fe(func)12 b Fg(\))390 2267 y
 
20029
(t_c)q(lie)q(nt_)q(hell)q(o_f)q(unc)q(tion)565 4393 y
 
20030
Fg(\()p Ff(gn)m(utls)p 846 4393 28 4 v 41 w(session)p
 
20031
1156 4393 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(gn)m(utls)p
 
20032
1935 4393 V 40 w(handshak)m(e)p 2390 4393 V 40 w(p)s(ost)p
 
20033
2600 4393 V 40 w(clien)m(t)p 2853 4393 V 41 w(hello)p
 
20034
3080 4393 V 41 w(func)e Fe(func)12 b Fg(\))390 4503 y
20031
20035
Ff(func)6 b FB(:)39 b(is)31 b(the)f(function)g(to)i(b)s(e)d(called)390
20032
 
2417 y(This)j(function)h(will)g(set)g(a)g(callbac)m(k)i(to)f(b)s(e)e
 
20036
4636 y(This)j(function)h(will)g(set)g(a)g(callbac)m(k)i(to)f(b)s(e)e
20033
20037
(called)i(after)g(the)f(clien)m(t)h(hello)g(has)e(b)s(een)h(receiv)m
20034
 
(ed)390 2527 y(\(callbac)m(k)d(v)-5 b(alid)28 b(in)g(serv)m(er)g(side)g
 
20038
(ed)390 4745 y(\(callbac)m(k)d(v)-5 b(alid)28 b(in)g(serv)m(er)g(side)g
20035
20039
(only\).)40 b(This)27 b(allo)m(ws)i(the)f(serv)m(er)g(to)h(adjust)e
20036
 
(settings)i(based)e(on)390 2637 y(receiv)m(ed)32 b(extensions.)390
20037
 
2787 y(Those)37 b(settings)h(could)f(b)s(e)f(ciphersuites,)j
 
20040
(settings)i(based)e(on)390 4855 y(receiv)m(ed)32 b(extensions.)390
 
20041
4988 y(Those)37 b(settings)h(could)f(b)s(e)f(ciphersuites,)j
20038
20042
(requesting)f(certi\014cate,)j(or)c(an)m(ything)g(else)h(except)390
20039
 
2897 y(for)30 b(v)m(ersion)h(negotiation)i(\(this)d(is)h(done)f(b)s
20040
 
(efore)g(the)g(hello)i(message)f(is)g(parsed\).)390 3047
 
20043
5098 y(for)30 b(v)m(ersion)h(negotiation)i(\(this)d(is)h(done)f(b)s
 
20044
(efore)g(the)g(hello)i(message)f(is)g(parsed\).)390 5230
20041
20045
y(This)e(callbac)m(k)j(m)m(ust)d(return)g(0)h(on)f(success)h(or)g(a)g
20042
20046
(gn)m(utls)g(error)f(co)s(de)h(to)g(terminate)h(the)f(hand-)390
20043
 
3156 y(shak)m(e.)390 3307 y Fn(W)-8 b(arning:)37 b FB(Y)-8
20044
 
b(ou)23 b(should)f(not)h(use)g(this)f(function)h(to)g(terminate)h(the)f
20045
 
(handshak)m(e)f(based)h(on)f(clien)m(t)390 3416 y(input)30
20046
 
b(unless)f(y)m(ou)i(kno)m(w)g(what)f(y)m(ou)h(are)g(doing.)41
20047
 
b(Before)31 b(the)g(handshak)m(e)f(is)g(\014nished)f(there)i(is)390
20048
 
3526 y(no)f(w)m(a)m(y)i(to)f(kno)m(w)f(if)g(there)h(is)f(a)h
20049
 
(man-in-the-middle)g(attac)m(k)i(b)s(eing)d(p)s(erformed.)150
20050
 
3741 y Fv(gn)m(utls)p 483 3741 37 5 v 55 w(handshak)m(e)p
20051
 
1096 3741 V 53 w(set)p 1301 3741 V 55 w(priv)-7 b(ate)p
20052
 
1730 3741 V 53 w(extensions)3350 3954 y FB([F)f(unction])-3599
 
20047
5340 y(shak)m(e.)p eop end
 
20048
%%Page: 148 154
 
20049
TeXDict begin 148 153 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20050
b(F)-8 b(unction)31 b(Reference)2237 b(148)390 299 y
 
20051
Fn(W)-8 b(arning:)37 b FB(Y)-8 b(ou)23 b(should)f(not)h(use)g(this)f
 
20052
(function)h(to)g(terminate)h(the)f(handshak)m(e)f(based)h(on)f(clien)m
 
20053
(t)390 408 y(input)30 b(unless)f(y)m(ou)i(kno)m(w)g(what)f(y)m(ou)h
 
20054
(are)g(doing.)41 b(Before)31 b(the)g(handshak)m(e)f(is)g(\014nished)f
 
20055
(there)i(is)390 518 y(no)f(w)m(a)m(y)i(to)f(kno)m(w)f(if)g(there)h(is)f
 
20056
(a)h(man-in-the-middle)g(attac)m(k)i(b)s(eing)d(p)s(erformed.)150
 
20057
722 y Fv(gn)m(utls)p 483 722 37 5 v 55 w(handshak)m(e)p
 
20058
1096 722 V 53 w(set)p 1301 722 V 55 w(priv)-7 b(ate)p
 
20059
1730 722 V 53 w(extensions)3350 923 y FB([F)f(unction])-3599
20053
20060
b Fh(void)54 b(gnutls_handshake_set_pri)q(vat)q(e_e)q(xte)q(nsio)q(ns)e
20054
 
Fg(\()p Ff(gn)m(utls)p 2778 3954 28 4 v 41 w(session)p
20055
 
3088 3954 V 40 w(t)565 4063 y Fe(session)12 b Ff(,)32
20056
 
b(in)m(t)f Fe(allow)12 b Fg(\))390 4173 y Ff(session)p
 
20061
Fg(\()p Ff(gn)m(utls)p 2778 923 28 4 v 41 w(session)p
 
20062
3088 923 V 40 w(t)565 1032 y Fe(session)12 b Ff(,)32
 
20063
b(in)m(t)f Fe(allow)12 b Fg(\))390 1142 y Ff(session)p
20057
20064
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20058
 
4323 y Ff(allo)m(w)8 b FB(:)42 b(is)30 b(an)h(in)m(teger)g(\(0)h(or)e
20059
 
(1\))390 4474 y(This)23 b(function)g(will)h(enable)g(or)g(disable)f
 
20065
1280 y Ff(allo)m(w)8 b FB(:)42 b(is)30 b(an)h(in)m(teger)g(\(0)h(or)e
 
20066
(1\))390 1419 y(This)23 b(function)g(will)h(enable)g(or)g(disable)f
20060
20067
(the)h(use)g(of)f(priv)-5 b(ate)24 b(cipher)g(suites)f(\(the)h(ones)g
20061
 
(that)g(start)390 4583 y(with)i(0xFF\).)i(By)f(default)g(or)f(if)h
 
20068
(that)g(start)390 1529 y(with)i(0xFF\).)i(By)f(default)g(or)f(if)h
20062
20069
Ft(allow)e FB(is)h(0)h(then)f(these)h(cipher)g(suites)f(will)h(not)g(b)
20063
 
s(e)f(adv)m(ertized)390 4693 y(nor)k(used.)390 4843 y(Unless)g(this)f
 
20070
s(e)f(adv)m(ertized)390 1638 y(nor)k(used.)390 1777 y(Unless)g(this)f
20064
20071
(function)h(is)f(called)i(with)f(the)g(option)g(to)g(allo)m(w)h(\(1\),)
20065
 
g(then)f(no)f(compression)h(algo-)390 4953 y(rithms,)35
 
20072
g(then)f(no)f(compression)h(algo-)390 1887 y(rithms,)35
20066
20073
b(lik)m(e)h(LZO.)d(That)i(is)f(b)s(ecause)g(these)h(algorithms)h(are)e
20067
20074
(not)h(y)m(et)h(de\014ned)d(in)h(an)m(y)h(RF)m(C)390
20068
 
5062 y(or)30 b(ev)m(en)h(in)m(ternet)h(draft.)390 5213
 
20075
1996 y(or)30 b(ev)m(en)h(in)m(ternet)h(draft.)390 2135
20069
20076
y(Enabling)23 b(the)h(priv)-5 b(ate)23 b(ciphersuites)g(when)g(talking)
20070
20077
h(to)g(other)g(than)f(gn)m(utls)g(serv)m(ers)h(and)e(clien)m(ts)390
20071
 
5322 y(ma)m(y)31 b(cause)g(in)m(terop)s(erabilit)m(y)h(problems.)p
20072
 
eop end
20073
 
%%Page: 148 154
20074
 
TeXDict begin 148 153 bop 150 -116 a FB(Chapter)30 b(9:)41
20075
 
b(F)-8 b(unction)31 b(Reference)2237 b(148)150 299 y
20076
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(handshak)m(e)3350
20077
 
497 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_handshake)e
20078
 
Fg(\()p Ff(gn)m(utls)p 1523 497 28 4 v 40 w(session)p
20079
 
1832 497 V 40 w(t)31 b Fe(session)12 b Fg(\))390 607
 
20078
2245 y(ma)m(y)31 b(cause)g(in)m(terop)s(erabilit)m(y)h(problems.)150
 
20079
2448 y Fv(gn)m(utls)p 483 2448 37 5 v 55 w(handshak)m(e)3350
 
20080
2649 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_handshake)e
 
20081
Fg(\()p Ff(gn)m(utls)p 1523 2649 28 4 v 40 w(session)p
 
20082
1832 2649 V 40 w(t)31 b Fe(session)12 b Fg(\))390 2759
20080
20083
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
20081
 
b FB(structure.)390 743 y(This)32 b(function)h(do)s(es)f(the)h
 
20084
b FB(structure.)390 2898 y(This)32 b(function)h(do)s(es)f(the)h
20082
20085
(handshak)m(e)g(of)g(the)g(TLS/SSL)e(proto)s(col,)k(and)d(initializes)j
20083
 
(the)e(TLS)390 853 y(connection.)390 989 y(This)28 b(function)h(will)h
20084
 
(fail)g(if)f(an)m(y)g(problem)g(is)g(encoun)m(tered,)h(and)f(will)g
20085
 
(return)f(a)i(negativ)m(e)h(error)390 1099 y(co)s(de.)54
20086
 
b(In)35 b(case)g(of)g(a)h(clien)m(t,)i(if)c(the)h(clien)m(t)i(has)d
20087
 
(ask)m(ed)i(to)g(resume)e(a)h(session,)h(but)f(the)g(serv)m(er)390
20088
 
1208 y(couldn't,)c(then)f(a)h(full)f(handshak)m(e)g(will)g(b)s(e)g(p)s
20089
 
(erformed.)390 1345 y(The)f(non-fatal)i(errors)e(suc)m(h)g(as)h
20090
 
Ft(GNUTLS_E_AGAIN)c FB(and)j Ft(GNUTLS_E_INTERRUPTED)24
20091
 
b FB(in)m(terrupt)390 1454 y(the)i(handshak)m(e)f(pro)s(cedure,)g(whic)
 
20086
(the)e(TLS)390 3007 y(connection.)390 3146 y(This)28
 
20087
b(function)h(will)h(fail)g(if)f(an)m(y)g(problem)g(is)g(encoun)m
 
20088
(tered,)h(and)f(will)g(return)f(a)i(negativ)m(e)h(error)390
 
20089
3255 y(co)s(de.)54 b(In)35 b(case)g(of)g(a)h(clien)m(t,)i(if)c(the)h
 
20090
(clien)m(t)i(has)d(ask)m(ed)i(to)g(resume)e(a)h(session,)h(but)f(the)g
 
20091
(serv)m(er)390 3365 y(couldn't,)c(then)f(a)h(full)f(handshak)m(e)g
 
20092
(will)g(b)s(e)g(p)s(erformed.)390 3504 y(The)f(non-fatal)i(errors)e
 
20093
(suc)m(h)g(as)h Ft(GNUTLS_E_AGAIN)c FB(and)j Ft(GNUTLS_E_INTERRUPTED)24
 
20094
b FB(in)m(terrupt)390 3613 y(the)i(handshak)m(e)f(pro)s(cedure,)g(whic)
20092
20095
m(h)g(should)g(b)s(e)g(later)h(b)s(e)f(resumed.)38 b(Call)26
20093
 
b(this)f(function)h(again,)390 1564 y(un)m(til)47 b(it)f(returns)f(0;)
 
20096
b(this)f(function)h(again,)390 3723 y(un)m(til)47 b(it)f(returns)f(0;)
20094
20097
55 b(cf.)89 b Ft(gnutls_record_get_dire)o(ctio)o(n\(\))40
20095
 
b FB(and)45 b Ft(gnutls_error_is_)390 1673 y(fatal\(\))p
20096
 
FB(.)390 1810 y(If)27 b(this)h(function)f(is)h(called)h(b)m(y)f(a)g
 
20098
b FB(and)45 b Ft(gnutls_error_is_)390 3833 y(fatal\(\))p
 
20099
FB(.)390 3971 y(If)27 b(this)h(function)f(is)h(called)h(b)m(y)f(a)g
20097
20100
(serv)m(er)g(after)g(a)g(rehandshak)m(e)f(request)h(then)g
20098
 
Ft(GNUTLS_E_GOT_)390 1919 y(APPLICATION_DATA)i FB(or)k
 
20101
Ft(GNUTLS_E_GOT_)390 4081 y(APPLICATION_DATA)i FB(or)k
20099
20102
Ft(GNUTLS_E_WARNING_ALERT_R)o(ECE)o(IVED)27 b FB(ma)m(y)35
20100
 
b(b)s(e)f(returned.)51 b(Note)390 2029 y(that)42 b(these)g(are)h(non)e
 
20103
b(b)s(e)f(returned.)51 b(Note)390 4190 y(that)42 b(these)g(are)h(non)e
20101
20104
(fatal)i(errors,)h(only)e(in)f(the)h(sp)s(eci\014c)g(case)g(of)g(a)g
20102
 
(rehandshak)m(e.)75 b(Their)390 2138 y(meaning)31 b(is)f(that)h(the)g
 
20105
(rehandshak)m(e.)75 b(Their)390 4300 y(meaning)31 b(is)f(that)h(the)g
20103
20106
(clien)m(t)h(rejected)f(the)f(rehandshak)m(e)g(request.)390
20104
 
2275 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
20105
 
b(success,)f(otherwise)h(an)f(error.)150 2476 y Fv(gn)m(utls)p
20106
 
483 2476 37 5 v 55 w(hex2bin)3350 2674 y FB([F)-8 b(unction])-3599
 
20107
4439 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
20108
b(success,)f(otherwise)h(an)f(error.)150 4642 y Fv(gn)m(utls)p
 
20109
483 4642 37 5 v 55 w(hex2bin)3350 4843 y FB([F)-8 b(unction])-3599
20107
20110
b Fh(int)53 b(gnutls_hex2bin)d Fg(\()p Ff(const)31 b(c)m(har)g(*)g
20108
 
Fe(hex_data)12 b Ff(,)32 b(size)p 2318 2674 28 4 v 41
20109
 
w(t)f Fe(hex_size)12 b Ff(,)32 b(c)m(har)f(*)565 2784
20110
 
y Fe(bin_data)12 b Ff(,)33 b(size)p 1198 2784 V 41 w(t)d(*)h
20111
 
Fe(bin_size)12 b Fg(\))390 2893 y Ff(hex)p 535 2893 V
 
20111
Fe(hex_data)12 b Ff(,)32 b(size)p 2318 4843 28 4 v 41
 
20112
w(t)f Fe(hex_size)12 b Ff(,)32 b(c)m(har)f(*)565 4953
 
20113
y Fe(bin_data)12 b Ff(,)33 b(size)p 1198 4953 V 41 w(t)d(*)h
 
20114
Fe(bin_size)12 b Fg(\))390 5062 y Ff(hex)p 535 5062 V
20112
20115
40 w(data)p FB(:)41 b(string)31 b(with)f(data)h(in)f(hex)g(format)390
20113
 
3030 y Ff(hex)p 535 3030 V 40 w(size)5 b FB(:)42 b(size)31
20114
 
b(of)f(hex)h(data)390 3166 y Ff(bin)p 523 3166 V 39 w(data)p
20115
 
FB(:)42 b(output)30 b(arra)m(y)h(with)f(binary)f(data)390
20116
 
3302 y Ff(bin)p 523 3302 V 39 w(size)5 b FB(:)49 b(when)33
 
20116
5201 y Ff(hex)p 535 5201 V 40 w(size)5 b FB(:)42 b(size)31
 
20117
b(of)f(hex)h(data)390 5340 y Ff(bin)p 523 5340 V 39 w(data)p
 
20118
FB(:)42 b(output)30 b(arra)m(y)h(with)f(binary)f(data)p
 
20119
eop end
 
20120
%%Page: 149 155
 
20121
TeXDict begin 149 154 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20122
b(F)-8 b(unction)31 b(Reference)2237 b(149)390 299 y
 
20123
Ff(bin)p 523 299 28 4 v 39 w(size)5 b FB(:)49 b(when)33
20117
20124
b(calling)i(*)p Ft(bin_size)d FB(should)h(hold)h(size)h(of)f
20118
 
Ft(bin_data)p FB(,)e(on)i(return)f(will)h(hold)390 3412
20119
 
y(actual)e(size)f(of)f Ft(bin_data)p FB(.)390 3548 y(Con)m(v)m(ert)h(a)
20120
 
g(bu\013er)e(with)h(hex)h(data)g(to)g(binary)e(data.)390
20121
 
3684 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
20122
 
b(success,)f(otherwise)h(an)f(error.)390 3821 y Fn(Since:)41
20123
 
b FB(2.4.0)150 4022 y Fv(gn)m(utls)p 483 4022 37 5 v
20124
 
55 w(hex)p 727 4022 V 54 w(deco)s(de)3350 4220 y FB([F)-8
 
20125
Ft(bin_data)p FB(,)e(on)i(return)f(will)h(hold)390 408
 
20126
y(actual)e(size)f(of)f Ft(bin_data)p FB(.)390 555 y(Con)m(v)m(ert)h(a)g
 
20127
(bu\013er)e(with)h(hex)h(data)g(to)g(binary)e(data.)390
 
20128
701 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
20129
b(success,)f(otherwise)h(an)f(error.)390 847 y Fn(Since:)41
 
20130
b FB(2.4.0)150 1058 y Fv(gn)m(utls)p 483 1058 37 5 v
 
20131
55 w(hex)p 727 1058 V 54 w(deco)s(de)3350 1267 y FB([F)-8
20125
20132
b(unction])-3599 b Fh(int)53 b(gnutls_hex_decode)e Fg(\()p
20126
 
Ff(const)31 b(gn)m(utls)p 1813 4220 28 4 v 40 w(datum)p
20127
 
2111 4220 V 40 w(t)g(*)f Fe(hex_data)12 b Ff(,)33 b(c)m(har)e(*)565
20128
 
4330 y Fe(result)12 b Ff(,)32 b(size)p 1093 4330 V 41
20129
 
w(t)f(*)f Fe(result_size)12 b Fg(\))390 4439 y Ff(hex)p
20130
 
535 4439 V 40 w(data)p FB(:)41 b(con)m(tain)32 b(the)f(enco)s(ded)f
20131
 
(data)390 4576 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s
20132
 
(ded)h(data)h(will)g(b)s(e)f(copied)390 4712 y Ff(result)p
20133
 
619 4712 V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
20134
 
(result)390 4848 y(This)37 b(function)g(will)i(deco)s(de)f(the)g(giv)m
 
20133
Ff(const)31 b(gn)m(utls)p 1813 1267 28 4 v 40 w(datum)p
 
20134
2111 1267 V 40 w(t)g(*)f Fe(hex_data)12 b Ff(,)33 b(c)m(har)e(*)565
 
20135
1376 y Fe(result)12 b Ff(,)32 b(size)p 1093 1376 V 41
 
20136
w(t)f(*)f Fe(result_size)12 b Fg(\))390 1486 y Ff(hex)p
 
20137
535 1486 V 40 w(data)p FB(:)41 b(con)m(tain)32 b(the)f(enco)s(ded)f
 
20138
(data)390 1632 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s
 
20139
(ded)h(data)h(will)g(b)s(e)f(copied)390 1778 y Ff(result)p
 
20140
619 1778 V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
 
20141
(result)390 1925 y(This)37 b(function)g(will)i(deco)s(de)f(the)g(giv)m
20135
20142
(en)g(enco)s(ded)g(data,)i(using)e(the)g(hex)f(enco)s(ding)h(used)f(b)m
20136
 
(y)390 4958 y(PSK)29 b(passw)m(ord)h(\014les.)390 5094
20137
 
y(Note)i(that)f(hex)p 952 5094 V 40 w(data)g(should)e(b)s(e)h(n)m(ull)g
20138
 
(terminated.)390 5230 y Fn(Returns:)40 b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o
 
20143
(y)390 2034 y(PSK)29 b(passw)m(ord)h(\014les.)390 2181
 
20144
y(Note)i(that)f(hex)p 952 2181 V 40 w(data)g(should)e(b)s(e)h(n)m(ull)g
 
20145
(terminated.)390 2327 y Fn(Returns:)40 b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o
20139
20146
(FER)24 b FB(if)30 b(the)g(bu\013er)f(giv)m(en)i(is)g(not)f(long)h
20140
 
(enough,)f(or)390 5340 y(0)h(on)f(success.)p eop end
20141
 
%%Page: 149 155
20142
 
TeXDict begin 149 154 bop 150 -116 a FB(Chapter)30 b(9:)41
20143
 
b(F)-8 b(unction)31 b(Reference)2237 b(149)150 299 y
20144
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(hex)p 727 299 V 54
20145
 
w(enco)s(de)3350 494 y FB([F)-8 b(unction])-3599 b Fh(int)53
20146
 
b(gnutls_hex_encode)e Fg(\()p Ff(const)31 b(gn)m(utls)p
20147
 
1813 494 28 4 v 40 w(datum)p 2111 494 V 40 w(t)g(*)f
20148
 
Fe(data)12 b Ff(,)32 b(c)m(har)f(*)f Fe(result)12 b Ff(,)565
20149
 
604 y(size)p 712 604 V 41 w(t)31 b(*)f Fe(result_size)12
20150
 
b Fg(\))390 713 y Ff(data)p FB(:)41 b(con)m(tain)32 b(the)f(ra)m(w)f
20151
 
(data)390 847 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(hex)i
20152
 
(data)g(will)f(b)s(e)g(copied)390 981 y Ff(result)p 619
20153
 
981 V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
20154
 
(result)390 1115 y(This)i(function)h(will)g(con)m(v)m(ert)h(the)f(giv)m
20155
 
(en)h(data)g(to)f(prin)m(table)g(data,)i(using)d(the)h(hex)g(enco)s
20156
 
(ding,)390 1224 y(as)e(used)e(in)h(the)h(PSK)e(passw)m(ord)h(\014les.)
20157
 
390 1358 y Fn(Returns:)40 b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24
20158
 
b FB(if)30 b(the)g(bu\013er)f(giv)m(en)i(is)g(not)f(long)h(enough,)f
20159
 
(or)390 1468 y(0)h(on)f(success.)150 1665 y Fv(gn)m(utls)p
20160
 
483 1665 37 5 v 55 w(init)3350 1861 y FB([F)-8 b(unction])-3599
20161
 
b Fh(int)53 b(gnutls_init)c Fg(\()p Ff(gn)m(utls)p 1261
20162
 
1861 28 4 v 41 w(session)p 1571 1861 V 40 w(t)31 b(*)f
20163
 
Fe(session)12 b Ff(,)33 b(gn)m(utls)p 2426 1861 V 40
20164
 
w(connection)p 2889 1861 V 41 w(end)p 3072 1861 V 40
20165
 
w(t)565 1970 y Fe(con_end)12 b Fg(\))390 2080 y Ff(session)p
20166
 
FB(:)41 b(is)30 b(a)h(p)s(oin)m(ter)f(to)i(a)e Ft(gnutls_session_t)c
20167
 
FB(structure.)390 2214 y Ff(con)p 532 2214 V 40 w(end)t
 
20147
(enough,)f(or)390 2436 y(0)h(on)f(success.)150 2647 y
 
20148
Fv(gn)m(utls)p 483 2647 37 5 v 55 w(hex)p 727 2647 V
 
20149
54 w(enco)s(de)3350 2856 y FB([F)-8 b(unction])-3599
 
20150
b Fh(int)53 b(gnutls_hex_encode)e Fg(\()p Ff(const)31
 
20151
b(gn)m(utls)p 1813 2856 28 4 v 40 w(datum)p 2111 2856
 
20152
V 40 w(t)g(*)f Fe(data)12 b Ff(,)32 b(c)m(har)f(*)f Fe(result)12
 
20153
b Ff(,)565 2966 y(size)p 712 2966 V 41 w(t)31 b(*)f Fe(result_size)12
 
20154
b Fg(\))390 3075 y Ff(data)p FB(:)41 b(con)m(tain)32
 
20155
b(the)f(ra)m(w)f(data)390 3221 y Ff(result)r FB(:)41
 
20156
b(the)30 b(place)i(where)d(hex)i(data)g(will)f(b)s(e)g(copied)390
 
20157
3368 y Ff(result)p 619 3368 V 40 w(size)5 b FB(:)42 b(holds)30
 
20158
b(the)g(size)h(of)g(the)f(result)390 3514 y(This)i(function)h(will)g
 
20159
(con)m(v)m(ert)h(the)f(giv)m(en)h(data)g(to)f(prin)m(table)g(data,)i
 
20160
(using)d(the)h(hex)g(enco)s(ding,)390 3624 y(as)e(used)e(in)h(the)h
 
20161
(PSK)e(passw)m(ord)h(\014les.)390 3770 y Fn(Returns:)40
 
20162
b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24 b FB(if)30 b(the)g(bu\013er)f
 
20163
(giv)m(en)i(is)g(not)f(long)h(enough,)f(or)390 3879 y(0)h(on)f
 
20164
(success.)150 4090 y Fv(gn)m(utls)p 483 4090 37 5 v 55
 
20165
w(init)3350 4299 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
20166
b(gnutls_init)c Fg(\()p Ff(gn)m(utls)p 1261 4299 28 4
 
20167
v 41 w(session)p 1571 4299 V 40 w(t)31 b(*)f Fe(session)12
 
20168
b Ff(,)33 b(gn)m(utls)p 2426 4299 V 40 w(connection)p
 
20169
2889 4299 V 41 w(end)p 3072 4299 V 40 w(t)565 4408 y
 
20170
Fe(con_end)12 b Fg(\))390 4518 y Ff(session)p FB(:)41
 
20171
b(is)30 b(a)h(p)s(oin)m(ter)f(to)i(a)e Ft(gnutls_session_t)c
 
20172
FB(structure.)390 4664 y Ff(con)p 532 4664 V 40 w(end)t
20168
20173
FB(:)40 b(indicate)31 b(if)g(this)f(session)h(is)f(to)h(b)s(e)f(used)f
20169
 
(for)i(serv)m(er)f(or)h(clien)m(t.)390 2347 y(This)e(function)h
 
20174
(for)i(serv)m(er)f(or)h(clien)m(t.)390 4811 y(This)e(function)h
20170
20175
(initializes)i(the)e(curren)m(t)g(session)g(to)g(n)m(ull.)41
20171
20176
b(Ev)m(ery)30 b(session)g(m)m(ust)g(b)s(e)f(initialized)390
20172
 
2457 y(b)s(efore)g(use,)g(so)h(in)m(ternal)g(structures)e(can)i(b)s(e)e
 
20177
4920 y(b)s(efore)g(use,)g(so)h(in)m(ternal)g(structures)e(can)i(b)s(e)e
20173
20178
(allo)s(cated.)43 b(This)28 b(function)h(allo)s(cates)j(structures)390
20174
 
2567 y(whic)m(h)e(can)h(only)f(b)s(e)g(free'd)g(b)m(y)h(calling)g
 
20179
5030 y(whic)m(h)e(can)h(only)f(b)s(e)g(free'd)g(b)m(y)h(calling)g
20175
20180
Ft(gnutls_deinit\(\))p FB(.)37 b(Returns)29 b(zero)j(on)e(success.)390
20176
 
2700 y Ft(con_end)e FB(can)j(b)s(e)f(one)g(of)h Ft(GNUTLS_CLIENT)c
20177
 
FB(and)j Ft(GNUTLS_SERVER)p FB(.)390 2834 y Fn(Returns:)40
 
20181
5176 y Ft(con_end)e FB(can)j(b)s(e)f(one)g(of)h Ft(GNUTLS_CLIENT)c
 
20182
FB(and)j Ft(GNUTLS_SERVER)p FB(.)390 5322 y Fn(Returns:)40
20178
20183
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
20179
 
(de.)150 3032 y Fv(gn)m(utls)p 483 3032 37 5 v 55 w(kx)p
20180
 
668 3032 V 53 w(get)p 886 3032 V 54 w(id)3350 3227 y
20181
 
FB([F)-8 b(unction])-3599 b Fh(gnutls_kx_algorithm_t)59
20182
 
b(gnutls_kx_get_id)50 b Fg(\()p Ff(const)31 b(c)m(har)g(*)g
20183
 
Fe(name)12 b Fg(\))390 3337 y Ff(name)5 b FB(:)41 b(is)30
20184
 
b(a)h(KX)f(name)390 3471 y(Con)m(v)m(ert)i(a)f(string)g(to)g(a)h
20185
 
Ft(gnutls_kx_algorithm_t)25 b FB(v)-5 b(alue.)43 b(The)30
20186
 
b(names)h(are)g(compared)g(in)g(a)390 3580 y(case)g(insensitiv)m(e)h(w)
20187
 
m(a)m(y)-8 b(.)390 3714 y Fn(Returns:)40 b FB(an)31 b(id)f(of)g(the)h
20188
 
(sp)s(eci\014ed)e(KX)i(algorithm,)g(or)g Ft(GNUTLS_KX_UNKNOWN)25
20189
 
b FB(on)31 b(error.)150 3912 y Fv(gn)m(utls)p 483 3912
20190
 
V 55 w(kx)p 668 3912 V 53 w(get)p 886 3912 V 54 w(name)3350
20191
 
4107 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
20192
 
(gnutls_kx_get_name)e Fg(\()p Ff(gn)m(utls)p 2098 4107
20193
 
28 4 v 41 w(kx)p 2235 4107 V 40 w(algorithm)p 2658 4107
20194
 
V 41 w(t)565 4217 y Fe(algorithm)12 b Fg(\))390 4326
 
20184
(de.)p eop end
 
20185
%%Page: 150 156
 
20186
TeXDict begin 150 155 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20187
b(F)-8 b(unction)31 b(Reference)2237 b(150)150 299 y
 
20188
Fv(gn)m(utls)p 483 299 37 5 v 55 w(kx)p 668 299 V 53
 
20189
w(get)p 886 299 V 54 w(id)3350 515 y FB([F)-8 b(unction])-3599
 
20190
b Fh(gnutls_kx_algorithm_t)59 b(gnutls_kx_get_id)50 b
 
20191
Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(name)12 b Fg(\))390
 
20192
624 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(KX)f(name)390
 
20193
778 y(Con)m(v)m(ert)i(a)f(string)g(to)g(a)h Ft(gnutls_kx_algorithm_t)25
 
20194
b FB(v)-5 b(alue.)43 b(The)30 b(names)h(are)g(compared)g(in)g(a)390
 
20195
888 y(case)g(insensitiv)m(e)h(w)m(a)m(y)-8 b(.)390 1041
 
20196
y Fn(Returns:)40 b FB(an)31 b(id)f(of)g(the)h(sp)s(eci\014ed)e(KX)i
 
20197
(algorithm,)g(or)g Ft(GNUTLS_KX_UNKNOWN)25 b FB(on)31
 
20198
b(error.)150 1260 y Fv(gn)m(utls)p 483 1260 V 55 w(kx)p
 
20199
668 1260 V 53 w(get)p 886 1260 V 54 w(name)3350 1475
 
20200
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
20201
(gnutls_kx_get_name)e Fg(\()p Ff(gn)m(utls)p 2098 1475
 
20202
28 4 v 41 w(kx)p 2235 1475 V 40 w(algorithm)p 2658 1475
 
20203
V 41 w(t)565 1585 y Fe(algorithm)12 b Fg(\))390 1695
20195
20204
y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(k)m(ey)g(exc)m(hange)h
20196
 
(algorithm)390 4460 y(Con)m(v)m(ert)f(a)g Ft(gnutls_kx_algorithm_t)25
20197
 
b FB(v)-5 b(alue)30 b(to)h(a)g(string.)390 4594 y Fn(Returns:)45
 
20205
(algorithm)390 1848 y(Con)m(v)m(ert)f(a)g Ft(gnutls_kx_algorithm_t)25
 
20206
b FB(v)-5 b(alue)30 b(to)h(a)g(string.)390 2002 y Fn(Returns:)45
20198
20207
b FB(a)33 b(p)s(oin)m(ter)g(to)g(a)g(string)g(that)g(con)m(tains)h(the)
20199
20208
f(name)g(of)g(the)g(sp)s(eci\014ed)f(k)m(ey)h(exc)m(hange)390
20200
 
4703 y(algorithm,)f(or)e Ft(NULL)p FB(.)150 4901 y Fv(gn)m(utls)p
20201
 
483 4901 37 5 v 55 w(kx)p 668 4901 V 53 w(get)3350 5097
 
20209
2111 y(algorithm,)f(or)e Ft(NULL)p FB(.)150 2330 y Fv(gn)m(utls)p
 
20210
483 2330 37 5 v 55 w(kx)p 668 2330 V 53 w(get)3350 2546
20202
20211
y FB([F)-8 b(unction])-3599 b Fh(gnutls_kx_algorithm_t)59
20203
 
b(gnutls_kx_get)49 b Fg(\()p Ff(gn)m(utls)p 2307 5097
20204
 
28 4 v 41 w(session)p 2617 5097 V 40 w(t)31 b Fe(session)12
20205
 
b Fg(\))390 5206 y Ff(session)p FB(:)41 b(is)30 b(a)h
20206
 
Ft(gnutls_session_t)26 b FB(structure.)390 5340 y(Get)31
20207
 
b(curren)m(tly)g(used)e(k)m(ey)j(exc)m(hange)f(algorithm.)p
20208
 
eop end
20209
 
%%Page: 150 156
20210
 
TeXDict begin 150 155 bop 150 -116 a FB(Chapter)30 b(9:)41
20211
 
b(F)-8 b(unction)31 b(Reference)2237 b(150)390 299 y
20212
 
Fn(Returns:)70 b FB(the)46 b(k)m(ey)g(exc)m(hange)g(algorithm)h(used)d
20213
 
(in)h(the)g(last)h(handshak)m(e,)j(a)d Ft(gnutls_kx_)390
20214
 
408 y(algorithm_t)27 b FB(v)-5 b(alue.)150 604 y Fv(gn)m(utls)p
20215
 
483 604 37 5 v 55 w(kx)p 668 604 V 53 w(list)3350 797
 
20212
b(gnutls_kx_get)49 b Fg(\()p Ff(gn)m(utls)p 2307 2546
 
20213
28 4 v 41 w(session)p 2617 2546 V 40 w(t)31 b Fe(session)12
 
20214
b Fg(\))390 2655 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
20215
Ft(gnutls_session_t)26 b FB(structure.)390 2809 y(Get)31
 
20216
b(curren)m(tly)g(used)e(k)m(ey)j(exc)m(hange)f(algorithm.)390
 
20217
2963 y Fn(Returns:)70 b FB(the)46 b(k)m(ey)g(exc)m(hange)g(algorithm)h
 
20218
(used)d(in)h(the)g(last)h(handshak)m(e,)j(a)d Ft(gnutls_kx_)390
 
20219
3072 y(algorithm_t)27 b FB(v)-5 b(alue.)150 3291 y Fv(gn)m(utls)p
 
20220
483 3291 37 5 v 55 w(kx)p 668 3291 V 53 w(list)3350 3506
20216
20221
y FB([F)d(unction])-3599 b Fh(const)54 b(gnutls_kx_algorithm_t)k(*)53
20217
20222
b(gnutls_kx_list)d Fg(\()30 b Fe(void)12 b Fg(\))390
20218
 
907 y FB(Get)31 b(a)g(list)g(of)g(supp)s(orted)d(k)m(ey)j(exc)m(hange)h
20219
 
(algorithms.)390 1039 y Fn(Returns:)55 b FB(a)37 b(zero-terminated)i
 
20223
3616 y FB(Get)31 b(a)g(list)g(of)g(supp)s(orted)d(k)m(ey)j(exc)m(hange)
 
20224
h(algorithms.)390 3770 y Fn(Returns:)55 b FB(a)37 b(zero-terminated)i
20220
20225
(list)g(of)e Ft(gnutls_kx_algorithm_t)32 b FB(in)m(tegers)38
20221
 
b(indicating)h(the)390 1149 y(a)m(v)-5 b(ailable)33 b(k)m(ey)e(exc)m
20222
 
(hange)h(algorithms.)150 1345 y Fv(gn)m(utls)p 483 1345
20223
 
V 55 w(kx)p 668 1345 V 53 w(set)p 873 1345 V 54 w(priorit)m(y)3350
20224
 
1538 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_kx_set_priorit)q
20225
 
(y)e Fg(\()p Ff(gn)m(utls)p 1836 1538 28 4 v 41 w(session)p
20226
 
2146 1538 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(const)f(in)m(t)g(*)
20227
 
565 1647 y Fe(list)12 b Fg(\))390 1757 y Ff(session)p
 
20226
b(indicating)h(the)390 3879 y(a)m(v)-5 b(ailable)33 b(k)m(ey)e(exc)m
 
20227
(hange)h(algorithms.)150 4098 y Fv(gn)m(utls)p 483 4098
 
20228
V 55 w(kx)p 668 4098 V 53 w(set)p 873 4098 V 54 w(priorit)m(y)3350
 
20229
4313 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_kx_set_priorit)q
 
20230
(y)e Fg(\()p Ff(gn)m(utls)p 1836 4313 28 4 v 41 w(session)p
 
20231
2146 4313 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(const)f(in)m(t)g(*)
 
20232
565 4423 y Fe(list)12 b Fg(\))390 4533 y Ff(session)p
20228
20233
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20229
 
1890 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
20230
 
m(utls)p 1789 1890 V 40 w(kx)p 1925 1890 V 40 w(algorithm)p
20231
 
2348 1890 V 41 w(t)g(elemen)m(ts.)390 2022 y(Sets)40
 
20234
4686 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
 
20235
m(utls)p 1789 4686 V 40 w(kx)p 1925 4686 V 40 w(algorithm)p
 
20236
2348 4686 V 41 w(t)g(elemen)m(ts.)390 4840 y(Sets)40
20232
20237
b(the)g(priorit)m(y)h(on)f(the)g(k)m(ey)h(exc)m(hange)g(algorithms)g
20233
20238
(supp)s(orted)d(b)m(y)i(gn)m(utls.)70 b(Priorit)m(y)41
20234
 
b(is)390 2132 y(higher)27 b(for)g(elemen)m(ts)h(sp)s(eci\014ed)f(b)s
 
20239
b(is)390 4949 y(higher)27 b(for)g(elemen)m(ts)h(sp)s(eci\014ed)f(b)s
20235
20240
(efore)g(others.)39 b(After)28 b(sp)s(ecifying)f(the)g(algorithms)h(y)m
20236
 
(ou)g(w)m(an)m(t,)390 2241 y(y)m(ou)h(m)m(ust)f(app)s(end)f(a)i(0.)40
 
20241
(ou)g(w)m(an)m(t,)390 5059 y(y)m(ou)h(m)m(ust)f(app)s(end)f(a)i(0.)40
20237
20242
b(Note)30 b(that)f(the)g(priorit)m(y)g(is)f(set)h(on)g(the)f(clien)m
20238
 
(t.)42 b(The)28 b(serv)m(er)h(do)s(es)f(not)390 2351
 
20243
(t.)42 b(The)28 b(serv)m(er)h(do)s(es)f(not)390 5169
20239
20244
y(use)i(the)h(algorithm's)g(priorit)m(y)g(except)g(for)f(disabling)h
20240
20245
(algorithms)g(that)g(w)m(ere)g(not)f(sp)s(eci\014ed.)390
20241
 
2484 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
20242
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 2679 y Fv(gn)m(utls)p
20243
 
483 2679 37 5 v 55 w(mac)p 755 2679 V 53 w(get)p 973
20244
 
2679 V 54 w(id)3350 2872 y FB([F)-8 b(unction])-3599
 
20246
5322 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
20247
b(success,)f(or)h(an)f(error)g(co)s(de.)p eop end
 
20248
%%Page: 151 157
 
20249
TeXDict begin 151 156 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20250
b(F)-8 b(unction)31 b(Reference)2237 b(151)150 299 y
 
20251
Fv(gn)m(utls)p 483 299 37 5 v 55 w(mac)p 755 299 V 53
 
20252
w(get)p 973 299 V 54 w(id)3350 523 y FB([F)-8 b(unction])-3599
20245
20253
b Fh(gnutls_mac_algorithm_t)59 b(gnutls_mac_get_id)51
20246
20254
b Fg(\()p Ff(const)31 b(c)m(har)g(*)f Fe(name)12 b Fg(\))390
20247
 
2982 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(MA)m(C)g(algorithm)g(name)390
20248
 
3115 y(Con)m(v)m(ert)j(a)f(string)g(to)h(a)g Ft(gnutls_mac_algorithm_t)
 
20255
633 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(MA)m(C)g(algorithm)g(name)390
 
20256
795 y(Con)m(v)m(ert)j(a)f(string)g(to)h(a)g Ft(gnutls_mac_algorithm_t)
20249
20257
27 b FB(v)-5 b(alue.)49 b(The)33 b(names)g(are)g(compared)g(in)390
20250
 
3224 y(a)e(case)g(insensitiv)m(e)h(w)m(a)m(y)-8 b(.)390
20251
 
3357 y Fn(Returns:)38 b FB(an)24 b Ft(gnutls_mac_algorithm_tid)19
 
20258
905 y(a)e(case)g(insensitiv)m(e)h(w)m(a)m(y)-8 b(.)390
 
20259
1067 y Fn(Returns:)38 b FB(an)24 b Ft(gnutls_mac_algorithm_tid)19
20252
20260
b FB(of)25 b(the)g(sp)s(eci\014ed)f(in)h(a)g(string)g(MA)m(C)h
20253
 
(algorithm,)390 3466 y(or)k Ft(GNUTLS_MAC_UNKNOWN)c FB(on)k(failures.)
20254
 
150 3662 y Fv(gn)m(utls)p 483 3662 V 55 w(mac)p 755 3662
20255
 
V 53 w(get)p 973 3662 V 54 w(k)m(ey)p 1210 3662 V 53
20256
 
w(size)3350 3855 y FB([F)-8 b(unction])-3599 b Fh(size_t)54
 
20261
(algorithm,)390 1176 y(or)k Ft(GNUTLS_MAC_UNKNOWN)c FB(on)k(failures.)
 
20262
150 1403 y Fv(gn)m(utls)p 483 1403 V 55 w(mac)p 755 1403
 
20263
V 53 w(get)p 973 1403 V 54 w(k)m(ey)p 1210 1403 V 53
 
20264
w(size)3350 1628 y FB([F)-8 b(unction])-3599 b Fh(size_t)54
20257
20265
b(gnutls_mac_get_key_siz)q(e)e Fg(\()p Ff(gn)m(utls)p
20258
 
2046 3855 28 4 v 40 w(mac)p 2247 3855 V 41 w(algorithm)p
20259
 
2671 3855 V 41 w(t)565 3965 y Fe(algorithm)12 b Fg(\))390
20260
 
4074 y Ff(algorithm)p FB(:)42 b(is)30 b(an)g(encryption)h(algorithm)390
20261
 
4207 y(Get)g(size)h(of)e(MA)m(C)h(k)m(ey)-8 b(.)390 4340
 
20266
2046 1628 28 4 v 40 w(mac)p 2247 1628 V 41 w(algorithm)p
 
20267
2671 1628 V 41 w(t)565 1737 y Fe(algorithm)12 b Fg(\))390
 
20268
1847 y Ff(algorithm)p FB(:)42 b(is)30 b(an)g(encryption)h(algorithm)390
 
20269
2009 y(Get)g(size)h(of)e(MA)m(C)h(k)m(ey)-8 b(.)390 2171
20262
20270
y Fn(Returns:)37 b FB(length)23 b(\(in)f(b)m(ytes\))i(of)f(the)f(giv)m
20263
20271
(en)i(MA)m(C)f(k)m(ey)h(size,)h(or)e(0)g(if)f(the)h(giv)m(en)h(MA)m(C)f
20264
 
(algorithm)390 4449 y(is)30 b(in)m(v)-5 b(alid.)150 4645
20265
 
y Fv(gn)m(utls)p 483 4645 37 5 v 55 w(mac)p 755 4645
20266
 
V 53 w(get)p 973 4645 V 54 w(name)3350 4838 y FB([F)d(unction])-3599
 
20272
(algorithm)390 2281 y(is)30 b(in)m(v)-5 b(alid.)150 2508
 
20273
y Fv(gn)m(utls)p 483 2508 37 5 v 55 w(mac)p 755 2508
 
20274
V 53 w(get)p 973 2508 V 54 w(name)3350 2732 y FB([F)d(unction])-3599
20267
20275
b Fh(const)54 b(char)f(*)g(gnutls_mac_get_name)e Fg(\()p
20268
 
Ff(gn)m(utls)p 2150 4838 28 4 v 41 w(mac)p 2352 4838
20269
 
V 41 w(algorithm)p 2776 4838 V 41 w(t)565 4947 y Fe(algorithm)12
20270
 
b Fg(\))390 5057 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(MA)m(C)g
20271
 
(algorithm)390 5190 y(Con)m(v)m(ert)g(a)g Ft(gnutls_mac_algorithm_t)24
20272
 
b FB(v)-5 b(alue)31 b(to)g(a)g(string.)390 5322 y Fn(Returns:)40
 
20276
Ff(gn)m(utls)p 2150 2732 28 4 v 41 w(mac)p 2352 2732
 
20277
V 41 w(algorithm)p 2776 2732 V 41 w(t)565 2842 y Fe(algorithm)12
 
20278
b Fg(\))390 2951 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(MA)m(C)g
 
20279
(algorithm)390 3113 y(Con)m(v)m(ert)g(a)g Ft(gnutls_mac_algorithm_t)24
 
20280
b FB(v)-5 b(alue)31 b(to)g(a)g(string.)390 3276 y Fn(Returns:)40
20273
20281
b FB(a)31 b(string)f(that)h(con)m(tains)h(the)f(name)f(of)h(the)f(sp)s
20274
 
(eci\014ed)g(MA)m(C)h(algorithm,)g(or)g Ft(NULL)p FB(.)p
20275
 
eop end
20276
 
%%Page: 151 157
20277
 
TeXDict begin 151 156 bop 150 -116 a FB(Chapter)30 b(9:)41
20278
 
b(F)-8 b(unction)31 b(Reference)2237 b(151)150 299 y
20279
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(mac)p 755 299 V 53
20280
 
w(get)3350 505 y FB([F)-8 b(unction])-3599 b Fh(gnutls_mac_algorithm_t)
20281
 
59 b(gnutls_mac_get)50 b Fg(\()p Ff(gn)m(utls)p 2412
20282
 
505 28 4 v 40 w(session)p 2721 505 V 41 w(t)565 615 y
20283
 
Fe(session)12 b Fg(\))390 724 y Ff(session)p FB(:)41
20284
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20285
 
868 y(Get)31 b(curren)m(tly)g(used)e(MA)m(C)i(algorithm.)390
20286
 
1012 y Fn(Returns:)40 b FB(the)31 b(curren)m(tly)f(used)g(mac)h
20287
 
(algorithm,)g(a)g Ft(gnutls_mac_algorithm_t)25 b FB(v)-5
20288
 
b(alue.)150 1221 y Fv(gn)m(utls)p 483 1221 37 5 v 55
20289
 
w(mac)p 755 1221 V 53 w(list)3350 1427 y FB([F)d(unction])-3599
20290
 
b Fh(const)54 b(gnutls_mac_algorithm_t)59 b(*)52 b(gnutls_mac_list)e
20291
 
Fg(\()31 b Fe(void)12 b Fg(\))390 1536 y FB(Get)25 b(a)g(list)f(of)h
20292
 
(hash)e(algorithms)i(for)f(use)g(as)g(MA)m(Cs.)39 b(Note)26
20293
 
b(that)f(not)f(necessarily)h(all)g(MA)m(Cs)g(are)390
20294
 
1646 y(supp)s(orted)f(in)h(TLS)f(cipher)h(suites.)39
 
20282
(eci\014ed)g(MA)m(C)h(algorithm,)g(or)g Ft(NULL)p FB(.)150
 
20283
3503 y Fv(gn)m(utls)p 483 3503 37 5 v 55 w(mac)p 755
 
20284
3503 V 53 w(get)3350 3727 y FB([F)-8 b(unction])-3599
 
20285
b Fh(gnutls_mac_algorithm_t)59 b(gnutls_mac_get)50 b
 
20286
Fg(\()p Ff(gn)m(utls)p 2412 3727 28 4 v 40 w(session)p
 
20287
2721 3727 V 41 w(t)565 3837 y Fe(session)12 b Fg(\))390
 
20288
3946 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
20289
b FB(structure.)390 4108 y(Get)31 b(curren)m(tly)g(used)e(MA)m(C)i
 
20290
(algorithm.)390 4270 y Fn(Returns:)40 b FB(the)31 b(curren)m(tly)f
 
20291
(used)g(mac)h(algorithm,)g(a)g Ft(gnutls_mac_algorithm_t)25
 
20292
b FB(v)-5 b(alue.)150 4497 y Fv(gn)m(utls)p 483 4497
 
20293
37 5 v 55 w(mac)p 755 4497 V 53 w(list)3350 4722 y FB([F)d(unction])
 
20294
-3599 b Fh(const)54 b(gnutls_mac_algorithm_t)59 b(*)52
 
20295
b(gnutls_mac_list)e Fg(\()31 b Fe(void)12 b Fg(\))390
 
20296
4831 y FB(Get)25 b(a)g(list)f(of)h(hash)e(algorithms)i(for)f(use)g(as)g
 
20297
(MA)m(Cs.)39 b(Note)26 b(that)f(not)f(necessarily)h(all)g(MA)m(Cs)g
 
20298
(are)390 4941 y(supp)s(orted)f(in)h(TLS)f(cipher)h(suites.)39
20295
20299
b(F)-8 b(or)26 b(example,)i(MD2)e(is)g(not)f(supp)s(orted)f(as)i(a)f
20296
 
(cipher)g(suite,)390 1756 y(but)30 b(is)g(supp)s(orted)f(for)h(other)g
 
20300
(cipher)g(suite,)390 5051 y(but)30 b(is)g(supp)s(orted)f(for)h(other)g
20297
20301
(purp)s(oses)f(\(e.g.,)j(X.509)g(signature)f(v)m(eri\014cation)h(or)e
20298
 
(similar\).)390 1899 y Fn(Returns:)57 b FB(Return)38
 
20302
(similar\).)390 5213 y Fn(Returns:)57 b FB(Return)38
20299
20303
b(a)h(zero-terminated)h(list)g(of)f Ft(gnutls_mac_algorithm_t)32
20300
 
b FB(in)m(tegers)40 b(indi-)390 2009 y(cating)32 b(the)e(a)m(v)-5
20301
 
b(ailable)33 b(MA)m(Cs.)150 2218 y Fv(gn)m(utls)p 483
20302
 
2218 V 55 w(mac)p 755 2218 V 53 w(set)p 960 2218 V 54
20303
 
w(priorit)m(y)3350 2424 y FB([F)-8 b(unction])-3599 b
20304
 
Fh(int)53 b(gnutls_mac_set_priori)q(ty)f Fg(\()p Ff(gn)m(utls)p
20305
 
1889 2424 28 4 v 40 w(session)p 2198 2424 V 41 w(t)30
20306
 
b Fe(session)12 b Ff(,)32 b(const)f(in)m(t)g(*)565 2533
20307
 
y Fe(list)12 b Fg(\))390 2643 y Ff(session)p FB(:)41
 
20304
b FB(in)m(tegers)40 b(indi-)390 5322 y(cating)32 b(the)e(a)m(v)-5
 
20305
b(ailable)33 b(MA)m(Cs.)p eop end
 
20306
%%Page: 152 158
 
20307
TeXDict begin 152 157 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20308
b(F)-8 b(unction)31 b(Reference)2237 b(152)150 299 y
 
20309
Fv(gn)m(utls)p 483 299 37 5 v 55 w(mac)p 755 299 V 53
 
20310
w(set)p 960 299 V 54 w(priorit)m(y)3350 498 y FB([F)-8
 
20311
b(unction])-3599 b Fh(int)53 b(gnutls_mac_set_priori)q(ty)f
 
20312
Fg(\()p Ff(gn)m(utls)p 1889 498 28 4 v 40 w(session)p
 
20313
2198 498 V 41 w(t)30 b Fe(session)12 b Ff(,)32 b(const)f(in)m(t)g(*)565
 
20314
608 y Fe(list)12 b Fg(\))390 718 y Ff(session)p FB(:)41
20308
20315
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20309
 
2787 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
20310
 
m(utls)p 1789 2787 V 40 w(mac)p 1990 2787 V 41 w(algorithm)p
20311
 
2414 2787 V 41 w(t)g(elemen)m(ts.)390 2931 y(Sets)36
20312
 
b(the)g(priorit)m(y)g(on)f(the)h(mac)g(algorithms)h(supp)s(orted)c(b)m
20313
 
(y)j(gn)m(utls.)57 b(Priorit)m(y)36 b(is)g(higher)f(for)390
20314
 
3040 y(elemen)m(ts)30 b(sp)s(eci\014ed)f(b)s(efore)g(others.)40
20315
 
b(After)29 b(sp)s(ecifying)g(the)h(algorithms)g(y)m(ou)f(w)m(an)m(t,)i
20316
 
(y)m(ou)e(m)m(ust)390 3150 y(app)s(end)i(a)j(0.)48 b(Note)35
20317
 
b(that)e(the)g(priorit)m(y)g(is)g(set)h(on)f(the)g(clien)m(t.)50
20318
 
b(The)32 b(serv)m(er)h(do)s(es)g(not)g(use)g(the)390
20319
 
3260 y(algorithm's)f(priorit)m(y)e(except)i(for)e(disabling)g
20320
 
(algorithms)h(that)g(w)m(ere)g(not)g(sp)s(eci\014ed.)390
20321
 
3403 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
20322
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 3612 y Fv(gn)m(utls)p
20323
 
483 3612 37 5 v 55 w(mallo)s(c)3350 3818 y FB([F)-8 b(unction])-3599
20324
 
b Fh(void)54 b(*)e(gnutls_malloc)e Fg(\()p Ff(size)p
20325
 
1424 3818 28 4 v 41 w(t)30 b Fe(s)12 b Fg(\))390 3928
20326
 
y FB(This)42 b(function)h(will)g(allo)s(cate)i('s')e(b)m(ytes)h(data,)j
20327
 
(and)42 b(return)g(a)h(p)s(oin)m(ter)g(to)g(memory)-8
20328
 
b(.)79 b(This)390 4037 y(function)30 b(is)g(supp)s(osed)f(to)i(b)s(e)f
20329
 
(used)f(b)m(y)i(callbac)m(ks.)390 4181 y(The)20 b(allo)s(cation)i
 
20316
855 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)m
 
20317
(utls)p 1789 855 V 40 w(mac)p 1990 855 V 41 w(algorithm)p
 
20318
2414 855 V 41 w(t)g(elemen)m(ts.)390 992 y(Sets)36 b(the)g(priorit)m(y)
 
20319
g(on)f(the)h(mac)g(algorithms)h(supp)s(orted)c(b)m(y)j(gn)m(utls.)57
 
20320
b(Priorit)m(y)36 b(is)g(higher)f(for)390 1102 y(elemen)m(ts)30
 
20321
b(sp)s(eci\014ed)f(b)s(efore)g(others.)40 b(After)29
 
20322
b(sp)s(ecifying)g(the)h(algorithms)g(y)m(ou)f(w)m(an)m(t,)i(y)m(ou)e(m)
 
20323
m(ust)390 1211 y(app)s(end)i(a)j(0.)48 b(Note)35 b(that)e(the)g
 
20324
(priorit)m(y)g(is)g(set)h(on)f(the)g(clien)m(t.)50 b(The)32
 
20325
b(serv)m(er)h(do)s(es)g(not)g(use)g(the)390 1321 y(algorithm's)f
 
20326
(priorit)m(y)e(except)i(for)e(disabling)g(algorithms)h(that)g(w)m(ere)g
 
20327
(not)g(sp)s(eci\014ed.)390 1458 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)
 
20328
26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
20329
1660 y Fv(gn)m(utls)p 483 1660 37 5 v 55 w(mallo)s(c)3350
 
20330
1860 y FB([F)-8 b(unction])-3599 b Fh(void)54 b(*)e(gnutls_malloc)e
 
20331
Fg(\()p Ff(size)p 1424 1860 28 4 v 41 w(t)30 b Fe(s)12
 
20332
b Fg(\))390 1969 y FB(This)42 b(function)h(will)g(allo)s(cate)i('s')e
 
20333
(b)m(ytes)h(data,)j(and)42 b(return)g(a)h(p)s(oin)m(ter)g(to)g(memory)
 
20334
-8 b(.)79 b(This)390 2079 y(function)30 b(is)g(supp)s(osed)f(to)i(b)s
 
20335
(e)f(used)f(b)m(y)i(callbac)m(ks.)390 2216 y(The)20 b(allo)s(cation)i
20330
20336
(function)f(used)e(is)h(the)h(one)g(set)g(b)m(y)f Ft
20331
20337
(gnutls_global_set_mem_f)o(unct)o(ions)o(\(\))p FB(.)150
20332
 
4390 y Fv(gn)m(utls)p 483 4390 37 5 v 55 w(op)s(enpgp)p
20333
 
991 4390 V 55 w(send)p 1286 4390 V 55 w(cert)3350 4596
 
20338
2418 y Fv(gn)m(utls)p 483 2418 37 5 v 55 w(op)s(enpgp)p
 
20339
991 2418 V 55 w(send)p 1286 2418 V 55 w(cert)3350 2618
20334
20340
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_openpgp_send_cert)e
20335
 
Fg(\()p Ff(gn)m(utls)p 1993 4596 28 4 v 41 w(session)p
20336
 
2303 4596 V 40 w(t)31 b Fe(session)12 b Ff(,)565 4706
20337
 
y(gn)m(utls)p 811 4706 V 41 w(op)s(enpgp)p 1189 4706
20338
 
V 38 w(crt)p 1338 4706 V 41 w(status)p 1617 4706 V 40
20339
 
w(t)31 b Fe(status)12 b Fg(\))390 4815 y Ff(session)p
 
20341
Fg(\()p Ff(gn)m(utls)p 1993 2618 28 4 v 41 w(session)p
 
20342
2303 2618 V 40 w(t)31 b Fe(session)12 b Ff(,)565 2727
 
20343
y(gn)m(utls)p 811 2727 V 41 w(op)s(enpgp)p 1189 2727
 
20344
V 38 w(crt)p 1338 2727 V 41 w(status)p 1617 2727 V 40
 
20345
w(t)31 b Fe(status)12 b Fg(\))390 2837 y Ff(session)p
20340
20346
FB(:)41 b(is)30 b(a)h(p)s(oin)m(ter)f(to)i(a)e Ft(gnutls_session_t)c
20341
 
FB(structure.)390 4959 y Ff(status)t FB(:)36 b(is)20
20342
 
b(one)h(of)f(GNUTLS)p 1411 4959 V 40 w(OPENPGP)p 1909
20343
 
4959 V 39 w(CER)-8 b(T,)20 b(or)h(GNUTLS)p 2729 4959
20344
 
V 39 w(OPENPGP)p 3226 4959 V 40 w(CER)-8 b(T)p 3519 4959
20345
 
V 40 w(FINGERPRINT)390 5103 y(This)34 b(function)f(will)i(order)f(gn)m
 
20347
FB(structure.)390 2974 y Ff(status)t FB(:)36 b(is)20
 
20348
b(one)h(of)f(GNUTLS)p 1411 2974 V 40 w(OPENPGP)p 1909
 
20349
2974 V 39 w(CER)-8 b(T,)20 b(or)h(GNUTLS)p 2729 2974
 
20350
V 39 w(OPENPGP)p 3226 2974 V 40 w(CER)-8 b(T)p 3519 2974
 
20351
V 40 w(FINGERPRINT)390 3111 y(This)34 b(function)f(will)i(order)f(gn)m
20346
20352
(utls)h(to)g(send)e(the)i(k)m(ey)g(\014ngerprin)m(t)e(instead)i(of)f
20347
 
(the)h(k)m(ey)g(in)f(the)390 5213 y(initial)i(handshak)m(e)e(pro)s
 
20353
(the)h(k)m(ey)g(in)f(the)390 3221 y(initial)i(handshak)m(e)e(pro)s
20348
20354
(cedure.)51 b(This)34 b(should)g(b)s(e)f(used)h(with)g(care)h(and)f
20349
 
(only)h(when)e(there)i(is)390 5322 y(indication)c(or)g(kno)m(wledge)g
 
20355
(only)h(when)e(there)i(is)390 3330 y(indication)c(or)g(kno)m(wledge)g
20350
20356
(that)g(the)g(serv)m(er)f(can)h(obtain)g(the)f(clien)m(t's)i(k)m(ey)-8
20351
 
b(.)p eop end
20352
 
%%Page: 152 158
20353
 
TeXDict begin 152 157 bop 150 -116 a FB(Chapter)30 b(9:)41
20354
 
b(F)-8 b(unction)31 b(Reference)2237 b(152)150 299 y
20355
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(opr\014)p 785 299
20356
 
V 54 w(enable)p 1181 299 V 55 w(clien)m(t)3350 512 y
20357
 
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_oprfi_enable_clie)q(nt)
20358
 
e Fg(\()p Ff(gn)m(utls)p 2098 512 28 4 v 41 w(session)p
20359
 
2408 512 V 40 w(t)30 b Fe(session)12 b Ff(,)33 b(size)p
20360
 
3088 512 V 41 w(t)565 621 y Fe(len)12 b Ff(,)31 b(unsigned)e(c)m(har)i
20361
 
(*)g Fe(data)12 b Fg(\))390 731 y Ff(session)p FB(:)41
 
20357
b(.)150 3532 y Fv(gn)m(utls)p 483 3532 37 5 v 55 w(opr\014)p
 
20358
785 3532 V 54 w(enable)p 1181 3532 V 55 w(clien)m(t)3350
 
20359
3732 y FB([F)g(unction])-3599 b Fh(void)54 b(gnutls_oprfi_enable_clie)q
 
20360
(nt)e Fg(\()p Ff(gn)m(utls)p 2098 3732 28 4 v 41 w(session)p
 
20361
2408 3732 V 40 w(t)30 b Fe(session)12 b Ff(,)33 b(size)p
 
20362
3088 3732 V 41 w(t)565 3842 y Fe(len)12 b Ff(,)31 b(unsigned)e(c)m(har)
 
20363
i(*)g Fe(data)12 b Fg(\))390 3951 y Ff(session)p FB(:)41
20362
20364
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20363
 
882 y Ff(len)p FB(:)41 b(length)31 b(of)f(Opaque)g(PRF)g(data)h(to)h
20364
 
(use)e(in)g(clien)m(t.)390 1032 y Ff(data)p FB(:)41 b(Opaque)30
20365
 
b(PRF)h(data)g(to)g(use)f(in)g(clien)m(t.)390 1183 y(Request)42
 
20365
4088 y Ff(len)p FB(:)41 b(length)31 b(of)f(Opaque)g(PRF)g(data)h(to)h
 
20366
(use)e(in)g(clien)m(t.)390 4226 y Ff(data)p FB(:)41 b(Opaque)30
 
20367
b(PRF)h(data)g(to)g(use)f(in)g(clien)m(t.)390 4363 y(Request)42
20366
20368
b(that)h(the)f(clien)m(t)h(should)e(attempt)i(to)g(negotiate)h(the)e
20367
 
(Opaque)g(PRF)g(Input)e(TLS)390 1292 y(extension,)31
 
20369
(Opaque)g(PRF)g(Input)e(TLS)390 4472 y(extension,)31
20368
20370
b(using)f(the)h(giv)m(en)g(data)g(as)g(the)f(clien)m(t's)i(Opaque)e
20369
 
(PRF)h(input.)390 1443 y(The)i(data)h(is)f(copied)h(in)m(to)h(the)e
 
20371
(PRF)h(input.)390 4610 y(The)i(data)h(is)f(copied)h(in)m(to)h(the)e
20370
20372
(session)h(con)m(text)h(after)f(this)f(call,)j(so)e(y)m(ou)f(ma)m(y)h
20371
 
(de-allo)s(cate)i(it)390 1553 y(immediately)c(after)f(calling)g(this)g
20372
 
(function.)150 1768 y Fv(gn)m(utls)p 483 1768 37 5 v
20373
 
55 w(opr\014)p 785 1768 V 54 w(enable)p 1181 1768 V 55
20374
 
w(serv)m(er)3350 1981 y FB([F)-8 b(unction])-3599 b Fh(void)54
 
20373
(de-allo)s(cate)i(it)390 4719 y(immediately)c(after)f(calling)g(this)g
 
20374
(function.)150 4921 y Fv(gn)m(utls)p 483 4921 37 5 v
 
20375
55 w(opr\014)p 785 4921 V 54 w(enable)p 1181 4921 V 55
 
20376
w(serv)m(er)3350 5121 y FB([F)-8 b(unction])-3599 b Fh(void)54
20375
20377
b(gnutls_oprfi_enable_serv)q(er)e Fg(\()p Ff(gn)m(utls)p
20376
 
2098 1981 28 4 v 41 w(session)p 2408 1981 V 40 w(t)30
20377
 
b Fe(session)12 b Ff(,)565 2090 y(gn)m(utls)p 811 2090
20378
 
V 41 w(opr\014)p 1035 2090 V 39 w(callbac)m(k)p 1390
20379
 
2090 V 42 w(func)29 b Fe(cb)12 b Ff(,)31 b(v)m(oid)g(*)g
20380
 
Fe(userdata)12 b Fg(\))390 2200 y Ff(session)p FB(:)41
20381
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20382
 
2351 y Ff(cb)r FB(:)41 b(function)30 b(p)s(oin)m(ter)g(to)h(Opaque)f
20383
 
(PRF)g(extension)h(serv)m(er)g(callbac)m(k.)390 2501
20384
 
y Ff(userdata)p FB(:)41 b(ho)s(ok)30 b(passed)g(to)h(callbac)m(k)i
20385
 
(function)d(for)g(passing)g(application)i(state.)390
20386
 
2652 y(Request)27 b(that)h(the)f(serv)m(er)g(should)f(attempt)i(to)g
20387
 
(accept)g(the)f(Opaque)g(PRF)g(Input)e(TLS)h(exten-)390
20388
 
2761 y(sion.)57 b(If)35 b(the)h(clien)m(t)i(requests)d(the)h
20389
 
(extension,)i(the)e(pro)m(vided)g(callbac)m(k)i Ft(cb)d
20390
 
FB(will)h(b)s(e)f(in)m(v)m(ok)m(ed.)390 2871 y(The)30
20391
 
b(callbac)m(k)i(m)m(ust)f(ha)m(v)m(e)g(the)g(follo)m(wing)h(protot)m
20392
 
(yp)s(e:)390 3022 y(in)m(t)e(callbac)m(k)h(\(gn)m(utls)p
20393
 
1156 3022 V 41 w(session)p 1466 3022 V 40 w(t)f(session,)g(v)m(oid)g
20394
 
(*userdata,)g(size)p 2671 3022 V 41 w(t)g(opr\014)p 2960
20395
 
3022 V 39 w(len,)g(const)g(unsigned)390 3131 y(c)m(har)h(*in)p
20396
 
717 3131 V 40 w(opr\014,)f(unsigned)f(c)m(har)i(*out)p
20397
 
1750 3131 V 40 w(opr\014\);)390 3282 y(The)23 b(callbac)m(k)i(can)f
 
20378
2098 5121 28 4 v 41 w(session)p 2408 5121 V 40 w(t)30
 
20379
b Fe(session)12 b Ff(,)565 5230 y(gn)m(utls)p 811 5230
 
20380
V 41 w(opr\014)p 1035 5230 V 39 w(callbac)m(k)p 1390
 
20381
5230 V 42 w(func)29 b Fe(cb)12 b Ff(,)31 b(v)m(oid)g(*)g
 
20382
Fe(userdata)12 b Fg(\))390 5340 y Ff(session)p FB(:)41
 
20383
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)p
 
20384
eop end
 
20385
%%Page: 153 159
 
20386
TeXDict begin 153 158 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20387
b(F)-8 b(unction)31 b(Reference)2237 b(153)390 299 y
 
20388
Ff(cb)r FB(:)41 b(function)30 b(p)s(oin)m(ter)g(to)h(Opaque)f(PRF)g
 
20389
(extension)h(serv)m(er)g(callbac)m(k.)390 433 y Ff(userdata)p
 
20390
FB(:)41 b(ho)s(ok)30 b(passed)g(to)h(callbac)m(k)i(function)d(for)g
 
20391
(passing)g(application)i(state.)390 568 y(Request)27
 
20392
b(that)h(the)f(serv)m(er)g(should)f(attempt)i(to)g(accept)g(the)f
 
20393
(Opaque)g(PRF)g(Input)e(TLS)h(exten-)390 677 y(sion.)57
 
20394
b(If)35 b(the)h(clien)m(t)i(requests)d(the)h(extension,)i(the)e(pro)m
 
20395
(vided)g(callbac)m(k)i Ft(cb)d FB(will)h(b)s(e)f(in)m(v)m(ok)m(ed.)390
 
20396
787 y(The)30 b(callbac)m(k)i(m)m(ust)f(ha)m(v)m(e)g(the)g(follo)m(wing)
 
20397
h(protot)m(yp)s(e:)390 921 y(in)m(t)e(callbac)m(k)h(\(gn)m(utls)p
 
20398
1156 921 28 4 v 41 w(session)p 1466 921 V 40 w(t)f(session,)g(v)m(oid)g
 
20399
(*userdata,)g(size)p 2671 921 V 41 w(t)g(opr\014)p 2960
 
20400
921 V 39 w(len,)g(const)g(unsigned)390 1031 y(c)m(har)h(*in)p
 
20401
717 1031 V 40 w(opr\014,)f(unsigned)f(c)m(har)i(*out)p
 
20402
1750 1031 V 40 w(opr\014\);)390 1165 y(The)23 b(callbac)m(k)i(can)f
20398
20403
(insp)s(ect)f(the)g(clien)m(t-pro)m(vided)i(data)f(in)f(the)g(input)f
20399
 
(parameters,)k(and)c(sp)s(ecify)390 3391 y(its)30 b(o)m(wn)f(opaque)g
 
20404
(parameters,)k(and)c(sp)s(ecify)390 1275 y(its)30 b(o)m(wn)f(opaque)g
20400
20405
(prf)g(input)f(data)i(in)f(the)g(output)g(v)-5 b(ariable.)41
20401
 
b(The)29 b(function)g(m)m(ust)g(return)f(0)i(on)390 3501
 
20406
b(The)29 b(function)g(m)m(ust)g(return)f(0)i(on)390 1384
20402
20407
y(success,)h(otherwise)g(the)f(handshak)m(e)g(will)h(b)s(e)f(ab)s
20403
 
(orted.)150 3716 y Fv(gn)m(utls)p 483 3716 37 5 v 55
20404
 
w(p)s(em)p 767 3716 V 54 w(base64)p 1175 3716 V 55 w(deco)s(de)p
20405
 
1597 3716 V 55 w(allo)s(c)3350 3929 y FB([F)-8 b(unction])-3599
 
20408
(orted.)150 1583 y Fv(gn)m(utls)p 483 1583 37 5 v 55
 
20409
w(p)s(em)p 767 1583 V 54 w(base64)p 1175 1583 V 55 w(deco)s(de)p
 
20410
1597 1583 V 55 w(allo)s(c)3350 1780 y FB([F)-8 b(unction])-3599
20406
20411
b Fh(int)53 b(gnutls_pem_base64_dec)q(ode_)q(all)q(oc)f
20407
20412
Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(header)12 b Ff(,)31
20408
 
b(const)565 4039 y(gn)m(utls)p 811 4039 28 4 v 41 w(datum)p
20409
 
1110 4039 V 39 w(t)g(*)g Fe(b64_data)12 b Ff(,)32 b(gn)m(utls)p
20410
 
2016 4039 V 40 w(datum)p 2314 4039 V 40 w(t)f(*)f Fe(result)12
20411
 
b Fg(\))390 4149 y Ff(header)7 b FB(:)40 b(The)30 b(PEM)g(header)g
20412
 
(\(eg.)42 b(CER)-8 b(TIFICA)g(TE\))390 4299 y Ff(b64)p
20413
 
537 4299 V 40 w(data)p FB(:)42 b(con)m(tains)31 b(the)g(enco)s(ded)f
20414
 
(data)390 4450 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s
20415
 
(ded)h(data)h(lie)390 4600 y(This)23 b(function)g(will)h(deco)s(de)f
 
20413
b(const)565 1890 y(gn)m(utls)p 811 1890 28 4 v 41 w(datum)p
 
20414
1110 1890 V 39 w(t)g(*)g Fe(b64_data)12 b Ff(,)32 b(gn)m(utls)p
 
20415
2016 1890 V 40 w(datum)p 2314 1890 V 40 w(t)f(*)f Fe(result)12
 
20416
b Fg(\))390 1999 y Ff(header)7 b FB(:)40 b(The)30 b(PEM)g(header)g
 
20417
(\(eg.)42 b(CER)-8 b(TIFICA)g(TE\))390 2134 y Ff(b64)p
 
20418
537 2134 V 40 w(data)p FB(:)42 b(con)m(tains)31 b(the)g(enco)s(ded)f
 
20419
(data)390 2268 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s
 
20420
(ded)h(data)h(lie)390 2402 y(This)23 b(function)g(will)h(deco)s(de)f
20416
20421
(the)h(giv)m(en)g(enco)s(ded)g(data.)39 b(The)23 b(deco)s(ded)g(data)h
20417
 
(will)g(b)s(e)f(allo)s(cated,)390 4710 y(and)37 b(stored)h(in)m(to)g
 
20422
(will)g(b)s(e)f(allo)s(cated,)390 2512 y(and)37 b(stored)h(in)m(to)g
20418
20423
(result.)62 b(If)37 b(the)h(header)f(giv)m(en)i(is)e(non)g(n)m(ull)h
20419
 
(this)f(function)g(will)h(searc)m(h)g(for)390 4820 y
 
20424
(this)f(function)g(will)h(searc)m(h)g(for)390 2622 y
20420
20425
Ft(")p FB(|{BEGIN)h(header)p Ft(")f FB(and)g(deco)s(de)g(only)h(this)f
20421
20426
(part.)65 b(Otherwise)38 b(it)h(will)g(deco)s(de)f(the)h(\014rst)390
20422
 
4929 y(PEM)30 b(pac)m(k)m(et)j(found.)390 5080 y(Y)-8
 
20427
2731 y(PEM)30 b(pac)m(k)m(et)j(found.)390 2866 y(Y)-8
20423
20428
b(ou)31 b(should)e(use)h Ft(gnutls_free\(\))d FB(to)k(free)g(the)f
20424
 
(returned)f(data.)390 5230 y Fn(Returns:)46 b FB(On)32
 
20429
(returned)f(data.)390 3000 y Fn(Returns:)46 b FB(On)32
20425
20430
b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34 b(is)f(returned,)g
20426
 
(otherwise)h(an)f(error)g(co)s(de)g(is)390 5340 y(returned.)p
20427
 
eop end
20428
 
%%Page: 153 159
20429
 
TeXDict begin 153 158 bop 150 -116 a FB(Chapter)30 b(9:)41
20430
 
b(F)-8 b(unction)31 b(Reference)2237 b(153)150 299 y
20431
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(p)s(em)p 767 299 V
20432
 
54 w(base64)p 1175 299 V 55 w(deco)s(de)3350 507 y FB([F)-8
20433
 
b(unction])-3599 b Fh(int)53 b(gnutls_pem_base64_dec)q(ode)f
20434
 
Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(header)12 b Ff(,)32
20435
 
b(const)565 617 y(gn)m(utls)p 811 617 28 4 v 41 w(datum)p
20436
 
1110 617 V 39 w(t)f(*)f Fe(b64_data)12 b Ff(,)33 b(unsigned)c(c)m(har)h
20437
 
(*)h Fe(result)12 b Ff(,)32 b(size)p 2952 617 V 41 w(t)e(*)h
20438
 
Fe(result_size)12 b Fg(\))390 726 y Ff(header)7 b FB(:)40
20439
 
b(A)31 b(n)m(ull)f(terminated)h(string)f(with)g(the)h(PEM)f(header)g
20440
 
(\(eg.)42 b(CER)-8 b(TIFICA)g(TE\))390 872 y Ff(b64)p
20441
 
537 872 V 40 w(data)p FB(:)42 b(con)m(tain)32 b(the)e(enco)s(ded)g
20442
 
(data)390 1018 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s
20443
 
(ded)h(data)h(will)g(b)s(e)f(copied)390 1164 y Ff(result)p
20444
 
619 1164 V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
20445
 
(result)390 1310 y(This)d(function)h(will)g(deco)s(de)g(the)g(giv)m(en)
 
20431
(otherwise)h(an)f(error)g(co)s(de)g(is)390 3110 y(returned.)150
 
20432
3309 y Fv(gn)m(utls)p 483 3309 37 5 v 55 w(p)s(em)p 767
 
20433
3309 V 54 w(base64)p 1175 3309 V 55 w(deco)s(de)3350
 
20434
3505 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pem_base64_dec)q
 
20435
(ode)f Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(header)12
 
20436
b Ff(,)32 b(const)565 3615 y(gn)m(utls)p 811 3615 28
 
20437
4 v 41 w(datum)p 1110 3615 V 39 w(t)f(*)f Fe(b64_data)12
 
20438
b Ff(,)33 b(unsigned)c(c)m(har)h(*)h Fe(result)12 b Ff(,)32
 
20439
b(size)p 2952 3615 V 41 w(t)e(*)h Fe(result_size)12 b
 
20440
Fg(\))390 3724 y Ff(header)7 b FB(:)40 b(A)31 b(n)m(ull)f(terminated)h
 
20441
(string)f(with)g(the)h(PEM)f(header)g(\(eg.)42 b(CER)-8
 
20442
b(TIFICA)g(TE\))390 3859 y Ff(b64)p 537 3859 V 40 w(data)p
 
20443
FB(:)42 b(con)m(tain)32 b(the)e(enco)s(ded)g(data)390
 
20444
3993 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s(ded)h
 
20445
(data)h(will)g(b)s(e)f(copied)390 4128 y Ff(result)p
 
20446
619 4128 V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
 
20447
(result)390 4262 y(This)d(function)h(will)g(deco)s(de)g(the)g(giv)m(en)
20446
20448
h(enco)s(ded)e(data.)41 b(If)27 b(the)h(header)g(giv)m(en)h(is)f(non)f
20447
 
(n)m(ull)h(this)390 1419 y(function)h(will)g(searc)m(h)h(for)f
 
20449
(n)m(ull)h(this)390 4372 y(function)h(will)g(searc)m(h)h(for)f
20448
20450
Ft(")p FB(|{BEGIN)h(header)p Ft(")e FB(and)h(deco)s(de)g(only)g(this)g
20449
 
(part.)41 b(Otherwise)28 b(it)390 1529 y(will)j(deco)s(de)f(the)h
20450
 
(\014rst)e(PEM)i(pac)m(k)m(et)h(found.)390 1675 y Fn(Returns:)49
 
20451
(part.)41 b(Otherwise)28 b(it)390 4481 y(will)j(deco)s(de)f(the)h
 
20452
(\014rst)e(PEM)i(pac)m(k)m(et)h(found.)390 4616 y Fn(Returns:)49
20451
20453
b FB(On)33 b(success)i Ft(GNUTLS_E_SUCCESS)30 b FB(\(0\))36
20452
 
b(is)e(returned,)h Ft(GNUTLS_E_SHORT_MEMORY_)390 1784
 
20454
b(is)e(returned,)h Ft(GNUTLS_E_SHORT_MEMORY_)390 4725
20453
20455
y(BUFFER)29 b FB(is)h(returned)f(if)i(the)f(bu\013er)g(giv)m(en)h(is)f
20454
 
(not)h(long)g(enough,)f(or)h(0)f(on)h(success.)150 1995
20455
 
y Fv(gn)m(utls)p 483 1995 37 5 v 55 w(p)s(em)p 767 1995
20456
 
V 54 w(base64)p 1175 1995 V 55 w(enco)s(de)p 1597 1995
20457
 
V 55 w(allo)s(c)3350 2203 y FB([F)-8 b(unction])-3599
 
20456
(not)h(long)g(enough,)f(or)h(0)f(on)h(success.)150 4924
 
20457
y Fv(gn)m(utls)p 483 4924 37 5 v 55 w(p)s(em)p 767 4924
 
20458
V 54 w(base64)p 1175 4924 V 55 w(enco)s(de)p 1597 4924
 
20459
V 55 w(allo)s(c)3350 5121 y FB([F)-8 b(unction])-3599
20458
20460
b Fh(int)53 b(gnutls_pem_base64_enc)q(ode_)q(all)q(oc)f
20459
20461
Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(msg)12 b Ff(,)31
20460
 
b(const)565 2313 y(gn)m(utls)p 811 2313 28 4 v 41 w(datum)p
20461
 
1110 2313 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p
20462
 
1807 2313 V 40 w(datum)p 2105 2313 V 40 w(t)f(*)h Fe(result)12
20463
 
b Fg(\))390 2422 y Ff(msg)c FB(:)41 b(is)30 b(a)h(message)g(to)g(b)s(e)
20464
 
f(put)g(in)g(the)g(enco)s(ded)g(header)390 2568 y Ff(data)p
20465
 
FB(:)41 b(con)m(tains)32 b(the)f(ra)m(w)f(data)390 2714
20466
 
y Ff(result)r FB(:)41 b(will)30 b(hold)g(the)h(newly)f(allo)s(cated)i
20467
 
(enco)s(ded)e(data)390 2860 y(This)22 b(function)h(will)h(con)m(v)m
20468
 
(ert)h(the)e(giv)m(en)h(data)g(to)g(prin)m(table)g(data,)h(using)e(the)
20469
 
g(base64)i(enco)s(ding.)390 2969 y(This)k(is)i(the)f(enco)s(ding)g
 
20462
b(const)565 5230 y(gn)m(utls)p 811 5230 28 4 v 41 w(datum)p
 
20463
1110 5230 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p
 
20464
1807 5230 V 40 w(datum)p 2105 5230 V 40 w(t)f(*)h Fe(result)12
 
20465
b Fg(\))390 5340 y Ff(msg)c FB(:)41 b(is)30 b(a)h(message)g(to)g(b)s(e)
 
20466
f(put)g(in)g(the)g(enco)s(ded)g(header)p eop end
 
20467
%%Page: 154 160
 
20468
TeXDict begin 154 159 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20469
b(F)-8 b(unction)31 b(Reference)2237 b(154)390 299 y
 
20470
Ff(data)p FB(:)41 b(con)m(tains)32 b(the)f(ra)m(w)f(data)390
 
20471
442 y Ff(result)r FB(:)41 b(will)30 b(hold)g(the)h(newly)f(allo)s
 
20472
(cated)i(enco)s(ded)e(data)390 584 y(This)22 b(function)h(will)h(con)m
 
20473
(v)m(ert)h(the)e(giv)m(en)h(data)g(to)g(prin)m(table)g(data,)h(using)e
 
20474
(the)g(base64)i(enco)s(ding.)390 694 y(This)k(is)i(the)f(enco)s(ding)g
20470
20475
(used)f(in)h(PEM)g(messages.)42 b(This)29 b(function)h(will)h(allo)s
20471
 
(cate)h(the)f(required)390 3079 y(memory)f(to)h(hold)f(the)h(enco)s
20472
 
(ded)f(data.)390 3225 y(Y)-8 b(ou)31 b(should)e(use)h
20473
 
Ft(gnutls_free\(\))d FB(to)k(free)g(the)f(returned)f(data.)390
20474
 
3371 y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
20475
 
b FB(\(0\))34 b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)
20476
 
390 3480 y(returned.)150 3691 y Fv(gn)m(utls)p 483 3691
20477
 
37 5 v 55 w(p)s(em)p 767 3691 V 54 w(base64)p 1175 3691
20478
 
V 55 w(enco)s(de)3350 3899 y FB([F)-8 b(unction])-3599
 
20476
(cate)h(the)f(required)390 804 y(memory)f(to)h(hold)f(the)h(enco)s(ded)
 
20477
f(data.)390 946 y(Y)-8 b(ou)31 b(should)e(use)h Ft(gnutls_free\(\))d
 
20478
FB(to)k(free)g(the)f(returned)f(data.)390 1089 y Fn(Returns:)46
 
20479
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
 
20480
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
 
20481
1199 y(returned.)150 1406 y Fv(gn)m(utls)p 483 1406 37
 
20482
5 v 55 w(p)s(em)p 767 1406 V 54 w(base64)p 1175 1406
 
20483
V 55 w(enco)s(de)3350 1611 y FB([F)-8 b(unction])-3599
20479
20484
b Fh(int)53 b(gnutls_pem_base64_enc)q(ode)f Fg(\()p Ff(const)31
20480
 
b(c)m(har)g(*)g Fe(msg)12 b Ff(,)31 b(const)565 4009
20481
 
y(gn)m(utls)p 811 4009 28 4 v 41 w(datum)p 1110 4009
 
20485
b(c)m(har)g(*)g Fe(msg)12 b Ff(,)31 b(const)565 1721
 
20486
y(gn)m(utls)p 811 1721 28 4 v 41 w(datum)p 1110 1721
20482
20487
V 39 w(t)g(*)g Fe(data)12 b Ff(,)31 b(c)m(har)g(*)f Fe(result)12
20483
 
b Ff(,)32 b(size)p 2364 4009 V 41 w(t)f(*)g Fe(result_size)12
20484
 
b Fg(\))390 4118 y Ff(msg)c FB(:)41 b(is)30 b(a)h(message)g(to)g(b)s(e)
20485
 
f(put)g(in)g(the)g(header)390 4264 y Ff(data)p FB(:)41
20486
 
b(con)m(tain)32 b(the)f(ra)m(w)f(data)390 4410 y Ff(result)r
 
20488
b Ff(,)32 b(size)p 2364 1721 V 41 w(t)f(*)g Fe(result_size)12
 
20489
b Fg(\))390 1831 y Ff(msg)c FB(:)41 b(is)30 b(a)h(message)g(to)g(b)s(e)
 
20490
f(put)g(in)g(the)g(header)390 1973 y Ff(data)p FB(:)41
 
20491
b(con)m(tain)32 b(the)f(ra)m(w)f(data)390 2116 y Ff(result)r
20487
20492
FB(:)41 b(the)30 b(place)i(where)d(base64)j(data)f(will)g(b)s(e)e
20488
 
(copied)390 4556 y Ff(result)p 619 4556 V 40 w(size)5
 
20493
(copied)390 2259 y Ff(result)p 619 2259 V 40 w(size)5
20489
20494
b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f(result)390
20490
 
4702 y(This)22 b(function)h(will)h(con)m(v)m(ert)h(the)e(giv)m(en)h
 
20495
2402 y(This)22 b(function)h(will)h(con)m(v)m(ert)h(the)e(giv)m(en)h
20491
20496
(data)g(to)g(prin)m(table)g(data,)h(using)e(the)g(base64)i(enco)s
20492
 
(ding.)390 4811 y(This)30 b(is)g(the)h(enco)s(ding)f(used)f(in)i(PEM)f
20493
 
(messages.)390 4957 y(The)43 b(output)g(string)g(will)h(b)s(e)e(n)m
 
20497
(ding.)390 2511 y(This)30 b(is)g(the)h(enco)s(ding)f(used)f(in)i(PEM)f
 
20498
(messages.)390 2654 y(The)43 b(output)g(string)g(will)h(b)s(e)e(n)m
20494
20499
(ull)i(terminated,)j(although)d(the)f(size)h(will)g(not)g(include)f
20495
 
(the)390 5067 y(terminating)31 b(n)m(ull.)390 5213 y
 
20500
(the)390 2764 y(terminating)31 b(n)m(ull.)390 2907 y
20496
20501
Fn(Returns:)49 b FB(On)33 b(success)i Ft(GNUTLS_E_SUCCESS)30
20497
20502
b FB(\(0\))36 b(is)e(returned,)h Ft(GNUTLS_E_SHORT_MEMORY_)390
20498
 
5322 y(BUFFER)29 b FB(is)h(returned)f(if)i(the)f(bu\013er)g(giv)m(en)h
20499
 
(is)f(not)h(long)g(enough,)f(or)h(0)f(on)h(success.)p
20500
 
eop end
20501
 
%%Page: 154 160
20502
 
TeXDict begin 154 159 bop 150 -116 a FB(Chapter)30 b(9:)41
20503
 
b(F)-8 b(unction)31 b(Reference)2237 b(154)150 299 y
20504
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(p)s(error)3350 508
20505
 
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_perror)49
20506
 
b Fg(\()p Ff(in)m(t)31 b Fe(error)12 b Fg(\))390 618
 
20503
3016 y(BUFFER)29 b FB(is)h(returned)f(if)i(the)f(bu\013er)g(giv)m(en)h
 
20504
(is)f(not)h(long)g(enough,)f(or)h(0)f(on)h(success.)150
 
20505
3224 y Fv(gn)m(utls)p 483 3224 37 5 v 55 w(p)s(error)3350
 
20506
3429 y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_perror)49
 
20507
b Fg(\()p Ff(in)m(t)31 b Fe(error)12 b Fg(\))390 3538
20507
20508
y Ff(error)7 b FB(:)40 b(is)30 b(a)h(Gn)m(uTLS)e(error)h(co)s(de,)h(a)g
20508
 
(negativ)m(e)h(v)-5 b(alue)390 764 y(This)26 b(function)g(is)h(lik)m(e)
20509
 
h Ft(perror\(\))p FB(.)37 b(The)26 b(only)h(di\013erence)g(is)f(that)i
20510
 
(it)f(accepts)h(an)e(error)g(n)m(um)m(b)s(er)390 874
20511
 
y(returned)j(b)m(y)h(a)h(gn)m(utls)g(function.)150 1086
20512
 
y Fv(gn)m(utls)p 483 1086 V 55 w(pk)p 671 1086 V 54 w(algorithm)p
20513
 
1243 1086 V 54 w(get)p 1462 1086 V 54 w(name)3350 1295
20514
 
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
20515
 
(gnutls_pk_algorithm_ge)q(t_n)q(ame)565 1404 y Fg(\()p
20516
 
Ff(gn)m(utls)p 846 1404 28 4 v 41 w(pk)p 986 1404 V 39
20517
 
w(algorithm)p 1408 1404 V 41 w(t)31 b Fe(algorithm)12
20518
 
b Fg(\))390 1514 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(pk)f(algorithm)
20519
 
390 1661 y(Con)m(v)m(ert)h(a)g Ft(gnutls_pk_algorithm_t)25
20520
 
b FB(v)-5 b(alue)30 b(to)h(a)g(string.)390 1807 y Fn(Returns:)55
 
20509
(negativ)m(e)h(v)-5 b(alue)390 3681 y(This)26 b(function)g(is)h(lik)m
 
20510
(e)h Ft(perror\(\))p FB(.)37 b(The)26 b(only)h(di\013erence)g(is)f
 
20511
(that)i(it)f(accepts)h(an)e(error)g(n)m(um)m(b)s(er)390
 
20512
3791 y(returned)j(b)m(y)h(a)h(gn)m(utls)g(function.)150
 
20513
3998 y Fv(gn)m(utls)p 483 3998 V 55 w(pk)p 671 3998 V
 
20514
54 w(algorithm)p 1243 3998 V 54 w(get)p 1462 3998 V 54
 
20515
w(name)3350 4203 y FB([F)-8 b(unction])-3599 b Fh(const)54
 
20516
b(char)f(*)g(gnutls_pk_algorithm_ge)q(t_n)q(ame)565 4313
 
20517
y Fg(\()p Ff(gn)m(utls)p 846 4313 28 4 v 41 w(pk)p 986
 
20518
4313 V 39 w(algorithm)p 1408 4313 V 41 w(t)31 b Fe(algorithm)12
 
20519
b Fg(\))390 4423 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(pk)f(algorithm)
 
20520
390 4565 y(Con)m(v)m(ert)h(a)g Ft(gnutls_pk_algorithm_t)25
 
20521
b FB(v)-5 b(alue)30 b(to)h(a)g(string.)390 4708 y Fn(Returns:)55
20521
20522
b FB(a)37 b(string)h(that)g(con)m(tains)g(the)g(name)g(of)f(the)h(sp)s
20522
 
(eci\014ed)e(public)h(k)m(ey)h(algorithm,)j(or)390 1917
20523
 
y Ft(NULL)p FB(.)150 2129 y Fv(gn)m(utls)p 483 2129 37
20524
 
5 v 55 w(pk)p 671 2129 V 54 w(get)p 890 2129 V 54 w(id)3350
20525
 
2338 y FB([F)-8 b(unction])-3599 b Fh(gnutls_pk_algorithm_t)59
 
20523
(eci\014ed)e(public)h(k)m(ey)h(algorithm,)j(or)390 4818
 
20524
y Ft(NULL)p FB(.)150 5025 y Fv(gn)m(utls)p 483 5025 37
 
20525
5 v 55 w(pk)p 671 5025 V 54 w(get)p 890 5025 V 54 w(id)3350
 
20526
5230 y FB([F)-8 b(unction])-3599 b Fh(gnutls_pk_algorithm_t)59
20526
20527
b(gnutls_pk_get_id)50 b Fg(\()p Ff(const)31 b(c)m(har)g(*)g
20527
 
Fe(name)12 b Fg(\))390 2447 y Ff(name)5 b FB(:)41 b(is)30
 
20528
Fe(name)12 b Fg(\))390 5340 y Ff(name)5 b FB(:)41 b(is)30
20528
20529
b(a)h(string)f(con)m(taining)i(a)f(public)f(k)m(ey)h(algorithm)g(name.)
20529
 
390 2594 y(Con)m(v)m(ert)h(a)f(string)g(to)g(a)h Ft
20530
 
(gnutls_pk_algorithm_t)25 b FB(v)-5 b(alue.)43 b(The)30
20531
 
b(names)h(are)g(compared)g(in)g(a)390 2704 y(case)h(insensitiv)m(e)g(w)
20532
 
m(a)m(y)-8 b(.)44 b(F)-8 b(or)31 b(example,)h(gn)m(utls)p
20533
 
2029 2704 28 4 v 41 w(pk)p 2169 2704 V 39 w(get)p 2328
20534
 
2704 V 41 w(id\()p Ft(")p FB(RSA)p Ft(")p FB(\))f(will)g(return)f
20535
 
Ft(GNUTLS_PK_)390 2813 y(RSA)p FB(.)390 2960 y Fn(Returns:)44
20536
 
b FB(an)32 b Ft(gnutls_pk_algorithm_tid)26 b FB(of)32
20537
 
b(the)h(sp)s(eci\014ed)e(in)h(a)g(string)h(public)e(k)m(ey)i(algo-)390
20538
 
3070 y(rithm,)d(or)g Ft(GNUTLS_PK_UNKNOWN)c FB(on)k(failures.)390
20539
 
3217 y Fn(Since:)41 b FB(2.6.0)150 3428 y Fv(gn)m(utls)p
20540
 
483 3428 37 5 v 55 w(pk)p 671 3428 V 54 w(get)p 890 3428
20541
 
V 54 w(name)3350 3637 y FB([F)-8 b(unction])-3599 b Fh(const)54
20542
 
b(char)f(*)g(gnutls_pk_get_name)e Fg(\()p Ff(gn)m(utls)p
20543
 
2098 3637 28 4 v 41 w(pk)p 2238 3637 V 39 w(algorithm)p
20544
 
2660 3637 V 41 w(t)565 3747 y Fe(algorithm)12 b Fg(\))390
20545
 
3856 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(public)f(k)m(ey)h
20546
 
(algorithm)390 4003 y(Con)m(v)m(ert)g(a)g Ft(gnutls_pk_algorithm_t)25
20547
 
b FB(v)-5 b(alue)30 b(to)h(a)g(string.)390 4150 y Fn(Returns:)61
 
20530
p eop end
 
20531
%%Page: 155 161
 
20532
TeXDict begin 155 160 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20533
b(F)-8 b(unction)31 b(Reference)2237 b(155)390 299 y(Con)m(v)m(ert)32
 
20534
b(a)f(string)g(to)g(a)h Ft(gnutls_pk_algorithm_t)25 b
 
20535
FB(v)-5 b(alue.)43 b(The)30 b(names)h(are)g(compared)g(in)g(a)390
 
20536
408 y(case)h(insensitiv)m(e)g(w)m(a)m(y)-8 b(.)44 b(F)-8
 
20537
b(or)31 b(example,)h(gn)m(utls)p 2029 408 28 4 v 41 w(pk)p
 
20538
2169 408 V 39 w(get)p 2328 408 V 41 w(id\()p Ft(")p FB(RSA)p
 
20539
Ft(")p FB(\))f(will)g(return)f Ft(GNUTLS_PK_)390 518
 
20540
y(RSA)p FB(.)390 651 y Fn(Returns:)44 b FB(an)32 b Ft
 
20541
(gnutls_pk_algorithm_tid)26 b FB(of)32 b(the)h(sp)s(eci\014ed)e(in)h(a)
 
20542
g(string)h(public)e(k)m(ey)i(algo-)390 760 y(rithm,)d(or)g
 
20543
Ft(GNUTLS_PK_UNKNOWN)c FB(on)k(failures.)390 893 y Fn(Since:)41
 
20544
b FB(2.6.0)150 1088 y Fv(gn)m(utls)p 483 1088 37 5 v
 
20545
55 w(pk)p 671 1088 V 54 w(get)p 890 1088 V 54 w(name)3350
 
20546
1281 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
20547
(gnutls_pk_get_name)e Fg(\()p Ff(gn)m(utls)p 2098 1281
 
20548
28 4 v 41 w(pk)p 2238 1281 V 39 w(algorithm)p 2660 1281
 
20549
V 41 w(t)565 1391 y Fe(algorithm)12 b Fg(\))390 1501
 
20550
y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(public)f(k)m(ey)h(algorithm)390
 
20551
1633 y(Con)m(v)m(ert)g(a)g Ft(gnutls_pk_algorithm_t)25
 
20552
b FB(v)-5 b(alue)30 b(to)h(a)g(string.)390 1766 y Fn(Returns:)61
20548
20553
b FB(a)40 b(p)s(oin)m(ter)h(to)g(a)g(string)f(that)h(con)m(tains)h(the)
20549
20554
f(name)f(of)h(the)g(sp)s(eci\014ed)e(public)h(k)m(ey)390
20550
 
4260 y(algorithm,)32 b(or)e Ft(NULL)p FB(.)390 4406 y
20551
 
Fn(Since:)41 b FB(2.6.0)150 4618 y Fv(gn)m(utls)p 483
20552
 
4618 37 5 v 55 w(pk)p 671 4618 V 54 w(list)3350 4827
 
20555
1875 y(algorithm,)32 b(or)e Ft(NULL)p FB(.)390 2008 y
 
20556
Fn(Since:)41 b FB(2.6.0)150 2204 y Fv(gn)m(utls)p 483
 
20557
2204 37 5 v 55 w(pk)p 671 2204 V 54 w(list)3350 2397
20553
20558
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(gnutls_pk_algorithm_t)k(*)
20554
20559
53 b(gnutls_pk_list)d Fg(\()30 b Fe(void)12 b Fg(\))390
20555
 
4937 y FB(Get)31 b(a)g(list)g(of)g(supp)s(orted)d(public)i(k)m(ey)h
20556
 
(algorithms.)390 5084 y Fn(Returns:)55 b FB(a)37 b(zero-terminated)i
 
20560
2506 y FB(Get)31 b(a)g(list)g(of)g(supp)s(orted)d(public)i(k)m(ey)h
 
20561
(algorithms.)390 2639 y Fn(Returns:)55 b FB(a)37 b(zero-terminated)i
20557
20562
(list)g(of)e Ft(gnutls_pk_algorithm_t)32 b FB(in)m(tegers)38
20558
 
b(indicating)h(the)390 5193 y(a)m(v)-5 b(ailable)33 b(ciphers.)390
20559
 
5340 y Fn(Since:)41 b FB(2.6.0)p eop end
20560
 
%%Page: 155 161
20561
 
TeXDict begin 155 160 bop 150 -116 a FB(Chapter)30 b(9:)41
20562
 
b(F)-8 b(unction)31 b(Reference)2237 b(155)150 299 y
20563
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(prf)p 693 299 V 54
20564
 
w(ra)m(w)3350 497 y FB([F)-8 b(unction])-3599 b Fh(int)53
20565
 
b(gnutls_prf_raw)d Fg(\()p Ff(gn)m(utls)p 1418 497 28
20566
 
4 v 41 w(session)p 1728 497 V 40 w(t)31 b Fe(session)12
20567
 
b Ff(,)32 b(size)p 2408 497 V 41 w(t)e Fe(label_size)12
20568
 
b Ff(,)565 607 y(const)31 b(c)m(har)g(*)f Fe(label)12
20569
 
b Ff(,)32 b(size)p 1554 607 V 41 w(t)f Fe(seed_size)12
20570
 
b Ff(,)32 b(const)f(c)m(har)g(*)g Fe(seed)12 b Ff(,)31
20571
 
b(size)p 3129 607 V 41 w(t)g Fe(outsize)12 b Ff(,)565
20572
 
716 y(c)m(har)31 b(*)g Fe(out)12 b Fg(\))390 826 y Ff(session)p
20573
 
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20574
 
962 y Ff(lab)s(el)p 585 962 V 40 w(size)5 b FB(:)42 b(length)31
20575
 
b(of)f(the)h Ft(label)e FB(v)-5 b(ariable.)390 1097 y
20576
 
Ff(lab)s(el)t FB(:)41 b(lab)s(el)30 b(used)g(in)g(PRF)g(computation,)i
20577
 
(t)m(ypically)g(a)f(short)f(string.)390 1233 y Ff(seed)p
20578
 
563 1233 V 40 w(size)5 b FB(:)42 b(length)31 b(of)f(the)h
20579
 
Ft(seed)e FB(v)-5 b(ariable.)390 1369 y Ff(seed)t FB(:)40
20580
 
b(optional)32 b(extra)f(data)g(to)g(seed)g(the)f(PRF)h(with.)390
20581
 
1505 y Ff(outsize)5 b FB(:)42 b(size)31 b(of)g(pre-allo)s(cated)h
20582
 
(output)e(bu\013er)f(to)i(hold)f(the)h(output.)390 1641
20583
 
y Ff(out)r FB(:)41 b(pre-allo)s(cate)33 b(bu\013er)c(to)i(hold)f(the)h
20584
 
(generated)g(data.)390 1777 y(Apply)40 b(the)h(TLS)f(Pseudo-Random-F)-8
20585
 
b(unction)41 b(\(PRF\))g(using)f(the)h(master)g(secret)h(on)f(some)390
20586
 
1886 y(data.)390 2022 y(The)34 b Ft(label)e FB(v)-5 b(ariable)35
 
20563
b(indicating)h(the)390 2748 y(a)m(v)-5 b(ailable)33 b(ciphers.)390
 
20564
2881 y Fn(Since:)41 b FB(2.6.0)150 3077 y Fv(gn)m(utls)p
 
20565
483 3077 V 55 w(prf)p 693 3077 V 54 w(ra)m(w)3350 3270
 
20566
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_prf_raw)d
 
20567
Fg(\()p Ff(gn)m(utls)p 1418 3270 28 4 v 41 w(session)p
 
20568
1728 3270 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(size)p
 
20569
2408 3270 V 41 w(t)e Fe(label_size)12 b Ff(,)565 3379
 
20570
y(const)31 b(c)m(har)g(*)f Fe(label)12 b Ff(,)32 b(size)p
 
20571
1554 3379 V 41 w(t)f Fe(seed_size)12 b Ff(,)32 b(const)f(c)m(har)g(*)g
 
20572
Fe(seed)12 b Ff(,)31 b(size)p 3129 3379 V 41 w(t)g Fe(outsize)12
 
20573
b Ff(,)565 3489 y(c)m(har)31 b(*)g Fe(out)12 b Fg(\))390
 
20574
3598 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
20575
b FB(structure.)390 3731 y Ff(lab)s(el)p 585 3731 V 40
 
20576
w(size)5 b FB(:)42 b(length)31 b(of)f(the)h Ft(label)e
 
20577
FB(v)-5 b(ariable.)390 3864 y Ff(lab)s(el)t FB(:)41 b(lab)s(el)30
 
20578
b(used)g(in)g(PRF)g(computation,)i(t)m(ypically)g(a)f(short)f(string.)
 
20579
390 3996 y Ff(seed)p 563 3996 V 40 w(size)5 b FB(:)42
 
20580
b(length)31 b(of)f(the)h Ft(seed)e FB(v)-5 b(ariable.)390
 
20581
4129 y Ff(seed)t FB(:)40 b(optional)32 b(extra)f(data)g(to)g(seed)g
 
20582
(the)f(PRF)h(with.)390 4262 y Ff(outsize)5 b FB(:)42
 
20583
b(size)31 b(of)g(pre-allo)s(cated)h(output)e(bu\013er)f(to)i(hold)f
 
20584
(the)h(output.)390 4394 y Ff(out)r FB(:)41 b(pre-allo)s(cate)33
 
20585
b(bu\013er)c(to)i(hold)f(the)h(generated)g(data.)390
 
20586
4527 y(Apply)40 b(the)h(TLS)f(Pseudo-Random-F)-8 b(unction)41
 
20587
b(\(PRF\))g(using)f(the)h(master)g(secret)h(on)f(some)390
 
20588
4636 y(data.)390 4769 y(The)34 b Ft(label)e FB(v)-5 b(ariable)35
20587
20589
b(usually)f(con)m(tain)i(a)e(string)g(denoting)h(the)f(purp)s(ose)f
20588
 
(for)h(the)g(generated)390 2132 y(data.)50 b(The)32 b
 
20590
(for)h(the)g(generated)390 4879 y(data.)50 b(The)32 b
20589
20591
Ft(seed)g FB(usually)h(con)m(tain)i(data)e(suc)m(h)g(as)g(the)h(clien)m
20590
 
(t)g(and)f(serv)m(er)g(random,)h(p)s(erhaps)390 2241
 
20592
(t)g(and)f(serv)m(er)g(random,)h(p)s(erhaps)390 4988
20591
20593
y(together)45 b(with)e(some)h(additional)h(data)f(that)g(is)g(added)e
20592
 
(to)j(guaran)m(tee)g(uniqueness)d(of)i(the)390 2351 y(output)30
20593
 
b(for)g(a)h(particular)g(purp)s(ose.)390 2487 y(Because)26
 
20594
(to)j(guaran)m(tee)g(uniqueness)d(of)i(the)390 5098 y(output)30
 
20595
b(for)g(a)h(particular)g(purp)s(ose.)390 5230 y(Because)26
20594
20596
b(the)e(output)g(is)g(not)g(guaran)m(teed)i(to)e(b)s(e)g(unique)f(for)h
20595
 
(a)h(particular)f(session)h(unless)e Ft(seed)390 2596
 
20597
(a)h(particular)f(session)h(unless)e Ft(seed)390 5340
20596
20598
y FB(include)28 b(the)h(clien)m(t)h(random)e(and)g(serv)m(er)h(random)f
20597
 
(\014elds)g(\(the)h(PRF)g(w)m(ould)f(output)h(the)g(same)390
20598
 
2706 y(data)38 b(on)f(another)h(connection)g(resumed)f(from)f(the)i
20599
 
(\014rst)e(one\),)k(it)e(is)g(not)f(recommended)g(to)390
20600
 
2816 y(use)31 b(this)g(function)g(directly)-8 b(.)45
20601
 
b(The)31 b Ft(gnutls_prf\(\))d FB(function)j(seed)h(the)f(PRF)h(with)f
20602
 
(the)g(clien)m(t)390 2925 y(and)25 b(serv)m(er)g(random)g(\014elds)f
20603
 
(directly)-8 b(,)28 b(and)d(is)g(recommended)g(if)g(y)m(ou)h(w)m(an)m
20604
 
(t)g(to)g(generate)h(pseudo)390 3035 y(random)j(data)h(unique)e(for)h
20605
 
(eac)m(h)i(session.)390 3171 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
20606
 
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
20607
 
3371 y Fv(gn)m(utls)p 483 3371 37 5 v 55 w(prf)3350 3569
20608
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_prf)c
20609
 
Fg(\()p Ff(gn)m(utls)p 1209 3569 28 4 v 40 w(session)p
20610
 
1518 3569 V 41 w(t)30 b Fe(session)12 b Ff(,)33 b(size)p
20611
 
2199 3569 V 40 w(t)e Fe(label_size)12 b Ff(,)33 b(const)565
20612
 
3679 y(c)m(har)e(*)g Fe(label)12 b Ff(,)31 b(in)m(t)g
20613
 
Fe(server_random_first)12 b Ff(,)36 b(size)p 2516 3679
20614
 
V 41 w(t)31 b Fe(extra_size)12 b Ff(,)33 b(const)e(c)m(har)f(*)565
20615
 
3789 y Fe(extra)12 b Ff(,)32 b(size)p 1041 3789 V 41
20616
 
w(t)e Fe(outsize)12 b Ff(,)33 b(c)m(har)d(*)h Fe(out)12
20617
 
b Fg(\))390 3898 y Ff(session)p FB(:)41 b(is)30 b(a)h
20618
 
Ft(gnutls_session_t)26 b FB(structure.)390 4034 y Ff(lab)s(el)p
20619
 
585 4034 V 40 w(size)5 b FB(:)42 b(length)31 b(of)f(the)h
20620
 
Ft(label)e FB(v)-5 b(ariable.)390 4170 y Ff(lab)s(el)t
20621
 
FB(:)41 b(lab)s(el)30 b(used)g(in)g(PRF)g(computation,)i(t)m(ypically)g
20622
 
(a)f(short)f(string.)390 4306 y Ff(serv)m(er)p 629 4306
20623
 
V 40 w(random)p 973 4306 V 40 w(\014rst)r FB(:)40 b(non-0)30
20624
 
b(if)g(serv)m(er)h(random)f(\014eld)g(should)f(b)s(e)h(\014rst)f(in)h
20625
 
(seed)390 4442 y Ff(extra)p 600 4442 V 41 w(size)5 b
20626
 
FB(:)41 b(length)31 b(of)g(the)f Ft(extra)f FB(v)-5 b(ariable.)390
20627
 
4577 y Ff(extra)p FB(:)41 b(optional)32 b(extra)f(data)g(to)g(seed)g
20628
 
(the)f(PRF)h(with.)390 4713 y Ff(outsize)5 b FB(:)42
20629
 
b(size)31 b(of)g(pre-allo)s(cated)h(output)e(bu\013er)f(to)i(hold)f
20630
 
(the)h(output.)390 4849 y Ff(out)r FB(:)41 b(pre-allo)s(cate)33
 
20599
(\014elds)g(\(the)h(PRF)g(w)m(ould)f(output)h(the)g(same)p
 
20600
eop end
 
20601
%%Page: 156 162
 
20602
TeXDict begin 156 161 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20603
b(F)-8 b(unction)31 b(Reference)2237 b(156)390 299 y(data)38
 
20604
b(on)f(another)h(connection)g(resumed)f(from)f(the)i(\014rst)e(one\),)k
 
20605
(it)e(is)g(not)f(recommended)g(to)390 408 y(use)31 b(this)g(function)g
 
20606
(directly)-8 b(.)45 b(The)31 b Ft(gnutls_prf\(\))d FB(function)j(seed)h
 
20607
(the)f(PRF)h(with)f(the)g(clien)m(t)390 518 y(and)25
 
20608
b(serv)m(er)g(random)g(\014elds)f(directly)-8 b(,)28
 
20609
b(and)d(is)g(recommended)g(if)g(y)m(ou)h(w)m(an)m(t)g(to)g(generate)h
 
20610
(pseudo)390 628 y(random)j(data)h(unique)e(for)h(eac)m(h)i(session.)390
 
20611
765 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
20612
b(success,)f(or)h(an)f(error)g(co)s(de.)150 967 y Fv(gn)m(utls)p
 
20613
483 967 37 5 v 55 w(prf)3350 1166 y FB([F)-8 b(unction])-3599
 
20614
b Fh(int)53 b(gnutls_prf)c Fg(\()p Ff(gn)m(utls)p 1209
 
20615
1166 28 4 v 40 w(session)p 1518 1166 V 41 w(t)30 b Fe(session)12
 
20616
b Ff(,)33 b(size)p 2199 1166 V 40 w(t)e Fe(label_size)12
 
20617
b Ff(,)33 b(const)565 1276 y(c)m(har)e(*)g Fe(label)12
 
20618
b Ff(,)31 b(in)m(t)g Fe(server_random_first)12 b Ff(,)36
 
20619
b(size)p 2516 1276 V 41 w(t)31 b Fe(extra_size)12 b Ff(,)33
 
20620
b(const)e(c)m(har)f(*)565 1385 y Fe(extra)12 b Ff(,)32
 
20621
b(size)p 1041 1385 V 41 w(t)e Fe(outsize)12 b Ff(,)33
 
20622
b(c)m(har)d(*)h Fe(out)12 b Fg(\))390 1495 y Ff(session)p
 
20623
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
 
20624
1632 y Ff(lab)s(el)p 585 1632 V 40 w(size)5 b FB(:)42
 
20625
b(length)31 b(of)f(the)h Ft(label)e FB(v)-5 b(ariable.)390
 
20626
1769 y Ff(lab)s(el)t FB(:)41 b(lab)s(el)30 b(used)g(in)g(PRF)g
 
20627
(computation,)i(t)m(ypically)g(a)f(short)f(string.)390
 
20628
1906 y Ff(serv)m(er)p 629 1906 V 40 w(random)p 973 1906
 
20629
V 40 w(\014rst)r FB(:)40 b(non-0)30 b(if)g(serv)m(er)h(random)f
 
20630
(\014eld)g(should)f(b)s(e)h(\014rst)f(in)h(seed)390 2043
 
20631
y Ff(extra)p 600 2043 V 41 w(size)5 b FB(:)41 b(length)31
 
20632
b(of)g(the)f Ft(extra)f FB(v)-5 b(ariable.)390 2180 y
 
20633
Ff(extra)p FB(:)41 b(optional)32 b(extra)f(data)g(to)g(seed)g(the)f
 
20634
(PRF)h(with.)390 2317 y Ff(outsize)5 b FB(:)42 b(size)31
 
20635
b(of)g(pre-allo)s(cated)h(output)e(bu\013er)f(to)i(hold)f(the)h
 
20636
(output.)390 2454 y Ff(out)r FB(:)41 b(pre-allo)s(cate)33
20631
20637
b(bu\013er)c(to)i(hold)f(the)h(generated)g(data.)390
20632
 
4985 y(Apply)40 b(the)h(TLS)f(Pseudo-Random-F)-8 b(unction)41
 
20638
2592 y(Apply)40 b(the)h(TLS)f(Pseudo-Random-F)-8 b(unction)41
20633
20639
b(\(PRF\))g(using)f(the)h(master)g(secret)h(on)f(some)390
20634
 
5095 y(data,)31 b(seeded)g(with)f(the)g(clien)m(t)i(and)e(serv)m(er)h
20635
 
(random)e(\014elds.)390 5230 y(The)34 b Ft(label)e FB(v)-5
 
20640
2701 y(data,)31 b(seeded)g(with)f(the)g(clien)m(t)i(and)e(serv)m(er)h
 
20641
(random)e(\014elds.)390 2838 y(The)34 b Ft(label)e FB(v)-5
20636
20642
b(ariable)35 b(usually)f(con)m(tain)i(a)e(string)g(denoting)h(the)f
20637
 
(purp)s(ose)f(for)h(the)g(generated)390 5340 y(data.)74
 
20643
(purp)s(ose)f(for)h(the)g(generated)390 2948 y(data.)74
20638
20644
b(The)41 b Ft(server_random_first)36 b FB(indicate)43
20639
 
b(whether)d(the)i(clien)m(t)h(random)d(\014eld)h(or)h(the)p
20640
 
eop end
20641
 
%%Page: 156 162
20642
 
TeXDict begin 156 161 bop 150 -116 a FB(Chapter)30 b(9:)41
20643
 
b(F)-8 b(unction)31 b(Reference)2237 b(156)390 299 y(serv)m(er)26
20644
 
b(random)f(\014eld)g(should)g(b)s(e)g(\014rst)f(in)i(the)f(seed.)40
20645
 
b(Non-0)26 b(indicate)h(that)f(the)g(serv)m(er)g(random)390
20646
 
408 y(\014eld)k(is)g(\014rst,)g(0)h(that)g(the)g(clien)m(t)h(random)d
20647
 
(\014eld)h(is)g(\014rst.)390 541 y(The)41 b Ft(extra)g
20648
 
FB(v)-5 b(ariable)43 b(can)f(b)s(e)g(used)f(to)h(add)g(more)g(data)h
20649
 
(to)g(the)f(seed,)j(after)e(the)f(random)390 650 y(v)-5
20650
 
b(ariables.)41 b(It)28 b(can)h(b)s(e)e(used)h(to)h(tie)g(mak)m(e)h
20651
 
(sure)d(the)i(generated)g(output)f(is)g(strongly)h(connected)390
20652
 
760 y(to)i(some)g(additional)g(data)g(\(e.g.,)i(a)d(string)h(used)e(in)
20653
 
h(user)g(authen)m(tication\).)390 892 y(The)g(output)g(is)g(placed)h
20654
 
(in)f(*)p Ft(OUT)p FB(,)g(whic)m(h)g(m)m(ust)h(b)s(e)e(pre-allo)s
20655
 
(cated.)390 1024 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
20645
b(whether)d(the)i(clien)m(t)h(random)d(\014eld)h(or)h(the)390
 
20646
3057 y(serv)m(er)26 b(random)f(\014eld)g(should)g(b)s(e)g(\014rst)f(in)
 
20647
i(the)f(seed.)40 b(Non-0)26 b(indicate)h(that)f(the)g(serv)m(er)g
 
20648
(random)390 3167 y(\014eld)k(is)g(\014rst,)g(0)h(that)g(the)g(clien)m
 
20649
(t)h(random)d(\014eld)h(is)g(\014rst.)390 3304 y(The)41
 
20650
b Ft(extra)g FB(v)-5 b(ariable)43 b(can)f(b)s(e)g(used)f(to)h(add)g
 
20651
(more)g(data)h(to)g(the)f(seed,)j(after)e(the)f(random)390
 
20652
3414 y(v)-5 b(ariables.)41 b(It)28 b(can)h(b)s(e)e(used)h(to)h(tie)g
 
20653
(mak)m(e)h(sure)d(the)i(generated)g(output)f(is)g(strongly)h(connected)
 
20654
390 3523 y(to)i(some)g(additional)g(data)g(\(e.g.,)i(a)d(string)h(used)
 
20655
e(in)h(user)g(authen)m(tication\).)390 3660 y(The)g(output)g(is)g
 
20656
(placed)h(in)f(*)p Ft(OUT)p FB(,)g(whic)m(h)g(m)m(ust)h(b)s(e)e
 
20657
(pre-allo)s(cated.)390 3797 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
20656
20658
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
20657
 
1219 y Fv(gn)m(utls)p 483 1219 37 5 v 55 w(priorit)m(y)p
20658
 
945 1219 V 54 w(deinit)3350 1412 y FB([F)-8 b(unction])-3599
 
20659
3999 y Fv(gn)m(utls)p 483 3999 37 5 v 55 w(priorit)m(y)p
 
20660
945 3999 V 54 w(deinit)3350 4199 y FB([F)-8 b(unction])-3599
20659
20661
b Fh(void)54 b(gnutls_priority_deinit)e Fg(\()p Ff(gn)m(utls)p
20660
 
1889 1412 28 4 v 40 w(priorit)m(y)p 2227 1412 V 41 w(t)31
20661
 
b Fe(priority_cache)12 b Fg(\))390 1521 y Ff(priorit)m(y)p
20662
 
694 1521 V 40 w(cac)m(he)5 b FB(:)43 b(is)30 b(a)h Ft
20663
 
(gnutls_prioritity_t)25 b FB(structure.)390 1654 y(Deinitializes)33
20664
 
b(the)e(priorit)m(y)g(cac)m(he.)150 1848 y Fv(gn)m(utls)p
20665
 
483 1848 37 5 v 55 w(priorit)m(y)p 945 1848 V 54 w(init)3350
20666
 
2041 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_priority_init)f
20667
 
Fg(\()p Ff(gn)m(utls)p 1732 2041 28 4 v 40 w(priorit)m(y)p
20668
 
2070 2041 V 41 w(t)31 b(*)f Fe(priority_cache)12 b Ff(,)565
20669
 
2150 y(const)31 b(c)m(har)g(*)f Fe(priorities)12 b Ff(,)34
20670
 
b(const)c(c)m(har)h(**)g Fe(err_pos)12 b Fg(\))390 2260
20671
 
y Ff(priorit)m(y)p 694 2260 V 40 w(cac)m(he)5 b FB(:)43
 
20662
1889 4199 28 4 v 40 w(priorit)m(y)p 2227 4199 V 41 w(t)31
 
20663
b Fe(priority_cache)12 b Fg(\))390 4308 y Ff(priorit)m(y)p
 
20664
694 4308 V 40 w(cac)m(he)5 b FB(:)43 b(is)30 b(a)h Ft
 
20665
(gnutls_prioritity_t)25 b FB(structure.)390 4445 y(Deinitializes)33
 
20666
b(the)e(priorit)m(y)g(cac)m(he.)150 4647 y Fv(gn)m(utls)p
 
20667
483 4647 37 5 v 55 w(priorit)m(y)p 945 4647 V 54 w(init)3350
 
20668
4847 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_priority_init)f
 
20669
Fg(\()p Ff(gn)m(utls)p 1732 4847 28 4 v 40 w(priorit)m(y)p
 
20670
2070 4847 V 41 w(t)31 b(*)f Fe(priority_cache)12 b Ff(,)565
 
20671
4956 y(const)31 b(c)m(har)g(*)f Fe(priorities)12 b Ff(,)34
 
20672
b(const)c(c)m(har)h(**)g Fe(err_pos)12 b Fg(\))390 5066
 
20673
y Ff(priorit)m(y)p 694 5066 V 40 w(cac)m(he)5 b FB(:)43
20672
20674
b(is)30 b(a)h Ft(gnutls_prioritity_t)25 b FB(structure.)390
20673
 
2392 y Ff(priorities)t FB(:)41 b(is)30 b(a)h(string)f(describing)h
20674
 
(priorities)390 2524 y Ff(err)p 508 2524 V 40 w(p)s(os)t
 
20675
5203 y Ff(priorities)t FB(:)41 b(is)30 b(a)h(string)f(describing)h
 
20676
(priorities)390 5340 y Ff(err)p 508 5340 V 40 w(p)s(os)t
20675
20677
FB(:)39 b(In)28 b(case)i(of)f(an)g(error)f(this)h(will)g(ha)m(v)m(e)i
20676
 
(the)e(p)s(osition)g(in)f(the)i(string)f(the)g(error)f(o)s(ccured)390
20677
 
2657 y(Sets)c(priorities)g(for)g(the)g(ciphers,)h(k)m(ey)f(exc)m(hange)
20678
 
h(metho)s(ds,)g(macs)f(and)g(compression)f(metho)s(ds.)390
20679
 
2766 y(This)30 b(is)g(to)h(a)m(v)m(oid)h(using)e(the)g(gn)m(utls)p
20680
 
1680 2766 V 41 w(*)p Ft(_priority\(\))e FB(functions.)390
20681
 
2899 y(The)d Ft(priorities)f FB(option)i(allo)m(ws)h(y)m(ou)g(to)f(sp)s
 
20678
(the)e(p)s(osition)g(in)f(the)i(string)f(the)g(error)f(o)s(ccured)p
 
20679
eop end
 
20680
%%Page: 157 163
 
20681
TeXDict begin 157 162 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20682
b(F)-8 b(unction)31 b(Reference)2237 b(157)390 299 y(Sets)24
 
20683
b(priorities)g(for)g(the)g(ciphers,)h(k)m(ey)f(exc)m(hange)h(metho)s
 
20684
(ds,)g(macs)f(and)g(compression)f(metho)s(ds.)390 408
 
20685
y(This)30 b(is)g(to)h(a)m(v)m(oid)h(using)e(the)g(gn)m(utls)p
 
20686
1680 408 28 4 v 41 w(*)p Ft(_priority\(\))e FB(functions.)390
 
20687
560 y(The)d Ft(priorities)f FB(option)i(allo)m(ws)h(y)m(ou)g(to)f(sp)s
20682
20688
(ecify)g(a)g(semi-colon)i(separated)e(list)h(of)f(the)g(cipher)390
20683
 
3008 y(priorities)31 b(to)g(enable.)390 3140 y(Unless)f(the)h(\014rst)f
 
20689
669 y(priorities)31 b(to)g(enable.)390 821 y(Unless)f(the)h(\014rst)f
20684
20690
(k)m(eyw)m(ord)g(is)h Ft(")p FB(NONE)p Ft(")f FB(the)g(defaults)g(are:)
20685
 
390 3273 y Fn(Proto)s(cols:)43 b FB(TLS1.1,)30 b(TLS1.0,)h(and)f
20686
 
(SSL3.0.)390 3405 y Fn(Compression:)40 b FB(NULL.)390
20687
 
3537 y Fn(Certi\014cate)32 b(t)m(yp)s(es:)41 b FB(X.509,)32
20688
 
b(Op)s(enPGP)-8 b(.)390 3670 y Fn(Y)g(ou)22 b(can)h(also)g(use)f
 
20691
390 972 y Fn(Proto)s(cols:)43 b FB(TLS1.1,)30 b(TLS1.0,)h(and)f
 
20692
(SSL3.0.)390 1123 y Fn(Compression:)40 b FB(NULL.)390
 
20693
1274 y Fn(Certi\014cate)32 b(t)m(yp)s(es:)41 b FB(X.509,)32
 
20694
b(Op)s(enPGP)-8 b(.)390 1425 y Fn(Y)g(ou)22 b(can)h(also)g(use)f
20689
20695
(prede\014ned)f(sets)i(of)f(ciphersuites:)37 b Ft(")p
20690
20696
FB(PERF)m(ORMANCE)p Ft(")23 b FB(all)g(the)f Ft(")p FB(secure)p
20691
 
Ft(")390 3779 y FB(ciphersuites)43 b(are)g(enabled,)j(limited)d(to)h
 
20697
Ft(")390 1535 y FB(ciphersuites)43 b(are)g(enabled,)j(limited)d(to)h
20692
20698
(128)g(bit)e(ciphers)h(and)f(sorted)h(b)m(y)f(terms)h(of)g(sp)s(eed)390
20693
 
3889 y(p)s(erformance.)390 4021 y Ft(")p FB(NORMAL)p
 
20699
1645 y(p)s(erformance.)390 1796 y Ft(")p FB(NORMAL)p
20694
20700
Ft(")e FB(option)g(enables)h(all)g Ft(")p FB(secure)p
20695
20701
Ft(")f FB(ciphersuites.)73 b(The)41 b(256-bit)i(ciphers)d(are)i(in-)390
20696
 
4131 y(cluded)30 b(as)g(a)h(fallbac)m(k)h(only)-8 b(.)41
 
20702
1905 y(cluded)30 b(as)g(a)h(fallbac)m(k)h(only)-8 b(.)41
20697
20703
b(The)30 b(ciphers)g(are)h(sorted)f(b)m(y)h(securit)m(y)g(margin.)390
20698
 
4263 y Ft(")p FB(SECURE128)p Ft(")43 b FB(\015ag)h(enables)g(all)g
 
20704
2057 y Ft(")p FB(SECURE128)p Ft(")43 b FB(\015ag)h(enables)g(all)g
20699
20705
Ft(")p FB(secure)p Ft(")f FB(ciphersuites)g(with)h(ciphers)e(up)h(to)h
20700
 
(128)h(bits,)390 4372 y(sorted)30 b(b)m(y)h(securit)m(y)g(margin.)390
20701
 
4505 y Ft(")p FB(SECURE256)p Ft(")38 b FB(\015ag)h(enables)f(all)h
 
20706
(128)h(bits,)390 2166 y(sorted)30 b(b)m(y)h(securit)m(y)g(margin.)390
 
20707
2317 y Ft(")p FB(SECURE256)p Ft(")38 b FB(\015ag)h(enables)f(all)h
20702
20708
Ft(")p FB(secure)p Ft(")f FB(ciphersuites)g(including)g(the)g(256)i
20703
 
(bit)e(ciphers,)390 4614 y(sorted)30 b(b)m(y)h(securit)m(y)g(margin.)
20704
 
390 4747 y Ft(")p FB(EXPOR)-8 b(T)p Ft(")24 b FB(all)h(the)g
 
20709
(bit)e(ciphers,)390 2427 y(sorted)30 b(b)m(y)h(securit)m(y)g(margin.)
 
20710
390 2578 y Ft(")p FB(EXPOR)-8 b(T)p Ft(")24 b FB(all)h(the)g
20705
20711
(ciphersuites)f(are)h(enabled,)h(including)e(the)h(lo)m(w-securit)m(y)h
20706
 
(40)g(bit)e(ciphers.)390 4879 y Ft(")p FB(NONE)p Ft(")j
 
20712
(40)g(bit)e(ciphers.)390 2729 y Ft(")p FB(NONE)p Ft(")j
20707
20713
FB(nothing)h(is)g(enabled.)40 b(This)27 b(disables)g(ev)m(en)i(proto)s
20708
 
(cols)f(and)g(compression)f(metho)s(ds.)390 5011 y Fn(Sp)s(ecial)44
 
20714
(cols)f(and)g(compression)f(metho)s(ds.)390 2881 y Fn(Sp)s(ecial)44
20709
20715
b(k)m(eyw)m(ords:)70 b Ft(")p FB(!)p Ft(")44 b FB(or)h
20710
20716
Ft(")p FB(-)p Ft(")f FB(app)s(ended)f(with)h(an)g(algorithm)i(will)f
20711
 
(remo)m(v)m(e)h(this)e(algo-)390 5121 y(rithm.)82 b Ft("+")44
 
20717
(remo)m(v)m(e)h(this)e(algo-)390 2990 y(rithm.)82 b Ft("+")44
20712
20718
b FB(app)s(ended)e(with)i(an)h(algorithm)g(will)g(add)e(this)i
20713
 
(algorithm.)83 b Ft("COMPAT")43 b FB(will)390 5230 y(enable)34
 
20719
(algorithm.)83 b Ft("COMPAT")43 b FB(will)390 3100 y(enable)34
20714
20720
b(compatibilit)m(y)h(features)e(for)g(a)h(serv)m(er.)49
20715
20721
b Ft("SSL3_RECORD_VERSION")28 b FB(will)33 b(use)g(SSL3.0)390
20716
 
5340 y(record)d(v)m(ersion)h(in)f(clien)m(t)i(hello.)p
20717
 
eop end
20718
 
%%Page: 157 163
20719
 
TeXDict begin 157 162 bop 150 -116 a FB(Chapter)30 b(9:)41
20720
 
b(F)-8 b(unction)31 b(Reference)2237 b(157)390 299 y(T)-8
20721
 
b(o)27 b(a)m(v)m(oid)i(collisions)f(in)f(order)f(to)i(sp)s(ecify)e(a)h
20722
 
(compression)g(algorithm)h(in)f(this)g(string)f(y)m(ou)i(ha)m(v)m(e)390
20723
 
408 y(to)41 b(pre\014x)f(it)h(with)f Ft(")p FB(COMP-)p
20724
 
Ft(")p FB(,)j(proto)s(col)e(v)m(ersions)g(with)g Ft(")p
20725
 
FB(VERS-)p Ft(")e FB(and)h(certi\014cate)j(t)m(yp)s(es)390
20726
 
518 y(with)30 b Ft(")p FB(CTYPE-)p Ft(")p FB(.)40 b(All)31
 
20722
3209 y(record)d(v)m(ersion)h(in)f(clien)m(t)i(hello.)390
 
20723
3361 y(T)-8 b(o)27 b(a)m(v)m(oid)i(collisions)f(in)f(order)f(to)i(sp)s
 
20724
(ecify)e(a)h(compression)g(algorithm)h(in)f(this)g(string)f(y)m(ou)i
 
20725
(ha)m(v)m(e)390 3470 y(to)41 b(pre\014x)f(it)h(with)f
 
20726
Ft(")p FB(COMP-)p Ft(")p FB(,)j(proto)s(col)e(v)m(ersions)g(with)g
 
20727
Ft(")p FB(VERS-)p Ft(")e FB(and)h(certi\014cate)j(t)m(yp)s(es)390
 
20728
3580 y(with)30 b Ft(")p FB(CTYPE-)p Ft(")p FB(.)40 b(All)31
20727
20729
b(other)f(algorithms)i(don't)e(need)g(a)h(pre\014x.)390
20728
 
679 y(F)-8 b(or)35 b(k)m(ey)g(exc)m(hange)h(algorithms)f(when)e(in)h
 
20730
3731 y(F)-8 b(or)35 b(k)m(ey)g(exc)m(hange)h(algorithms)f(when)e(in)h
20729
20731
(NORMAL)h(or)f(SECURE)f(lev)m(els)j(the)f(p)s(erfect)f(for-)390
20730
 
789 y(w)m(ard)d(secrecy)i(algorithms)g(tak)m(e)g(precendence)f(of)g
 
20732
3841 y(w)m(ard)d(secrecy)i(algorithms)g(tak)m(e)g(precendence)f(of)g
20731
20733
(the)f(other)h(proto)s(cols.)46 b(In)31 b(all)i(cases)f(all)h(the)390
20732
 
898 y(supp)s(orted)25 b(k)m(ey)i(exc)m(hange)i(algorithms)e(are)h
 
20734
3950 y(supp)s(orted)25 b(k)m(ey)i(exc)m(hange)i(algorithms)e(are)h
20733
20735
(enabled)e(\(except)i(for)f(the)g(RSA-EXPOR)-8 b(T)26
20734
 
b(whic)m(h)390 1008 y(is)k(only)h(enabled)f(in)g(EXPOR)-8
20735
 
b(T)30 b(lev)m(el\).)390 1169 y(Note)d(that)g(although)f(one)g(can)g
 
20736
b(whic)m(h)390 4060 y(is)k(only)h(enabled)f(in)g(EXPOR)-8
 
20737
b(T)30 b(lev)m(el\).)390 4211 y(Note)d(that)g(although)f(one)g(can)g
20736
20738
(select)h(v)m(ery)g(long)f(k)m(ey)h(sizes)f(\(suc)m(h)g(as)g(256)h
20737
 
(bits\))f(for)g(symmetric)390 1279 y(algorithms,)k(to)g(actually)g
 
20739
(bits\))f(for)g(symmetric)390 4321 y(algorithms,)k(to)g(actually)g
20738
20740
(increase)f(securit)m(y)h(the)f(public)f(k)m(ey)h(algorithms)h(ha)m(v)m
20739
 
(e)g(to)f(use)f(longer)390 1388 y(k)m(ey)j(sizes)g(as)g(w)m(ell.)390
20740
 
1549 y Fn(Examples:)216 b Ft(")p FB(NORMAL:!AES-128-CBC)p
 
20741
(e)g(to)f(use)f(longer)390 4430 y(k)m(ey)j(sizes)g(as)g(w)m(ell.)390
 
20742
4581 y Fn(Examples:)216 b Ft(")p FB(NORMAL:!AES-128-CBC)p
20741
20743
Ft(")p FB(,)142 b Ft(")p FB(EXPOR)-8 b(T:!VERS-TLS1.0:)p
20742
 
Ft(+)p FB(COMP-)390 1659 y(DEFLA)g(TE:)p Ft(+)p FB(CTYPE-OPENPGP)p
 
20744
Ft(+)p FB(COMP-)390 4691 y(DEFLA)g(TE:)p Ft(+)p FB(CTYPE-OPENPGP)p
20743
20745
Ft(")p FB(,)560 b Ft(")p FB(NONE:)p Ft(+)p FB(VERS-TLS1.0:)p
20744
 
Ft(+)p FB(AES-128-)390 1768 y(CBC:)p Ft(+)p FB(RSA:)p
 
20746
Ft(+)p FB(AES-128-)390 4801 y(CBC:)p Ft(+)p FB(RSA:)p
20745
20747
Ft(+)p FB(SHA1:)p Ft(+)p FB(COMP-NULL)p Ft(")p FB(,)30
20746
20748
b Ft(")p FB(NORMAL)p Ft(")p FB(,)g Ft(")p FB(NORMAL:)p
20747
 
Ft(COMPAT")p FB(.)390 1930 y(F)-8 b(or)44 b(all)g(the)f(curren)m(t)g(a)
 
20749
Ft(COMPAT")p FB(.)390 4952 y(F)-8 b(or)44 b(all)g(the)f(curren)m(t)g(a)
20748
20750
m(v)-5 b(ailable)46 b(algorithms)e(and)f(proto)s(cols)h(use)e
20749
20751
Ft(")p FB(gn)m(utls-cli)j(-l)p Ft(")e FB(to)h(get)h(a)390
20750
 
2039 y(listing.)390 2200 y Fn(Returns:)93 b FB(On)55
 
20752
5061 y(listing.)390 5213 y Fn(Returns:)93 b FB(On)55
20751
20753
b(syn)m(tax)i(error)f Ft(GNUTLS_E_INVALID_REQUEST)50
20752
 
b FB(is)56 b(returned,)62 b Ft(GNUTLS_E_)390 2310 y(SUCCESS)28
20753
 
b FB(on)j(success,)f(or)h(an)f(error)g(co)s(de.)150 2536
20754
 
y Fv(gn)m(utls)p 483 2536 37 5 v 55 w(priorit)m(y)p 945
20755
 
2536 V 54 w(set)p 1151 2536 V 54 w(direct)3350 2759 y
20756
 
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_priority_set_d)q(irec)q
20757
 
(t)f Fg(\()p Ff(gn)m(utls)p 2046 2759 28 4 v 40 w(session)p
20758
 
2355 2759 V 41 w(t)30 b Fe(session)12 b Ff(,)32 b(const)565
20759
 
2869 y(c)m(har)f(*)g Fe(priorities)12 b Ff(,)33 b(const)e(c)m(har)f(**)
20760
 
i Fe(err_pos)12 b Fg(\))390 2978 y Ff(session)p FB(:)41
 
20754
b FB(is)56 b(returned,)62 b Ft(GNUTLS_E_)390 5322 y(SUCCESS)28
 
20755
b FB(on)j(success,)f(or)h(an)f(error)g(co)s(de.)p eop
 
20756
end
 
20757
%%Page: 158 164
 
20758
TeXDict begin 158 163 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20759
b(F)-8 b(unction)31 b(Reference)2237 b(158)150 299 y
 
20760
Fv(gn)m(utls)p 483 299 37 5 v 55 w(priorit)m(y)p 945
 
20761
299 V 54 w(set)p 1151 299 V 54 w(direct)3350 486 y FB([F)-8
 
20762
b(unction])-3599 b Fh(int)53 b(gnutls_priority_set_d)q(irec)q(t)f
 
20763
Fg(\()p Ff(gn)m(utls)p 2046 486 28 4 v 40 w(session)p
 
20764
2355 486 V 41 w(t)30 b Fe(session)12 b Ff(,)32 b(const)565
 
20765
596 y(c)m(har)f(*)g Fe(priorities)12 b Ff(,)33 b(const)e(c)m(har)f(**)i
 
20766
Fe(err_pos)12 b Fg(\))390 705 y Ff(session)p FB(:)41
20761
20767
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20762
 
3139 y Ff(priorities)t FB(:)41 b(is)30 b(a)h(string)f(describing)h
20763
 
(priorities)390 3300 y Ff(err)p 508 3300 V 40 w(p)s(os)t
 
20768
835 y Ff(priorities)t FB(:)41 b(is)30 b(a)h(string)f(describing)h
 
20769
(priorities)390 964 y Ff(err)p 508 964 V 40 w(p)s(os)t
20764
20770
FB(:)39 b(In)28 b(case)i(of)f(an)g(error)f(this)h(will)g(ha)m(v)m(e)i
20765
20771
(the)e(p)s(osition)g(in)f(the)i(string)f(the)g(error)f(o)s(ccured)390
20766
 
3462 y(Sets)23 b(the)h(priorities)g(to)g(use)f(on)g(the)g(ciphers,)i(k)
 
20772
1094 y(Sets)23 b(the)h(priorities)g(to)g(use)f(on)g(the)g(ciphers,)i(k)
20767
20773
m(ey)f(exc)m(hange)g(metho)s(ds,)h(macs)e(and)g(compression)390
20768
 
3571 y(metho)s(ds.)62 b(This)37 b(function)h(a)m(v)m(oids)h(k)m(eeping)
 
20774
1204 y(metho)s(ds.)62 b(This)37 b(function)h(a)m(v)m(oids)h(k)m(eeping)
20769
20775
g(a)f(priorit)m(y)g(cac)m(he)h(and)f(is)f(used)g(to)i(directly)f(set)
20770
 
390 3681 y(string)c(priorities)g(to)h(a)f(TLS)f(session.)51
 
20776
390 1313 y(string)c(priorities)g(to)h(a)f(TLS)f(session.)51
20771
20777
b(F)-8 b(or)35 b(do)s(cumen)m(tation)g(c)m(hec)m(k)g(the)f
20772
 
Ft(gnutls_priority_)390 3790 y(init\(\))p FB(.)390 3951
 
20778
Ft(gnutls_priority_)390 1423 y(init\(\))p FB(.)390 1553
20773
20779
y Fn(Returns:)93 b FB(On)55 b(syn)m(tax)i(error)f Ft
20774
20780
(GNUTLS_E_INVALID_REQUEST)50 b FB(is)56 b(returned,)62
20775
 
b Ft(GNUTLS_E_)390 4061 y(SUCCESS)28 b FB(on)j(success,)f(or)h(an)f
20776
 
(error)g(co)s(de.)150 4287 y Fv(gn)m(utls)p 483 4287
20777
 
37 5 v 55 w(priorit)m(y)p 945 4287 V 54 w(set)3350 4510
 
20781
b Ft(GNUTLS_E_)390 1662 y(SUCCESS)28 b FB(on)j(success,)f(or)h(an)f
 
20782
(error)g(co)s(de.)150 1852 y Fv(gn)m(utls)p 483 1852
 
20783
37 5 v 55 w(priorit)m(y)p 945 1852 V 54 w(set)3350 2039
20778
20784
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_priority_set)e
20779
 
Fg(\()p Ff(gn)m(utls)p 1679 4510 28 4 v 41 w(session)p
20780
 
1989 4510 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(gn)m(utls)p
20781
 
2768 4510 V 41 w(priorit)m(y)p 3107 4510 V 40 w(t)565
20782
 
4620 y Fe(priority)12 b Fg(\))390 4729 y Ff(session)p
 
20785
Fg(\()p Ff(gn)m(utls)p 1679 2039 28 4 v 41 w(session)p
 
20786
1989 2039 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(gn)m(utls)p
 
20787
2768 2039 V 41 w(priorit)m(y)p 3107 2039 V 40 w(t)565
 
20788
2148 y Fe(priority)12 b Fg(\))390 2258 y Ff(session)p
20783
20789
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20784
 
4891 y Ff(priorit)m(y)8 b FB(:)41 b(is)30 b(a)h Ft(gnutls_priority_t)26
20785
 
b FB(structure.)390 5052 y(Sets)d(the)h(priorities)g(to)g(use)f(on)g
 
20790
2388 y Ff(priorit)m(y)8 b FB(:)41 b(is)30 b(a)h Ft(gnutls_priority_t)26
 
20791
b FB(structure.)390 2517 y(Sets)d(the)h(priorities)g(to)g(use)f(on)g
20786
20792
(the)g(ciphers,)i(k)m(ey)f(exc)m(hange)g(metho)s(ds,)h(macs)e(and)g
20787
 
(compression)390 5161 y(metho)s(ds.)390 5322 y Fn(Returns:)40
 
20793
(compression)390 2627 y(metho)s(ds.)390 2757 y Fn(Returns:)40
20788
20794
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
20789
 
(de.)p eop end
20790
 
%%Page: 158 164
20791
 
TeXDict begin 158 163 bop 150 -116 a FB(Chapter)30 b(9:)41
20792
 
b(F)-8 b(unction)31 b(Reference)2237 b(158)150 299 y
 
20795
(de.)150 2946 y Fv(gn)m(utls)p 483 2946 37 5 v 55 w(proto)s(col)p
 
20796
979 2946 V 55 w(get)p 1199 2946 V 54 w(id)3350 3133 y
 
20797
FB([F)-8 b(unction])-3599 b Fh(gnutls_protocol_t)57 b
 
20798
(gnutls_protocol_get_)q(id)52 b Fg(\()p Ff(const)31 b(c)m(har)g(*)f
 
20799
Fe(name)12 b Fg(\))390 3243 y Ff(name)5 b FB(:)41 b(is)30
 
20800
b(a)h(proto)s(col)g(name)390 3373 y(The)f(names)g(are)h(compared)f(in)g
 
20801
(a)h(case)h(insensitiv)m(e)f(w)m(a)m(y)-8 b(.)390 3502
 
20802
y Fn(Returns:)40 b FB(an)31 b(id)f(of)g(the)h(sp)s(eci\014ed)e(proto)s
 
20803
(col,)j(or)e Ft(GNUTLS_VERSION_UNKNOWN)25 b FB(on)30
 
20804
b(error.)150 3692 y Fv(gn)m(utls)p 483 3692 V 55 w(proto)s(col)p
 
20805
979 3692 V 55 w(get)p 1199 3692 V 54 w(name)3350 3879
 
20806
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
20807
(gnutls_protocol_get_na)q(me)f Fg(\()p Ff(gn)m(utls)p
 
20808
2412 3879 28 4 v 40 w(proto)s(col)p 2777 3879 V 41 w(t)565
 
20809
3989 y Fe(version)12 b Fg(\))390 4098 y Ff(v)m(ersion)p
 
20810
FB(:)41 b(is)31 b(a)f(\(gn)m(utls\))i(v)m(ersion)f(n)m(um)m(b)s(er)390
 
20811
4228 y(Con)m(v)m(ert)g(a)g Ft(gnutls_protocol_t)26 b
 
20812
FB(v)-5 b(alue)30 b(to)i(a)e(string.)390 4357 y Fn(Returns:)94
 
20813
b FB(a)58 b(string)f(that)h(con)m(tains)g(the)g(name)f(of)g(the)h(sp)s
 
20814
(eci\014ed)e(TLS)g(v)m(ersion)i(\(e.g.,)390 4467 y Ft(")p
 
20815
FB(TLS1.0)p Ft(")p FB(\),)31 b(or)f Ft(NULL)p FB(.)150
 
20816
4657 y Fv(gn)m(utls)p 483 4657 37 5 v 55 w(proto)s(col)p
 
20817
979 4657 V 55 w(get)p 1199 4657 V 54 w(v)m(ersion)3350
 
20818
4844 y FB([F)-8 b(unction])-3599 b Fh(gnutls_protocol_t)57
 
20819
b(gnutls_protocol_get_)q(vers)q(ion)565 4953 y Fg(\()p
 
20820
Ff(gn)m(utls)p 846 4953 28 4 v 41 w(session)p 1156 4953
 
20821
V 40 w(t)31 b Fe(session)12 b Fg(\))390 5063 y Ff(session)p
 
20822
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
 
20823
5193 y(Get)31 b(TLS)f(v)m(ersion,)h(a)g Ft(gnutls_protocol_t)25
 
20824
b FB(v)-5 b(alue.)390 5322 y Fn(Returns:)40 b FB(the)31
 
20825
b(v)m(ersion)g(of)f(the)h(curren)m(tly)f(used)g(proto)s(col.)p
 
20826
eop end
 
20827
%%Page: 159 165
 
20828
TeXDict begin 159 164 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20829
b(F)-8 b(unction)31 b(Reference)2237 b(159)150 299 y
20793
20830
Fv(gn)m(utls)p 483 299 37 5 v 55 w(proto)s(col)p 979
20794
 
299 V 55 w(get)p 1199 299 V 54 w(id)3350 500 y FB([F)-8
20795
 
b(unction])-3599 b Fh(gnutls_protocol_t)57 b(gnutls_protocol_get_)q(id)
20796
 
52 b Fg(\()p Ff(const)31 b(c)m(har)g(*)f Fe(name)12 b
20797
 
Fg(\))390 610 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(proto)s(col)g(name)
20798
 
390 749 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h(insensitiv)m
20799
 
(e)f(w)m(a)m(y)-8 b(.)390 888 y Fn(Returns:)40 b FB(an)31
20800
 
b(id)f(of)g(the)h(sp)s(eci\014ed)e(proto)s(col,)j(or)e
20801
 
Ft(GNUTLS_VERSION_UNKNOWN)25 b FB(on)30 b(error.)150
20802
 
1092 y Fv(gn)m(utls)p 483 1092 V 55 w(proto)s(col)p 979
20803
 
1092 V 55 w(get)p 1199 1092 V 54 w(name)3350 1293 y FB([F)-8
20804
 
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_protocol_get_na)q
20805
 
(me)f Fg(\()p Ff(gn)m(utls)p 2412 1293 28 4 v 40 w(proto)s(col)p
20806
 
2777 1293 V 41 w(t)565 1402 y Fe(version)12 b Fg(\))390
20807
 
1512 y Ff(v)m(ersion)p FB(:)41 b(is)31 b(a)f(\(gn)m(utls\))i(v)m
20808
 
(ersion)f(n)m(um)m(b)s(er)390 1651 y(Con)m(v)m(ert)g(a)g
20809
 
Ft(gnutls_protocol_t)26 b FB(v)-5 b(alue)30 b(to)i(a)e(string.)390
20810
 
1790 y Fn(Returns:)94 b FB(a)58 b(string)f(that)h(con)m(tains)g(the)g
20811
 
(name)f(of)g(the)h(sp)s(eci\014ed)e(TLS)g(v)m(ersion)i(\(e.g.,)390
20812
 
1900 y Ft(")p FB(TLS1.0)p Ft(")p FB(\),)31 b(or)f Ft(NULL)p
20813
 
FB(.)150 2103 y Fv(gn)m(utls)p 483 2103 37 5 v 55 w(proto)s(col)p
20814
 
979 2103 V 55 w(get)p 1199 2103 V 54 w(v)m(ersion)3350
20815
 
2305 y FB([F)-8 b(unction])-3599 b Fh(gnutls_protocol_t)57
20816
 
b(gnutls_protocol_get_)q(vers)q(ion)565 2414 y Fg(\()p
20817
 
Ff(gn)m(utls)p 846 2414 28 4 v 41 w(session)p 1156 2414
20818
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 2524 y Ff(session)p
20819
 
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20820
 
2663 y(Get)31 b(TLS)f(v)m(ersion,)h(a)g Ft(gnutls_protocol_t)25
20821
 
b FB(v)-5 b(alue.)390 2802 y Fn(Returns:)40 b FB(the)31
20822
 
b(v)m(ersion)g(of)f(the)h(curren)m(tly)f(used)g(proto)s(col.)150
20823
 
3006 y Fv(gn)m(utls)p 483 3006 37 5 v 55 w(proto)s(col)p
20824
 
979 3006 V 55 w(list)3350 3207 y FB([F)-8 b(unction])-3599
 
20831
299 V 55 w(list)3350 508 y FB([F)-8 b(unction])-3599
20825
20832
b Fh(const)54 b(gnutls_protocol_t)j(*)c(gnutls_protocol_list)e
20826
 
Fg(\()31 b Fe(void)12 b Fg(\))390 3316 y FB(Get)31 b(a)g(list)g(of)g
 
20833
Fg(\()31 b Fe(void)12 b Fg(\))390 618 y FB(Get)31 b(a)g(list)g(of)g
20827
20834
(supp)s(orted)d(proto)s(cols,)k(e.g.)41 b(SSL)30 b(3.0,)h(TLS)f(1.0)h
20828
 
(etc.)390 3455 y Fn(Returns:)43 b FB(a)32 b(zero-terminated)h(list)f
20829
 
(of)g Ft(gnutls_protocol_t)27 b FB(in)m(tegers)33 b(indicating)f(the)g
20830
 
(a)m(v)-5 b(ail-)390 3565 y(able)31 b(proto)s(cols.)150
20831
 
3769 y Fv(gn)m(utls)p 483 3769 V 55 w(proto)s(col)p 979
20832
 
3769 V 55 w(set)p 1186 3769 V 54 w(priorit)m(y)3350 3970
20833
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_protocol_set_p)q(rior)
20834
 
q(ity)f Fg(\()p Ff(gn)m(utls)p 2150 3970 28 4 v 41 w(session)p
20835
 
2460 3970 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(const)565
20836
 
4080 y(in)m(t)f(*)g Fe(list)12 b Fg(\))390 4189 y Ff(session)p
 
20835
(etc.)390 764 y Fn(Returns:)43 b FB(a)32 b(zero-terminated)h(list)f(of)
 
20836
g Ft(gnutls_protocol_t)27 b FB(in)m(tegers)33 b(indicating)f(the)g(a)m
 
20837
(v)-5 b(ail-)390 874 y(able)31 b(proto)s(cols.)150 1086
 
20838
y Fv(gn)m(utls)p 483 1086 V 55 w(proto)s(col)p 979 1086
 
20839
V 55 w(set)p 1186 1086 V 54 w(priorit)m(y)3350 1295 y
 
20840
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_protocol_set_p)q(rior)q
 
20841
(ity)f Fg(\()p Ff(gn)m(utls)p 2150 1295 28 4 v 41 w(session)p
 
20842
2460 1295 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(const)565
 
20843
1404 y(in)m(t)f(*)g Fe(list)12 b Fg(\))390 1514 y Ff(session)p
20837
20844
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
20838
 
4328 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
20839
 
m(utls)p 1789 4328 V 40 w(proto)s(col)p 2154 4328 V 41
20840
 
w(t)g(elemen)m(ts.)390 4467 y(Sets)c(the)g(priorit)m(y)g(on)g(the)g
 
20845
1661 y Ff(list)r FB(:)41 b(is)31 b(a)g(0)f(terminated)h(list)g(of)g(gn)
 
20846
m(utls)p 1789 1661 V 40 w(proto)s(col)p 2154 1661 V 41
 
20847
w(t)g(elemen)m(ts.)390 1807 y(Sets)c(the)g(priorit)m(y)g(on)g(the)g
20841
20848
(proto)s(col)g(v)m(ersions)g(supp)s(orted)e(b)m(y)i(gn)m(utls.)40
20842
 
b(This)26 b(function)g(actually)390 4577 y(enables)31
 
20849
b(This)26 b(function)g(actually)390 1917 y(enables)31
20843
20850
b(or)f(disables)g(proto)s(cols.)42 b(New)m(er)31 b(proto)s(col)g(v)m
20844
20851
(ersions)g(alw)m(a)m(ys)h(ha)m(v)m(e)g(highest)e(priorit)m(y)-8
20845
 
b(.)390 4716 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
20852
b(.)390 2064 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
20846
20853
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
20847
 
4920 y Fv(gn)m(utls)p 483 4920 37 5 v 55 w(psk)p 719
20848
 
4920 V 54 w(allo)s(cate)p 1184 4920 V 53 w(clien)m(t)p
20849
 
1529 4920 V 54 w(creden)m(tials)3350 5121 y FB([F)-8
 
20854
2275 y Fv(gn)m(utls)p 483 2275 37 5 v 55 w(psk)p 719
 
20855
2275 V 54 w(allo)s(cate)p 1184 2275 V 53 w(clien)m(t)p
 
20856
1529 2275 V 54 w(creden)m(tials)3350 2485 y FB([F)-8
20850
20857
b(unction])-3599 b Fh(int)53 b(gnutls_psk_allocate_c)q(lien)q(t_c)q
20851
 
(red)q(ent)q(ials)565 5230 y Fg(\()p Ff(gn)m(utls)p 846
20852
 
5230 28 4 v 41 w(psk)p 1022 5230 V 39 w(clien)m(t)p 1274
20853
 
5230 V 42 w(creden)m(tials)p 1737 5230 V 41 w(t)31 b(*)g
20854
 
Fe(sc)12 b Fg(\))390 5340 y Ff(sc)6 b FB(:)40 b(is)31
20855
 
b(a)g(p)s(oin)m(ter)f(to)h(an)f Ft(gnutls_psk_server_credenti)o(als)o
20856
 
(_t)24 b FB(structure.)p eop end
20857
 
%%Page: 159 165
20858
 
TeXDict begin 159 164 bop 150 -116 a FB(Chapter)30 b(9:)41
20859
 
b(F)-8 b(unction)31 b(Reference)2237 b(159)390 299 y(This)31
20860
 
b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f(directly)g(th)m
20861
 
(us)f(this)h(help)s(er)f(function)g(is)390 408 y(pro)m(vided)f(in)g
20862
 
(order)g(to)h(allo)s(cate)i(it.)390 542 y Fn(Returns:)40
20863
 
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
20864
 
(de.)150 738 y Fv(gn)m(utls)p 483 738 37 5 v 55 w(psk)p
20865
 
719 738 V 54 w(allo)s(cate)p 1184 738 V 53 w(serv)m(er)p
20866
 
1559 738 V 54 w(creden)m(tials)3350 933 y FB([F)-8 b(unction])-3599
20867
 
b Fh(int)53 b(gnutls_psk_allocate_s)q(erve)q(r_c)q(red)q(ent)q(ials)565
20868
 
1042 y Fg(\()p Ff(gn)m(utls)p 846 1042 28 4 v 41 w(psk)p
20869
 
1022 1042 V 39 w(serv)m(er)p 1294 1042 V 41 w(creden)m(tials)p
20870
 
1756 1042 V 41 w(t)31 b(*)f Fe(sc)12 b Fg(\))390 1152
20871
 
y Ff(sc)6 b FB(:)40 b(is)31 b(a)g(p)s(oin)m(ter)f(to)h(an)f
20872
 
Ft(gnutls_psk_server_credenti)o(als)o(_t)24 b FB(structure.)390
20873
 
1285 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
20874
 
(directly)g(th)m(us)f(this)h(help)s(er)f(function)g(is)390
20875
 
1395 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i(it.)390
20876
 
1528 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
20877
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 1725 y Fv(gn)m(utls)p
20878
 
483 1725 37 5 v 55 w(psk)p 719 1725 V 54 w(clien)m(t)p
20879
 
1065 1725 V 53 w(get)p 1283 1725 V 54 w(hin)m(t)3350
20880
 
1919 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
20881
 
(gnutls_psk_client_get_)q(hin)q(t)e Fg(\()p Ff(gn)m(utls)p
20882
 
2516 1919 28 4 v 41 w(session)p 2826 1919 V 40 w(t)565
20883
 
2029 y Fe(session)12 b Fg(\))390 2138 y Ff(session)p
20884
 
FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390 2271 y(The)j(PSK)g(iden)m
20885
 
(tit)m(y)i(hin)m(t)e(ma)m(y)i(giv)m(e)g(the)f(clien)m(t)h(help)e(in)g
20886
 
(deciding)h(whic)m(h)g(username)f(to)h(use.)390 2381
20887
 
y(This)30 b(should)f(only)h(b)s(e)g(called)i(in)e(case)h(of)g(PSK)e
20888
 
(authen)m(tication)k(and)c(in)i(case)g(of)f(a)h(clien)m(t.)390
20889
 
2514 y Fn(Returns:)40 b FB(the)31 b(iden)m(tit)m(y)h(hin)m(t)e(of)h
 
20858
(red)q(ent)q(ials)565 2594 y Fg(\()p Ff(gn)m(utls)p 846
 
20859
2594 28 4 v 41 w(psk)p 1022 2594 V 39 w(clien)m(t)p 1274
 
20860
2594 V 42 w(creden)m(tials)p 1737 2594 V 41 w(t)31 b(*)g
 
20861
Fe(sc)12 b Fg(\))390 2704 y Ff(sc)6 b FB(:)40 b(is)31
 
20862
b(a)g(p)s(oin)m(ter)f(to)h(an)f Ft(gnutls_psk_server_credenti)o(als)o
 
20863
(_t)24 b FB(structure.)390 2851 y(This)31 b(structure)g(is)h(complex)g
 
20864
(enough)f(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f
 
20865
(function)g(is)390 2960 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i
 
20866
(it.)390 3107 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
20867
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
20868
3319 y Fv(gn)m(utls)p 483 3319 37 5 v 55 w(psk)p 719
 
20869
3319 V 54 w(allo)s(cate)p 1184 3319 V 53 w(serv)m(er)p
 
20870
1559 3319 V 54 w(creden)m(tials)3350 3528 y FB([F)-8
 
20871
b(unction])-3599 b Fh(int)53 b(gnutls_psk_allocate_s)q(erve)q(r_c)q
 
20872
(red)q(ent)q(ials)565 3637 y Fg(\()p Ff(gn)m(utls)p 846
 
20873
3637 28 4 v 41 w(psk)p 1022 3637 V 39 w(serv)m(er)p 1294
 
20874
3637 V 41 w(creden)m(tials)p 1756 3637 V 41 w(t)31 b(*)f
 
20875
Fe(sc)12 b Fg(\))390 3747 y Ff(sc)6 b FB(:)40 b(is)31
 
20876
b(a)g(p)s(oin)m(ter)f(to)h(an)f Ft(gnutls_psk_server_credenti)o(als)o
 
20877
(_t)24 b FB(structure.)390 3894 y(This)31 b(structure)g(is)h(complex)g
 
20878
(enough)f(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f
 
20879
(function)g(is)390 4003 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i
 
20880
(it.)390 4150 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
20881
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
20882
4362 y Fv(gn)m(utls)p 483 4362 37 5 v 55 w(psk)p 719
 
20883
4362 V 54 w(clien)m(t)p 1065 4362 V 53 w(get)p 1283 4362
 
20884
V 54 w(hin)m(t)3350 4571 y FB([F)-8 b(unction])-3599
 
20885
b Fh(const)54 b(char)f(*)g(gnutls_psk_client_get_)q(hin)q(t)e
 
20886
Fg(\()p Ff(gn)m(utls)p 2516 4571 28 4 v 41 w(session)p
 
20887
2826 4571 V 40 w(t)565 4680 y Fe(session)12 b Fg(\))390
 
20888
4790 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
 
20889
4937 y(The)j(PSK)g(iden)m(tit)m(y)i(hin)m(t)e(ma)m(y)i(giv)m(e)g(the)f
 
20890
(clien)m(t)h(help)e(in)g(deciding)h(whic)m(h)g(username)f(to)h(use.)390
 
20891
5046 y(This)30 b(should)f(only)h(b)s(e)g(called)i(in)e(case)h(of)g(PSK)
 
20892
e(authen)m(tication)k(and)c(in)i(case)g(of)f(a)h(clien)m(t.)390
 
20893
5193 y Fn(Returns:)40 b FB(the)31 b(iden)m(tit)m(y)h(hin)m(t)e(of)h
20890
20894
(the)f(p)s(eer,)g(or)h Ft(NULL)e FB(in)h(case)h(of)g(an)f(error.)390
20891
 
2648 y Fn(Since:)41 b FB(2.4.0)150 2844 y Fv(gn)m(utls)p
20892
 
483 2844 37 5 v 55 w(psk)p 719 2844 V 54 w(free)p 972
20893
 
2844 V 55 w(clien)m(t)p 1319 2844 V 53 w(creden)m(tials)3350
20894
 
3039 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
20895
 
(gnutls_psk_free_client_c)q(red)q(ent)q(ial)q(s)565 3148
20896
 
y Fg(\()p Ff(gn)m(utls)p 846 3148 28 4 v 41 w(psk)p 1022
20897
 
3148 V 39 w(clien)m(t)p 1274 3148 V 42 w(creden)m(tials)p
20898
 
1737 3148 V 41 w(t)31 b Fe(sc)12 b Fg(\))390 3258 y Ff(sc)6
 
20895
5340 y Fn(Since:)41 b FB(2.4.0)p eop end
 
20896
%%Page: 160 166
 
20897
TeXDict begin 160 165 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20898
b(F)-8 b(unction)31 b(Reference)2237 b(160)150 299 y
 
20899
Fv(gn)m(utls)p 483 299 37 5 v 55 w(psk)p 719 299 V 54
 
20900
w(free)p 972 299 V 55 w(clien)m(t)p 1319 299 V 53 w(creden)m(tials)3350
 
20901
502 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
20902
(gnutls_psk_free_client_c)q(red)q(ent)q(ial)q(s)565 612
 
20903
y Fg(\()p Ff(gn)m(utls)p 846 612 28 4 v 41 w(psk)p 1022
 
20904
612 V 39 w(clien)m(t)p 1274 612 V 42 w(creden)m(tials)p
 
20905
1737 612 V 41 w(t)31 b Fe(sc)12 b Fg(\))390 722 y Ff(sc)6
20899
20906
b FB(:)40 b(is)31 b(an)f Ft(gnutls_psk_client_credent)o(ial)o(s_t)24
20900
 
b FB(structure.)390 3391 y(This)31 b(structure)g(is)h(complex)g(enough)
 
20907
b FB(structure.)390 863 y(This)31 b(structure)g(is)h(complex)g(enough)f
 
20908
(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f(function)g
 
20909
(is)390 973 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s(cate\))
 
20910
i(it.)150 1179 y Fv(gn)m(utls)p 483 1179 37 5 v 55 w(psk)p
 
20911
719 1179 V 54 w(free)p 972 1179 V 55 w(serv)m(er)p 1349
 
20912
1179 V 54 w(creden)m(tials)3350 1382 y FB([F)-8 b(unction])-3599
 
20913
b Fh(void)54 b(gnutls_psk_free_server_c)q(red)q(ent)q(ial)q(s)565
 
20914
1492 y Fg(\()p Ff(gn)m(utls)p 846 1492 28 4 v 41 w(psk)p
 
20915
1022 1492 V 39 w(serv)m(er)p 1294 1492 V 41 w(creden)m(tials)p
 
20916
1756 1492 V 41 w(t)31 b Fe(sc)12 b Fg(\))390 1601 y Ff(sc)6
 
20917
b FB(:)40 b(is)31 b(an)f Ft(gnutls_psk_server_credent)o(ial)o(s_t)24
 
20918
b FB(structure.)390 1743 y(This)31 b(structure)g(is)h(complex)g(enough)
20901
20919
f(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f(function)g
20902
 
(is)390 3501 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s
20903
 
(cate\))i(it.)150 3697 y Fv(gn)m(utls)p 483 3697 37 5
20904
 
v 55 w(psk)p 719 3697 V 54 w(free)p 972 3697 V 55 w(serv)m(er)p
20905
 
1349 3697 V 54 w(creden)m(tials)3350 3892 y FB([F)-8
20906
 
b(unction])-3599 b Fh(void)54 b(gnutls_psk_free_server_c)q(red)q(ent)q
20907
 
(ial)q(s)565 4001 y Fg(\()p Ff(gn)m(utls)p 846 4001 28
20908
 
4 v 41 w(psk)p 1022 4001 V 39 w(serv)m(er)p 1294 4001
20909
 
V 41 w(creden)m(tials)p 1756 4001 V 41 w(t)31 b Fe(sc)12
20910
 
b Fg(\))390 4111 y Ff(sc)6 b FB(:)40 b(is)31 b(an)f Ft
20911
 
(gnutls_psk_server_credent)o(ial)o(s_t)24 b FB(structure.)390
20912
 
4244 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
20913
 
(directly)g(th)m(us)f(this)h(help)s(er)f(function)g(is)390
20914
 
4354 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s(cate\))i(it.)
20915
 
150 4550 y Fv(gn)m(utls)p 483 4550 37 5 v 55 w(psk)p
20916
 
719 4550 V 54 w(netconf)p 1166 4550 V 54 w(deriv)m(e)p
20917
 
1546 4550 V 54 w(k)m(ey)3350 4745 y FB([F)-8 b(unction])-3599
20918
 
b Fh(int)53 b(gnutls_psk_netconf_de)q(rive)q(_ke)q(y)e
 
20920
(is)390 1852 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s
 
20921
(cate\))i(it.)150 2059 y Fv(gn)m(utls)p 483 2059 37 5
 
20922
v 55 w(psk)p 719 2059 V 54 w(netconf)p 1166 2059 V 54
 
20923
w(deriv)m(e)p 1546 2059 V 54 w(k)m(ey)3350 2262 y FB([F)-8
 
20924
b(unction])-3599 b Fh(int)53 b(gnutls_psk_netconf_de)q(rive)q(_ke)q(y)e
20919
20925
Fg(\()p Ff(const)32 b(c)m(har)e(*)h Fe(password)12 b
20920
 
Ff(,)33 b(const)565 4854 y(c)m(har)e(*)g Fe(psk_identity)12
 
20926
Ff(,)33 b(const)565 2372 y(c)m(har)e(*)g Fe(psk_identity)12
20921
20927
b Ff(,)33 b(const)e(c)m(har)g(*)g Fe(psk_identity_hint)12
20922
 
b Ff(,)35 b(gn)m(utls)p 3251 4854 28 4 v 40 w(datum)p
20923
 
3549 4854 V 40 w(t)c(*)565 4964 y Fe(output_key)12 b
20924
 
Fg(\))390 5073 y Ff(passw)m(ord)t FB(:)40 b(zero)31 b(terminated)g
20925
 
(string)f(con)m(taining)i(passw)m(ord.)390 5207 y Ff(psk)p
20926
 
531 5207 V 39 w(iden)m(tit)m(y)8 b FB(:)42 b(zero)32
 
20928
b Ff(,)35 b(gn)m(utls)p 3251 2372 28 4 v 40 w(datum)p
 
20929
3549 2372 V 40 w(t)c(*)565 2481 y Fe(output_key)12 b
 
20930
Fg(\))390 2591 y Ff(passw)m(ord)t FB(:)40 b(zero)31 b(terminated)g
 
20931
(string)f(con)m(taining)i(passw)m(ord.)390 2732 y Ff(psk)p
 
20932
531 2732 V 39 w(iden)m(tit)m(y)8 b FB(:)42 b(zero)32
20927
20933
b(terminated)e(string)h(with)f(PSK)f(iden)m(tit)m(y)-8
20928
 
b(.)390 5340 y Ff(psk)p 531 5340 V 39 w(iden)m(tit)m(y)p
20929
 
874 5340 V 42 w(hin)m(t)r FB(:)41 b(zero)31 b(terminated)g(string)f
20930
 
(with)g(PSK)f(iden)m(tit)m(y)j(hin)m(t.)p eop end
20931
 
%%Page: 160 166
20932
 
TeXDict begin 160 165 bop 150 -116 a FB(Chapter)30 b(9:)41
20933
 
b(F)-8 b(unction)31 b(Reference)2237 b(160)390 299 y
20934
 
Ff(output)p 664 299 28 4 v 40 w(k)m(ey)8 b FB(:)41 b(output)30
20935
 
b(v)-5 b(ariable,)31 b(con)m(tains)h(newly)e(allo)s(cated)i(*data)g(p)s
20936
 
(oin)m(ter.)390 443 y(This)g(function)g(will)h(deriv)m(e)g(a)g(PSK)f(k)
20937
 
m(ey)i(from)e(a)h(passw)m(ord,)g(for)f(use)g(with)h(the)f(Netconf)i
20938
 
(pro-)390 553 y(to)s(col.)390 697 y Fn(Returns:)40 b
20939
 
Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
20940
 
(de.)390 842 y Fn(Since:)41 b FB(2.4.0)150 1051 y Fv(gn)m(utls)p
20941
 
483 1051 37 5 v 55 w(psk)p 719 1051 V 54 w(serv)m(er)p
20942
 
1095 1051 V 54 w(get)p 1314 1051 V 54 w(username)3350
20943
 
1258 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
20934
b(.)390 2874 y Ff(psk)p 531 2874 V 39 w(iden)m(tit)m(y)p
 
20935
874 2874 V 42 w(hin)m(t)r FB(:)41 b(zero)31 b(terminated)g(string)f
 
20936
(with)g(PSK)f(iden)m(tit)m(y)j(hin)m(t.)390 3015 y Ff(output)p
 
20937
664 3015 V 40 w(k)m(ey)8 b FB(:)41 b(output)30 b(v)-5
 
20938
b(ariable,)31 b(con)m(tains)h(newly)e(allo)s(cated)i(*data)g(p)s(oin)m
 
20939
(ter.)390 3156 y(This)g(function)g(will)h(deriv)m(e)g(a)g(PSK)f(k)m(ey)
 
20940
i(from)e(a)h(passw)m(ord,)g(for)f(use)g(with)h(the)f(Netconf)i(pro-)390
 
20941
3266 y(to)s(col.)390 3407 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
20942
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)390
 
20943
3549 y Fn(Since:)41 b FB(2.4.0)150 3755 y Fv(gn)m(utls)p
 
20944
483 3755 37 5 v 55 w(psk)p 719 3755 V 54 w(serv)m(er)p
 
20945
1095 3755 V 54 w(get)p 1314 3755 V 54 w(username)3350
 
20946
3958 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
20944
20947
(gnutls_psk_server_get_)q(use)q(rnam)q(e)e Fg(\()p Ff(gn)m(utls)p
20945
 
2725 1258 28 4 v 41 w(session)p 3035 1258 V 40 w(t)565
20946
 
1367 y Fe(session)12 b Fg(\))390 1477 y Ff(session)p
20947
 
FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390 1621 y(This)f(should)f
 
20948
2725 3958 28 4 v 41 w(session)p 3035 3958 V 40 w(t)565
 
20949
4068 y Fe(session)12 b Fg(\))390 4177 y Ff(session)p
 
20950
FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390 4319 y(This)f(should)f
20948
20951
(only)h(b)s(e)g(called)i(in)e(case)h(of)g(PSK)e(authen)m(tication)k
20949
 
(and)c(in)i(case)g(of)f(a)h(serv)m(er.)390 1766 y Fn(Returns:)40
 
20952
(and)c(in)i(case)g(of)f(a)h(serv)m(er.)390 4460 y Fn(Returns:)40
20950
20953
b FB(the)31 b(username)f(of)g(the)h(p)s(eer,)f(or)g Ft(NULL)f
20951
 
FB(in)h(case)i(of)e(an)h(error.)150 1975 y Fv(gn)m(utls)p
20952
 
483 1975 37 5 v 55 w(psk)p 719 1975 V 54 w(set)p 925
20953
 
1975 V 54 w(clien)m(t)p 1271 1975 V 53 w(creden)m(tials)p
20954
 
1898 1975 V 54 w(function)3350 2182 y FB([F)-8 b(unction])-3599
 
20954
FB(in)h(case)i(of)e(an)h(error.)150 4666 y Fv(gn)m(utls)p
 
20955
483 4666 37 5 v 55 w(psk)p 719 4666 V 54 w(set)p 925
 
20956
4666 V 54 w(clien)m(t)p 1271 4666 V 53 w(creden)m(tials)p
 
20957
1898 4666 V 54 w(function)3350 4870 y FB([F)-8 b(unction])-3599
20955
20958
b Fh(void)54 b(gnutls_psk_set_client_cr)q(ede)q(nti)q(als)q(_fun)q(cti)
20956
 
q(on)565 2291 y Fg(\()p Ff(gn)m(utls)p 846 2291 28 4
20957
 
v 41 w(psk)p 1022 2291 V 39 w(clien)m(t)p 1274 2291 V
20958
 
42 w(creden)m(tials)p 1737 2291 V 41 w(t)31 b Fe(cred)12
20959
 
b Ff(,)31 b(gn)m(utls)p 2360 2291 V 41 w(psk)p 2536 2291
20960
 
V 39 w(clien)m(t)p 2788 2291 V 42 w(creden)m(tials)p
20961
 
3251 2291 V 41 w(function)f(*)565 2401 y Fe(func)12 b
20962
 
Fg(\))390 2510 y Ff(cred)t FB(:)40 b(is)31 b(a)f Ft
 
20959
q(on)565 4979 y Fg(\()p Ff(gn)m(utls)p 846 4979 28 4
 
20960
v 41 w(psk)p 1022 4979 V 39 w(clien)m(t)p 1274 4979 V
 
20961
42 w(creden)m(tials)p 1737 4979 V 41 w(t)31 b Fe(cred)12
 
20962
b Ff(,)31 b(gn)m(utls)p 2360 4979 V 41 w(psk)p 2536 4979
 
20963
V 39 w(clien)m(t)p 2788 4979 V 42 w(creden)m(tials)p
 
20964
3251 4979 V 41 w(function)f(*)565 5089 y Fe(func)12 b
 
20965
Fg(\))390 5199 y Ff(cred)t FB(:)40 b(is)31 b(a)f Ft
20963
20966
(gnutls_psk_server_credent)o(ials)o(_t)24 b FB(structure.)390
20964
 
2655 y Ff(func)6 b FB(:)39 b(is)31 b(the)f(callbac)m(k)j(function)390
20965
 
2799 y(This)47 b(function)h(can)g(b)s(e)f(used)g(to)i(set)f(a)g
20966
 
(callbac)m(k)i(to)f(retriev)m(e)g(the)f(username)g(and)f(pass-)390
20967
 
2909 y(w)m(ord)f(for)f(clien)m(t)j(PSK)d(authen)m(tication.)89
20968
 
b(The)46 b(callbac)m(k's)i(function)e(form)f(is:)72 b(in)m(t)47
20969
 
b(\(*call-)390 3019 y(bac)m(k\)\(gn)m(utls)p 887 3019
20970
 
V 42 w(session)p 1198 3019 V 40 w(t,)31 b(c)m(har**)h(username,)e(gn)m
20971
 
(utls)p 2290 3019 V 40 w(datum)p 2588 3019 V 40 w(t*)h(k)m(ey\);)390
20972
 
3163 y(The)h Ft(username)e FB(and)h Ft(key)p FB(-)p Ft(>)p
 
20967
5340 y Ff(func)6 b FB(:)39 b(is)31 b(the)f(callbac)m(k)j(function)p
 
20968
eop end
 
20969
%%Page: 161 167
 
20970
TeXDict begin 161 166 bop 150 -116 a FB(Chapter)30 b(9:)41
 
20971
b(F)-8 b(unction)31 b(Reference)2237 b(161)390 299 y(This)47
 
20972
b(function)h(can)g(b)s(e)f(used)g(to)i(set)f(a)g(callbac)m(k)i(to)f
 
20973
(retriev)m(e)g(the)f(username)g(and)f(pass-)390 408 y(w)m(ord)f(for)f
 
20974
(clien)m(t)j(PSK)d(authen)m(tication.)89 b(The)46 b(callbac)m(k's)i
 
20975
(function)e(form)f(is:)72 b(in)m(t)47 b(\(*call-)390
 
20976
518 y(bac)m(k\)\(gn)m(utls)p 887 518 28 4 v 42 w(session)p
 
20977
1198 518 V 40 w(t,)31 b(c)m(har**)h(username,)e(gn)m(utls)p
 
20978
2290 518 V 40 w(datum)p 2588 518 V 40 w(t*)h(k)m(ey\);)390
 
20979
672 y(The)h Ft(username)e FB(and)h Ft(key)p FB(-)p Ft(>)p
20973
20980
FB(data)h(m)m(ust)g(b)s(e)g(allo)s(cated)i(using)d Ft
20974
 
(gnutls_malloc\(\))p FB(.)42 b Ft(username)390 3273 y
 
20981
(gnutls_malloc\(\))p FB(.)42 b Ft(username)390 782 y
20975
20982
FB(should)30 b(b)s(e)h(ASCI)s(I)f(strings)h(or)h(UTF-8)g(strings)f
20976
20983
(prepared)f(using)h(the)h Ft(")p FB(SASLprep)p Ft(")d
20977
 
FB(pro\014le)i(of)390 3382 y Ft(")p FB(stringprep)p Ft(")p
20978
 
FB(.)390 3527 y(The)f(callbac)m(k)i(function)e(will)h(b)s(e)f(called)h
20979
 
(once)h(p)s(er)d(handshak)m(e.)390 3671 y(The)h(callbac)m(k)i(function)
 
20984
FB(pro\014le)i(of)390 892 y Ft(")p FB(stringprep)p Ft(")p
 
20985
FB(.)390 1046 y(The)f(callbac)m(k)i(function)e(will)h(b)s(e)f(called)h
 
20986
(once)h(p)s(er)d(handshak)m(e.)390 1200 y(The)h(callbac)m(k)i(function)
20980
20987
e(should)g(return)f(0)i(on)f(success.)41 b(-1)31 b(indicates)g(an)g
20981
 
(error.)150 3880 y Fv(gn)m(utls)p 483 3880 37 5 v 55
20982
 
w(psk)p 719 3880 V 54 w(set)p 925 3880 V 54 w(clien)m(t)p
20983
 
1271 3880 V 53 w(creden)m(tials)3350 4087 y FB([F)-8
 
20988
(error.)150 1420 y Fv(gn)m(utls)p 483 1420 37 5 v 55
 
20989
w(psk)p 719 1420 V 54 w(set)p 925 1420 V 54 w(clien)m(t)p
 
20990
1271 1420 V 53 w(creden)m(tials)3350 1636 y FB([F)-8
20984
20991
b(unction])-3599 b Fh(int)53 b(gnutls_psk_set_client)q(_cre)q(den)q
20985
 
(tia)q(ls)565 4197 y Fg(\()p Ff(gn)m(utls)p 846 4197
20986
 
28 4 v 41 w(psk)p 1022 4197 V 39 w(clien)m(t)p 1274 4197
20987
 
V 42 w(creden)m(tials)p 1737 4197 V 41 w(t)31 b Fe(res)12
 
20992
(tia)q(ls)565 1746 y Fg(\()p Ff(gn)m(utls)p 846 1746
 
20993
28 4 v 41 w(psk)p 1022 1746 V 39 w(clien)m(t)p 1274 1746
 
20994
V 42 w(creden)m(tials)p 1737 1746 V 41 w(t)31 b Fe(res)12
20988
20995
b Ff(,)31 b(const)g(c)m(har)g(*)f Fe(username)12 b Ff(,)33
20989
 
b(const)565 4306 y(gn)m(utls)p 811 4306 V 41 w(datum)p
20990
 
1110 4306 V 39 w(t)e(*)g Fe(key)12 b Ff(,)31 b(gn)m(utls)p
20991
 
1755 4306 V 40 w(psk)p 1930 4306 V 39 w(k)m(ey)p 2102
20992
 
4306 V 41 w(\015ags)g Fe(flags)12 b Fg(\))390 4416 y
 
20996
b(const)565 1855 y(gn)m(utls)p 811 1855 V 41 w(datum)p
 
20997
1110 1855 V 39 w(t)e(*)g Fe(key)12 b Ff(,)31 b(gn)m(utls)p
 
20998
1755 1855 V 40 w(psk)p 1930 1855 V 39 w(k)m(ey)p 2102
 
20999
1855 V 41 w(\015ags)g Fe(flags)12 b Fg(\))390 1965 y
20993
21000
Ff(res)t FB(:)40 b(is)31 b(an)f Ft(gnutls_psk_client_creden)o(tial)o
20994
 
(s_t)24 b FB(structure.)390 4560 y Ff(username)5 b FB(:)40
 
21001
(s_t)24 b FB(structure.)390 2119 y Ff(username)5 b FB(:)40
20995
21002
b(is)31 b(the)f(user's)g(zero-terminated)i(userid)390
20996
 
4705 y Ff(k)m(ey)8 b FB(:)41 b(is)31 b(the)f(user's)g(k)m(ey)390
20997
 
4849 y(This)38 b(function)g(sets)g(the)h(username)e(and)h(passw)m(ord,)
20998
 
i(in)e(a)h(gn)m(utls)p 2789 4849 V 40 w(psk)p 2964 4849
20999
 
V 40 w(clien)m(t)p 3217 4849 V 41 w(creden)m(tials)p
21000
 
3679 4849 V 42 w(t)390 4959 y(structure.)i(Those)30 b(will)h(b)s(e)f
 
21003
2274 y Ff(k)m(ey)8 b FB(:)41 b(is)31 b(the)f(user's)g(k)m(ey)390
 
21004
2428 y(This)38 b(function)g(sets)g(the)h(username)e(and)h(passw)m(ord,)
 
21005
i(in)e(a)h(gn)m(utls)p 2789 2428 V 40 w(psk)p 2964 2428
 
21006
V 40 w(clien)m(t)p 3217 2428 V 41 w(creden)m(tials)p
 
21007
3679 2428 V 42 w(t)390 2538 y(structure.)i(Those)30 b(will)h(b)s(e)f
21001
21008
(used)f(in)i(PSK)e(authen)m(tication.)43 b Ft(username)29
21002
 
b FB(should)g(b)s(e)h(an)g(ASCI)s(I)390 5068 y(string)f(or)h(UTF-8)g
 
21009
b FB(should)g(b)s(e)h(an)g(ASCI)s(I)390 2647 y(string)f(or)h(UTF-8)g
21003
21010
(strings)f(prepared)g(using)g(the)g Ft(")p FB(SASLprep)p
21004
21011
Ft(")e FB(pro\014le)i(of)h Ft(")p FB(stringprep)p Ft(")p
21005
 
FB(.)38 b(The)390 5178 y(k)m(ey)31 b(can)g(b)s(e)f(either)g(in)g(ra)m
 
21012
FB(.)38 b(The)390 2757 y(k)m(ey)31 b(can)g(b)s(e)f(either)g(in)g(ra)m
21006
21013
(w)h(b)m(yte)g(format)g(or)f(in)g(Hex)h(\(not)g(with)f(the)h('0x')g
21007
 
(pre\014x\).)390 5322 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
21008
 
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)p
21009
 
eop end
21010
 
%%Page: 161 167
21011
 
TeXDict begin 161 166 bop 150 -116 a FB(Chapter)30 b(9:)41
21012
 
b(F)-8 b(unction)31 b(Reference)2237 b(161)150 299 y
21013
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(psk)p 719 299 V 54
21014
 
w(set)p 925 299 V 54 w(params)p 1367 299 V 54 w(function)3350
21015
 
493 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
21016
 
(gnutls_psk_set_params_fu)q(nct)q(ion)565 602 y Fg(\()p
21017
 
Ff(gn)m(utls)p 846 602 28 4 v 41 w(psk)p 1022 602 V 39
21018
 
w(serv)m(er)p 1294 602 V 41 w(creden)m(tials)p 1756 602
21019
 
V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2327
21020
 
602 V 40 w(params)p 2656 602 V 40 w(function)f(*)h Fe(func)12
21021
 
b Fg(\))390 712 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p
21022
 
984 712 V 41 w(psk)p 1160 712 V 39 w(serv)m(er)p 1432
21023
 
712 V 41 w(creden)m(tials)p 1894 712 V 41 w(t)h(structure)390
21024
 
845 y Ff(func)6 b FB(:)39 b(is)31 b(the)f(function)g(to)i(b)s(e)d
21025
 
(called)390 978 y(This)35 b(function)h(will)g(set)h(a)f(callbac)m(k)i
21026
 
(in)e(order)f(for)h(the)g(serv)m(er)g(to)h(get)g(the)f(di\016e)g
21027
 
(hellman)g(or)390 1087 y(RSA)30 b(parameters)h(for)f(psk)f(authen)m
21028
 
(tication.)43 b(The)30 b(callbac)m(k)j(should)c(return)g(zero)i(on)g
21029
 
(success.)150 1283 y Fv(gn)m(utls)p 483 1283 37 5 v 55
21030
 
w(psk)p 719 1283 V 54 w(set)p 925 1283 V 54 w(serv)m(er)p
21031
 
1301 1283 V 54 w(creden)m(tials)p 1929 1283 V 54 w(\014le)3350
21032
 
1477 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_psk_set_server)q
21033
 
(_cre)q(den)q(tia)q(ls_)q(file)565 1587 y Fg(\()p Ff(gn)m(utls)p
21034
 
846 1587 28 4 v 41 w(psk)p 1022 1587 V 39 w(serv)m(er)p
21035
 
1294 1587 V 41 w(creden)m(tials)p 1756 1587 V 41 w(t)31
 
21014
(pre\014x\).)390 2911 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
21015
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
21016
3131 y Fv(gn)m(utls)p 483 3131 37 5 v 55 w(psk)p 719
 
21017
3131 V 54 w(set)p 925 3131 V 54 w(params)p 1367 3131
 
21018
V 54 w(function)3350 3347 y FB([F)-8 b(unction])-3599
 
21019
b Fh(void)54 b(gnutls_psk_set_params_fu)q(nct)q(ion)565
 
21020
3457 y Fg(\()p Ff(gn)m(utls)p 846 3457 28 4 v 41 w(psk)p
 
21021
1022 3457 V 39 w(serv)m(er)p 1294 3457 V 41 w(creden)m(tials)p
 
21022
1756 3457 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
 
21023
2327 3457 V 40 w(params)p 2656 3457 V 40 w(function)f(*)h
 
21024
Fe(func)12 b Fg(\))390 3566 y Ff(res)t FB(:)40 b(is)31
 
21025
b(a)f(gn)m(utls)p 984 3566 V 41 w(psk)p 1160 3566 V 39
 
21026
w(serv)m(er)p 1432 3566 V 41 w(creden)m(tials)p 1894
 
21027
3566 V 41 w(t)h(structure)390 3721 y Ff(func)6 b FB(:)39
 
21028
b(is)31 b(the)f(function)g(to)i(b)s(e)d(called)390 3875
 
21029
y(This)35 b(function)h(will)g(set)h(a)f(callbac)m(k)i(in)e(order)f(for)
 
21030
h(the)g(serv)m(er)g(to)h(get)g(the)f(di\016e)g(hellman)g(or)390
 
21031
3985 y(RSA)30 b(parameters)h(for)f(psk)f(authen)m(tication.)43
 
21032
b(The)30 b(callbac)m(k)j(should)c(return)g(zero)i(on)g(success.)150
 
21033
4204 y Fv(gn)m(utls)p 483 4204 37 5 v 55 w(psk)p 719
 
21034
4204 V 54 w(set)p 925 4204 V 54 w(serv)m(er)p 1301 4204
 
21035
V 54 w(creden)m(tials)p 1929 4204 V 54 w(\014le)3350
 
21036
4421 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_psk_set_server)q
 
21037
(_cre)q(den)q(tia)q(ls_)q(file)565 4530 y Fg(\()p Ff(gn)m(utls)p
 
21038
846 4530 28 4 v 41 w(psk)p 1022 4530 V 39 w(serv)m(er)p
 
21039
1294 4530 V 41 w(creden)m(tials)p 1756 4530 V 41 w(t)31
21036
21040
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)f(*)h Fe(password_file)12
21037
 
b Fg(\))390 1696 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft
 
21041
b Fg(\))390 4640 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft
21038
21042
(gnutls_psk_server_creden)o(tial)o(s_t)24 b FB(structure.)390
21039
 
1829 y Ff(passw)m(ord)p 759 1829 V 39 w(\014le)5 b FB(:)41
 
21043
4794 y Ff(passw)m(ord)p 759 4794 V 39 w(\014le)5 b FB(:)41
21040
21044
b(is)31 b(the)f(PSK)g(passw)m(ord)f(\014le)i(\(passwd.psk\))390
21041
 
1962 y(This)c(function)h(sets)g(the)g(passw)m(ord)f(\014le,)i(in)e(a)i
 
21045
4949 y(This)c(function)h(sets)g(the)g(passw)m(ord)f(\014le,)i(in)e(a)i
21042
21046
Ft(gnutls_psk_server_crede)o(ntia)o(ls_)o(t)22 b FB(struc-)390
21043
 
2072 y(ture.)40 b(This)30 b(passw)m(ord)f(\014le)h(holds)g(usernames)f
 
21047
5058 y(ture.)40 b(This)30 b(passw)m(ord)f(\014le)h(holds)g(usernames)f
21044
21048
(and)g(k)m(eys)i(and)e(will)i(b)s(e)e(used)g(for)h(PSK)f(authen-)390
21045
 
2181 y(tication.)390 2314 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
21046
 
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
21047
 
2511 y Fv(gn)m(utls)p 483 2511 37 5 v 55 w(psk)p 719
21048
 
2511 V 54 w(set)p 925 2511 V 54 w(serv)m(er)p 1301 2511
21049
 
V 54 w(creden)m(tials)p 1929 2511 V 54 w(function)3350
21050
 
2704 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
21051
 
(gnutls_psk_set_server_cr)q(ede)q(nti)q(als)q(_fun)q(cti)q(on)565
21052
 
2814 y Fg(\()p Ff(gn)m(utls)p 846 2814 28 4 v 41 w(psk)p
21053
 
1022 2814 V 39 w(serv)m(er)p 1294 2814 V 41 w(creden)m(tials)p
21054
 
1756 2814 V 41 w(t)31 b Fe(cred)12 b Ff(,)31 b(gn)m(utls)p
21055
 
2379 2814 V 40 w(psk)p 2554 2814 V 40 w(serv)m(er)p 2827
21056
 
2814 V 40 w(creden)m(tials)p 3288 2814 V 42 w(function)f(*)565
21057
 
2923 y Fe(func)12 b Fg(\))390 3033 y Ff(cred)t FB(:)40
21058
 
b(is)31 b(a)f Ft(gnutls_psk_server_credent)o(ials)o(_t)24
21059
 
b FB(structure.)390 3166 y Ff(func)6 b FB(:)39 b(is)31
21060
 
b(the)f(callbac)m(k)j(function)390 3299 y(This)23 b(function)h(can)h(b)
21061
 
s(e)f(used)f(to)i(set)g(a)g(callbac)m(k)h(to)f(retriev)m(e)h(the)e
21062
 
(user's)g(PSK)f(creden)m(tials.)40 b(The)390 3409 y(callbac)m(k's)h
21063
 
(function)e(form)g(is:)58 b(in)m(t)40 b(\(*callbac)m(k\)\(gn)m(utls)p
21064
 
2401 3409 V 44 w(session)p 2714 3409 V 40 w(t,)i(const)d(c)m(har*)h
21065
 
(username,)390 3518 y(gn)m(utls)p 636 3518 V 40 w(datum)p
21066
 
934 3518 V 40 w(t*)31 b(k)m(ey\);)390 3651 y Ft(username)25
21067
 
b FB(con)m(tains)i(the)g(actual)i(username.)39 b(The)26
21068
 
b Ft(key)g FB(m)m(ust)g(b)s(e)h(\014lled)f(in)h(using)f(the)h
21069
 
Ft(gnutls_)390 3761 y(malloc\(\))p FB(.)390 3894 y(In)39
21070
 
b(case)j(the)e(callbac)m(k)i(returned)d(a)i(negativ)m(e)h(n)m(um)m(b)s
21071
 
(er)d(then)h(gn)m(utls)h(will)f(assume)g(that)h(the)390
21072
 
4003 y(username)30 b(do)s(es)g(not)g(exist.)390 4136
21073
 
y(The)g(callbac)m(k)k(function)c(will)h(only)h(b)s(e)e(called)i(once)g
21074
 
(p)s(er)e(handshak)m(e.)42 b(The)30 b(callbac)m(k)j(function)390
21075
 
4246 y(should)c(return)h(0)g(on)h(success,)g(while)f(-1)h(indicates)g
21076
 
(an)g(error.)150 4442 y Fv(gn)m(utls)p 483 4442 37 5
21077
 
v 55 w(psk)p 719 4442 V 54 w(set)p 925 4442 V 54 w(serv)m(er)p
21078
 
1301 4442 V 54 w(creden)m(tials)p 1929 4442 V 54 w(hin)m(t)3350
21079
 
4636 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_psk_set_server)q
21080
 
(_cre)q(den)q(tia)q(ls_)q(hint)565 4745 y Fg(\()p Ff(gn)m(utls)p
21081
 
846 4745 28 4 v 41 w(psk)p 1022 4745 V 39 w(serv)m(er)p
21082
 
1294 4745 V 41 w(creden)m(tials)p 1756 4745 V 41 w(t)31
 
21049
5168 y(tication.)390 5322 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
21050
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)p
 
21051
eop end
 
21052
%%Page: 162 168
 
21053
TeXDict begin 162 167 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21054
b(F)-8 b(unction)31 b(Reference)2237 b(162)150 299 y
 
21055
Fv(gn)m(utls)p 483 299 37 5 v 55 w(psk)p 719 299 V 54
 
21056
w(set)p 925 299 V 54 w(serv)m(er)p 1301 299 V 54 w(creden)m(tials)p
 
21057
1929 299 V 54 w(function)3350 490 y FB([F)-8 b(unction])-3599
 
21058
b Fh(void)54 b(gnutls_psk_set_server_cr)q(ede)q(nti)q(als)q(_fun)q(cti)
 
21059
q(on)565 599 y Fg(\()p Ff(gn)m(utls)p 846 599 28 4 v
 
21060
41 w(psk)p 1022 599 V 39 w(serv)m(er)p 1294 599 V 41
 
21061
w(creden)m(tials)p 1756 599 V 41 w(t)31 b Fe(cred)12
 
21062
b Ff(,)31 b(gn)m(utls)p 2379 599 V 40 w(psk)p 2554 599
 
21063
V 40 w(serv)m(er)p 2827 599 V 40 w(creden)m(tials)p 3288
 
21064
599 V 42 w(function)f(*)565 709 y Fe(func)12 b Fg(\))390
 
21065
818 y Ff(cred)t FB(:)40 b(is)31 b(a)f Ft(gnutls_psk_server_credent)o
 
21066
(ials)o(_t)24 b FB(structure.)390 950 y Ff(func)6 b FB(:)39
 
21067
b(is)31 b(the)f(callbac)m(k)j(function)390 1081 y(This)23
 
21068
b(function)h(can)h(b)s(e)f(used)f(to)i(set)g(a)g(callbac)m(k)h(to)f
 
21069
(retriev)m(e)h(the)e(user's)g(PSK)f(creden)m(tials.)40
 
21070
b(The)390 1191 y(callbac)m(k's)h(function)e(form)g(is:)58
 
21071
b(in)m(t)40 b(\(*callbac)m(k\)\(gn)m(utls)p 2401 1191
 
21072
V 44 w(session)p 2714 1191 V 40 w(t,)i(const)d(c)m(har*)h(username,)390
 
21073
1300 y(gn)m(utls)p 636 1300 V 40 w(datum)p 934 1300 V
 
21074
40 w(t*)31 b(k)m(ey\);)390 1432 y Ft(username)25 b FB(con)m(tains)i
 
21075
(the)g(actual)i(username.)39 b(The)26 b Ft(key)g FB(m)m(ust)g(b)s(e)h
 
21076
(\014lled)f(in)h(using)f(the)h Ft(gnutls_)390 1541 y(malloc\(\))p
 
21077
FB(.)390 1673 y(In)39 b(case)j(the)e(callbac)m(k)i(returned)d(a)i
 
21078
(negativ)m(e)h(n)m(um)m(b)s(er)d(then)h(gn)m(utls)h(will)f(assume)g
 
21079
(that)h(the)390 1782 y(username)30 b(do)s(es)g(not)g(exist.)390
 
21080
1914 y(The)g(callbac)m(k)k(function)c(will)h(only)h(b)s(e)e(called)i
 
21081
(once)g(p)s(er)e(handshak)m(e.)42 b(The)30 b(callbac)m(k)j(function)390
 
21082
2023 y(should)c(return)h(0)g(on)h(success,)g(while)f(-1)h(indicates)g
 
21083
(an)g(error.)150 2217 y Fv(gn)m(utls)p 483 2217 37 5
 
21084
v 55 w(psk)p 719 2217 V 54 w(set)p 925 2217 V 54 w(serv)m(er)p
 
21085
1301 2217 V 54 w(creden)m(tials)p 1929 2217 V 54 w(hin)m(t)3350
 
21086
2407 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_psk_set_server)q
 
21087
(_cre)q(den)q(tia)q(ls_)q(hint)565 2517 y Fg(\()p Ff(gn)m(utls)p
 
21088
846 2517 28 4 v 41 w(psk)p 1022 2517 V 39 w(serv)m(er)p
 
21089
1294 2517 V 41 w(creden)m(tials)p 1756 2517 V 41 w(t)31
21083
21090
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)f(*)h Fe(hint)12
21084
 
b Fg(\))390 4855 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft
 
21091
b Fg(\))390 2626 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft
21085
21092
(gnutls_psk_server_creden)o(tial)o(s_t)24 b FB(structure.)390
21086
 
4988 y Ff(hin)m(t)r FB(:)41 b(is)30 b(the)h(PSK)e(iden)m(tit)m(y)j(hin)
21087
 
m(t)e(string)390 5121 y(This)f(function)g(sets)h(the)f(iden)m(tit)m(y)i
 
21093
2758 y Ff(hin)m(t)r FB(:)41 b(is)30 b(the)h(PSK)e(iden)m(tit)m(y)j(hin)
 
21094
m(t)e(string)390 2889 y(This)f(function)g(sets)h(the)f(iden)m(tit)m(y)i
21088
21095
(hin)m(t,)f(in)f(a)h Ft(gnutls_psk_server_credent)o(ial)o(s_t)23
21089
 
b FB(struc-)390 5230 y(ture.)73 b(This)41 b(hin)m(t)g(is)h(sen)m(t)f
 
21096
b FB(struc-)390 2999 y(ture.)73 b(This)41 b(hin)m(t)g(is)h(sen)m(t)f
21090
21097
(to)i(the)e(clien)m(t)i(to)f(help)f(it)h(c)m(hose)g(a)g(go)s(o)s(d)f
21091
 
(PSK)f(creden)m(tial)j(\(i.e.,)390 5340 y(username)30
21092
 
b(and)g(passw)m(ord\).)p eop end
21093
 
%%Page: 162 168
21094
 
TeXDict begin 162 167 bop 150 -116 a FB(Chapter)30 b(9:)41
21095
 
b(F)-8 b(unction)31 b(Reference)2237 b(162)390 299 y
21096
 
Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h
21097
 
(an)f(error)g(co)s(de.)390 438 y Fn(Since:)41 b FB(2.4.0)150
21098
 
643 y Fv(gn)m(utls)p 483 643 37 5 v 55 w(psk)p 719 643
21099
 
V 54 w(set)p 925 643 V 54 w(serv)m(er)p 1301 643 V 54
21100
 
w(dh)p 1491 643 V 54 w(params)3350 845 y FB([F)-8 b(unction])-3599
21101
 
b Fh(void)54 b(gnutls_psk_set_server_dh)q(_pa)q(ram)q(s)565
21102
 
954 y Fg(\()p Ff(gn)m(utls)p 846 954 28 4 v 41 w(psk)p
21103
 
1022 954 V 39 w(serv)m(er)p 1294 954 V 41 w(creden)m(tials)p
21104
 
1756 954 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
21105
 
2327 954 V 40 w(dh)p 2469 954 V 39 w(params)p 2797 954
21106
 
V 40 w(t)f Fe(dh_params)12 b Fg(\))390 1064 y Ff(res)t
21107
 
FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984 1064 V 41 w(psk)p
21108
 
1160 1064 V 39 w(serv)m(er)p 1432 1064 V 41 w(creden)m(tials)p
21109
 
1894 1064 V 41 w(t)h(structure)390 1204 y Ff(dh)p 498
21110
 
1204 V 39 w(params)t FB(:)40 b(is)30 b(a)h(structure)f(that)h(holds)f
21111
 
(di\016e)g(hellman)h(parameters.)390 1343 y(This)g(function)h(will)h
 
21098
(PSK)f(creden)m(tial)j(\(i.e.,)390 3109 y(username)30
 
21099
b(and)g(passw)m(ord\).)390 3240 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)
 
21100
26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)390
 
21101
3371 y Fn(Since:)41 b FB(2.4.0)150 3565 y Fv(gn)m(utls)p
 
21102
483 3565 37 5 v 55 w(psk)p 719 3565 V 54 w(set)p 925
 
21103
3565 V 54 w(serv)m(er)p 1301 3565 V 54 w(dh)p 1491 3565
 
21104
V 54 w(params)3350 3755 y FB([F)-8 b(unction])-3599 b
 
21105
Fh(void)54 b(gnutls_psk_set_server_dh)q(_pa)q(ram)q(s)565
 
21106
3865 y Fg(\()p Ff(gn)m(utls)p 846 3865 28 4 v 41 w(psk)p
 
21107
1022 3865 V 39 w(serv)m(er)p 1294 3865 V 41 w(creden)m(tials)p
 
21108
1756 3865 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
 
21109
2327 3865 V 40 w(dh)p 2469 3865 V 39 w(params)p 2797
 
21110
3865 V 40 w(t)f Fe(dh_params)12 b Fg(\))390 3974 y Ff(res)t
 
21111
FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984 3974 V 41 w(psk)p
 
21112
1160 3974 V 39 w(serv)m(er)p 1432 3974 V 41 w(creden)m(tials)p
 
21113
1894 3974 V 41 w(t)h(structure)390 4106 y Ff(dh)p 498
 
21114
4106 V 39 w(params)t FB(:)40 b(is)30 b(a)h(structure)f(that)h(holds)f
 
21115
(di\016e)g(hellman)h(parameters.)390 4237 y(This)g(function)h(will)h
21112
21116
(set)f(the)g(di\016e)g(hellman)h(parameters)f(for)g(an)g(anon)m(ymous)g
21113
 
(serv)m(er)g(to)h(use.)390 1453 y(These)d(parameters)h(will)g(b)s(e)e
 
21117
(serv)m(er)g(to)h(use.)390 4347 y(These)d(parameters)h(will)g(b)s(e)e
21114
21118
(used)h(in)g(Di\016e)h(Hellman)g(with)f(PSK)g(cipher)g(suites.)150
21115
 
1657 y Fv(gn)m(utls)p 483 1657 37 5 v 55 w(psk)p 719
21116
 
1657 V 54 w(set)p 925 1657 V 54 w(serv)m(er)p 1301 1657
21117
 
V 54 w(params)p 1743 1657 V 54 w(function)3350 1859 y
 
21119
4540 y Fv(gn)m(utls)p 483 4540 37 5 v 55 w(psk)p 719
 
21120
4540 V 54 w(set)p 925 4540 V 54 w(serv)m(er)p 1301 4540
 
21121
V 54 w(params)p 1743 4540 V 54 w(function)3350 4731 y
21118
21122
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_psk_set_server_pa)q
21119
 
(ram)q(s_f)q(unc)q(tion)565 1969 y Fg(\()p Ff(gn)m(utls)p
21120
 
846 1969 28 4 v 41 w(psk)p 1022 1969 V 39 w(serv)m(er)p
21121
 
1294 1969 V 41 w(creden)m(tials)p 1756 1969 V 41 w(t)31
21122
 
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2327 1969 V 40 w(params)p
21123
 
2656 1969 V 40 w(function)f(*)h Fe(func)12 b Fg(\))390
21124
 
2078 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984
21125
 
2078 V 41 w(certi\014cate)p 1412 2078 V 42 w(creden)m(tials)p
21126
 
1875 2078 V 41 w(t)h(structure)390 2218 y Ff(func)6 b
 
21123
(ram)q(s_f)q(unc)q(tion)565 4840 y Fg(\()p Ff(gn)m(utls)p
 
21124
846 4840 28 4 v 41 w(psk)p 1022 4840 V 39 w(serv)m(er)p
 
21125
1294 4840 V 41 w(creden)m(tials)p 1756 4840 V 41 w(t)31
 
21126
b Fe(res)12 b Ff(,)31 b(gn)m(utls)p 2327 4840 V 40 w(params)p
 
21127
2656 4840 V 40 w(function)f(*)h Fe(func)12 b Fg(\))390
 
21128
4950 y Ff(res)t FB(:)40 b(is)31 b(a)f(gn)m(utls)p 984
 
21129
4950 V 41 w(certi\014cate)p 1412 4950 V 42 w(creden)m(tials)p
 
21130
1875 4950 V 41 w(t)h(structure)390 5081 y Ff(func)6 b
21127
21131
FB(:)39 b(is)31 b(the)f(function)g(to)i(b)s(e)d(called)390
21128
 
2357 y(This)43 b(function)g(will)h(set)h(a)f(callbac)m(k)i(in)d(order)g
 
21132
5213 y(This)43 b(function)g(will)h(set)h(a)f(callbac)m(k)i(in)d(order)g
21129
21133
(for)h(the)g(serv)m(er)g(to)g(get)h(the)f(di\016e)g(hellman)390
21130
 
2467 y(parameters)31 b(for)f(PSK)f(authen)m(tication.)43
21131
 
b(The)30 b(callbac)m(k)i(should)e(return)f(zero)i(on)g(success.)150
21132
 
2671 y Fv(gn)m(utls)p 483 2671 37 5 v 55 w(record)p 878
21133
 
2671 V 54 w(c)m(hec)m(k)p 1225 2671 V 52 w(p)s(ending)3350
21134
 
2873 y FB([F)-8 b(unction])-3599 b Fh(size_t)54 b
21135
 
(gnutls_record_check_pe)q(ndi)q(ng)e Fg(\()p Ff(gn)m(utls)p
21136
 
2255 2873 28 4 v 41 w(session)p 2565 2873 V 40 w(t)30
21137
 
b Fe(session)12 b Fg(\))390 2983 y Ff(session)p FB(:)41
21138
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21139
 
3122 y(This)35 b(function)g(c)m(hec)m(ks)h(if)g(there)f(are)h(an)m(y)g
21140
 
(data)g(to)g(receiv)m(e)h(in)e(the)h(gn)m(utls)f(bu\013ers.)55
21141
 
b(Returns)390 3232 y(the)32 b(size)h(of)f(that)g(data)g(or)g(0.)45
21142
 
b(Notice)34 b(that)f(y)m(ou)f(ma)m(y)g(also)h(use)e Ft(select\(\))f
21143
 
FB(to)i(c)m(hec)m(k)i(for)d(data)390 3342 y(in)36 b(a)h(TCP)f
21144
 
(connection,)j(instead)e(of)f(this)h(function.)58 b(\(gn)m(utls)37
21145
 
b(lea)m(v)m(es)i(some)e(data)g(in)f(the)h(tcp)390 3451
21146
 
y(bu\013er)29 b(in)h(order)g(for)g(select)i(to)g(w)m(ork\).)150
21147
 
3656 y Fv(gn)m(utls)p 483 3656 37 5 v 55 w(record)p 878
21148
 
3656 V 54 w(disable)p 1300 3656 V 55 w(padding)3350 3857
 
21134
5322 y(parameters)31 b(for)f(PSK)f(authen)m(tication.)43
 
21135
b(The)30 b(callbac)m(k)i(should)e(return)f(zero)i(on)g(success.)p
 
21136
eop end
 
21137
%%Page: 163 169
 
21138
TeXDict begin 163 168 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21139
b(F)-8 b(unction)31 b(Reference)2237 b(163)150 299 y
 
21140
Fv(gn)m(utls)p 483 299 37 5 v 55 w(record)p 878 299 V
 
21141
54 w(c)m(hec)m(k)p 1225 299 V 52 w(p)s(ending)3350 502
 
21142
y FB([F)-8 b(unction])-3599 b Fh(size_t)54 b(gnutls_record_check_pe)q
 
21143
(ndi)q(ng)e Fg(\()p Ff(gn)m(utls)p 2255 502 28 4 v 41
 
21144
w(session)p 2565 502 V 40 w(t)30 b Fe(session)12 b Fg(\))390
 
21145
611 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
21146
b FB(structure.)390 752 y(This)35 b(function)g(c)m(hec)m(ks)h(if)g
 
21147
(there)f(are)h(an)m(y)g(data)g(to)g(receiv)m(e)h(in)e(the)h(gn)m(utls)f
 
21148
(bu\013ers.)55 b(Returns)390 861 y(the)32 b(size)h(of)f(that)g(data)g
 
21149
(or)g(0.)45 b(Notice)34 b(that)f(y)m(ou)f(ma)m(y)g(also)h(use)e
 
21150
Ft(select\(\))f FB(to)i(c)m(hec)m(k)i(for)d(data)390
 
21151
971 y(in)36 b(a)h(TCP)f(connection,)j(instead)e(of)f(this)h(function.)
 
21152
58 b(\(gn)m(utls)37 b(lea)m(v)m(es)i(some)e(data)g(in)f(the)h(tcp)390
 
21153
1081 y(bu\013er)29 b(in)h(order)g(for)g(select)i(to)g(w)m(ork\).)150
 
21154
1286 y Fv(gn)m(utls)p 483 1286 37 5 v 55 w(record)p 878
 
21155
1286 V 54 w(disable)p 1300 1286 V 55 w(padding)3350 1489
21149
21156
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_record_disable_pa)q
21150
 
(ddi)q(ng)e Fg(\()p Ff(gn)m(utls)p 2255 3857 28 4 v 41
21151
 
w(session)p 2565 3857 V 40 w(t)30 b Fe(session)12 b Fg(\))390
21152
 
3967 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21153
 
b FB(structure.)390 4107 y(Used)35 b(to)i(disabled)e(padding)f(in)h
 
21157
(ddi)q(ng)e Fg(\()p Ff(gn)m(utls)p 2255 1489 28 4 v 41
 
21158
w(session)p 2565 1489 V 40 w(t)30 b Fe(session)12 b Fg(\))390
 
21159
1598 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
21160
b FB(structure.)390 1739 y(Used)35 b(to)i(disabled)e(padding)f(in)h
21154
21161
(TLS)g(1.0)h(and)f(ab)s(o)m(v)m(e.)58 b(Normally)36 b(y)m(ou)g(do)f
21155
 
(not)h(need)f(to)h(use)390 4216 y(this)25 b(function,)h(but)f(there)h
 
21162
(not)h(need)f(to)h(use)390 1848 y(this)25 b(function,)h(but)f(there)h
21156
21163
(are)f(buggy)g(clien)m(ts)i(that)f(complain)g(if)f(a)h(serv)m(er)f
21157
 
(pads)g(the)g(encrypted)390 4326 y(data.)41 b(This)30
 
21164
(pads)g(the)g(encrypted)390 1958 y(data.)41 b(This)30
21158
21165
b(of)h(course)f(will)h(disable)f(protection)i(against)g(statistical)h
21159
 
(attac)m(ks)f(on)f(the)f(data.)390 4465 y(Normally)25
 
21166
(attac)m(ks)f(on)f(the)f(data.)390 2098 y(Normally)25
21160
21167
b(only)f(serv)m(ers)g(that)g(require)g(maxim)m(um)g(compatibilit)m(y)i
21161
 
(with)e(ev)m(erything)g(out)g(there,)390 4575 y(need)30
21162
 
b(to)h(call)h(this)e(function.)150 4779 y Fv(gn)m(utls)p
21163
 
483 4779 37 5 v 55 w(record)p 878 4779 V 54 w(get)p 1097
21164
 
4779 V 54 w(direction)3350 4981 y FB([F)-8 b(unction])-3599
 
21168
(with)e(ev)m(erything)g(out)g(there,)390 2208 y(need)30
 
21169
b(to)h(call)h(this)e(function.)150 2413 y Fv(gn)m(utls)p
 
21170
483 2413 37 5 v 55 w(record)p 878 2413 V 54 w(get)p 1097
 
21171
2413 V 54 w(direction)3350 2616 y FB([F)-8 b(unction])-3599
21165
21172
b Fh(int)53 b(gnutls_record_get_dir)q(ecti)q(on)f Fg(\()p
21166
 
Ff(gn)m(utls)p 2098 4981 28 4 v 41 w(session)p 2408 4981
21167
 
V 40 w(t)30 b Fe(session)12 b Fg(\))390 5091 y Ff(session)p
 
21173
Ff(gn)m(utls)p 2098 2616 28 4 v 41 w(session)p 2408 2616
 
21174
V 40 w(t)30 b Fe(session)12 b Fg(\))390 2726 y Ff(session)p
21168
21175
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21169
 
5230 y(This)31 b(function)h(pro)m(vides)h(information)f(ab)s(out)g(the)
 
21176
2866 y(This)31 b(function)h(pro)m(vides)h(information)f(ab)s(out)g(the)
21170
21177
h(in)m(ternals)g(of)f(the)h(record)f(proto)s(col)h(and)f(is)390
21171
 
5340 y(only)27 b(useful)f(if)h(a)h(prior)e(gn)m(utls)i(function)e(call)
 
21178
2976 y(only)27 b(useful)f(if)h(a)h(prior)e(gn)m(utls)i(function)e(call)
21172
21179
j(\(e.g.)41 b Ft(gnutls_handshake\(\))p FB(\))22 b(w)m(as)28
21173
 
b(in)m(terrupted)p eop end
21174
 
%%Page: 163 169
21175
 
TeXDict begin 163 168 bop 150 -116 a FB(Chapter)30 b(9:)41
21176
 
b(F)-8 b(unction)31 b(Reference)2237 b(163)390 299 y(for)35
21177
 
b(some)h(reason,)h(that)e(is,)i(if)e(a)h(function)f(returned)f
21178
 
Ft(GNUTLS_E_INTERRUPTED)c FB(or)35 b Ft(GNUTLS_)390 408
21179
 
y(E_AGAIN)p FB(.)47 b(In)33 b(suc)m(h)f(a)i(case,)h(y)m(ou)f(migh)m(t)g
21180
 
(w)m(an)m(t)g(to)g(call)g Ft(select\(\))d FB(or)i Ft(poll\(\))f
21181
 
FB(b)s(efore)g(calling)390 518 y(the)d(in)m(terrupted)f(gn)m(utls)h
21182
 
(function)g(again.)41 b(T)-8 b(o)29 b(tell)i(y)m(ou)e(whether)f(a)h
21183
 
(\014le)g(descriptor)g(should)f(b)s(e)390 628 y(selected)j(for)f
21184
 
(either)g(reading)f(or)h(writing,)g Ft(gnutls_record_get_direct)o
21185
 
(ion\()o(\))24 b FB(returns)k(0)i(if)390 737 y(the)e(in)m(terrupted)f
21186
 
(function)h(w)m(as)g(trying)g(to)h(read)f(data,)h(and)e(1)i(if)f(it)g
21187
 
(w)m(as)g(trying)g(to)h(write)f(data.)390 876 y Fn(Returns:)40
21188
 
b FB(0)31 b(if)f(trying)h(to)g(read)f(data,)i(1)e(if)h(trying)f(to)h
21189
 
(write)g(data.)150 1079 y Fv(gn)m(utls)p 483 1079 37
21190
 
5 v 55 w(record)p 878 1079 V 54 w(get)p 1097 1079 V 54
21191
 
w(max)p 1378 1079 V 54 w(size)3350 1280 y FB([F)-8 b(unction])-3599
21192
 
b Fh(size_t)54 b(gnutls_record_get_max_)q(siz)q(e)d Fg(\()p
21193
 
Ff(gn)m(utls)p 2202 1280 28 4 v 41 w(session)p 2512 1280
21194
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 1390 y Ff(session)p
21195
 
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21196
 
1529 y(This)i(function)g(returns)g(the)h(maxim)m(um)f(record)h(pac)m(k)
 
21180
b(in)m(terrupted)390 3085 y(for)35 b(some)h(reason,)h(that)e(is,)i(if)e
 
21181
(a)h(function)f(returned)f Ft(GNUTLS_E_INTERRUPTED)c
 
21182
FB(or)35 b Ft(GNUTLS_)390 3195 y(E_AGAIN)p FB(.)47 b(In)33
 
21183
b(suc)m(h)f(a)i(case,)h(y)m(ou)f(migh)m(t)g(w)m(an)m(t)g(to)g(call)g
 
21184
Ft(select\(\))d FB(or)i Ft(poll\(\))f FB(b)s(efore)g(calling)390
 
21185
3304 y(the)d(in)m(terrupted)f(gn)m(utls)h(function)g(again.)41
 
21186
b(T)-8 b(o)29 b(tell)i(y)m(ou)e(whether)f(a)h(\014le)g(descriptor)g
 
21187
(should)f(b)s(e)390 3414 y(selected)j(for)f(either)g(reading)f(or)h
 
21188
(writing,)g Ft(gnutls_record_get_direct)o(ion\()o(\))24
 
21189
b FB(returns)k(0)i(if)390 3524 y(the)e(in)m(terrupted)f(function)h(w)m
 
21190
(as)g(trying)g(to)h(read)f(data,)h(and)e(1)i(if)f(it)g(w)m(as)g(trying)
 
21191
g(to)h(write)f(data.)390 3664 y Fn(Returns:)40 b FB(0)31
 
21192
b(if)f(trying)h(to)g(read)f(data,)i(1)e(if)h(trying)f(to)h(write)g
 
21193
(data.)150 3869 y Fv(gn)m(utls)p 483 3869 37 5 v 55 w(record)p
 
21194
878 3869 V 54 w(get)p 1097 3869 V 54 w(max)p 1378 3869
 
21195
V 54 w(size)3350 4072 y FB([F)-8 b(unction])-3599 b Fh(size_t)54
 
21196
b(gnutls_record_get_max_)q(siz)q(e)d Fg(\()p Ff(gn)m(utls)p
 
21197
2202 4072 28 4 v 41 w(session)p 2512 4072 V 40 w(t)31
 
21198
b Fe(session)12 b Fg(\))390 4182 y Ff(session)p FB(:)41
 
21199
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
 
21200
4322 y(This)i(function)g(returns)g(the)h(maxim)m(um)f(record)h(pac)m(k)
21197
21201
m(et)h(size)g(in)e(this)h(connection.)41 b(The)28 b(maxi-)390
21198
 
1638 y(m)m(um)i(record)g(size)h(is)g(negotiated)h(b)m(y)e(the)h(clien)m
 
21202
4432 y(m)m(um)i(record)g(size)h(is)g(negotiated)h(b)m(y)e(the)h(clien)m
21199
21203
(t)h(after)f(the)f(\014rst)g(handshak)m(e)g(message.)150
21200
 
1842 y Fv(gn)m(utls)p 483 1842 37 5 v 55 w(record)p 878
21201
 
1842 V 54 w(recv)3350 2043 y FB([F)-8 b(unction])-3599
 
21204
4637 y Fv(gn)m(utls)p 483 4637 37 5 v 55 w(record)p 878
 
21205
4637 V 54 w(recv)3350 4840 y FB([F)-8 b(unction])-3599
21202
21206
b Fh(ssize_t)54 b(gnutls_record_recv)d Fg(\()p Ff(gn)m(utls)p
21203
 
1836 2043 28 4 v 41 w(session)p 2146 2043 V 40 w(t)31
 
21207
1836 4840 28 4 v 41 w(session)p 2146 4840 V 40 w(t)31
21204
21208
b Fe(session)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(data)12
21205
 
b Ff(,)565 2153 y(size)p 712 2153 V 41 w(t)31 b Fe(sizeofdata)12
21206
 
b Fg(\))390 2262 y Ff(session)p FB(:)41 b(is)30 b(a)h
21207
 
Ft(gnutls_session_t)26 b FB(structure.)390 2401 y Ff(data)p
 
21209
b Ff(,)565 4949 y(size)p 712 4949 V 41 w(t)31 b Fe(sizeofdata)12
 
21210
b Fg(\))390 5059 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
21211
Ft(gnutls_session_t)26 b FB(structure.)390 5199 y Ff(data)p
21208
21212
FB(:)41 b(the)31 b(bu\013er)e(that)i(the)g(data)g(will)g(b)s(e)e(read)i
21209
 
(in)m(to)390 2540 y Ff(sizeofdata)p FB(:)43 b(the)30
21210
 
b(n)m(um)m(b)s(er)f(of)i(requested)f(b)m(ytes)390 2678
21211
 
y(This)k(function)g(has)h(the)g(similar)g(seman)m(tics)h(with)e
 
21213
(in)m(to)390 5340 y Ff(sizeofdata)p FB(:)43 b(the)30
 
21214
b(n)m(um)m(b)s(er)f(of)i(requested)f(b)m(ytes)p eop end
 
21215
%%Page: 164 170
 
21216
TeXDict begin 164 169 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21217
b(F)-8 b(unction)31 b(Reference)2237 b(164)390 299 y(This)34
 
21218
b(function)g(has)h(the)g(similar)g(seman)m(tics)h(with)e
21212
21219
Ft(recv\(\))p FB(.)52 b(The)34 b(only)h(di\013erence)g(is)g(that)g(is)
21213
 
390 2788 y(accepts)d(a)e(GNUTLS)g(session,)h(and)f(uses)g(di\013eren)m
21214
 
(t)h(error)f(co)s(des.)390 2927 y(In)k(the)i(sp)s(ecial)g(case)g(that)g
 
21220
390 408 y(accepts)d(a)e(GNUTLS)g(session,)h(and)f(uses)g(di\013eren)m
 
21221
(t)h(error)f(co)s(des.)390 545 y(In)k(the)i(sp)s(ecial)g(case)g(that)g
21215
21222
(a)f(serv)m(er)h(requests)f(a)g(renegotiation,)k(the)d(clien)m(t)g(ma)m
21216
 
(y)g(receiv)m(e)h(an)390 3036 y(error)31 b(co)s(de)i(of)f
 
21223
(y)g(receiv)m(e)h(an)390 655 y(error)31 b(co)s(de)i(of)f
21217
21224
Ft(GNUTLS_E_REHANDSHAKE)p FB(.)39 b(This)31 b(message)i(ma)m(y)g(b)s(e)
21218
 
e(simply)g(ignored,)i(replied)390 3146 y(with)f(an)h(alert)g(con)m
21219
 
(taining)h(NO)p 1531 3146 V 40 w(RENEGOTIA)-8 b(TION,)32
21220
 
b(or)h(replied)f(with)g(a)h(new)f(handshak)m(e,)390 3255
21221
 
y(dep)s(ending)d(on)h(the)h(clien)m(t's)h(will.)390 3394
 
21225
e(simply)g(ignored,)i(replied)390 764 y(with)f(an)h(alert)g(con)m
 
21226
(taining)h(NO)p 1531 764 28 4 v 40 w(RENEGOTIA)-8 b(TION,)32
 
21227
b(or)h(replied)f(with)g(a)h(new)f(handshak)m(e,)390 874
 
21228
y(dep)s(ending)d(on)h(the)h(clien)m(t's)h(will.)390 1010
21222
21229
y(If)20 b Ft(EINTR)g FB(is)g(returned)g(b)m(y)g(the)h(in)m(ternal)h
21223
21230
(push)d(function)h(\(the)h(default)g(is)g Ft(recv\(\))p
21224
 
FB(\))e(then)i Ft(GNUTLS_)390 3504 y(E_INTERRUPTED)33
 
21231
FB(\))e(then)i Ft(GNUTLS_)390 1120 y(E_INTERRUPTED)33
21225
21232
b FB(will)k(b)s(e)f(returned.)58 b(If)36 b Ft(GNUTLS_E_INTERRUPTED)c
21226
 
FB(or)k Ft(GNUTLS_E_AGAIN)d FB(is)390 3613 y(returned,)26
 
21233
FB(or)k Ft(GNUTLS_E_AGAIN)d FB(is)390 1229 y(returned,)26
21227
21234
b(y)m(ou)h(m)m(ust)f(call)i(this)f(function)f(again)h(to)g(get)h(the)f
21228
 
(data.)40 b(See)26 b(also)i Ft(gnutls_record_)390 3723
21229
 
y(get_direction\(\))p FB(.)390 3862 y(A)e(serv)m(er)h(ma)m(y)f(also)h
 
21235
(data.)40 b(See)26 b(also)i Ft(gnutls_record_)390 1339
 
21236
y(get_direction\(\))p FB(.)390 1475 y(A)e(serv)m(er)h(ma)m(y)f(also)h
21230
21237
(receiv)m(e)h Ft(GNUTLS_E_REHANDSHAKE)21 b FB(when)k(a)h(clien)m(t)i
21231
 
(has)e(initiated)h(a)g(hand-)390 3971 y(shak)m(e.)41
 
21238
(has)e(initiated)h(a)g(hand-)390 1585 y(shak)m(e.)41
21232
21239
b(In)27 b(that)i(case)h(the)e(serv)m(er)h(can)f(only)h(initiate)h(a)f
21233
 
(handshak)m(e)f(or)g(terminate)h(the)g(connec-)390 4081
21234
 
y(tion.)390 4220 y Fn(Returns:)68 b FB(the)44 b(n)m(um)m(b)s(er)f(of)h
 
21240
(handshak)m(e)f(or)g(terminate)h(the)g(connec-)390 1695
 
21241
y(tion.)390 1831 y Fn(Returns:)68 b FB(the)44 b(n)m(um)m(b)s(er)f(of)h
21235
21242
(b)m(ytes)h(receiv)m(ed)g(and)f(zero)g(on)g(EOF.)h(A)f(negativ)m(e)i
21236
 
(error)e(co)s(de)390 4329 y(is)c(returned)g(in)g(case)h(of)g(an)f
 
21243
(error)e(co)s(de)390 1941 y(is)c(returned)g(in)g(case)h(of)g(an)f
21237
21244
(error.)71 b(The)40 b(n)m(um)m(b)s(er)f(of)i(b)m(ytes)g(receiv)m(ed)g
21238
 
(migh)m(t)h(b)s(e)d(less)i(than)390 4439 y Ft(sizeofdata)p
21239
 
FB(.)150 4642 y Fv(gn)m(utls)p 483 4642 37 5 v 55 w(record)p
21240
 
878 4642 V 54 w(send)3350 4843 y FB([F)-8 b(unction])-3599
 
21245
(migh)m(t)h(b)s(e)d(less)i(than)390 2050 y Ft(sizeofdata)p
 
21246
FB(.)150 2252 y Fv(gn)m(utls)p 483 2252 37 5 v 55 w(record)p
 
21247
878 2252 V 54 w(send)3350 2450 y FB([F)-8 b(unction])-3599
21241
21248
b Fh(ssize_t)54 b(gnutls_record_send)d Fg(\()p Ff(gn)m(utls)p
21242
 
1836 4843 28 4 v 41 w(session)p 2146 4843 V 40 w(t)31
21243
 
b Fe(session)12 b Ff(,)32 b(const)f(v)m(oid)g(*)565 4953
21244
 
y Fe(data)12 b Ff(,)31 b(size)p 988 4953 V 41 w(t)g Fe(sizeofdata)12
21245
 
b Fg(\))390 5062 y Ff(session)p FB(:)41 b(is)30 b(a)h
21246
 
Ft(gnutls_session_t)26 b FB(structure.)390 5201 y Ff(data)p
 
21249
1836 2450 28 4 v 41 w(session)p 2146 2450 V 40 w(t)31
 
21250
b Fe(session)12 b Ff(,)32 b(const)f(v)m(oid)g(*)565 2560
 
21251
y Fe(data)12 b Ff(,)31 b(size)p 988 2560 V 41 w(t)g Fe(sizeofdata)12
 
21252
b Fg(\))390 2669 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
21253
Ft(gnutls_session_t)26 b FB(structure.)390 2806 y Ff(data)p
21247
21254
FB(:)41 b(con)m(tains)32 b(the)f(data)g(to)g(send)390
21248
 
5340 y Ff(sizeofdata)p FB(:)43 b(is)30 b(the)h(length)f(of)h(the)f
21249
 
(data)p eop end
21250
 
%%Page: 164 170
21251
 
TeXDict begin 164 169 bop 150 -116 a FB(Chapter)30 b(9:)41
21252
 
b(F)-8 b(unction)31 b(Reference)2237 b(164)390 299 y(This)34
21253
 
b(function)g(has)h(the)g(similar)g(seman)m(tics)h(with)e
21254
 
Ft(send\(\))p FB(.)52 b(The)34 b(only)h(di\013erence)g(is)g(that)g(is)
21255
 
390 408 y(accepts)d(a)e(GNUTLS)g(session,)h(and)f(uses)g(di\013eren)m
21256
 
(t)h(error)f(co)s(des.)390 549 y(Note)35 b(that)f(if)g(the)g(send)f
21257
 
(bu\013er)g(is)h(full,)g Ft(send\(\))e FB(will)i(blo)s(c)m(k)h(this)e
21258
 
(function.)51 b(See)34 b(the)g Ft(send\(\))390 659 y
21259
 
FB(do)s(cumen)m(tation)29 b(for)e(full)h(information.)40
21260
 
b(Y)-8 b(ou)29 b(can)f(replace)h(the)f(default)g(push)e(function)i(b)m
21261
 
(y)f(us-)390 768 y(ing)f Ft(gnutls_transport_set_ptr2)o(\(\))20
21262
 
b FB(with)25 b(a)i(call)g(to)g Ft(send\(\))d FB(with)h(a)i(MSG)p
21263
 
3192 768 28 4 v 40 w(DONTW)-10 b(AIT)390 878 y(\015ag)31
21264
 
b(if)f(blo)s(c)m(king)h(is)g(a)f(problem.)390 1018 y(If)g(the)h(EINTR)f
21265
 
(is)h(returned)e(b)m(y)i(the)f(in)m(ternal)i(push)d(function)h(\(the)h
21266
 
(default)g(is)g Ft(send\(\)})d FB(then)390 1128 y Ft
21267
 
(GNUTLS_E_INTERRUPTED)j FB(will)38 b(b)s(e)e(returned.)59
21268
 
b(If)36 b Ft(GNUTLS_E_INTERRUPTED)c FB(or)k Ft(GNUTLS_E_)390
21269
 
1238 y(AGAIN)44 b FB(is)h(returned,)i(y)m(ou)f(m)m(ust)f(call)h(this)f
21270
 
(function)g(again,)50 b(with)45 b(the)g(same)g(parameters;)390
21271
 
1347 y(alternativ)m(ely)36 b(y)m(ou)d(could)g(pro)m(vide)g(a)g
21272
 
Ft(NULL)f FB(p)s(oin)m(ter)g(for)h(data,)h(and)f(0)g(for)g(size.)49
21273
 
b(cf.)f Ft(gnutls_)390 1457 y(record_get_direction\(\))p
21274
 
FB(.)390 1597 y Fn(Returns:)i FB(the)36 b(n)m(um)m(b)s(er)e(of)h(b)m
21275
 
(ytes)h(sen)m(t,)h(or)e(a)h(negativ)m(e)i(error)d(co)s(de.)55
21276
 
b(The)35 b(n)m(um)m(b)s(er)f(of)h(b)m(ytes)390 1707 y(sen)m(t)h(migh)m
21277
 
(t)h(b)s(e)e(less)h(than)g Ft(sizeofdata)p FB(.)54 b(The)36
21278
 
b(maxim)m(um)g(n)m(um)m(b)s(er)e(of)i(b)m(ytes)g(this)g(function)390
21279
 
1816 y(can)31 b(send)e(in)h(a)h(single)g(call)h(dep)s(ends)c(on)j(the)f
21280
 
(negotiated)j(maxim)m(um)d(record)g(size.)150 2022 y
21281
 
Fv(gn)m(utls)p 483 2022 37 5 v 55 w(record)p 878 2022
21282
 
V 54 w(set)p 1084 2022 V 54 w(max)p 1365 2022 V 54 w(size)3350
21283
 
2225 y FB([F)-8 b(unction])-3599 b Fh(ssize_t)54 b
21284
 
(gnutls_record_set_max)q(_si)q(ze)e Fg(\()p Ff(gn)m(utls)p
21285
 
2255 2225 28 4 v 41 w(session)p 2565 2225 V 40 w(t)30
21286
 
b Fe(session)12 b Ff(,)565 2334 y(size)p 712 2334 V 41
21287
 
w(t)31 b Fe(size)12 b Fg(\))390 2444 y Ff(session)p FB(:)41
 
21255
2942 y Ff(sizeofdata)p FB(:)43 b(is)30 b(the)h(length)f(of)h(the)f
 
21256
(data)390 3079 y(This)k(function)g(has)h(the)g(similar)g(seman)m(tics)h
 
21257
(with)e Ft(send\(\))p FB(.)52 b(The)34 b(only)h(di\013erence)g(is)g
 
21258
(that)g(is)390 3189 y(accepts)d(a)e(GNUTLS)g(session,)h(and)f(uses)g
 
21259
(di\013eren)m(t)h(error)f(co)s(des.)390 3325 y(Note)35
 
21260
b(that)f(if)g(the)g(send)f(bu\013er)g(is)h(full,)g Ft(send\(\))e
 
21261
FB(will)i(blo)s(c)m(k)h(this)e(function.)51 b(See)34
 
21262
b(the)g Ft(send\(\))390 3435 y FB(do)s(cumen)m(tation)29
 
21263
b(for)e(full)h(information.)40 b(Y)-8 b(ou)29 b(can)f(replace)h(the)f
 
21264
(default)g(push)e(function)i(b)m(y)f(us-)390 3544 y(ing)f
 
21265
Ft(gnutls_transport_set_ptr2)o(\(\))20 b FB(with)25 b(a)i(call)g(to)g
 
21266
Ft(send\(\))d FB(with)h(a)i(MSG)p 3192 3544 V 40 w(DONTW)-10
 
21267
b(AIT)390 3654 y(\015ag)31 b(if)f(blo)s(c)m(king)h(is)g(a)f(problem.)
 
21268
390 3790 y(If)g(the)h(EINTR)f(is)h(returned)e(b)m(y)i(the)f(in)m
 
21269
(ternal)i(push)d(function)h(\(the)h(default)g(is)g Ft(send\(\)})d
 
21270
FB(then)390 3900 y Ft(GNUTLS_E_INTERRUPTED)j FB(will)38
 
21271
b(b)s(e)e(returned.)59 b(If)36 b Ft(GNUTLS_E_INTERRUPTED)c
 
21272
FB(or)k Ft(GNUTLS_E_)390 4009 y(AGAIN)44 b FB(is)h(returned,)i(y)m(ou)f
 
21273
(m)m(ust)f(call)h(this)f(function)g(again,)50 b(with)45
 
21274
b(the)g(same)g(parameters;)390 4119 y(alternativ)m(ely)36
 
21275
b(y)m(ou)d(could)g(pro)m(vide)g(a)g Ft(NULL)f FB(p)s(oin)m(ter)g(for)h
 
21276
(data,)h(and)f(0)g(for)g(size.)49 b(cf.)f Ft(gnutls_)390
 
21277
4229 y(record_get_direction\(\))p FB(.)390 4365 y Fn(Returns:)i
 
21278
FB(the)36 b(n)m(um)m(b)s(er)e(of)h(b)m(ytes)h(sen)m(t,)h(or)e(a)h
 
21279
(negativ)m(e)i(error)d(co)s(de.)55 b(The)35 b(n)m(um)m(b)s(er)f(of)h(b)
 
21280
m(ytes)390 4475 y(sen)m(t)h(migh)m(t)h(b)s(e)e(less)h(than)g
 
21281
Ft(sizeofdata)p FB(.)54 b(The)36 b(maxim)m(um)g(n)m(um)m(b)s(er)e(of)i
 
21282
(b)m(ytes)g(this)g(function)390 4584 y(can)31 b(send)e(in)h(a)h(single)
 
21283
g(call)h(dep)s(ends)c(on)j(the)f(negotiated)j(maxim)m(um)d(record)g
 
21284
(size.)150 4786 y Fv(gn)m(utls)p 483 4786 37 5 v 55 w(record)p
 
21285
878 4786 V 54 w(set)p 1084 4786 V 54 w(max)p 1365 4786
 
21286
V 54 w(size)3350 4984 y FB([F)-8 b(unction])-3599 b Fh(ssize_t)54
 
21287
b(gnutls_record_set_max)q(_si)q(ze)e Fg(\()p Ff(gn)m(utls)p
 
21288
2255 4984 28 4 v 41 w(session)p 2565 4984 V 40 w(t)30
 
21289
b Fe(session)12 b Ff(,)565 5094 y(size)p 712 5094 V 41
 
21290
w(t)31 b Fe(size)12 b Fg(\))390 5203 y Ff(session)p FB(:)41
21288
21291
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21289
 
2584 y Ff(size)5 b FB(:)42 b(is)30 b(the)h(new)f(size)390
21290
 
2725 y(This)e(function)g(sets)h(the)g(maxim)m(um)f(record)h(pac)m(k)m
21291
 
(et)h(size)g(in)e(this)g(connection.)42 b(This)28 b(prop)s(ert)m(y)390
21292
 
2834 y(can)j(only)f(b)s(e)g(set)h(to)g(clien)m(ts.)42
 
21292
5340 y Ff(size)5 b FB(:)42 b(is)30 b(the)h(new)f(size)p
 
21293
eop end
 
21294
%%Page: 165 171
 
21295
TeXDict begin 165 170 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21296
b(F)-8 b(unction)31 b(Reference)2237 b(165)390 299 y(This)28
 
21297
b(function)g(sets)h(the)g(maxim)m(um)f(record)h(pac)m(k)m(et)h(size)g
 
21298
(in)e(this)g(connection.)42 b(This)28 b(prop)s(ert)m(y)390
 
21299
408 y(can)j(only)f(b)s(e)g(set)h(to)g(clien)m(ts.)42
21293
21300
b(The)30 b(serv)m(er)h(ma)m(y)g(c)m(ho)s(ose)g(not)g(to)g(accept)h(the)
21294
 
e(requested)g(size.)390 2975 y(Acceptable)j(v)-5 b(alues)32
 
21301
e(requested)g(size.)390 544 y(Acceptable)j(v)-5 b(alues)32
21295
21302
b(are)g(512\(=2)p Ft(^)p FB(9\),)i(1024\(=2)p Ft(^)p
21296
21303
FB(10\),)h(2048\(=2)p Ft(^)p FB(11\))g(and)30 b(4096\(=2)p
21297
 
Ft(^)p FB(12\).)47 b(Re-)390 3085 y(turns)39 b(0)h(on)f(success.)69
 
21304
Ft(^)p FB(12\).)47 b(Re-)390 654 y(turns)39 b(0)h(on)f(success.)69
21298
21305
b(The)40 b(requested)f(record)h(size)h(do)s(es)e(get)i(in)e(e\013ect)j
21299
 
(immediately)f(only)390 3194 y(while)30 b(sending)g(data.)42
 
21306
(immediately)f(only)390 763 y(while)30 b(sending)g(data.)42
21300
21307
b(The)29 b(receiv)m(e)k(part)d(will)h(tak)m(e)h(e\013ect)f(after)g(a)g
21301
 
(successful)f(handshak)m(e.)390 3335 y(This)g(function)g(uses)h(a)g
21302
 
(TLS)f(extension)h(called)h('max)f(record)g(size'.)43
21303
 
b(Not)32 b(all)f(TLS)f(implemen-)390 3444 y(tations)i(use)e(or)g(ev)m
21304
 
(en)h(understand)e(this)h(extension.)150 3650 y Fv(gn)m(utls)p
21305
 
483 3650 37 5 v 55 w(rehandshak)m(e)3350 3852 y FB([F)-8
 
21308
(successful)f(handshak)m(e.)390 899 y(This)g(function)g(uses)h(a)g(TLS)
 
21309
f(extension)h(called)h('max)f(record)g(size'.)43 b(Not)32
 
21310
b(all)f(TLS)f(implemen-)390 1009 y(tations)i(use)e(or)g(ev)m(en)h
 
21311
(understand)e(this)h(extension.)150 1209 y Fv(gn)m(utls)p
 
21312
483 1209 37 5 v 55 w(rehandshak)m(e)3350 1407 y FB([F)-8
21306
21313
b(unction])-3599 b Fh(int)53 b(gnutls_rehandshake)e Fg(\()p
21307
 
Ff(gn)m(utls)p 1627 3852 28 4 v 41 w(session)p 1937 3852
21308
 
V 40 w(t)31 b Fe(session)12 b Fg(\))390 3962 y Ff(session)p
 
21314
Ff(gn)m(utls)p 1627 1407 28 4 v 41 w(session)p 1937 1407
 
21315
V 40 w(t)31 b Fe(session)12 b Fg(\))390 1517 y Ff(session)p
21309
21316
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21310
 
4103 y(This)32 b(function)h(will)h(renegotiate)h(securit)m(y)f
 
21317
1652 y(This)32 b(function)h(will)h(renegotiate)h(securit)m(y)f
21311
21318
(parameters)g(with)e(the)i(clien)m(t.)50 b(This)33 b(should)f(only)390
21312
 
4212 y(b)s(e)e(called)h(in)f(case)i(of)e(a)h(serv)m(er.)390
21313
 
4353 y(This)37 b(message)i(informs)e(the)h(p)s(eer)g(that)g(w)m(e)h(w)m
 
21319
1762 y(b)s(e)e(called)h(in)f(case)i(of)e(a)h(serv)m(er.)390
 
21320
1897 y(This)37 b(message)i(informs)e(the)h(p)s(eer)g(that)g(w)m(e)h(w)m
21314
21321
(an)m(t)f(to)h(renegotiate)h(parameters)f(\(p)s(erform)e(a)390
21315
 
4462 y(handshak)m(e\).)390 4603 y(If)25 b(this)h(function)f(succeeds)h
 
21322
2007 y(handshak)m(e\).)390 2143 y(If)25 b(this)h(function)f(succeeds)h
21316
21323
(\(returns)f(0\),)j(y)m(ou)e(m)m(ust)g(call)h(the)e Ft
21317
 
(gnutls_handshake\(\))c FB(function)390 4712 y(in)30
 
21324
(gnutls_handshake\(\))c FB(function)390 2252 y(in)30
21318
21325
b(order)g(to)h(negotiate)i(the)e(new)e(parameters.)390
21319
 
4853 y(If)40 b(the)h(clien)m(t)h(do)s(es)f(not)g(wish)f(to)h
 
21326
2388 y(If)40 b(the)h(clien)m(t)h(do)s(es)f(not)g(wish)f(to)h
21320
21327
(renegotiate)i(parameters)f(he)e(will)h(should)f(with)g(an)h(alert)390
21321
 
4963 y(message,)36 b(th)m(us)e(the)g(return)f(co)s(de)h(will)g(b)s(e)f
 
21328
2498 y(message,)36 b(th)m(us)e(the)g(return)f(co)s(de)h(will)g(b)s(e)f
21322
21329
Ft(GNUTLS_E_WARNING_ALERT_RE)o(CEI)o(VED)27 b FB(and)34
21323
 
b(the)390 5072 y(alert)h(will)g(b)s(e)f Ft(GNUTLS_A_NO_RENEGOTIATI)o
 
21330
b(the)390 2607 y(alert)h(will)g(b)s(e)f Ft(GNUTLS_A_NO_RENEGOTIATI)o
21324
21331
(ON)p FB(.)46 b(A)35 b(clien)m(t)h(ma)m(y)e(also)i(c)m(ho)s(ose)f(to)g
21325
 
(ignore)g(this)390 5182 y(message.)390 5322 y Fn(Returns:)40
 
21332
(ignore)g(this)390 2717 y(message.)390 2852 y Fn(Returns:)40
21326
21333
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(otherwise)h(an)f
21327
 
(error.)p eop end
21328
 
%%Page: 165 171
21329
 
TeXDict begin 165 170 bop 150 -116 a FB(Chapter)30 b(9:)41
21330
 
b(F)-8 b(unction)31 b(Reference)2237 b(165)150 299 y
21331
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(rsa)p 696 299 V 54
21332
 
w(exp)s(ort)p 1101 299 V 54 w(get)p 1320 299 V 54 w(mo)s(dulus)p
21333
 
1826 299 V 57 w(bits)3350 496 y FB([F)-8 b(unction])-3599
21334
 
b Fh(int)53 b(gnutls_rsa_export_get)q(_mod)q(ulu)q(s_b)q(its)f
21335
 
Fg(\()p Ff(gn)m(utls)p 2464 496 28 4 v 41 w(session)p
21336
 
2774 496 V 40 w(t)565 605 y Fe(session)12 b Fg(\))390
21337
 
715 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
21338
 
850 y(Get)g(the)g(exp)s(ort)f(RSA)g(parameter's)h(mo)s(dulus)e(size.)
21339
 
390 984 y Fn(Returns:)49 b FB(the)34 b(bits)h(used)e(in)i(the)f(last)i
21340
 
(RSA-EXPOR)-8 b(T)34 b(k)m(ey)h(exc)m(hange)h(with)e(the)h(p)s(eer,)g
21341
 
(or)g(a)390 1094 y(negativ)m(e)e(v)-5 b(alue)30 b(in)g(case)i(of)e
21342
 
(error.)150 1293 y Fv(gn)m(utls)p 483 1293 37 5 v 55
21343
 
w(rsa)p 696 1293 V 54 w(exp)s(ort)p 1101 1293 V 54 w(get)p
21344
 
1320 1293 V 54 w(pubk)m(ey)3350 1490 y FB([F)-8 b(unction])-3599
 
21334
(error.)150 3053 y Fv(gn)m(utls)p 483 3053 37 5 v 55
 
21335
w(rsa)p 696 3053 V 54 w(exp)s(ort)p 1101 3053 V 54 w(get)p
 
21336
1320 3053 V 54 w(mo)s(dulus)p 1826 3053 V 57 w(bits)3350
 
21337
3251 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_rsa_export_get)q
 
21338
(_mod)q(ulu)q(s_b)q(its)f Fg(\()p Ff(gn)m(utls)p 2464
 
21339
3251 28 4 v 41 w(session)p 2774 3251 V 40 w(t)565 3360
 
21340
y Fe(session)12 b Fg(\))390 3470 y Ff(session)p FB(:)41
 
21341
b(is)30 b(a)h(gn)m(utls)g(session)390 3606 y(Get)g(the)g(exp)s(ort)f
 
21342
(RSA)g(parameter's)h(mo)s(dulus)e(size.)390 3741 y Fn(Returns:)49
 
21343
b FB(the)34 b(bits)h(used)e(in)i(the)f(last)i(RSA-EXPOR)-8
 
21344
b(T)34 b(k)m(ey)h(exc)m(hange)h(with)e(the)h(p)s(eer,)g(or)g(a)390
 
21345
3851 y(negativ)m(e)e(v)-5 b(alue)30 b(in)g(case)i(of)e(error.)150
 
21346
4051 y Fv(gn)m(utls)p 483 4051 37 5 v 55 w(rsa)p 696
 
21347
4051 V 54 w(exp)s(ort)p 1101 4051 V 54 w(get)p 1320 4051
 
21348
V 54 w(pubk)m(ey)3350 4249 y FB([F)-8 b(unction])-3599
21345
21349
b Fh(int)53 b(gnutls_rsa_export_get)q(_pub)q(key)f Fg(\()p
21346
 
Ff(gn)m(utls)p 2150 1490 28 4 v 41 w(session)p 2460 1490
21347
 
V 40 w(t)31 b Fe(session)12 b Ff(,)565 1600 y(gn)m(utls)p
21348
 
811 1600 V 41 w(datum)p 1110 1600 V 39 w(t)31 b(*)g Fe(exponent)12
21349
 
b Ff(,)32 b(gn)m(utls)p 2016 1600 V 40 w(datum)p 2314
21350
 
1600 V 40 w(t)f(*)f Fe(modulus)12 b Fg(\))390 1709 y
 
21350
Ff(gn)m(utls)p 2150 4249 28 4 v 41 w(session)p 2460 4249
 
21351
V 40 w(t)31 b Fe(session)12 b Ff(,)565 4359 y(gn)m(utls)p
 
21352
811 4359 V 41 w(datum)p 1110 4359 V 39 w(t)31 b(*)g Fe(exponent)12
 
21353
b Ff(,)32 b(gn)m(utls)p 2016 4359 V 40 w(datum)p 2314
 
21354
4359 V 40 w(t)f(*)f Fe(modulus)12 b Fg(\))390 4469 y
21351
21355
Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
21352
 
1844 y Ff(exp)s(onen)m(t)r FB(:)41 b(will)30 b(hold)g(the)h(exp)s(onen)
21353
 
m(t.)390 1978 y Ff(mo)s(dulus)t FB(:)39 b(will)30 b(hold)h(the)f(mo)s
21354
 
(dulus.)390 2113 y(This)c(function)g(will)h(return)e(the)i(p)s(eer's)f
 
21356
4604 y Ff(exp)s(onen)m(t)r FB(:)41 b(will)30 b(hold)g(the)h(exp)s(onen)
 
21357
m(t.)390 4740 y Ff(mo)s(dulus)t FB(:)39 b(will)30 b(hold)h(the)f(mo)s
 
21358
(dulus.)390 4876 y(This)c(function)g(will)h(return)e(the)i(p)s(eer's)f
21355
21359
(public)f(k)m(ey)j(exp)s(onen)m(t)e(and)g(mo)s(dulus)f(used)g(in)h(the)
21356
 
h(last)390 2223 y(RSA-EXPOR)-8 b(T)31 b(authen)m(tication.)48
 
21360
h(last)390 4985 y(RSA-EXPOR)-8 b(T)31 b(authen)m(tication.)48
21357
21361
b(The)31 b(output)h(parameters)g(m)m(ust)g(b)s(e)f(freed)g(with)h
21358
 
Ft(gnutls_)390 2332 y(free\(\))p FB(.)390 2467 y Fn(Returns:)46
 
21362
Ft(gnutls_)390 5095 y(free\(\))p FB(.)390 5230 y Fn(Returns:)46
21359
21363
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
21360
21364
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
21361
 
2576 y(returned.)150 2776 y Fv(gn)m(utls)p 483 2776 37
21362
 
5 v 55 w(rsa)p 696 2776 V 54 w(params)p 1138 2776 V 54
21363
 
w(cp)m(y)3350 2973 y FB([F)-8 b(unction])-3599 b Fh(int)53
21364
 
b(gnutls_rsa_params_cpy)f Fg(\()p Ff(gn)m(utls)p 1784
21365
 
2973 28 4 v 41 w(rsa)p 1942 2973 V 40 w(params)p 2271
21366
 
2973 V 39 w(t)31 b Fe(dst)12 b Ff(,)565 3082 y(gn)m(utls)p
21367
 
811 3082 V 41 w(rsa)p 969 3082 V 39 w(params)p 1297 3082
21368
 
V 40 w(t)31 b Fe(src)12 b Fg(\))390 3192 y Ff(dst)r FB(:)40
21369
 
b(Is)30 b(the)h(destination)g(structure,)f(whic)m(h)g(should)g(b)s(e)f
21370
 
(initialized.)390 3326 y Ff(src)6 b FB(:)40 b(Is)30 b(the)h(source)f
21371
 
(structure)390 3461 y(This)g(function)g(will)g(cop)m(y)h(the)g(RSA)f
21372
 
(parameters)h(structure)f(from)f(source)i(to)g(destination.)150
21373
 
3660 y Fv(gn)m(utls)p 483 3660 37 5 v 55 w(rsa)p 696
21374
 
3660 V 54 w(params)p 1138 3660 V 54 w(deinit)3350 3857
21375
 
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_rsa_params_deinit)e
21376
 
Fg(\()p Ff(gn)m(utls)p 1993 3857 28 4 v 41 w(rsa)p 2151
21377
 
3857 V 40 w(params)p 2480 3857 V 40 w(t)30 b Fe(rsa_params)12
21378
 
b Fg(\))390 3967 y Ff(rsa)p 513 3967 V 40 w(params)t
 
21365
5340 y(returned.)p eop end
 
21366
%%Page: 166 172
 
21367
TeXDict begin 166 171 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21368
b(F)-8 b(unction)31 b(Reference)2237 b(166)150 299 y
 
21369
Fv(gn)m(utls)p 483 299 37 5 v 55 w(rsa)p 696 299 V 54
 
21370
w(params)p 1138 299 V 54 w(cp)m(y)3350 499 y FB([F)-8
 
21371
b(unction])-3599 b Fh(int)53 b(gnutls_rsa_params_cpy)f
 
21372
Fg(\()p Ff(gn)m(utls)p 1784 499 28 4 v 41 w(rsa)p 1942
 
21373
499 V 40 w(params)p 2271 499 V 39 w(t)31 b Fe(dst)12
 
21374
b Ff(,)565 609 y(gn)m(utls)p 811 609 V 41 w(rsa)p 969
 
21375
609 V 39 w(params)p 1297 609 V 40 w(t)31 b Fe(src)12
 
21376
b Fg(\))390 718 y Ff(dst)r FB(:)40 b(Is)30 b(the)h(destination)g
 
21377
(structure,)f(whic)m(h)g(should)g(b)s(e)f(initialized.)390
 
21378
856 y Ff(src)6 b FB(:)40 b(Is)30 b(the)h(source)f(structure)390
 
21379
994 y(This)g(function)g(will)g(cop)m(y)h(the)g(RSA)f(parameters)h
 
21380
(structure)f(from)f(source)i(to)g(destination.)150 1197
 
21381
y Fv(gn)m(utls)p 483 1197 37 5 v 55 w(rsa)p 696 1197
 
21382
V 54 w(params)p 1138 1197 V 54 w(deinit)3350 1397 y FB([F)-8
 
21383
b(unction])-3599 b Fh(void)54 b(gnutls_rsa_params_deinit)e
 
21384
Fg(\()p Ff(gn)m(utls)p 1993 1397 28 4 v 41 w(rsa)p 2151
 
21385
1397 V 40 w(params)p 2480 1397 V 40 w(t)30 b Fe(rsa_params)12
 
21386
b Fg(\))390 1507 y Ff(rsa)p 513 1507 V 40 w(params)t
21379
21387
FB(:)40 b(Is)30 b(a)h(structure)f(that)h(holds)e(the)i(parameters)390
21380
 
4102 y(This)f(function)g(will)g(deinitialize)j(the)e(RSA)e(parameters)i
21381
 
(structure.)150 4301 y Fv(gn)m(utls)p 483 4301 37 5 v
21382
 
55 w(rsa)p 696 4301 V 54 w(params)p 1138 4301 V 54 w(exp)s(ort)p
21383
 
1543 4301 V 55 w(pk)m(cs1)3350 4498 y FB([F)-8 b(unction])-3599
 
21388
1645 y(This)f(function)g(will)g(deinitialize)j(the)e(RSA)e(parameters)i
 
21389
(structure.)150 1847 y Fv(gn)m(utls)p 483 1847 37 5 v
 
21390
55 w(rsa)p 696 1847 V 54 w(params)p 1138 1847 V 54 w(exp)s(ort)p
 
21391
1543 1847 V 55 w(pk)m(cs1)3350 2048 y FB([F)-8 b(unction])-3599
21384
21392
b Fh(int)53 b(gnutls_rsa_params_exp)q(ort_)q(pkc)q(s1)f
21385
 
Fg(\()p Ff(gn)m(utls)p 2255 4498 28 4 v 41 w(rsa)p 2413
21386
 
4498 V 39 w(params)p 2741 4498 V 40 w(t)31 b Fe(params)12
21387
 
b Ff(,)565 4607 y(gn)m(utls)p 811 4607 V 41 w(x509)p
21388
 
1035 4607 V 41 w(crt)p 1187 4607 V 40 w(fm)m(t)p 1363
21389
 
4607 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(unsigned)d(c)m(har)i(*)g
21390
 
Fe(params_data)12 b Ff(,)33 b(size)p 3288 4607 V 41 w(t)e(*)565
21391
 
4717 y Fe(params_data_size)12 b Fg(\))390 4827 y Ff(params)t
21392
 
FB(:)40 b(Holds)31 b(the)f(RSA)g(parameters)390 4961
 
21393
Fg(\()p Ff(gn)m(utls)p 2255 2048 28 4 v 41 w(rsa)p 2413
 
21394
2048 V 39 w(params)p 2741 2048 V 40 w(t)31 b Fe(params)12
 
21395
b Ff(,)565 2157 y(gn)m(utls)p 811 2157 V 41 w(x509)p
 
21396
1035 2157 V 41 w(crt)p 1187 2157 V 40 w(fm)m(t)p 1363
 
21397
2157 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(unsigned)d(c)m(har)i(*)g
 
21398
Fe(params_data)12 b Ff(,)33 b(size)p 3288 2157 V 41 w(t)e(*)565
 
21399
2267 y Fe(params_data_size)12 b Fg(\))390 2376 y Ff(params)t
 
21400
FB(:)40 b(Holds)31 b(the)f(RSA)g(parameters)390 2514
21393
21401
y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
21394
 
b(One)30 b(of)h(PEM)f(or)g(DER.)390 5096 y Ff(params)p
21395
 
685 5096 V 40 w(data)p FB(:)40 b(will)29 b(con)m(tain)h(a)f(PK)m(CS1)f
 
21402
b(One)30 b(of)h(PEM)f(or)g(DER.)390 2652 y Ff(params)p
 
21403
685 2652 V 40 w(data)p FB(:)40 b(will)29 b(con)m(tain)h(a)f(PK)m(CS1)f
21396
21404
(RSAPublicKey)g(structure)g(PEM)g(or)h(DER)f(enco)s(ded)390
21397
 
5230 y Ff(params)p 685 5230 V 40 w(data)p 901 5230 V
 
21405
2790 y Ff(params)p 685 2790 V 40 w(data)p 901 2790 V
21398
21406
40 w(size)5 b FB(:)43 b(holds)30 b(the)h(size)g(of)g(params)p
21399
 
2115 5230 V 40 w(data)g(\(and)g(will)g(b)s(e)f(replaced)h(b)m(y)g(the)g
21400
 
(actual)390 5340 y(size)g(of)g(parameters\))p eop end
21401
 
%%Page: 166 172
21402
 
TeXDict begin 166 171 bop 150 -116 a FB(Chapter)30 b(9:)41
21403
 
b(F)-8 b(unction)31 b(Reference)2237 b(166)390 299 y(This)43
21404
 
b(function)h(will)g(exp)s(ort)g(the)g(giv)m(en)h(RSA)e(parameters)h(to)
21405
 
h(a)f(PK)m(CS1)g(RSAPublicKey)390 408 y(structure.)103
21406
 
b(If)51 b(the)h(bu\013er)e(pro)m(vided)h(is)g(not)h(long)g(enough)f(to)
21407
 
h(hold)f(the)h(output,)k(then)390 518 y(GNUTLS)p 777
21408
 
518 28 4 v 40 w(E)p 879 518 V 40 w(SHOR)-8 b(T)p 1234
21409
 
518 V 39 w(MEMOR)g(Y)p 1699 518 V 41 w(BUFFER)31 b(will)g(b)s(e)f
21410
 
(returned.)390 652 y(If)35 b(the)h(structure)f(is)g(PEM)h(enco)s(ded,)g
21411
 
(it)g(will)g(ha)m(v)m(e)h(a)f(header)f(of)g Ft(")p FB(BEGIN)h(RSA)f
21412
 
(PRIV)-10 b(A)i(TE)390 761 y(KEY)p Ft(")p FB(.)390 895
21413
 
y(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)h(v)-5
21414
 
b(alue)31 b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
21415
 
1092 y Fv(gn)m(utls)p 483 1092 37 5 v 55 w(rsa)p 696
21416
 
1092 V 54 w(params)p 1138 1092 V 54 w(exp)s(ort)p 1543
21417
 
1092 V 55 w(ra)m(w)3350 1287 y FB([F)-8 b(unction])-3599
 
21407
2115 2790 V 40 w(data)g(\(and)g(will)g(b)s(e)f(replaced)h(b)m(y)g(the)g
 
21408
(actual)390 2900 y(size)g(of)g(parameters\))390 3038
 
21409
y(This)43 b(function)h(will)g(exp)s(ort)g(the)g(giv)m(en)h(RSA)e
 
21410
(parameters)h(to)h(a)f(PK)m(CS1)g(RSAPublicKey)390 3147
 
21411
y(structure.)103 b(If)51 b(the)h(bu\013er)e(pro)m(vided)h(is)g(not)h
 
21412
(long)g(enough)f(to)h(hold)f(the)h(output,)k(then)390
 
21413
3257 y(GNUTLS)p 777 3257 V 40 w(E)p 879 3257 V 40 w(SHOR)-8
 
21414
b(T)p 1234 3257 V 39 w(MEMOR)g(Y)p 1699 3257 V 41 w(BUFFER)31
 
21415
b(will)g(b)s(e)f(returned.)390 3395 y(If)35 b(the)h(structure)f(is)g
 
21416
(PEM)h(enco)s(ded,)g(it)g(will)g(ha)m(v)m(e)h(a)f(header)f(of)g
 
21417
Ft(")p FB(BEGIN)h(RSA)f(PRIV)-10 b(A)i(TE)390 3505 y(KEY)p
 
21418
Ft(")p FB(.)390 3643 y(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)h
 
21419
(v)-5 b(alue)31 b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)
 
21420
150 3845 y Fv(gn)m(utls)p 483 3845 37 5 v 55 w(rsa)p
 
21421
696 3845 V 54 w(params)p 1138 3845 V 54 w(exp)s(ort)p
 
21422
1543 3845 V 55 w(ra)m(w)3350 4045 y FB([F)-8 b(unction])-3599
21418
21423
b Fh(int)53 b(gnutls_rsa_params_exp)q(ort_)q(raw)f Fg(\()p
21419
 
Ff(gn)m(utls)p 2150 1287 28 4 v 41 w(rsa)p 2308 1287
21420
 
V 40 w(params)p 2637 1287 V 39 w(t)31 b Fe(params)12
21421
 
b Ff(,)565 1396 y(gn)m(utls)p 811 1396 V 41 w(datum)p
21422
 
1110 1396 V 39 w(t)31 b(*)g Fe(m)12 b Ff(,)30 b(gn)m(utls)p
21423
 
1650 1396 V 40 w(datum)p 1948 1396 V 40 w(t)h(*)f Fe(e)12
21424
 
b Ff(,)31 b(gn)m(utls)p 2489 1396 V 40 w(datum)p 2787
21425
 
1396 V 40 w(t)f(*)h Fe(d)12 b Ff(,)30 b(gn)m(utls)p 3327
21426
 
1396 V 41 w(datum)p 3626 1396 V 39 w(t)565 1506 y(*)h
21427
 
Fe(p)12 b Ff(,)30 b(gn)m(utls)p 1006 1506 V 41 w(datum)p
21428
 
1305 1506 V 39 w(t)h(*)g Fe(q)12 b Ff(,)30 b(gn)m(utls)p
21429
 
1845 1506 V 40 w(datum)p 2143 1506 V 40 w(t)h(*)f Fe(u)12
 
21424
Ff(gn)m(utls)p 2150 4045 28 4 v 41 w(rsa)p 2308 4045
 
21425
V 40 w(params)p 2637 4045 V 39 w(t)31 b Fe(params)12
 
21426
b Ff(,)565 4155 y(gn)m(utls)p 811 4155 V 41 w(datum)p
 
21427
1110 4155 V 39 w(t)31 b(*)g Fe(m)12 b Ff(,)30 b(gn)m(utls)p
 
21428
1650 4155 V 40 w(datum)p 1948 4155 V 40 w(t)h(*)f Fe(e)12
 
21429
b Ff(,)31 b(gn)m(utls)p 2489 4155 V 40 w(datum)p 2787
 
21430
4155 V 40 w(t)f(*)h Fe(d)12 b Ff(,)30 b(gn)m(utls)p 3327
 
21431
4155 V 41 w(datum)p 3626 4155 V 39 w(t)565 4265 y(*)h
 
21432
Fe(p)12 b Ff(,)30 b(gn)m(utls)p 1006 4265 V 41 w(datum)p
 
21433
1305 4265 V 39 w(t)h(*)g Fe(q)12 b Ff(,)30 b(gn)m(utls)p
 
21434
1845 4265 V 40 w(datum)p 2143 4265 V 40 w(t)h(*)f Fe(u)12
21430
21435
b Ff(,)31 b(unsigned)e(in)m(t)i(*)g Fe(bits)12 b Fg(\))390
21431
 
1615 y Ff(params)t FB(:)40 b(a)31 b(structure)f(that)h(holds)f(the)g
21432
 
(rsa)g(parameters)390 1749 y Ff(m)p FB(:)40 b(will)31
21433
 
b(hold)f(the)h(mo)s(dulus)390 1882 y Ff(e)5 b FB(:)41
 
21436
4374 y Ff(params)t FB(:)40 b(a)31 b(structure)f(that)h(holds)f(the)g
 
21437
(rsa)g(parameters)390 4512 y Ff(m)p FB(:)40 b(will)31
 
21438
b(hold)f(the)h(mo)s(dulus)390 4650 y Ff(e)5 b FB(:)41
21434
21439
b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m(t)390
21435
 
2016 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
21436
 
b(ate)31 b(exp)s(onen)m(t)390 2149 y Ff(p)s FB(:)40 b(will)31
21437
 
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 2283 y Ff(q)r
 
21440
4788 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
 
21441
b(ate)31 b(exp)s(onen)m(t)390 4926 y Ff(p)s FB(:)40 b(will)31
 
21442
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 5064 y Ff(q)r
21438
21443
FB(:)41 b(will)30 b(hold)g(the)h(second)f(prime)g(\(q\))390
21439
 
2416 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
21440
 
2550 y Ff(bits)t FB(:)40 b(if)31 b(non)e(n)m(ull)i(will)f(hold)h(the)f
21441
 
(prime's)g(n)m(um)m(b)s(er)f(of)i(bits)390 2683 y(This)41
 
21444
5202 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
 
21445
5340 y Ff(bits)t FB(:)40 b(if)31 b(non)e(n)m(ull)i(will)f(hold)h(the)f
 
21446
(prime's)g(n)m(um)m(b)s(er)f(of)i(bits)p eop end
 
21447
%%Page: 167 173
 
21448
TeXDict begin 167 172 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21449
b(F)-8 b(unction)31 b(Reference)2237 b(167)390 299 y(This)41
21442
21450
b(function)g(will)h(exp)s(ort)f(the)h(RSA)f(parameters)h(found)e(in)h
21443
 
(the)h(giv)m(en)h(structure.)73 b(The)390 2793 y(new)35
 
21451
(the)h(giv)m(en)h(structure.)73 b(The)390 408 y(new)35
21444
21452
b(parameters)g(will)h(b)s(e)f(allo)s(cated)i(using)e
21445
21453
Ft(gnutls_malloc\(\))c FB(and)j(will)i(b)s(e)e(stored)i(in)f(the)390
21446
 
2902 y(appropriate)30 b(datum.)150 3100 y Fv(gn)m(utls)p
21447
 
483 3100 37 5 v 55 w(rsa)p 696 3100 V 54 w(params)p 1138
21448
 
3100 V 54 w(generate2)3350 3294 y FB([F)-8 b(unction])-3599
 
21454
518 y(appropriate)30 b(datum.)150 714 y Fv(gn)m(utls)p
 
21455
483 714 37 5 v 55 w(rsa)p 696 714 V 54 w(params)p 1138
 
21456
714 V 54 w(generate2)3350 907 y FB([F)-8 b(unction])-3599
21449
21457
b Fh(int)53 b(gnutls_rsa_params_gen)q(erat)q(e2)f Fg(\()p
21450
 
Ff(gn)m(utls)p 2098 3294 28 4 v 41 w(rsa)p 2256 3294
21451
 
V 40 w(params)p 2585 3294 V 39 w(t)31 b Fe(params)12
21452
 
b Ff(,)565 3404 y(unsigned)29 b(in)m(t)i Fe(bits)12 b
21453
 
Fg(\))390 3513 y Ff(params)t FB(:)40 b(The)30 b(structure)g(where)g
21454
 
(the)g(parameters)h(will)g(b)s(e)e(stored)390 3647 y
21455
 
Ff(bits)t FB(:)40 b(is)31 b(the)f(prime's)g(n)m(um)m(b)s(er)f(of)i
21456
 
(bits)390 3780 y(This)24 b(function)g(will)h(generate)h(new)e(temp)s
21457
 
(orary)g(RSA)h(parameters)g(for)f(use)g(in)g(RSA-EXPOR)-8
21458
 
b(T)390 3890 y(ciphersuites.)41 b(This)29 b(function)h(is)h(normally)f
21459
 
(slo)m(w.)390 4024 y(Note)25 b(that)f(if)g(the)f(parameters)h(are)g(to)
21460
 
g(b)s(e)f(used)g(in)g(exp)s(ort)h(cipher)f(suites)h(the)f(bits)h(v)-5
21461
 
b(alue)24 b(should)390 4133 y(b)s(e)33 b(512)h(or)g(less.)50
 
21458
Ff(gn)m(utls)p 2098 907 28 4 v 41 w(rsa)p 2256 907 V
 
21459
40 w(params)p 2585 907 V 39 w(t)31 b Fe(params)12 b Ff(,)565
 
21460
1017 y(unsigned)29 b(in)m(t)i Fe(bits)12 b Fg(\))390
 
21461
1127 y Ff(params)t FB(:)40 b(The)30 b(structure)g(where)g(the)g
 
21462
(parameters)h(will)g(b)s(e)e(stored)390 1259 y Ff(bits)t
 
21463
FB(:)40 b(is)31 b(the)f(prime's)g(n)m(um)m(b)s(er)f(of)i(bits)390
 
21464
1392 y(This)24 b(function)g(will)h(generate)h(new)e(temp)s(orary)g(RSA)
 
21465
h(parameters)g(for)f(use)g(in)g(RSA-EXPOR)-8 b(T)390
 
21466
1502 y(ciphersuites.)41 b(This)29 b(function)h(is)h(normally)f(slo)m
 
21467
(w.)390 1635 y(Note)25 b(that)f(if)g(the)f(parameters)h(are)g(to)g(b)s
 
21468
(e)f(used)g(in)g(exp)s(ort)h(cipher)f(suites)h(the)f(bits)h(v)-5
 
21469
b(alue)24 b(should)390 1744 y(b)s(e)33 b(512)h(or)g(less.)50
21462
21470
b(Also)34 b(note)g(that)g(the)g(generation)h(of)e(new)g(RSA)g
21463
 
(parameters)h(is)f(only)h(useful)390 4243 y(to)d(serv)m(ers.)40
 
21471
(parameters)h(is)f(only)h(useful)390 1854 y(to)d(serv)m(ers.)40
21464
21472
b(Clien)m(ts)31 b(use)e(the)h(parameters)g(sen)m(t)h(b)m(y)e(the)h
21465
21473
(serv)m(er,)h(th)m(us)e(it's)i(no)e(use)h(calling)h(this)390
21466
 
4352 y(in)f(clien)m(t)i(side.)150 4550 y Fv(gn)m(utls)p
21467
 
483 4550 37 5 v 55 w(rsa)p 696 4550 V 54 w(params)p 1138
21468
 
4550 V 54 w(imp)s(ort)p 1558 4550 V 55 w(pk)m(cs1)3350
21469
 
4744 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_rsa_params_imp)q
21470
 
(ort_)q(pkc)q(s1)f Fg(\()p Ff(gn)m(utls)p 2255 4744 28
21471
 
4 v 41 w(rsa)p 2413 4744 V 39 w(params)p 2741 4744 V
21472
 
40 w(t)31 b Fe(params)12 b Ff(,)565 4854 y(const)31 b(gn)m(utls)p
21473
 
1049 4854 V 40 w(datum)p 1347 4854 V 40 w(t)g(*)f Fe(pkcs1_params)12
21474
 
b Ff(,)34 b(gn)m(utls)p 2463 4854 V 41 w(x509)p 2687
21475
 
4854 V 41 w(crt)p 2839 4854 V 40 w(fm)m(t)p 3015 4854
21476
 
V 41 w(t)c Fe(format)12 b Fg(\))390 4963 y Ff(params)t
 
21474
1963 y(in)f(clien)m(t)i(side.)150 2159 y Fv(gn)m(utls)p
 
21475
483 2159 37 5 v 55 w(rsa)p 696 2159 V 54 w(params)p 1138
 
21476
2159 V 54 w(imp)s(ort)p 1558 2159 V 55 w(pk)m(cs1)3350
 
21477
2353 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_rsa_params_imp)q
 
21478
(ort_)q(pkc)q(s1)f Fg(\()p Ff(gn)m(utls)p 2255 2353 28
 
21479
4 v 41 w(rsa)p 2413 2353 V 39 w(params)p 2741 2353 V
 
21480
40 w(t)31 b Fe(params)12 b Ff(,)565 2462 y(const)31 b(gn)m(utls)p
 
21481
1049 2462 V 40 w(datum)p 1347 2462 V 40 w(t)g(*)f Fe(pkcs1_params)12
 
21482
b Ff(,)34 b(gn)m(utls)p 2463 2462 V 41 w(x509)p 2687
 
21483
2462 V 41 w(crt)p 2839 2462 V 40 w(fm)m(t)p 3015 2462
 
21484
V 41 w(t)c Fe(format)12 b Fg(\))390 2572 y Ff(params)t
21477
21485
FB(:)40 b(A)31 b(structure)e(where)h(the)h(parameters)g(will)f(b)s(e)g
21478
 
(copied)h(to)390 5097 y Ff(pk)m(cs1)p 613 5097 V 41 w(params)t
 
21486
(copied)h(to)390 2705 y Ff(pk)m(cs1)p 613 2705 V 41 w(params)t
21479
21487
FB(:)43 b(should)32 b(con)m(tain)h(a)g(PK)m(CS1)f(RSAPublicKey)f
21480
 
(structure)h(PEM)g(or)g(DER)h(en-)390 5206 y(co)s(ded)390
21481
 
5340 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(params.)40
21482
 
b(PEM)31 b(or)f(DER.)p eop end
21483
 
%%Page: 167 173
21484
 
TeXDict begin 167 172 bop 150 -116 a FB(Chapter)30 b(9:)41
21485
 
b(F)-8 b(unction)31 b(Reference)2237 b(167)390 299 y(This)26
21486
 
b(function)h(will)g(extract)i(the)e(RSAPublicKey)f(found)g(in)h(a)g(PK)
21487
 
m(CS1)g(formatted)g(structure.)390 429 y(If)g(the)g(structure)g(is)g
21488
 
(PEM)g(enco)s(ded,)h(it)g(should)e(ha)m(v)m(e)i(a)g(header)f(of)g
21489
 
Ft(")p FB(BEGIN)g(RSA)g(PRIV)-10 b(A)i(TE)390 539 y(KEY)p
21490
 
Ft(")p FB(.)390 669 y(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)h
21491
 
(v)-5 b(alue)31 b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)
21492
 
150 861 y Fv(gn)m(utls)p 483 861 37 5 v 55 w(rsa)p 696
21493
 
861 V 54 w(params)p 1138 861 V 54 w(imp)s(ort)p 1558
21494
 
861 V 55 w(ra)m(w)3350 1050 y FB([F)-8 b(unction])-3599
 
21488
(structure)h(PEM)g(or)g(DER)h(en-)390 2814 y(co)s(ded)390
 
21489
2947 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(params.)40
 
21490
b(PEM)31 b(or)f(DER.)390 3080 y(This)c(function)h(will)g(extract)i(the)
 
21491
e(RSAPublicKey)f(found)g(in)h(a)g(PK)m(CS1)g(formatted)g(structure.)390
 
21492
3213 y(If)g(the)g(structure)g(is)g(PEM)g(enco)s(ded,)h(it)g(should)e
 
21493
(ha)m(v)m(e)i(a)g(header)f(of)g Ft(")p FB(BEGIN)g(RSA)g(PRIV)-10
 
21494
b(A)i(TE)390 3322 y(KEY)p Ft(")p FB(.)390 3455 y(In)30
 
21495
b(case)h(of)g(failure)f(a)h(negativ)m(e)h(v)-5 b(alue)31
 
21496
b(will)g(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
 
21497
3651 y Fv(gn)m(utls)p 483 3651 37 5 v 55 w(rsa)p 696
 
21498
3651 V 54 w(params)p 1138 3651 V 54 w(imp)s(ort)p 1558
 
21499
3651 V 55 w(ra)m(w)3350 3845 y FB([F)-8 b(unction])-3599
21495
21500
b Fh(int)53 b(gnutls_rsa_params_imp)q(ort_)q(raw)f Fg(\()p
21496
 
Ff(gn)m(utls)p 2150 1050 28 4 v 41 w(rsa)p 2308 1050
21497
 
V 40 w(params)p 2637 1050 V 39 w(t)565 1159 y Fe(rsa_params)12
21498
 
b Ff(,)33 b(const)e(gn)m(utls)p 1639 1159 V 41 w(datum)p
21499
 
1938 1159 V 39 w(t)g(*)g Fe(m)12 b Ff(,)30 b(const)h(gn)m(utls)p
21500
 
2716 1159 V 40 w(datum)p 3014 1159 V 40 w(t)f(*)h Fe(e)12
21501
 
b Ff(,)31 b(const)565 1269 y(gn)m(utls)p 811 1269 V 41
21502
 
w(datum)p 1110 1269 V 39 w(t)e(*)h Fe(d)12 b Ff(,)29
21503
 
b(const)g(gn)m(utls)p 1882 1269 V 41 w(datum)p 2181 1269
 
21501
Ff(gn)m(utls)p 2150 3845 28 4 v 41 w(rsa)p 2308 3845
 
21502
V 40 w(params)p 2637 3845 V 39 w(t)565 3954 y Fe(rsa_params)12
 
21503
b Ff(,)33 b(const)e(gn)m(utls)p 1639 3954 V 41 w(datum)p
 
21504
1938 3954 V 39 w(t)g(*)g Fe(m)12 b Ff(,)30 b(const)h(gn)m(utls)p
 
21505
2716 3954 V 40 w(datum)p 3014 3954 V 40 w(t)f(*)h Fe(e)12
 
21506
b Ff(,)31 b(const)565 4064 y(gn)m(utls)p 811 4064 V 41
 
21507
w(datum)p 1110 4064 V 39 w(t)e(*)h Fe(d)12 b Ff(,)29
 
21508
b(const)g(gn)m(utls)p 1882 4064 V 41 w(datum)p 2181 4064
21504
21509
V 39 w(t)h(*)f Fe(p)12 b Ff(,)29 b(const)h(gn)m(utls)p
21505
 
2954 1269 V 40 w(datum)p 3252 1269 V 40 w(t)f(*)g Fe(q)12
21506
 
b Ff(,)29 b(const)565 1378 y(gn)m(utls)p 811 1378 V 41
21507
 
w(datum)p 1110 1378 V 39 w(t)i(*)g Fe(u)12 b Fg(\))390
21508
 
1488 y Ff(rsa)p 513 1488 V 40 w(params)t FB(:)40 b(Is)30
 
21510
2954 4064 V 40 w(datum)p 3252 4064 V 40 w(t)f(*)g Fe(q)12
 
21511
b Ff(,)29 b(const)565 4173 y(gn)m(utls)p 811 4173 V 41
 
21512
w(datum)p 1110 4173 V 39 w(t)i(*)g Fe(u)12 b Fg(\))390
 
21513
4283 y Ff(rsa)p 513 4283 V 40 w(params)t FB(:)40 b(Is)30
21509
21514
b(a)h(structure)f(will)g(hold)g(the)h(parameters)390
21510
 
1618 y Ff(m)p FB(:)40 b(holds)30 b(the)h(mo)s(dulus)390
21511
 
1749 y Ff(e)5 b FB(:)41 b(holds)30 b(the)h(public)e(exp)s(onen)m(t)390
21512
 
1879 y Ff(d)t FB(:)40 b(holds)30 b(the)g(priv)-5 b(ate)31
21513
 
b(exp)s(onen)m(t)390 2010 y Ff(p)s FB(:)40 b(holds)30
21514
 
b(the)g(\014rst)g(prime)g(\(p\))390 2140 y Ff(q)r FB(:)41
21515
 
b(holds)30 b(the)g(second)h(prime)e(\(q\))390 2271 y
 
21515
4416 y Ff(m)p FB(:)40 b(holds)30 b(the)h(mo)s(dulus)390
 
21516
4549 y Ff(e)5 b FB(:)41 b(holds)30 b(the)h(public)e(exp)s(onen)m(t)390
 
21517
4681 y Ff(d)t FB(:)40 b(holds)30 b(the)g(priv)-5 b(ate)31
 
21518
b(exp)s(onen)m(t)390 4814 y Ff(p)s FB(:)40 b(holds)30
 
21519
b(the)g(\014rst)g(prime)g(\(p\))390 4947 y Ff(q)r FB(:)41
 
21520
b(holds)30 b(the)g(second)h(prime)e(\(q\))390 5080 y
21516
21521
Ff(u)p FB(:)40 b(holds)30 b(the)h(co)s(e\016cien)m(t)390
21517
 
2401 y(This)25 b(function)h(will)g(replace)h(the)f(parameters)g(in)g
 
21522
5213 y(This)25 b(function)h(will)g(replace)h(the)f(parameters)g(in)g
21518
21523
(the)g(giv)m(en)h(structure.)39 b(The)25 b(new)h(parameters)390
21519
 
2511 y(should)j(b)s(e)h(stored)h(in)f(the)g(appropriate)h(gn)m(utls)p
21520
 
2075 2511 V 40 w(datum.)150 2702 y Fv(gn)m(utls)p 483
21521
 
2702 37 5 v 55 w(rsa)p 696 2702 V 54 w(params)p 1138
21522
 
2702 V 54 w(init)3350 2891 y FB([F)-8 b(unction])-3599
21523
 
b Fh(int)53 b(gnutls_rsa_params_ini)q(t)e Fg(\()p Ff(gn)m(utls)p
21524
 
1836 2891 28 4 v 41 w(rsa)p 1994 2891 V 40 w(params)p
21525
 
2323 2891 V 40 w(t)30 b(*)h Fe(rsa_params)12 b Fg(\))390
21526
 
3001 y Ff(rsa)p 513 3001 V 40 w(params)t FB(:)40 b(Is)30
21527
 
b(a)h(structure)f(that)h(will)f(hold)g(the)h(parameters)390
21528
 
3131 y(This)f(function)g(will)g(initialize)j(the)e(temp)s(orary)f(RSA)f
21529
 
(parameters)i(structure.)150 3322 y Fv(gn)m(utls)p 483
21530
 
3322 37 5 v 55 w(serv)m(er)p 860 3322 V 54 w(name)p 1200
21531
 
3322 V 54 w(get)3350 3511 y FB([F)-8 b(unction])-3599
21532
 
b Fh(int)53 b(gnutls_server_name_ge)q(t)e Fg(\()p Ff(gn)m(utls)p
21533
 
1836 3511 28 4 v 41 w(session)p 2146 3511 V 40 w(t)31
21534
 
b Fe(session)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(data)12
21535
 
b Ff(,)565 3621 y(size)p 712 3621 V 41 w(t)31 b(*)f Fe(data_length)12
21536
 
b Ff(,)34 b(unsigned)29 b(in)m(t)i(*)g Fe(type)12 b Ff(,)31
21537
 
b(unsigned)e(in)m(t)i Fe(indx)12 b Fg(\))390 3730 y Ff(session)p
21538
 
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21539
 
3861 y Ff(data)p FB(:)41 b(will)31 b(hold)f(the)h(data)390
21540
 
3991 y Ff(data)p 572 3991 V 41 w(length)p FB(:)41 b(will)31
21541
 
b(hold)f(the)g(data)h(length.)41 b(Must)31 b(hold)f(the)g(maxim)m(um)h
21542
 
(size)g(of)f(data.)390 4122 y Ff(t)m(yp)s(e)5 b FB(:)41
21543
 
b(will)31 b(hold)f(the)g(serv)m(er)h(name)f(indicator)h(t)m(yp)s(e)390
21544
 
4252 y Ff(indx)6 b FB(:)40 b(is)31 b(the)f(index)g(of)h(the)f(serv)m
21545
 
(er)p 1628 4252 V 41 w(name)390 4383 y(This)37 b(function)h(will)g
21546
 
(allo)m(w)h(y)m(ou)f(to)h(get)g(the)f(name)g(indication)g(\(if)g(an)m
21547
 
(y\),)j(a)d(clien)m(t)i(has)d(sen)m(t.)390 4492 y(The)30
21548
 
b(name)g(indication)i(ma)m(y)f(b)s(e)e(an)m(y)i(of)f(the)h(en)m
21549
 
(umeration)g(gn)m(utls)p 2765 4492 V 40 w(serv)m(er)p
21550
 
3038 4492 V 41 w(name)p 3291 4492 V 40 w(t)m(yp)s(e)p
21551
 
3505 4492 V 40 w(t.)390 4623 y(If)38 b Ft(type)f FB(is)h(GNUTLS)p
21552
 
1204 4623 V 40 w(NAME)p 1525 4623 V 41 w(DNS,)g(then)g(this)h(function)
21553
 
f(is)g(to)h(b)s(e)f(used)g(b)m(y)g(serv)m(ers)g(that)390
21554
 
4733 y(supp)s(ort)29 b(virtual)h(hosting,)h(and)f(the)h(data)g(will)f
21555
 
(b)s(e)g(a)h(n)m(ull)f(terminated)h(UTF-8)g(string.)390
21556
 
4863 y(If)20 b Ft(data)f FB(has)h(not)g(enough)g(size)i(to)f(hold)f
21557
 
(the)g(serv)m(er)h(name)f(GNUTLS)p 2763 4863 V 40 w(E)p
21558
 
2865 4863 V 39 w(SHOR)-8 b(T)p 3219 4863 V 40 w(MEMOR)g(Y)p
21559
 
3685 4863 V 41 w(BUFFER)390 4973 y(is)30 b(returned,)g(and)g
21560
 
Ft(data_length)d FB(will)k(hold)f(the)g(required)g(size.)390
21561
 
5103 y Ft(index)c FB(is)h(used)g(to)h(retriev)m(e)g(more)g(than)f(one)g
21562
 
(serv)m(er)h(names)f(\(if)h(sen)m(t)g(b)m(y)f(the)g(clien)m(t\).)42
21563
 
b(The)27 b(\014rst)390 5213 y(serv)m(er)36 b(name)g(has)f(an)h(index)g
21564
 
(of)g(0,)h(the)f(second)g(1)g(and)g(so)g(on.)57 b(If)35
21565
 
b(no)h(name)f(with)h(the)g(giv)m(en)390 5322 y(index)30
21566
 
b(exists)h(GNUTLS)p 1273 5322 V 40 w(E)p 1375 5322 V
21567
 
40 w(REQUESTED)p 1993 5322 V 39 w(D)m(A)-8 b(T)g(A)p
21568
 
2284 5322 V 41 w(NOT)p 2530 5322 V 40 w(A)e(V)g(AILABLE)30
21569
 
b(is)h(returned.)p eop end
 
21524
5322 y(should)j(b)s(e)h(stored)h(in)f(the)g(appropriate)h(gn)m(utls)p
 
21525
2075 5322 V 40 w(datum.)p eop end
21570
21526
%%Page: 168 174
21571
21527
TeXDict begin 168 173 bop 150 -116 a FB(Chapter)30 b(9:)41
21572
21528
b(F)-8 b(unction)31 b(Reference)2237 b(168)150 299 y
21573
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(serv)m(er)p 860 299
21574
 
V 54 w(name)p 1200 299 V 54 w(set)3350 494 y FB([F)-8
21575
 
b(unction])-3599 b Fh(int)53 b(gnutls_server_name_se)q(t)e
21576
 
Fg(\()p Ff(gn)m(utls)p 1836 494 28 4 v 41 w(session)p
21577
 
2146 494 V 40 w(t)31 b Fe(session)12 b Ff(,)565 604 y(gn)m(utls)p
21578
 
811 604 V 41 w(serv)m(er)p 1085 604 V 40 w(name)p 1337
21579
 
604 V 40 w(t)m(yp)s(e)p 1551 604 V 40 w(t)31 b Fe(type)12
 
21529
Fv(gn)m(utls)p 483 299 37 5 v 55 w(rsa)p 696 299 V 54
 
21530
w(params)p 1138 299 V 54 w(init)3350 497 y FB([F)-8 b(unction])-3599
 
21531
b Fh(int)53 b(gnutls_rsa_params_ini)q(t)e Fg(\()p Ff(gn)m(utls)p
 
21532
1836 497 28 4 v 41 w(rsa)p 1994 497 V 40 w(params)p 2323
 
21533
497 V 40 w(t)30 b(*)h Fe(rsa_params)12 b Fg(\))390 606
 
21534
y Ff(rsa)p 513 606 V 40 w(params)t FB(:)40 b(Is)30 b(a)h(structure)f
 
21535
(that)h(will)f(hold)g(the)h(parameters)390 742 y(This)f(function)g
 
21536
(will)g(initialize)j(the)e(temp)s(orary)f(RSA)f(parameters)i
 
21537
(structure.)150 942 y Fv(gn)m(utls)p 483 942 37 5 v 55
 
21538
w(serv)m(er)p 860 942 V 54 w(name)p 1200 942 V 54 w(get)3350
 
21539
1140 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_server_name_ge)q
 
21540
(t)e Fg(\()p Ff(gn)m(utls)p 1836 1140 28 4 v 41 w(session)p
 
21541
2146 1140 V 40 w(t)31 b Fe(session)12 b Ff(,)32 b(v)m(oid)f(*)g
 
21542
Fe(data)12 b Ff(,)565 1249 y(size)p 712 1249 V 41 w(t)31
 
21543
b(*)f Fe(data_length)12 b Ff(,)34 b(unsigned)29 b(in)m(t)i(*)g
 
21544
Fe(type)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(indx)12
 
21545
b Fg(\))390 1359 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
21546
Ft(gnutls_session_t)26 b FB(structure.)390 1494 y Ff(data)p
 
21547
FB(:)41 b(will)31 b(hold)f(the)h(data)390 1630 y Ff(data)p
 
21548
572 1630 V 41 w(length)p FB(:)41 b(will)31 b(hold)f(the)g(data)h
 
21549
(length.)41 b(Must)31 b(hold)f(the)g(maxim)m(um)h(size)g(of)f(data.)390
 
21550
1765 y Ff(t)m(yp)s(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(serv)m(er)h
 
21551
(name)f(indicator)h(t)m(yp)s(e)390 1900 y Ff(indx)6 b
 
21552
FB(:)40 b(is)31 b(the)f(index)g(of)h(the)f(serv)m(er)p
 
21553
1628 1900 V 41 w(name)390 2036 y(This)37 b(function)h(will)g(allo)m(w)h
 
21554
(y)m(ou)f(to)h(get)g(the)f(name)g(indication)g(\(if)g(an)m(y\),)j(a)d
 
21555
(clien)m(t)i(has)d(sen)m(t.)390 2146 y(The)30 b(name)g(indication)i(ma)
 
21556
m(y)f(b)s(e)e(an)m(y)i(of)f(the)h(en)m(umeration)g(gn)m(utls)p
 
21557
2765 2146 V 40 w(serv)m(er)p 3038 2146 V 41 w(name)p
 
21558
3291 2146 V 40 w(t)m(yp)s(e)p 3505 2146 V 40 w(t.)390
 
21559
2281 y(If)38 b Ft(type)f FB(is)h(GNUTLS)p 1204 2281 V
 
21560
40 w(NAME)p 1525 2281 V 41 w(DNS,)g(then)g(this)h(function)f(is)g(to)h
 
21561
(b)s(e)f(used)g(b)m(y)g(serv)m(ers)g(that)390 2391 y(supp)s(ort)29
 
21562
b(virtual)h(hosting,)h(and)f(the)h(data)g(will)f(b)s(e)g(a)h(n)m(ull)f
 
21563
(terminated)h(UTF-8)g(string.)390 2526 y(If)20 b Ft(data)f
 
21564
FB(has)h(not)g(enough)g(size)i(to)f(hold)f(the)g(serv)m(er)h(name)f
 
21565
(GNUTLS)p 2763 2526 V 40 w(E)p 2865 2526 V 39 w(SHOR)-8
 
21566
b(T)p 3219 2526 V 40 w(MEMOR)g(Y)p 3685 2526 V 41 w(BUFFER)390
 
21567
2636 y(is)30 b(returned,)g(and)g Ft(data_length)d FB(will)k(hold)f(the)
 
21568
g(required)g(size.)390 2771 y Ft(index)c FB(is)h(used)g(to)h(retriev)m
 
21569
(e)g(more)g(than)f(one)g(serv)m(er)h(names)f(\(if)h(sen)m(t)g(b)m(y)f
 
21570
(the)g(clien)m(t\).)42 b(The)27 b(\014rst)390 2881 y(serv)m(er)36
 
21571
b(name)g(has)f(an)h(index)g(of)g(0,)h(the)f(second)g(1)g(and)g(so)g
 
21572
(on.)57 b(If)35 b(no)h(name)f(with)h(the)g(giv)m(en)390
 
21573
2990 y(index)30 b(exists)h(GNUTLS)p 1273 2990 V 40 w(E)p
 
21574
1375 2990 V 40 w(REQUESTED)p 1993 2990 V 39 w(D)m(A)-8
 
21575
b(T)g(A)p 2284 2990 V 41 w(NOT)p 2530 2990 V 40 w(A)e(V)g(AILABLE)30
 
21576
b(is)h(returned.)150 3190 y Fv(gn)m(utls)p 483 3190 37
 
21577
5 v 55 w(serv)m(er)p 860 3190 V 54 w(name)p 1200 3190
 
21578
V 54 w(set)3350 3388 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
21579
b(gnutls_server_name_se)q(t)e Fg(\()p Ff(gn)m(utls)p
 
21580
1836 3388 28 4 v 41 w(session)p 2146 3388 V 40 w(t)31
 
21581
b Fe(session)12 b Ff(,)565 3498 y(gn)m(utls)p 811 3498
 
21582
V 41 w(serv)m(er)p 1085 3498 V 40 w(name)p 1337 3498
 
21583
V 40 w(t)m(yp)s(e)p 1551 3498 V 40 w(t)31 b Fe(type)12
21580
21584
b Ff(,)31 b(const)g(v)m(oid)g(*)g Fe(name)12 b Ff(,)31
21581
 
b(size)p 2861 604 V 41 w(t)g Fe(name_length)12 b Fg(\))390
21582
 
714 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21583
 
b FB(structure.)390 848 y Ff(t)m(yp)s(e)5 b FB(:)41 b(sp)s(eci\014es)30
21584
 
b(the)h(indicator)g(t)m(yp)s(e)390 981 y Ff(name)5 b
21585
 
FB(:)41 b(is)30 b(a)h(string)f(that)h(con)m(tains)h(the)e(serv)m(er)h
21586
 
(name.)390 1115 y Ff(name)p 608 1115 V 40 w(length)p
21587
 
FB(:)41 b(holds)30 b(the)h(length)f(of)h(name)390 1249
21588
 
y(This)43 b(function)g(is)h(to)g(b)s(e)f(used)g(b)m(y)h(clien)m(ts)h
21589
 
(that)f(w)m(an)m(t)h(to)f(inform)f(\(via)i(a)f(TLS)e(extension)390
21590
 
1359 y(mec)m(hanism\))28 b(the)f(serv)m(er)g(of)g(the)g(name)g(they)h
 
21585
b(size)p 2861 3498 V 41 w(t)g Fe(name_length)12 b Fg(\))390
 
21586
3607 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
21587
b FB(structure.)390 3743 y Ff(t)m(yp)s(e)5 b FB(:)41
 
21588
b(sp)s(eci\014es)30 b(the)h(indicator)g(t)m(yp)s(e)390
 
21589
3878 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(string)f(that)h(con)m(tains)h
 
21590
(the)e(serv)m(er)h(name.)390 4014 y Ff(name)p 608 4014
 
21591
V 40 w(length)p FB(:)41 b(holds)30 b(the)h(length)f(of)h(name)390
 
21592
4149 y(This)43 b(function)g(is)h(to)g(b)s(e)f(used)g(b)m(y)h(clien)m
 
21593
(ts)h(that)f(w)m(an)m(t)h(to)f(inform)f(\(via)i(a)f(TLS)e(extension)390
 
21594
4259 y(mec)m(hanism\))28 b(the)f(serv)m(er)g(of)g(the)g(name)g(they)h
21591
21595
(connected)g(to.)40 b(This)26 b(should)g(b)s(e)g(used)h(b)m(y)f(clien)m
21592
 
(ts)390 1468 y(that)31 b(connect)g(to)g(serv)m(ers)g(that)g(do)f
21593
 
(virtual)h(hosting.)390 1602 y(The)k(v)-5 b(alue)36 b(of)f
 
21596
(ts)390 4368 y(that)31 b(connect)g(to)g(serv)m(ers)g(that)g(do)f
 
21597
(virtual)h(hosting.)390 4504 y(The)k(v)-5 b(alue)36 b(of)f
21594
21598
Ft(name)f FB(dep)s(ends)g(on)h(the)g Ft(ind)g FB(t)m(yp)s(e.)56
21595
 
b(In)34 b(case)j(of)e(GNUTLS)p 3050 1602 V 40 w(NAME)p
21596
 
3371 1602 V 40 w(DNS,)h(an)390 1712 y(ASCI)s(I)c(or)h(UTF-8)i(n)m(ull)e
 
21599
b(In)34 b(case)j(of)e(GNUTLS)p 3050 4504 V 40 w(NAME)p
 
21600
3371 4504 V 40 w(DNS,)h(an)390 4613 y(ASCI)s(I)c(or)h(UTF-8)i(n)m(ull)e
21597
21601
(terminated)h(string,)h(without)e(the)h(trailing)g(dot,)h(is)e(exp)s
21598
 
(ected.)51 b(IPv4)390 1821 y(or)30 b(IPv6)h(addresses)f(are)g(not)h(p)s
21599
 
(ermitted.)150 2020 y Fv(gn)m(utls)p 483 2020 37 5 v
21600
 
55 w(session)p 901 2020 V 55 w(enable)p 1298 2020 V 55
21601
 
w(compatibilit)m(y)p 2061 2020 V 53 w(mo)s(de)3350 2215
 
21602
(ected.)51 b(IPv4)390 4723 y(or)30 b(IPv6)h(addresses)f(are)g(not)h(p)s
 
21603
(ermitted.)150 4923 y Fv(gn)m(utls)p 483 4923 37 5 v
 
21604
55 w(session)p 901 4923 V 55 w(enable)p 1298 4923 V 55
 
21605
w(compatibilit)m(y)p 2061 4923 V 53 w(mo)s(de)3350 5121
21602
21606
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_session_enable_co)q
21603
 
(mpa)q(tib)q(ili)q(ty_m)q(ode)565 2325 y Fg(\()p Ff(gn)m(utls)p
21604
 
846 2325 28 4 v 41 w(session)p 1156 2325 V 40 w(t)31
21605
 
b Fe(session)12 b Fg(\))390 2434 y Ff(session)p FB(:)41
21606
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21607
 
2568 y(This)45 b(function)h(can)h(b)s(e)e(used)h(to)h(disable)f
21608
 
(certain)h(\(securit)m(y\))h(features)f(in)e(TLS)h(in)f(order)390
21609
 
2678 y(to)37 b(main)m(tain)h(maxim)m(um)e(compatibilit)m(y)i(with)f
21610
 
(buggy)f(clien)m(ts.)60 b(It)37 b(is)f(equiv)-5 b(alen)m(t)38
21611
 
b(to)f(calling:)390 2787 y Ft(gnutls_record_disable_pa)o(ddin)o(g\(\))
21612
 
390 2921 y FB(Normally)25 b(only)f(serv)m(ers)g(that)g(require)g(maxim)
21613
 
m(um)g(compatibilit)m(y)i(with)e(ev)m(erything)g(out)g(there,)390
21614
 
3031 y(need)30 b(to)h(call)h(this)e(function.)150 3229
21615
 
y Fv(gn)m(utls)p 483 3229 37 5 v 55 w(session)p 901 3229
21616
 
V 55 w(get)p 1121 3229 V 55 w(clien)m(t)p 1468 3229 V
21617
 
53 w(random)3350 3424 y FB([F)-8 b(unction])-3599 b Fh(const)54
 
21607
(mpa)q(tib)q(ili)q(ty_m)q(ode)565 5230 y Fg(\()p Ff(gn)m(utls)p
 
21608
846 5230 28 4 v 41 w(session)p 1156 5230 V 40 w(t)31
 
21609
b Fe(session)12 b Fg(\))390 5340 y Ff(session)p FB(:)41
 
21610
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)p
 
21611
eop end
 
21612
%%Page: 169 175
 
21613
TeXDict begin 169 174 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21614
b(F)-8 b(unction)31 b(Reference)2237 b(169)390 299 y(This)45
 
21615
b(function)h(can)h(b)s(e)e(used)h(to)h(disable)f(certain)h(\(securit)m
 
21616
(y\))h(features)f(in)e(TLS)h(in)f(order)390 408 y(to)37
 
21617
b(main)m(tain)h(maxim)m(um)e(compatibilit)m(y)i(with)f(buggy)f(clien)m
 
21618
(ts.)60 b(It)37 b(is)f(equiv)-5 b(alen)m(t)38 b(to)f(calling:)390
 
21619
518 y Ft(gnutls_record_disable_pa)o(ddin)o(g\(\))390
 
21620
661 y FB(Normally)25 b(only)f(serv)m(ers)g(that)g(require)g(maxim)m(um)
 
21621
g(compatibilit)m(y)i(with)e(ev)m(erything)g(out)g(there,)390
 
21622
771 y(need)30 b(to)h(call)h(this)e(function.)150 979
 
21623
y Fv(gn)m(utls)p 483 979 37 5 v 55 w(session)p 901 979
 
21624
V 55 w(get)p 1121 979 V 55 w(clien)m(t)p 1468 979 V 53
 
21625
w(random)3350 1184 y FB([F)-8 b(unction])-3599 b Fh(const)54
21618
21626
b(void)f(*)g(gnutls_session_get_cli)q(ent)q(_ran)q(dom)565
21619
 
3534 y Fg(\()p Ff(gn)m(utls)p 846 3534 28 4 v 41 w(session)p
21620
 
1156 3534 V 40 w(t)31 b Fe(session)12 b Fg(\))390 3644
 
21627
1294 y Fg(\()p Ff(gn)m(utls)p 846 1294 28 4 v 41 w(session)p
 
21628
1156 1294 V 40 w(t)31 b Fe(session)12 b Fg(\))390 1403
21621
21629
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21622
 
b FB(structure.)390 3778 y(Return)31 b(a)h(p)s(oin)m(ter)f(to)i(the)f
 
21630
b FB(structure.)390 1547 y(Return)31 b(a)h(p)s(oin)m(ter)f(to)i(the)f
21623
21631
(32-b)m(yte)h(clien)m(t)g(random)e(\014eld)g(used)g(in)g(the)h
21624
 
(session.)45 b(The)31 b(p)s(oin)m(ter)390 3887 y(m)m(ust)f(not)h(b)s(e)
21625
 
f(mo)s(di\014ed)f(or)h(deallo)s(cated.)390 4021 y(If)h(a)g(clien)m(t)h
 
21632
(session.)45 b(The)31 b(p)s(oin)m(ter)390 1656 y(m)m(ust)f(not)h(b)s(e)
 
21633
f(mo)s(di\014ed)f(or)h(deallo)s(cated.)390 1800 y(If)h(a)g(clien)m(t)h
21626
21634
(random)f(v)-5 b(alue)31 b(has)g(not)g(y)m(et)h(b)s(een)e(established,)
21627
 
i(the)f(output)g(will)g(b)s(e)f(garbage;)j(in)390 4131
 
21635
i(the)f(output)g(will)g(b)s(e)f(garbage;)j(in)390 1909
21628
21636
y(particular,)e(a)g Ft(NULL)e FB(return)g(v)-5 b(alue)31
21629
 
b(should)e(not)i(b)s(e)f(exp)s(ected.)390 4265 y Fn(Returns:)40
 
21637
b(should)e(not)i(b)s(e)f(exp)s(ected.)390 2052 y Fn(Returns:)40
21630
21638
b FB(p)s(oin)m(ter)31 b(to)g(clien)m(t)h(random)d(data.)150
21631
 
4463 y Fv(gn)m(utls)p 483 4463 37 5 v 55 w(session)p
21632
 
901 4463 V 55 w(get)p 1121 4463 V 55 w(data2)3350 4658
 
21639
2260 y Fv(gn)m(utls)p 483 2260 37 5 v 55 w(session)p
 
21640
901 2260 V 55 w(get)p 1121 2260 V 55 w(data2)3350 2466
21633
21641
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_session_get_da)q(ta2)f
21634
 
Fg(\()p Ff(gn)m(utls)p 1941 4658 28 4 v 41 w(session)p
21635
 
2251 4658 V 40 w(t)31 b Fe(session)12 b Ff(,)565 4768
21636
 
y(gn)m(utls)p 811 4768 V 41 w(datum)p 1110 4768 V 39
21637
 
w(t)31 b(*)g Fe(data)12 b Fg(\))390 4877 y Ff(session)p
 
21642
Fg(\()p Ff(gn)m(utls)p 1941 2466 28 4 v 41 w(session)p
 
21643
2251 2466 V 40 w(t)31 b Fe(session)12 b Ff(,)565 2575
 
21644
y(gn)m(utls)p 811 2575 V 41 w(datum)p 1110 2575 V 39
 
21645
w(t)31 b(*)g Fe(data)12 b Fg(\))390 2685 y Ff(session)p
21638
21646
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21639
 
5011 y(Returns)31 b(all)h(session)g(parameters,)h(in)e(order)h(to)g
 
21647
2828 y(Returns)31 b(all)h(session)g(parameters,)h(in)e(order)h(to)g
21640
21648
(supp)s(ort)e(resuming.)44 b(The)32 b(clien)m(t)h(should)e(call)390
21641
 
5121 y(this,)26 b(and)d(k)m(eep)i(the)g(returned)e(session,)i(if)g(he)f
 
21649
2938 y(this,)26 b(and)d(k)m(eep)i(the)g(returned)e(session,)i(if)g(he)f
21642
21650
(w)m(an)m(ts)h(to)g(resume)e(that)i(curren)m(t)f(v)m(ersion)h(later)g
21643
 
(b)m(y)390 5230 y(calling)32 b Ft(gnutls_session_set_data\(\))24
 
21651
(b)m(y)390 3047 y(calling)32 b Ft(gnutls_session_set_data\(\))24
21644
21652
b FB(This)31 b(function)f(m)m(ust)h(b)s(e)f(called)i(after)g(a)f
21645
 
(successful)390 5340 y(handshak)m(e.)40 b(The)30 b(returned)f(datum)h
 
21653
(successful)390 3157 y(handshak)m(e.)40 b(The)30 b(returned)f(datum)h
21646
21654
(m)m(ust)g(b)s(e)g(freed)g(with)g Ft(gnutls_free\(\))p
21647
 
FB(.)p eop end
21648
 
%%Page: 169 175
21649
 
TeXDict begin 169 174 bop 150 -116 a FB(Chapter)30 b(9:)41
21650
 
b(F)-8 b(unction)31 b(Reference)2237 b(169)390 299 y(Resuming)30
21651
 
b(sessions)g(is)h(really)g(useful)f(and)f(sp)s(eedups)g(connections)i
21652
 
(after)g(a)g(succesful)f(one.)390 428 y Fn(Returns:)46
21653
 
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
21654
 
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
21655
 
537 y(returned.)150 725 y Fv(gn)m(utls)p 483 725 37 5
21656
 
v 55 w(session)p 901 725 V 55 w(get)p 1121 725 V 55 w(data)3350
21657
 
910 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_session_get_da)q
21658
 
(ta)f Fg(\()p Ff(gn)m(utls)p 1889 910 28 4 v 40 w(session)p
21659
 
2198 910 V 41 w(t)30 b Fe(session)12 b Ff(,)32 b(v)m(oid)f(*)565
21660
 
1020 y Fe(session_data)12 b Ff(,)34 b(size)p 1407 1020
21661
 
V 41 w(t)c(*)h Fe(session_data_size)12 b Fg(\))390 1130
21662
 
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21663
 
b FB(structure.)390 1258 y Ff(session)p 665 1258 V 40
21664
 
w(data)p FB(:)42 b(is)30 b(a)h(p)s(oin)m(ter)f(to)h(space)g(to)g(hold)f
21665
 
(the)h(session.)390 1387 y Ff(session)p 665 1387 V 40
21666
 
w(data)p 881 1387 V 41 w(size)5 b FB(:)42 b(is)30 b(the)h(session)p
21667
 
1652 1387 V 40 w(data's)g(size,)g(or)g(it)g(will)f(b)s(e)g(set)h(b)m(y)
21668
 
f(the)h(function.)390 1516 y(Returns)g(all)h(session)g(parameters,)h
21669
 
(in)e(order)h(to)g(supp)s(ort)e(resuming.)44 b(The)32
21670
 
b(clien)m(t)h(should)e(call)390 1625 y(this,)26 b(and)d(k)m(eep)i(the)g
21671
 
(returned)e(session,)i(if)g(he)f(w)m(an)m(ts)h(to)g(resume)e(that)i
21672
 
(curren)m(t)f(v)m(ersion)h(later)g(b)m(y)390 1735 y(calling)32
21673
 
b Ft(gnutls_session_set_data\(\))24 b FB(This)31 b(function)f(m)m(ust)h
21674
 
(b)s(e)f(called)i(after)g(a)f(successful)390 1845 y(handshak)m(e.)390
21675
 
1973 y(Resuming)f(sessions)g(is)h(really)g(useful)f(and)f(sp)s(eedups)g
21676
 
(connections)i(after)g(a)g(succesful)f(one.)390 2102
21677
 
y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
 
21655
FB(.)390 3300 y(Resuming)g(sessions)g(is)h(really)g(useful)f(and)f(sp)s
 
21656
(eedups)g(connections)i(after)g(a)g(succesful)f(one.)390
 
21657
3443 y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
21678
21658
b FB(\(0\))34 b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)
21679
 
390 2212 y(returned.)150 2400 y Fv(gn)m(utls)p 483 2400
21680
 
37 5 v 55 w(session)p 901 2400 V 55 w(get)p 1121 2400
21681
 
V 55 w(id)3350 2585 y FB([F)-8 b(unction])-3599 b Fh(int)53
21682
 
b(gnutls_session_get_id)f Fg(\()p Ff(gn)m(utls)p 1784
21683
 
2585 28 4 v 41 w(session)p 2094 2585 V 40 w(t)31 b Fe(session)12
21684
 
b Ff(,)32 b(v)m(oid)f(*)565 2694 y Fe(session_id)12 b
21685
 
Ff(,)33 b(size)p 1302 2694 V 41 w(t)e(*)g Fe(session_id_size)12
21686
 
b Fg(\))390 2804 y Ff(session)p FB(:)41 b(is)30 b(a)h
21687
 
Ft(gnutls_session_t)26 b FB(structure.)390 2933 y Ff(session)p
21688
 
665 2933 V 40 w(id)t FB(:)40 b(is)31 b(a)f(p)s(oin)m(ter)h(to)g(space)g
21689
 
(to)g(hold)f(the)g(session)h(id.)390 3062 y Ff(session)p
21690
 
665 3062 V 40 w(id)p 781 3062 V 40 w(size)5 b FB(:)42
21691
 
b(is)30 b(the)h(session)f(id's)g(size,)i(or)e(it)h(will)g(b)s(e)e(set)i
21692
 
(b)m(y)g(the)f(function.)390 3190 y(Returns)38 b(the)g(curren)m(t)h
21693
 
(session)g(id.)65 b(This)37 b(can)i(b)s(e)f(used)g(if)h(y)m(ou)f(w)m
21694
 
(an)m(t)i(to)f(c)m(hec)m(k)h(if)f(the)g(next)390 3300
21695
 
y(session)33 b(y)m(ou)g(tried)g(to)h(resume)f(w)m(as)g(actually)h
21696
 
(resumed.)48 b(This)32 b(is)h(b)s(ecause)g(resumed)f(sessions)390
21697
 
3409 y(ha)m(v)m(e)g(the)e(same)h(sessionID)g(with)f(the)g(original)i
21698
 
(session.)390 3538 y(Session)j(id)f(is)h(some)g(data)h(set)f(b)m(y)g
 
21659
390 3553 y(returned.)150 3761 y Fv(gn)m(utls)p 483 3761
 
21660
37 5 v 55 w(session)p 901 3761 V 55 w(get)p 1121 3761
 
21661
V 55 w(data)3350 3966 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
21662
b(gnutls_session_get_da)q(ta)f Fg(\()p Ff(gn)m(utls)p
 
21663
1889 3966 28 4 v 40 w(session)p 2198 3966 V 41 w(t)30
 
21664
b Fe(session)12 b Ff(,)32 b(v)m(oid)f(*)565 4076 y Fe(session_data)12
 
21665
b Ff(,)34 b(size)p 1407 4076 V 41 w(t)c(*)h Fe(session_data_size)12
 
21666
b Fg(\))390 4186 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
21667
Ft(gnutls_session_t)26 b FB(structure.)390 4329 y Ff(session)p
 
21668
665 4329 V 40 w(data)p FB(:)42 b(is)30 b(a)h(p)s(oin)m(ter)f(to)h
 
21669
(space)g(to)g(hold)f(the)h(session.)390 4472 y Ff(session)p
 
21670
665 4472 V 40 w(data)p 881 4472 V 41 w(size)5 b FB(:)42
 
21671
b(is)30 b(the)h(session)p 1652 4472 V 40 w(data's)g(size,)g(or)g(it)g
 
21672
(will)f(b)s(e)g(set)h(b)m(y)f(the)h(function.)390 4615
 
21673
y(Returns)g(all)h(session)g(parameters,)h(in)e(order)h(to)g(supp)s(ort)
 
21674
e(resuming.)44 b(The)32 b(clien)m(t)h(should)e(call)390
 
21675
4725 y(this,)26 b(and)d(k)m(eep)i(the)g(returned)e(session,)i(if)g(he)f
 
21676
(w)m(an)m(ts)h(to)g(resume)e(that)i(curren)m(t)f(v)m(ersion)h(later)g
 
21677
(b)m(y)390 4834 y(calling)32 b Ft(gnutls_session_set_data\(\))24
 
21678
b FB(This)31 b(function)f(m)m(ust)h(b)s(e)f(called)i(after)g(a)f
 
21679
(successful)390 4944 y(handshak)m(e.)390 5087 y(Resuming)f(sessions)g
 
21680
(is)h(really)g(useful)f(and)f(sp)s(eedups)g(connections)i(after)g(a)g
 
21681
(succesful)f(one.)390 5230 y Fn(Returns:)46 b FB(On)32
 
21682
b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34 b(is)f(returned,)g
 
21683
(otherwise)h(an)f(error)g(co)s(de)g(is)390 5340 y(returned.)p
 
21684
eop end
 
21685
%%Page: 170 176
 
21686
TeXDict begin 170 175 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21687
b(F)-8 b(unction)31 b(Reference)2237 b(170)150 299 y
 
21688
Fv(gn)m(utls)p 483 299 37 5 v 55 w(session)p 901 299
 
21689
V 55 w(get)p 1121 299 V 55 w(id)3350 480 y FB([F)-8 b(unction])-3599
 
21690
b Fh(int)53 b(gnutls_session_get_id)f Fg(\()p Ff(gn)m(utls)p
 
21691
1784 480 28 4 v 41 w(session)p 2094 480 V 40 w(t)31 b
 
21692
Fe(session)12 b Ff(,)32 b(v)m(oid)f(*)565 590 y Fe(session_id)12
 
21693
b Ff(,)33 b(size)p 1302 590 V 41 w(t)e(*)g Fe(session_id_size)12
 
21694
b Fg(\))390 699 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
21695
Ft(gnutls_session_t)26 b FB(structure.)390 826 y Ff(session)p
 
21696
665 826 V 40 w(id)t FB(:)40 b(is)31 b(a)f(p)s(oin)m(ter)h(to)g(space)g
 
21697
(to)g(hold)f(the)g(session)h(id.)390 953 y Ff(session)p
 
21698
665 953 V 40 w(id)p 781 953 V 40 w(size)5 b FB(:)42 b(is)30
 
21699
b(the)h(session)f(id's)g(size,)i(or)e(it)h(will)g(b)s(e)e(set)i(b)m(y)g
 
21700
(the)f(function.)390 1080 y(Returns)38 b(the)g(curren)m(t)h(session)g
 
21701
(id.)65 b(This)37 b(can)i(b)s(e)f(used)g(if)h(y)m(ou)f(w)m(an)m(t)i(to)
 
21702
f(c)m(hec)m(k)h(if)f(the)g(next)390 1189 y(session)33
 
21703
b(y)m(ou)g(tried)g(to)h(resume)f(w)m(as)g(actually)h(resumed.)48
 
21704
b(This)32 b(is)h(b)s(ecause)g(resumed)f(sessions)390
 
21705
1299 y(ha)m(v)m(e)g(the)e(same)h(sessionID)g(with)f(the)g(original)i
 
21706
(session.)390 1425 y(Session)j(id)f(is)h(some)g(data)h(set)f(b)m(y)g
21699
21707
(the)g(serv)m(er,)i(that)e(iden)m(tify)h(the)f(curren)m(t)f(session.)55
21700
 
b(In)34 b(TLS)390 3648 y(1.0)d(and)f(SSL)f(3.0)j(session)e(id)g(is)h
21701
 
(alw)m(a)m(ys)h(less)e(than)h(32)g(b)m(ytes.)390 3777
 
21708
b(In)34 b(TLS)390 1535 y(1.0)d(and)f(SSL)f(3.0)j(session)e(id)g(is)h
 
21709
(alw)m(a)m(ys)h(less)e(than)h(32)g(b)m(ytes.)390 1662
21702
21710
y Fn(Returns:)46 b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29
21703
21711
b FB(\(0\))34 b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)
21704
 
390 3886 y(returned.)150 4074 y Fv(gn)m(utls)p 483 4074
21705
 
37 5 v 55 w(session)p 901 4074 V 55 w(get)p 1121 4074
21706
 
V 55 w(master)p 1540 4074 V 54 w(secret)3350 4259 y FB([F)-8
 
21712
390 1771 y(returned.)150 1955 y Fv(gn)m(utls)p 483 1955
 
21713
37 5 v 55 w(session)p 901 1955 V 55 w(get)p 1121 1955
 
21714
V 55 w(master)p 1540 1955 V 54 w(secret)3350 2136 y FB([F)-8
21707
21715
b(unction])-3599 b Fh(const)54 b(void)f(*)g(gnutls_session_get_mas)q
21708
 
(ter)q(_sec)q(ret)565 4369 y Fg(\()p Ff(gn)m(utls)p 846
21709
 
4369 28 4 v 41 w(session)p 1156 4369 V 40 w(t)31 b Fe(session)12
21710
 
b Fg(\))390 4478 y Ff(session)p FB(:)41 b(is)30 b(a)h
21711
 
Ft(gnutls_session_t)26 b FB(structure.)390 4607 y(Return)33
 
21716
(ter)q(_sec)q(ret)565 2246 y Fg(\()p Ff(gn)m(utls)p 846
 
21717
2246 28 4 v 41 w(session)p 1156 2246 V 40 w(t)31 b Fe(session)12
 
21718
b Fg(\))390 2356 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
21719
Ft(gnutls_session_t)26 b FB(structure.)390 2482 y(Return)33
21712
21720
b(a)i(p)s(oin)m(ter)f(to)h(the)f(48-b)m(yte)i(master)e(secret)h(in)f
21713
21721
(the)g(session.)52 b(The)34 b(p)s(oin)m(ter)g(m)m(ust)g(not)390
21714
 
4717 y(b)s(e)c(mo)s(di\014ed)f(or)h(deallo)s(cated.)390
21715
 
4846 y(If)i(a)h(master)f(secret)i(v)-5 b(alue)32 b(has)g(not)h(y)m(et)h
 
21722
2592 y(b)s(e)c(mo)s(di\014ed)f(or)h(deallo)s(cated.)390
 
21723
2719 y(If)i(a)h(master)f(secret)i(v)-5 b(alue)32 b(has)g(not)h(y)m(et)h
21716
21724
(b)s(een)d(established,)j(the)e(output)g(will)h(b)s(e)e(garbage;)k(in)
21717
 
390 4955 y(particular,)c(a)g Ft(NULL)e FB(return)g(v)-5
21718
 
b(alue)31 b(should)e(not)i(b)s(e)f(exp)s(ected.)390 5084
 
21725
390 2828 y(particular,)c(a)g Ft(NULL)e FB(return)g(v)-5
 
21726
b(alue)31 b(should)e(not)i(b)s(e)f(exp)s(ected.)390 2955
21719
21727
y(Consider)g(using)g Ft(gnutls_prf\(\))d FB(rather)k(than)f(extracting)
21720
 
i(the)f(master)g(secret)h(and)e(use)g(it)h(to)390 5194
21721
 
y(deriv)m(e)g(further)e(data.)390 5322 y Fn(Returns:)40
21722
 
b FB(p)s(oin)m(ter)31 b(to)g(master)g(secret)g(data.)p
21723
 
eop end
21724
 
%%Page: 170 176
21725
 
TeXDict begin 170 175 bop 150 -116 a FB(Chapter)30 b(9:)41
21726
 
b(F)-8 b(unction)31 b(Reference)2237 b(170)150 299 y
21727
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(session)p 901 299
21728
 
V 55 w(get)p 1121 299 V 55 w(ptr)3350 522 y FB([F)-8
21729
 
b(unction])-3599 b Fh(void)54 b(*)e(gnutls_session_get_ptr)g
21730
 
Fg(\()p Ff(gn)m(utls)p 1993 522 28 4 v 41 w(session)p
21731
 
2303 522 V 40 w(t)31 b Fe(session)12 b Fg(\))390 632
 
21728
i(the)f(master)g(secret)h(and)e(use)g(it)h(to)390 3065
 
21729
y(deriv)m(e)g(further)e(data.)390 3191 y Fn(Returns:)40
 
21730
b FB(p)s(oin)m(ter)31 b(to)g(master)g(secret)g(data.)150
 
21731
3375 y Fv(gn)m(utls)p 483 3375 37 5 v 55 w(session)p
 
21732
901 3375 V 55 w(get)p 1121 3375 V 55 w(ptr)3350 3556
 
21733
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(*)e(gnutls_session_get_ptr)g
 
21734
Fg(\()p Ff(gn)m(utls)p 1993 3556 28 4 v 41 w(session)p
 
21735
2303 3556 V 40 w(t)31 b Fe(session)12 b Fg(\))390 3666
21732
21736
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21733
 
b FB(structure.)390 793 y(Get)h(user)f(p)s(oin)m(ter)g(for)g(session.)
 
21737
b FB(structure.)390 3793 y(Get)h(user)f(p)s(oin)m(ter)g(for)g(session.)
21734
21738
39 b(Useful)26 b(in)g(callbac)m(ks.)41 b(This)26 b(is)g(the)g(p)s(oin)m
21735
 
(ter)g(set)h(with)f Ft(gnutls_)390 903 y(session_set_ptr\(\))p
21736
 
FB(.)390 1064 y Fn(Returns:)52 b FB(the)37 b(user)f(giv)m(en)h(p)s(oin)
 
21739
(ter)g(set)h(with)f Ft(gnutls_)390 3902 y(session_set_ptr\(\))p
 
21740
FB(.)390 4029 y Fn(Returns:)52 b FB(the)37 b(user)f(giv)m(en)h(p)s(oin)
21737
21741
m(ter)f(from)g(the)h(session)f(structure,)i(or)e Ft(NULL)g
21738
 
FB(if)g(it)h(w)m(as)g(nev)m(er)390 1174 y(set.)150 1400
21739
 
y Fv(gn)m(utls)p 483 1400 37 5 v 55 w(session)p 901 1400
21740
 
V 55 w(get)p 1121 1400 V 55 w(serv)m(er)p 1498 1400 V
21741
 
54 w(random)3350 1623 y FB([F)-8 b(unction])-3599 b Fh(const)54
 
21742
FB(if)g(it)h(w)m(as)g(nev)m(er)390 4139 y(set.)150 4322
 
21743
y Fv(gn)m(utls)p 483 4322 37 5 v 55 w(session)p 901 4322
 
21744
V 55 w(get)p 1121 4322 V 55 w(serv)m(er)p 1498 4322 V
 
21745
54 w(random)3350 4504 y FB([F)-8 b(unction])-3599 b Fh(const)54
21742
21746
b(void)f(*)g(gnutls_session_get_ser)q(ver)q(_ran)q(dom)565
21743
 
1733 y Fg(\()p Ff(gn)m(utls)p 846 1733 28 4 v 41 w(session)p
21744
 
1156 1733 V 40 w(t)31 b Fe(session)12 b Fg(\))390 1842
 
21747
4613 y Fg(\()p Ff(gn)m(utls)p 846 4613 28 4 v 41 w(session)p
 
21748
1156 4613 V 40 w(t)31 b Fe(session)12 b Fg(\))390 4723
21745
21749
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21746
 
b FB(structure.)390 2004 y(Return)k(a)g(p)s(oin)m(ter)h(to)g(the)g
 
21750
b FB(structure.)390 4850 y(Return)k(a)g(p)s(oin)m(ter)h(to)g(the)g
21747
21751
(32-b)m(yte)h(serv)m(er)f(random)e(\014eld)h(used)g(in)g(the)h
21748
 
(session.)41 b(The)30 b(p)s(oin)m(ter)390 2113 y(m)m(ust)g(not)h(b)s(e)
21749
 
f(mo)s(di\014ed)f(or)h(deallo)s(cated.)390 2274 y(If)f(a)h(serv)m(er)g
 
21752
(session.)41 b(The)30 b(p)s(oin)m(ter)390 4959 y(m)m(ust)g(not)h(b)s(e)
 
21753
f(mo)s(di\014ed)f(or)h(deallo)s(cated.)390 5086 y(If)f(a)h(serv)m(er)g
21750
21754
(random)f(v)-5 b(alue)31 b(has)e(not)h(y)m(et)h(b)s(een)e(established,)
21751
 
h(the)g(output)g(will)g(b)s(e)f(garbage;)i(in)390 2384
 
21755
h(the)g(output)g(will)g(b)s(e)f(garbage;)i(in)390 5196
21752
21756
y(particular,)g(a)g Ft(NULL)e FB(return)g(v)-5 b(alue)31
21753
 
b(should)e(not)i(b)s(e)f(exp)s(ected.)390 2545 y Fn(Returns:)40
21754
 
b FB(p)s(oin)m(ter)31 b(to)g(serv)m(er)g(random)e(data.)150
21755
 
2771 y Fv(gn)m(utls)p 483 2771 37 5 v 55 w(session)p
21756
 
901 2771 V 55 w(is)p 1038 2771 V 55 w(resumed)3350 2995
21757
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_session_is_res)q(umed)
21758
 
f Fg(\()p Ff(gn)m(utls)p 1993 2995 28 4 v 41 w(session)p
21759
 
2303 2995 V 40 w(t)31 b Fe(session)12 b Fg(\))390 3104
 
21757
b(should)e(not)i(b)s(e)f(exp)s(ected.)390 5322 y Fn(Returns:)40
 
21758
b FB(p)s(oin)m(ter)31 b(to)g(serv)m(er)g(random)e(data.)p
 
21759
eop end
 
21760
%%Page: 171 177
 
21761
TeXDict begin 171 176 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21762
b(F)-8 b(unction)31 b(Reference)2237 b(171)150 299 y
 
21763
Fv(gn)m(utls)p 483 299 37 5 v 55 w(session)p 901 299
 
21764
V 55 w(is)p 1038 299 V 55 w(resumed)3350 480 y FB([F)-8
 
21765
b(unction])-3599 b Fh(int)53 b(gnutls_session_is_res)q(umed)f
 
21766
Fg(\()p Ff(gn)m(utls)p 1993 480 28 4 v 41 w(session)p
 
21767
2303 480 V 40 w(t)31 b Fe(session)12 b Fg(\))390 590
21760
21768
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21761
 
b FB(structure.)390 3266 y(Chec)m(k)31 b(whether)e(session)i(is)f
21762
 
(resumed)g(or)g(not.)390 3427 y Fn(Returns:)40 b FB(non)30
 
21769
b FB(structure.)390 717 y(Chec)m(k)31 b(whether)e(session)i(is)f
 
21770
(resumed)g(or)g(not.)390 843 y Fn(Returns:)40 b FB(non)30
21763
21771
b(zero)h(if)g(this)f(session)g(is)h(resumed,)e(or)i(a)g(zero)g(if)f
21764
 
(this)g(is)h(a)g(new)e(session.)150 3653 y Fv(gn)m(utls)p
21765
 
483 3653 37 5 v 55 w(session)p 901 3653 V 55 w(set)p
21766
 
1108 3653 V 55 w(data)3350 3876 y FB([F)-8 b(unction])-3599
 
21772
(this)g(is)h(a)g(new)e(session.)150 1027 y Fv(gn)m(utls)p
 
21773
483 1027 37 5 v 55 w(session)p 901 1027 V 55 w(set)p
 
21774
1108 1027 V 55 w(data)3350 1208 y FB([F)-8 b(unction])-3599
21767
21775
b Fh(int)53 b(gnutls_session_set_da)q(ta)f Fg(\()p Ff(gn)m(utls)p
21768
 
1889 3876 28 4 v 40 w(session)p 2198 3876 V 41 w(t)30
21769
 
b Fe(session)12 b Ff(,)32 b(const)f(v)m(oid)565 3986
21770
 
y(*)g Fe(session_data)12 b Ff(,)34 b(size)p 1483 3986
21771
 
V 41 w(t)c Fe(session_data_size)12 b Fg(\))390 4095 y
 
21776
1889 1208 28 4 v 40 w(session)p 2198 1208 V 41 w(t)30
 
21777
b Fe(session)12 b Ff(,)32 b(const)f(v)m(oid)565 1318
 
21778
y(*)g Fe(session_data)12 b Ff(,)34 b(size)p 1483 1318
 
21779
V 41 w(t)c Fe(session_data_size)12 b Fg(\))390 1428 y
21772
21780
Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21773
 
b FB(structure.)390 4257 y Ff(session)p 665 4257 V 40
 
21781
b FB(structure.)390 1554 y Ff(session)p 665 1554 V 40
21774
21782
w(data)p FB(:)42 b(is)30 b(a)h(p)s(oin)m(ter)f(to)h(space)g(to)g(hold)f
21775
 
(the)h(session.)390 4418 y Ff(session)p 665 4418 V 40
21776
 
w(data)p 881 4418 V 41 w(size)5 b FB(:)42 b(is)30 b(the)h(session's)f
21777
 
(size)390 4579 y(Sets)h(all)i(session)e(parameters,)h(in)f(order)g(to)h
 
21783
(the)h(session.)390 1681 y Ff(session)p 665 1681 V 40
 
21784
w(data)p 881 1681 V 41 w(size)5 b FB(:)42 b(is)30 b(the)h(session's)f
 
21785
(size)390 1808 y(Sets)h(all)i(session)e(parameters,)h(in)f(order)g(to)h
21778
21786
(resume)f(a)h(previously)f(established)h(session.)43
21779
 
b(The)390 4689 y(session)32 b(data)g(giv)m(en)g(m)m(ust)f(b)s(e)g(the)h
 
21787
b(The)390 1917 y(session)32 b(data)g(giv)m(en)g(m)m(ust)f(b)s(e)g(the)h
21780
21788
(one)f(returned)g(b)m(y)g Ft(gnutls_session_get_data\()o(\))p
21781
 
FB(.)38 b(This)390 4798 y(function)30 b(should)f(b)s(e)h(called)i(b)s
21782
 
(efore)e Ft(gnutls_handshake\(\))p FB(.)390 4960 y(Keep)25
 
21789
FB(.)38 b(This)390 2027 y(function)30 b(should)f(b)s(e)h(called)i(b)s
 
21790
(efore)e Ft(gnutls_handshake\(\))p FB(.)390 2154 y(Keep)25
21783
21791
b(in)g(mind)g(that)g(session)h(resuming)e(is)i(advisory)-8
21784
21792
b(.)39 b(The)25 b(serv)m(er)h(ma)m(y)g(c)m(ho)s(ose)g(not)f(to)h
21785
 
(resume)390 5069 y(the)31 b(session,)f(th)m(us)g(a)h(full)f(handshak)m
21786
 
(e)g(will)h(b)s(e)f(p)s(erformed.)390 5230 y Fn(Returns:)46
 
21793
(resume)390 2263 y(the)31 b(session,)f(th)m(us)g(a)h(full)f(handshak)m
 
21794
(e)g(will)h(b)s(e)f(p)s(erformed.)390 2390 y Fn(Returns:)46
21787
21795
b FB(On)32 b(success,)i Ft(GNUTLS_E_SUCCESS)29 b FB(\(0\))34
21788
21796
b(is)f(returned,)g(otherwise)h(an)f(error)g(co)s(de)g(is)390
21789
 
5340 y(returned.)p eop end
21790
 
%%Page: 171 177
21791
 
TeXDict begin 171 176 bop 150 -116 a FB(Chapter)30 b(9:)41
21792
 
b(F)-8 b(unction)31 b(Reference)2237 b(171)150 299 y
21793
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(session)p 901 299
21794
 
V 55 w(set)p 1108 299 V 55 w(\014nished)p 1573 299 V
21795
 
55 w(function)3350 491 y FB([F)-8 b(unction])-3599 b
21796
 
Fh(void)54 b(gnutls_session_set_finis)q(hed)q(_fu)q(nct)q(ion)e
21797
 
Fg(\()p Ff(gn)m(utls)p 2621 491 28 4 v 41 w(session)p
21798
 
2931 491 V 40 w(t)565 600 y Fe(session)12 b Ff(,)32 b(gn)m(utls)p
21799
 
1244 600 V 41 w(\014nished)p 1590 600 V 38 w(callbac)m(k)p
21800
 
1944 600 V 42 w(func)e Fe(finished_func)12 b Fg(\))390
21801
 
710 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
21802
 
b FB(structure.)390 842 y Ff(\014nished)p 701 842 V 39
21803
 
w(func)6 b FB(:)39 b(a)31 b Ft(gnutls_finished_callbac)o(k_fu)o(nc)24
21804
 
b FB(callbac)m(k.)390 974 y(Register)33 b(a)g(callbac)m(k)h(function)e
21805
 
(for)g(the)g(session)h(that)f(will)h(b)s(e)e(called)j(when)d(a)h(TLS)f
21806
 
(Finished)390 1084 y(message)38 b(has)e(b)s(een)f(generated.)60
21807
 
b(The)36 b(function)g(is)h(t)m(ypically)h(used)e(to)h(cop)m(y)g(a)m(w)m
21808
 
(a)m(y)h(the)f(TLS)390 1193 y(\014nished)29 b(message)i(for)f(later)i
21809
 
(use)e(as)h(a)f(c)m(hannel)h(binding)e(or)i(similar)f(purp)s(ose.)390
21810
 
1325 y Fn(The)41 b(callbac)m(k)j(should)c(follo)m(w)j(this)e(protot)m
21811
 
(yp)s(e:)64 b FB(v)m(oid)42 b(callbac)m(k)i(\(gn)m(utls)p
21812
 
3035 1325 V 41 w(session)p 3345 1325 V 40 w(t)e(session,)390
21813
 
1435 y(const)31 b(v)m(oid)g(*\014nished,)e(size)p 1376
21814
 
1435 V 41 w(t)i(len\);)390 1567 y(The)e Ft(finished)e
 
21797
2500 y(returned.)150 2684 y Fv(gn)m(utls)p 483 2684 37
 
21798
5 v 55 w(session)p 901 2684 V 55 w(set)p 1108 2684 V
 
21799
55 w(\014nished)p 1573 2684 V 55 w(function)3350 2865
 
21800
y FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_session_set_finis)q
 
21801
(hed)q(_fu)q(nct)q(ion)e Fg(\()p Ff(gn)m(utls)p 2621
 
21802
2865 28 4 v 41 w(session)p 2931 2865 V 40 w(t)565 2974
 
21803
y Fe(session)12 b Ff(,)32 b(gn)m(utls)p 1244 2974 V 41
 
21804
w(\014nished)p 1590 2974 V 38 w(callbac)m(k)p 1944 2974
 
21805
V 42 w(func)e Fe(finished_func)12 b Fg(\))390 3084 y
 
21806
Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
21807
b FB(structure.)390 3211 y Ff(\014nished)p 701 3211 V
 
21808
39 w(func)6 b FB(:)39 b(a)31 b Ft(gnutls_finished_callbac)o(k_fu)o(nc)
 
21809
24 b FB(callbac)m(k.)390 3338 y(Register)33 b(a)g(callbac)m(k)h
 
21810
(function)e(for)g(the)g(session)h(that)f(will)h(b)s(e)e(called)j(when)d
 
21811
(a)h(TLS)f(Finished)390 3447 y(message)38 b(has)e(b)s(een)f(generated.)
 
21812
60 b(The)36 b(function)g(is)h(t)m(ypically)h(used)e(to)h(cop)m(y)g(a)m
 
21813
(w)m(a)m(y)h(the)f(TLS)390 3557 y(\014nished)29 b(message)i(for)f
 
21814
(later)i(use)e(as)h(a)f(c)m(hannel)h(binding)e(or)i(similar)f(purp)s
 
21815
(ose.)390 3684 y Fn(The)41 b(callbac)m(k)j(should)c(follo)m(w)j(this)e
 
21816
(protot)m(yp)s(e:)64 b FB(v)m(oid)42 b(callbac)m(k)i(\(gn)m(utls)p
 
21817
3035 3684 V 41 w(session)p 3345 3684 V 40 w(t)e(session,)390
 
21818
3793 y(const)31 b(v)m(oid)g(*\014nished,)e(size)p 1376
 
21819
3793 V 41 w(t)i(len\);)390 3920 y(The)e Ft(finished)e
21815
21820
FB(parameter)j(will)f(con)m(tain)i(the)f(binary)e(TLS)h(\014nished)e
21816
 
(message,)k(and)e Ft(len)g FB(will)390 1677 y(con)m(tains)d(its)g
 
21821
(message,)k(and)e Ft(len)g FB(will)390 4029 y(con)m(tains)d(its)g
21817
21822
(length.)40 b(F)-8 b(or)26 b(SSLv3)e(connections,)k(the)d
21818
21823
Ft(len)f FB(parameter)i(will)g(b)s(e)e(36)i(and)f(for)g(TLS)390
21819
 
1786 y(connections)31 b(it)g(will)g(b)s(e)f(12.)390 1918
 
21824
4139 y(connections)31 b(it)g(will)g(b)s(e)f(12.)390 4266
21820
21825
y(It)i(is)g(recommended)f(that)h(the)g(function)g(returns)e(quic)m(kly)
21821
21826
j(in)e(order)h(to)g(not)g(dela)m(y)h(the)f(hand-)390
21822
 
2028 y(shak)m(e.)41 b(Use)31 b(the)g(function)f(to)h(store)g(a)g(cop)m
 
21827
4375 y(shak)m(e.)41 b(Use)31 b(the)g(function)f(to)h(store)g(a)g(cop)m
21823
21828
(y)g(of)f(the)h(TLS)e(\014nished)g(message)i(for)g(later)g(use.)390
21824
 
2160 y Fn(Since:)41 b FB(2.6.0)150 2355 y Fv(gn)m(utls)p
21825
 
483 2355 37 5 v 55 w(session)p 901 2355 V 55 w(set)p
21826
 
1108 2355 V 55 w(ptr)3350 2547 y FB([F)-8 b(unction])-3599
 
21829
4502 y Fn(Since:)41 b FB(2.6.0)150 4686 y Fv(gn)m(utls)p
 
21830
483 4686 37 5 v 55 w(session)p 901 4686 V 55 w(set)p
 
21831
1108 4686 V 55 w(ptr)3350 4867 y FB([F)-8 b(unction])-3599
21827
21832
b Fh(void)54 b(gnutls_session_set_ptr)e Fg(\()p Ff(gn)m(utls)p
21828
 
1889 2547 28 4 v 40 w(session)p 2198 2547 V 41 w(t)28
 
21833
1889 4867 28 4 v 40 w(session)p 2198 4867 V 41 w(t)28
21829
21834
b Fe(session)12 b Ff(,)31 b(v)m(oid)e(*)g Fe(ptr)12 b
21830
 
Fg(\))390 2656 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft
21831
 
(gnutls_session_t)26 b FB(structure.)390 2788 y Ff(ptr)7
21832
 
b FB(:)40 b(is)30 b(the)h(user)e(p)s(oin)m(ter)390 2920
 
21835
Fg(\))390 4977 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft
 
21836
(gnutls_session_t)26 b FB(structure.)390 5104 y Ff(ptr)7
 
21837
b FB(:)40 b(is)30 b(the)h(user)e(p)s(oin)m(ter)390 5230
21833
21838
y(This)h(function)g(will)h(set)h(\(asso)s(ciate\))h(the)e(user)f(giv)m
21834
21839
(en)h(p)s(oin)m(ter)g Ft(ptr)f FB(to)h(the)g(session)g(structure.)390
21835
 
3030 y(This)f(is)g(p)s(oin)m(ter)g(can)h(b)s(e)f(accessed)h(with)f
21836
 
Ft(gnutls_session_get_ptr\(\))p FB(.)150 3224 y Fv(gn)m(utls)p
21837
 
483 3224 37 5 v 55 w(set)p 690 3224 V 54 w(default)p
21838
 
1115 3224 V 54 w(exp)s(ort)p 1520 3224 V 55 w(priorit)m(y)3350
21839
 
3416 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_set_default_ex)q
21840
 
(port)q(_pr)q(ior)q(ity)f Fg(\()p Ff(gn)m(utls)p 2464
21841
 
3416 28 4 v 41 w(session)p 2774 3416 V 40 w(t)565 3526
21842
 
y Fe(session)12 b Fg(\))390 3636 y Ff(session)p FB(:)41
21843
 
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21844
 
3768 y(Sets)j(some)h(default)f(priorit)m(y)g(on)g(the)g(ciphers,)h(k)m
21845
 
(ey)f(exc)m(hange)i(metho)s(ds,)e(macs)g(and)g(compres-)390
21846
 
3877 y(sion)h(metho)s(ds.)40 b(This)30 b(function)g(also)h(includes)f
21847
 
(w)m(eak)i(algorithms.)390 4009 y Fn(This)e(is)g(the)h(same)g(as)f
21848
 
(calling:)42 b FB(gn)m(utls)p 1752 4009 V 40 w(priorit)m(y)p
21849
 
2090 4009 V 41 w(set)p 2242 4009 V 41 w(direct)30 b(\(session,)h
 
21840
5340 y(This)f(is)g(p)s(oin)m(ter)g(can)h(b)s(e)f(accessed)h(with)f
 
21841
Ft(gnutls_session_get_ptr\(\))p FB(.)p eop end
 
21842
%%Page: 172 178
 
21843
TeXDict begin 172 177 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21844
b(F)-8 b(unction)31 b(Reference)2237 b(172)150 299 y
 
21845
Fv(gn)m(utls)p 483 299 37 5 v 55 w(set)p 690 299 V 54
 
21846
w(default)p 1115 299 V 54 w(exp)s(ort)p 1520 299 V 55
 
21847
w(priorit)m(y)3350 511 y FB([F)-8 b(unction])-3599 b
 
21848
Fh(int)53 b(gnutls_set_default_ex)q(port)q(_pr)q(ior)q(ity)f
 
21849
Fg(\()p Ff(gn)m(utls)p 2464 511 28 4 v 41 w(session)p
 
21850
2774 511 V 40 w(t)565 620 y Fe(session)12 b Fg(\))390
 
21851
730 y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
21852
b FB(structure.)390 880 y(Sets)j(some)h(default)f(priorit)m(y)g(on)g
 
21853
(the)g(ciphers,)h(k)m(ey)f(exc)m(hange)i(metho)s(ds,)e(macs)g(and)g
 
21854
(compres-)390 989 y(sion)h(metho)s(ds.)40 b(This)30 b(function)g(also)h
 
21855
(includes)f(w)m(eak)i(algorithms.)390 1139 y Fn(This)e(is)g(the)h(same)
 
21856
g(as)f(calling:)42 b FB(gn)m(utls)p 1752 1139 V 40 w(priorit)m(y)p
 
21857
2090 1139 V 41 w(set)p 2242 1139 V 41 w(direct)30 b(\(session,)h
21850
21858
Ft(")p FB(EXPOR)-8 b(T)p Ft(")p FB(,)30 b(NULL\);)390
21851
 
4141 y(This)d(function)h(is)f(k)m(ept)i(around)e(for)g(bac)m(kw)m(ards)
 
21859
1289 y(This)d(function)h(is)f(k)m(ept)i(around)e(for)g(bac)m(kw)m(ards)
21852
21860
h(compatibilit)m(y)-8 b(,)32 b(but)27 b(b)s(ecause)g(of)h(its)h(wide)e
21853
 
(use)390 4251 y(it)34 b(is)f(still)h(fully)f(supp)s(orted.)47
 
21861
(use)390 1398 y(it)34 b(is)f(still)h(fully)f(supp)s(orted.)47
21854
21862
b(If)32 b(y)m(ou)i(wish)e(to)i(allo)m(w)h(users)d(to)i(pro)m(vide)f(a)h
21855
 
(string)f(that)g(sp)s(ecify)390 4361 y(whic)m(h)23 b(ciphers)f(to)i
 
21863
(string)f(that)g(sp)s(ecify)390 1508 y(whic)m(h)23 b(ciphers)f(to)i
21856
21864
(use)f(\(whic)m(h)g(is)g(recommended\),)h(y)m(ou)g(should)e(use)g
21857
 
Ft(gnutls_priority_set_)390 4470 y(direct\(\))28 b FB(or)i
21858
 
Ft(gnutls_priority_set\(\))25 b FB(instead.)390 4602
 
21865
Ft(gnutls_priority_set_)390 1617 y(direct\(\))28 b FB(or)i
 
21866
Ft(gnutls_priority_set\(\))25 b FB(instead.)390 1767
21859
21867
y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
21860
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 4797 y Fv(gn)m(utls)p
21861
 
483 4797 37 5 v 55 w(set)p 690 4797 V 54 w(default)p
21862
 
1115 4797 V 54 w(priorit)m(y)3350 4989 y FB([F)-8 b(unction])-3599
 
21868
b(success,)f(or)h(an)f(error)g(co)s(de.)150 1982 y Fv(gn)m(utls)p
 
21869
483 1982 37 5 v 55 w(set)p 690 1982 V 54 w(default)p
 
21870
1115 1982 V 54 w(priorit)m(y)3350 2194 y FB([F)-8 b(unction])-3599
21863
21871
b Fh(int)53 b(gnutls_set_default_pr)q(iori)q(ty)f Fg(\()p
21864
 
Ff(gn)m(utls)p 2098 4989 28 4 v 41 w(session)p 2408 4989
21865
 
V 40 w(t)30 b Fe(session)12 b Fg(\))390 5098 y Ff(session)p
 
21872
Ff(gn)m(utls)p 2098 2194 28 4 v 41 w(session)p 2408 2194
 
21873
V 40 w(t)30 b Fe(session)12 b Fg(\))390 2303 y Ff(session)p
21866
21874
FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
21867
 
5230 y(Sets)j(some)h(default)f(priorit)m(y)g(on)g(the)g(ciphers,)h(k)m
 
21875
2453 y(Sets)j(some)h(default)f(priorit)m(y)g(on)g(the)g(ciphers,)h(k)m
21868
21876
(ey)f(exc)m(hange)i(metho)s(ds,)e(macs)g(and)g(compres-)390
21869
 
5340 y(sion)h(metho)s(ds.)p eop end
21870
 
%%Page: 172 178
21871
 
TeXDict begin 172 177 bop 150 -116 a FB(Chapter)30 b(9:)41
21872
 
b(F)-8 b(unction)31 b(Reference)2237 b(172)390 299 y
21873
 
Fn(This)28 b(is)f(the)i(same)f(as)g(calling:)40 b FB(gn)m(utls)p
21874
 
1738 299 28 4 v 41 w(priorit)m(y)p 2077 299 V 40 w(set)p
21875
 
2228 299 V 41 w(direct)28 b(\(session,)h Ft(")p FB(NORMAL)p
21876
 
Ft(")p FB(,)f(NULL\);)390 431 y(This)f(function)h(is)f(k)m(ept)i
21877
 
(around)e(for)g(bac)m(kw)m(ards)h(compatibilit)m(y)-8
 
21877
2562 y(sion)h(metho)s(ds.)390 2712 y Fn(This)e(is)f(the)i(same)f(as)g
 
21878
(calling:)40 b FB(gn)m(utls)p 1738 2712 V 41 w(priorit)m(y)p
 
21879
2077 2712 V 40 w(set)p 2228 2712 V 41 w(direct)28 b(\(session,)h
 
21880
Ft(")p FB(NORMAL)p Ft(")p FB(,)f(NULL\);)390 2862 y(This)f(function)h
 
21881
(is)f(k)m(ept)i(around)e(for)g(bac)m(kw)m(ards)h(compatibilit)m(y)-8
21878
21882
b(,)32 b(but)27 b(b)s(ecause)g(of)h(its)h(wide)e(use)390
21879
 
541 y(it)34 b(is)f(still)h(fully)f(supp)s(orted.)47 b(If)32
21880
 
b(y)m(ou)i(wish)e(to)i(allo)m(w)h(users)d(to)i(pro)m(vide)f(a)h(string)
21881
 
f(that)g(sp)s(ecify)390 650 y(whic)m(h)23 b(ciphers)f(to)i(use)f
21882
 
(\(whic)m(h)g(is)g(recommended\),)h(y)m(ou)g(should)e(use)g
21883
 
Ft(gnutls_priority_set_)390 760 y(direct\(\))28 b FB(or)i
21884
 
Ft(gnutls_priority_set\(\))25 b FB(instead.)390 892 y
21885
 
Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h
21886
 
(an)f(error)g(co)s(de.)150 1087 y Fv(gn)m(utls)p 483
21887
 
1087 37 5 v 55 w(sign)p 749 1087 V 55 w(algorithm)p 1322
21888
 
1087 V 54 w(get)p 1541 1087 V 55 w(name)3350 1280 y FB([F)-8
21889
 
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_sign_algorithm_)q
21890
 
(get)q(_nam)q(e)565 1389 y Fg(\()p Ff(gn)m(utls)p 846
21891
 
1389 28 4 v 41 w(sign)p 1044 1389 V 40 w(algorithm)p
21892
 
1467 1389 V 41 w(t)31 b Fe(sign)12 b Fg(\))390 1499 y
21893
 
FB(Con)m(v)m(ert)31 b(a)g Ft(gnutls_sign_algorithm_t)24
21894
 
b FB(v)-5 b(alue)31 b(to)g(a)g(string.)390 1631 y Fn(Returns:)40
21895
 
b FB(a)31 b(string)f(that)h(con)m(tains)h(the)f(name)f(of)h(the)f(sp)s
21896
 
(eci\014ed)g(sign)g(algorithm,)i(or)e Ft(NULL)p FB(.)150
21897
 
1826 y Fv(gn)m(utls)p 483 1826 37 5 v 55 w(sign)p 749
21898
 
1826 V 55 w(callbac)m(k)p 1232 1826 V 52 w(get)3350 2019
21899
 
y FB([F)-8 b(unction])-3599 b Fh(gnutls_sign_func)57
21900
 
b(gnutls_sign_callback_)q(get)52 b Fg(\()p Ff(gn)m(utls)p
21901
 
2621 2019 28 4 v 41 w(session)p 2931 2019 V 40 w(t)565
21902
 
2128 y Fe(session)12 b Ff(,)32 b(v)m(oid)f(**)h Fe(userdata)12
21903
 
b Fg(\))390 2238 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
21904
 
(session)390 2370 y Ff(userdata)p FB(:)41 b(if)30 b(non-)p
 
21883
2971 y(it)34 b(is)f(still)h(fully)f(supp)s(orted.)47
 
21884
b(If)32 b(y)m(ou)i(wish)e(to)i(allo)m(w)h(users)d(to)i(pro)m(vide)f(a)h
 
21885
(string)f(that)g(sp)s(ecify)390 3081 y(whic)m(h)23 b(ciphers)f(to)i
 
21886
(use)f(\(whic)m(h)g(is)g(recommended\),)h(y)m(ou)g(should)e(use)g
 
21887
Ft(gnutls_priority_set_)390 3191 y(direct\(\))28 b FB(or)i
 
21888
Ft(gnutls_priority_set\(\))25 b FB(instead.)390 3340
 
21889
y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
21890
b(success,)f(or)h(an)f(error)g(co)s(de.)150 3555 y Fv(gn)m(utls)p
 
21891
483 3555 37 5 v 55 w(sign)p 749 3555 V 55 w(algorithm)p
 
21892
1322 3555 V 54 w(get)p 1541 3555 V 55 w(name)3350 3767
 
21893
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
21894
(gnutls_sign_algorithm_)q(get)q(_nam)q(e)565 3876 y Fg(\()p
 
21895
Ff(gn)m(utls)p 846 3876 28 4 v 41 w(sign)p 1044 3876
 
21896
V 40 w(algorithm)p 1467 3876 V 41 w(t)31 b Fe(sign)12
 
21897
b Fg(\))390 3986 y FB(Con)m(v)m(ert)31 b(a)g Ft
 
21898
(gnutls_sign_algorithm_t)24 b FB(v)-5 b(alue)31 b(to)g(a)g(string.)390
 
21899
4136 y Fn(Returns:)40 b FB(a)31 b(string)f(that)h(con)m(tains)h(the)f
 
21900
(name)f(of)h(the)f(sp)s(eci\014ed)g(sign)g(algorithm,)i(or)e
 
21901
Ft(NULL)p FB(.)150 4350 y Fv(gn)m(utls)p 483 4350 37
 
21902
5 v 55 w(sign)p 749 4350 V 55 w(callbac)m(k)p 1232 4350
 
21903
V 52 w(get)3350 4562 y FB([F)-8 b(unction])-3599 b Fh(gnutls_sign_func)
 
21904
57 b(gnutls_sign_callback_)q(get)52 b Fg(\()p Ff(gn)m(utls)p
 
21905
2621 4562 28 4 v 41 w(session)p 2931 4562 V 40 w(t)565
 
21906
4672 y Fe(session)12 b Ff(,)32 b(v)m(oid)f(**)h Fe(userdata)12
 
21907
b Fg(\))390 4781 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
21908
(session)390 4931 y Ff(userdata)p FB(:)41 b(if)30 b(non-)p
21905
21909
Ft(NULL)p FB(,)f(will)i(b)s(e)f(set)h(to)g(abstract)g(callbac)m(k)i(p)s
21906
 
(oin)m(ter.)390 2502 y(Retriev)m(e)f(the)f(callbac)m(k)h(function,)e
21907
 
(and)g(its)h(userdata)f(p)s(oin)m(ter.)390 2635 y Fn(Returns:)51
 
21910
(oin)m(ter.)390 5081 y(Retriev)m(e)f(the)f(callbac)m(k)h(function,)e
 
21911
(and)g(its)h(userdata)f(p)s(oin)m(ter.)390 5230 y Fn(Returns:)51
21908
21912
b FB(The)35 b(function)g(p)s(oin)m(ter)g(set)h(b)m(y)g
21909
21913
Ft(gnutls_sign_callback_se)o(t\(\))p FB(,)30 b(or)36
21910
 
b(if)f(not)h(set,)390 2744 y Ft(NULL)p FB(.)150 2939
21911
 
y Fv(gn)m(utls)p 483 2939 37 5 v 55 w(sign)p 749 2939
21912
 
V 55 w(callbac)m(k)p 1232 2939 V 52 w(set)3350 3132 y
21913
 
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_sign_callback_set)e
21914
 
Fg(\()p Ff(gn)m(utls)p 1993 3132 28 4 v 41 w(session)p
21915
 
2303 3132 V 40 w(t)31 b Fe(session)12 b Ff(,)565 3241
21916
 
y(gn)m(utls)p 811 3241 V 41 w(sign)p 1009 3241 V 40 w(func)29
21917
 
b Fe(sign_func)12 b Ff(,)33 b(v)m(oid)e(*)g Fe(userdata)12
21918
 
b Fg(\))390 3351 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
21919
 
(session)390 3483 y Ff(sign)p 553 3483 V 40 w(func)6
21920
 
b FB(:)39 b(function)30 b(p)s(oin)m(ter)h(to)g(application's)h(sign)e
21921
 
(callbac)m(k.)390 3616 y Ff(userdata)p FB(:)41 b(v)m(oid)31
21922
 
b(p)s(oin)m(ter)f(that)h(will)g(b)s(e)f(passed)f(to)j(sign)e(callbac)m
21923
 
(k.)390 3748 y(Set)h(the)f(callbac)m(k)j(function.)40
21924
 
b(The)30 b(function)g(m)m(ust)g(ha)m(v)m(e)i(this)e(protot)m(yp)s(e:)
21925
 
390 3880 y(t)m(yp)s(edef)107 b(in)m(t)i(\(*gn)m(utls)p
21926
 
1333 3880 V 41 w(sign)p 1531 3880 V 40 w(func\))e(\(gn)m(utls)p
21927
 
2158 3880 V 41 w(session)p 2468 3880 V 40 w(t)h(session,)127
21928
 
b(v)m(oid)108 b(*userdata,)390 3990 y(gn)m(utls)p 636
21929
 
3990 V 40 w(certi\014cate)p 1063 3990 V 43 w(t)m(yp)s(e)p
21930
 
1280 3990 V 40 w(t)119 b(cert)p 1625 3990 V 41 w(t)m(yp)s(e,)142
21931
 
b(const)119 b(gn)m(utls)p 2573 3990 V 41 w(datum)p 2872
21932
 
3990 V 39 w(t)h(*)f(cert,)142 b(const)390 4100 y(gn)m(utls)p
21933
 
636 4100 V 40 w(datum)p 934 4100 V 40 w(t)31 b(*)f(hash,)g(gn)m(utls)p
21934
 
1593 4100 V 41 w(datum)p 1892 4100 V 39 w(t)h(*)g(signature\);)390
21935
 
4232 y(The)j Ft(userdata)e FB(parameter)j(is)f(passed)g(to)h(the)g
 
21914
b(if)f(not)h(set,)390 5340 y Ft(NULL)p FB(.)p eop end
 
21915
%%Page: 173 179
 
21916
TeXDict begin 173 178 bop 150 -116 a FB(Chapter)30 b(9:)41
 
21917
b(F)-8 b(unction)31 b(Reference)2237 b(173)150 299 y
 
21918
Fv(gn)m(utls)p 483 299 37 5 v 55 w(sign)p 749 299 V 55
 
21919
w(callbac)m(k)p 1232 299 V 52 w(set)3350 480 y FB([F)-8
 
21920
b(unction])-3599 b Fh(void)54 b(gnutls_sign_callback_set)e
 
21921
Fg(\()p Ff(gn)m(utls)p 1993 480 28 4 v 41 w(session)p
 
21922
2303 480 V 40 w(t)31 b Fe(session)12 b Ff(,)565 590 y(gn)m(utls)p
 
21923
811 590 V 41 w(sign)p 1009 590 V 40 w(func)29 b Fe(sign_func)12
 
21924
b Ff(,)33 b(v)m(oid)e(*)g Fe(userdata)12 b Fg(\))390
 
21925
699 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g(session)390
 
21926
826 y Ff(sign)p 553 826 V 40 w(func)6 b FB(:)39 b(function)30
 
21927
b(p)s(oin)m(ter)h(to)g(application's)h(sign)e(callbac)m(k.)390
 
21928
953 y Ff(userdata)p FB(:)41 b(v)m(oid)31 b(p)s(oin)m(ter)f(that)h(will)
 
21929
g(b)s(e)f(passed)f(to)j(sign)e(callbac)m(k.)390 1079
 
21930
y(Set)h(the)f(callbac)m(k)j(function.)40 b(The)30 b(function)g(m)m(ust)
 
21931
g(ha)m(v)m(e)i(this)e(protot)m(yp)s(e:)390 1206 y(t)m(yp)s(edef)107
 
21932
b(in)m(t)i(\(*gn)m(utls)p 1333 1206 V 41 w(sign)p 1531
 
21933
1206 V 40 w(func\))e(\(gn)m(utls)p 2158 1206 V 41 w(session)p
 
21934
2468 1206 V 40 w(t)h(session,)127 b(v)m(oid)108 b(*userdata,)390
 
21935
1316 y(gn)m(utls)p 636 1316 V 40 w(certi\014cate)p 1063
 
21936
1316 V 43 w(t)m(yp)s(e)p 1280 1316 V 40 w(t)119 b(cert)p
 
21937
1625 1316 V 41 w(t)m(yp)s(e,)142 b(const)119 b(gn)m(utls)p
 
21938
2573 1316 V 41 w(datum)p 2872 1316 V 39 w(t)h(*)f(cert,)142
 
21939
b(const)390 1425 y(gn)m(utls)p 636 1425 V 40 w(datum)p
 
21940
934 1425 V 40 w(t)31 b(*)f(hash,)g(gn)m(utls)p 1593 1425
 
21941
V 41 w(datum)p 1892 1425 V 39 w(t)h(*)g(signature\);)390
 
21942
1552 y(The)j Ft(userdata)e FB(parameter)j(is)f(passed)g(to)h(the)g
21936
21943
Ft(sign_func)d FB(v)m(erbatim,)k(and)e(can)h(b)s(e)f(used)f(to)390
21937
 
4341 y(store)23 b(application-sp)s(eci\014c)g(data)g(needed)e(in)h(the)
 
21944
1662 y(store)23 b(application-sp)s(eci\014c)g(data)g(needed)e(in)h(the)
21938
21945
g(callbac)m(k)i(function.)38 b(See)22 b(also)h Ft(gnutls_sign_)390
21939
 
4451 y(callback_get\(\))p FB(.)150 4646 y Fv(gn)m(utls)p
21940
 
483 4646 37 5 v 55 w(sign)p 749 4646 V 55 w(get)p 969
21941
 
4646 V 54 w(id)3350 4838 y FB([F)-8 b(unction])-3599
 
21946
1771 y(callback_get\(\))p FB(.)150 1955 y Fv(gn)m(utls)p
 
21947
483 1955 37 5 v 55 w(sign)p 749 1955 V 55 w(get)p 969
 
21948
1955 V 54 w(id)3350 2136 y FB([F)-8 b(unction])-3599
21942
21949
b Fh(gnutls_sign_algorithm_)q(t)58 b(gnutls_sign_get_id)51
21943
21950
b Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(name)12 b Fg(\))390
21944
 
4948 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(MA)m(C)g(algorithm)g(name)390
21945
 
5080 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h(insensitiv)m(e)f
21946
 
(w)m(a)m(y)-8 b(.)390 5213 y Fn(Returns:)55 b FB(return)37
 
21951
2246 y Ff(name)5 b FB(:)41 b(is)30 b(a)h(MA)m(C)g(algorithm)g(name)390
 
21952
2372 y(The)f(names)g(are)h(compared)f(in)g(a)h(case)h(insensitiv)m(e)f
 
21953
(w)m(a)m(y)-8 b(.)390 2499 y Fn(Returns:)55 b FB(return)37
21947
21954
b(a)h Ft(gnutls_sign_algorithm_t)31 b FB(v)-5 b(alue)39
21948
 
b(corresp)s(onding)d(to)j(the)f(sp)s(eci\014ed)390 5322
 
21955
b(corresp)s(onding)d(to)j(the)f(sp)s(eci\014ed)390 2609
21949
21956
y(cipher,)30 b(or)h Ft(GNUTLS_SIGN_UNKNOWN)25 b FB(on)30
21950
 
b(error.)p eop end
21951
 
%%Page: 173 179
21952
 
TeXDict begin 173 178 bop 150 -116 a FB(Chapter)30 b(9:)41
21953
 
b(F)-8 b(unction)31 b(Reference)2237 b(173)150 299 y
21954
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(sign)p 749 299 V 55
21955
 
w(get)p 969 299 V 54 w(name)3350 486 y FB([F)-8 b(unction])-3599
21956
 
b Fh(const)54 b(char)f(*)g(gnutls_sign_get_name)e Fg(\()p
21957
 
Ff(gn)m(utls)p 2202 486 28 4 v 41 w(sign)p 2400 486 V
21958
 
40 w(algorithm)p 2823 486 V 41 w(t)565 596 y Fe(algorithm)12
21959
 
b Fg(\))390 705 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(public)f(k)m(ey)
21960
 
h(signature)f(algorithm)390 835 y(Con)m(v)m(ert)h(a)g
 
21957
b(error.)150 2792 y Fv(gn)m(utls)p 483 2792 V 55 w(sign)p
 
21958
749 2792 V 55 w(get)p 969 2792 V 54 w(name)3350 2973
 
21959
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
21960
(gnutls_sign_get_name)e Fg(\()p Ff(gn)m(utls)p 2202 2973
 
21961
28 4 v 41 w(sign)p 2400 2973 V 40 w(algorithm)p 2823
 
21962
2973 V 41 w(t)565 3083 y Fe(algorithm)12 b Fg(\))390
 
21963
3193 y Ff(algorithm)p FB(:)42 b(is)30 b(a)h(public)f(k)m(ey)h
 
21964
(signature)f(algorithm)390 3319 y(Con)m(v)m(ert)h(a)g
21961
21965
Ft(gnutls_sign_algorithm_t)24 b FB(v)-5 b(alue)31 b(to)g(a)g(string.)
21962
 
390 964 y Fn(Returns:)61 b FB(a)40 b(p)s(oin)m(ter)h(to)g(a)g(string)f
 
21966
390 3446 y Fn(Returns:)61 b FB(a)40 b(p)s(oin)m(ter)h(to)g(a)g(string)f
21963
21967
(that)h(con)m(tains)h(the)f(name)f(of)h(the)g(sp)s(eci\014ed)e(public)h
21964
 
(k)m(ey)390 1074 y(signature)31 b(algorithm,)g(or)g Ft(NULL)p
21965
 
FB(.)390 1204 y Fn(Since:)41 b FB(2.6.0)150 1393 y Fv(gn)m(utls)p
21966
 
483 1393 37 5 v 55 w(sign)p 749 1393 V 55 w(list)3350
21967
 
1580 y FB([F)-8 b(unction])-3599 b Fh(const)54 b
 
21968
(k)m(ey)390 3556 y(signature)31 b(algorithm,)g(or)g Ft(NULL)p
 
21969
FB(.)390 3682 y Fn(Since:)41 b FB(2.6.0)150 3866 y Fv(gn)m(utls)p
 
21970
483 3866 37 5 v 55 w(sign)p 749 3866 V 55 w(list)3350
 
21971
4047 y FB([F)-8 b(unction])-3599 b Fh(const)54 b
21968
21972
(gnutls_sign_algorithm_t)59 b(*)53 b(gnutls_sign_list)d
21969
 
Fg(\()31 b Fe(void)12 b Fg(\))390 1690 y FB(Get)31 b(a)g(list)g(of)g
 
21973
Fg(\()31 b Fe(void)12 b Fg(\))390 4157 y FB(Get)31 b(a)g(list)g(of)g
21970
21974
(supp)s(orted)d(public)i(k)m(ey)h(signature)g(algorithms.)390
21971
 
1820 y Fn(Returns:)38 b FB(a)27 b(zero-terminated)h(list)e(of)h
 
21975
4283 y Fn(Returns:)38 b FB(a)27 b(zero-terminated)h(list)e(of)h
21972
21976
Ft(gnutls_sign_algorithm_t)19 b FB(in)m(tegers)28 b(indicating)f(the)
21973
 
390 1929 y(a)m(v)-5 b(ailable)33 b(ciphers.)150 2119
21974
 
y Fv(gn)m(utls)p 483 2119 V 55 w(srp)p 704 2119 V 54
21975
 
w(allo)s(cate)p 1169 2119 V 54 w(clien)m(t)p 1515 2119
21976
 
V 53 w(creden)m(tials)3350 2306 y FB([F)-8 b(unction])-3599
 
21977
390 4393 y(a)m(v)-5 b(ailable)33 b(ciphers.)150 4577
 
21978
y Fv(gn)m(utls)p 483 4577 V 55 w(srp)p 704 4577 V 54
 
21979
w(allo)s(cate)p 1169 4577 V 54 w(clien)m(t)p 1515 4577
 
21980
V 53 w(creden)m(tials)3350 4758 y FB([F)-8 b(unction])-3599
21977
21981
b Fh(int)53 b(gnutls_srp_allocate_c)q(lien)q(t_c)q(red)q(ent)q(ials)565
21978
 
2416 y Fg(\()p Ff(gn)m(utls)p 846 2416 28 4 v 41 w(srp)p
21979
 
1010 2416 V 39 w(clien)m(t)p 1262 2416 V 41 w(creden)m(tials)p
21980
 
1724 2416 V 42 w(t)31 b(*)f Fe(sc)12 b Fg(\))390 2525
 
21982
4867 y Fg(\()p Ff(gn)m(utls)p 846 4867 28 4 v 41 w(srp)p
 
21983
1010 4867 V 39 w(clien)m(t)p 1262 4867 V 41 w(creden)m(tials)p
 
21984
1724 4867 V 42 w(t)31 b(*)f Fe(sc)12 b Fg(\))390 4977
21981
21985
y Ff(sc)6 b FB(:)40 b(is)31 b(a)g(p)s(oin)m(ter)f(to)h(an)f
21982
21986
Ft(gnutls_srp_server_credenti)o(als)o(_t)24 b FB(structure.)390
21983
 
2655 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
 
21987
5104 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
21984
21988
(directly)g(th)m(us)f(this)h(help)s(er)f(function)g(is)390
21985
 
2764 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i(it.)390
21986
 
2894 y Fn(Returns:)40 b FB(On)30 b(success,)h Ft(GNUTLS_E_SUCCESS)26
21987
 
b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h(error)f(co)s(de.)150
21988
 
3084 y Fv(gn)m(utls)p 483 3084 37 5 v 55 w(srp)p 704
21989
 
3084 V 54 w(allo)s(cate)p 1169 3084 V 54 w(serv)m(er)p
21990
 
1545 3084 V 54 w(creden)m(tials)3350 3271 y FB([F)-8
21991
 
b(unction])-3599 b Fh(int)53 b(gnutls_srp_allocate_s)q(erve)q(r_c)q
21992
 
(red)q(ent)q(ials)565 3380 y Fg(\()p Ff(gn)m(utls)p 846
21993
 
3380 28 4 v 41 w(srp)p 1010 3380 V 39 w(serv)m(er)p 1282
21994
 
3380 V 40 w(creden)m(tials)p 1743 3380 V 42 w(t)30 b(*)h
21995
 
Fe(sc)12 b Fg(\))390 3490 y Ff(sc)6 b FB(:)40 b(is)31
21996
 
b(a)g(p)s(oin)m(ter)f(to)h(an)f Ft(gnutls_srp_server_credenti)o(als)o
21997
 
(_t)24 b FB(structure.)390 3620 y(This)31 b(structure)g(is)h(complex)g
21998
 
(enough)f(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f
21999
 
(function)g(is)390 3729 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i
22000
 
(it.)390 3859 y Fn(Returns:)40 b FB(On)30 b(success,)h
22001
 
Ft(GNUTLS_E_SUCCESS)26 b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h
22002
 
(error)f(co)s(de.)150 4049 y Fv(gn)m(utls)p 483 4049
22003
 
37 5 v 55 w(srp)p 704 4049 V 54 w(base64)p 1112 4049
22004
 
V 55 w(deco)s(de)p 1534 4049 V 55 w(allo)s(c)3350 4236
22005
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_dec)q(ode_)
22006
 
q(all)q(oc)f Fg(\()p Ff(const)31 b(gn)m(utls)p 2493 4236
22007
 
28 4 v 40 w(datum)p 2791 4236 V 40 w(t)g(*)565 4345 y
22008
 
Fe(b64_data)12 b Ff(,)33 b(gn)m(utls)p 1297 4345 V 40
22009
 
w(datum)p 1595 4345 V 40 w(t)d(*)h Fe(result)12 b Fg(\))390
22010
 
4455 y Ff(b64)p 537 4455 V 40 w(data)p FB(:)42 b(con)m(tains)31
22011
 
b(the)g(enco)s(ded)f(data)390 4584 y Ff(result)r FB(:)41
22012
 
b(the)30 b(place)i(where)d(deco)s(ded)h(data)h(lie)390
22013
 
4714 y(This)23 b(function)g(will)h(deco)s(de)f(the)h(giv)m(en)g(enco)s
22014
 
(ded)g(data.)39 b(The)23 b(deco)s(ded)g(data)h(will)g(b)s(e)f(allo)s
22015
 
(cated,)390 4824 y(and)30 b(stored)g(in)m(to)i(result.)40
22016
 
b(It)31 b(will)f(deco)s(de)h(using)f(the)g(base64)i(algorithm)f(as)g
22017
 
(used)e(in)h(libsrp.)390 4953 y(Y)-8 b(ou)31 b(should)e(use)h
22018
 
Ft(gnutls_free\(\))d FB(to)k(free)g(the)f(returned)f(data.)390
22019
 
5083 y(W)-8 b(arning!)46 b(This)31 b(base64)i(enco)s(ding)f(is)g(not)g
22020
 
(the)h Ft(")p FB(standard)p Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g
22021
 
(use)g(it)g(for)390 5193 y(non-SRP)d(purp)s(oses.)390
22022
 
5322 y Fn(Returns:)40 b FB(0)31 b(on)f(success,)h(or)g(an)f(error)g(co)
22023
 
s(de.)p eop end
 
21989
5213 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i(it.)390
 
21990
5340 y Fn(Returns:)40 b FB(On)30 b(success,)h Ft(GNUTLS_E_SUCCESS)26
 
21991
b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h(error)f(co)s(de.)p
 
21992
eop end
22024
21993
%%Page: 174 180
22025
21994
TeXDict begin 174 179 bop 150 -116 a FB(Chapter)30 b(9:)41
22026
21995
b(F)-8 b(unction)31 b(Reference)2237 b(174)150 299 y
22027
21996
Fv(gn)m(utls)p 483 299 37 5 v 55 w(srp)p 704 299 V 54
22028
 
w(base64)p 1112 299 V 55 w(deco)s(de)3350 503 y FB([F)-8
22029
 
b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_dec)q(ode)f
22030
 
Fg(\()p Ff(const)31 b(gn)m(utls)p 2179 503 28 4 v 41
22031
 
w(datum)p 2478 503 V 39 w(t)g(*)g Fe(b64_data)12 b Ff(,)565
22032
 
612 y(c)m(har)31 b(*)g Fe(result)12 b Ff(,)32 b(size)p
22033
 
1369 612 V 40 w(t)f(*)g Fe(result_size)12 b Fg(\))390
22034
 
722 y Ff(b64)p 537 722 V 40 w(data)p FB(:)42 b(con)m(tain)32
22035
 
b(the)e(enco)s(ded)g(data)390 863 y Ff(result)r FB(:)41
22036
 
b(the)30 b(place)i(where)d(deco)s(ded)h(data)h(will)g(b)s(e)f(copied)
22037
 
390 1005 y Ff(result)p 619 1005 V 40 w(size)5 b FB(:)42
22038
 
b(holds)30 b(the)g(size)h(of)g(the)f(result)390 1146
22039
 
y(This)k(function)g(will)h(deco)s(de)g(the)g(giv)m(en)h(enco)s(ded)e
22040
 
(data,)j(using)d(the)h(base64)h(enco)s(ding)e(found)390
22041
 
1256 y(in)c(libsrp.)390 1397 y(Note)i(that)f(b64)p 954
22042
 
1397 V 40 w(data)g(should)f(b)s(e)f(n)m(ull)i(terminated.)390
22043
 
1539 y(W)-8 b(arning!)46 b(This)31 b(base64)i(enco)s(ding)f(is)g(not)g
 
21997
w(allo)s(cate)p 1169 299 V 54 w(serv)m(er)p 1545 299
 
21998
V 54 w(creden)m(tials)3350 488 y FB([F)-8 b(unction])-3599
 
21999
b Fh(int)53 b(gnutls_srp_allocate_s)q(erve)q(r_c)q(red)q(ent)q(ials)565
 
22000
597 y Fg(\()p Ff(gn)m(utls)p 846 597 28 4 v 41 w(srp)p
 
22001
1010 597 V 39 w(serv)m(er)p 1282 597 V 40 w(creden)m(tials)p
 
22002
1743 597 V 42 w(t)30 b(*)h Fe(sc)12 b Fg(\))390 707 y
 
22003
Ff(sc)6 b FB(:)40 b(is)31 b(a)g(p)s(oin)m(ter)f(to)h(an)f
 
22004
Ft(gnutls_srp_server_credenti)o(als)o(_t)24 b FB(structure.)390
 
22005
837 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
 
22006
(directly)g(th)m(us)f(this)h(help)s(er)f(function)g(is)390
 
22007
947 y(pro)m(vided)f(in)g(order)g(to)h(allo)s(cate)i(it.)390
 
22008
1078 y Fn(Returns:)40 b FB(On)30 b(success,)h Ft(GNUTLS_E_SUCCESS)26
 
22009
b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h(error)f(co)s(de.)150
 
22010
1269 y Fv(gn)m(utls)p 483 1269 37 5 v 55 w(srp)p 704
 
22011
1269 V 54 w(base64)p 1112 1269 V 55 w(deco)s(de)p 1534
 
22012
1269 V 55 w(allo)s(c)3350 1458 y FB([F)-8 b(unction])-3599
 
22013
b Fh(int)53 b(gnutls_srp_base64_dec)q(ode_)q(all)q(oc)f
 
22014
Fg(\()p Ff(const)31 b(gn)m(utls)p 2493 1458 28 4 v 40
 
22015
w(datum)p 2791 1458 V 40 w(t)g(*)565 1567 y Fe(b64_data)12
 
22016
b Ff(,)33 b(gn)m(utls)p 1297 1567 V 40 w(datum)p 1595
 
22017
1567 V 40 w(t)d(*)h Fe(result)12 b Fg(\))390 1677 y Ff(b64)p
 
22018
537 1677 V 40 w(data)p FB(:)42 b(con)m(tains)31 b(the)g(enco)s(ded)f
 
22019
(data)390 1808 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s
 
22020
(ded)h(data)h(lie)390 1938 y(This)23 b(function)g(will)h(deco)s(de)f
 
22021
(the)h(giv)m(en)g(enco)s(ded)g(data.)39 b(The)23 b(deco)s(ded)g(data)h
 
22022
(will)g(b)s(e)f(allo)s(cated,)390 2048 y(and)30 b(stored)g(in)m(to)i
 
22023
(result.)40 b(It)31 b(will)f(deco)s(de)h(using)f(the)g(base64)i
 
22024
(algorithm)f(as)g(used)e(in)h(libsrp.)390 2178 y(Y)-8
 
22025
b(ou)31 b(should)e(use)h Ft(gnutls_free\(\))d FB(to)k(free)g(the)f
 
22026
(returned)f(data.)390 2309 y(W)-8 b(arning!)46 b(This)31
 
22027
b(base64)i(enco)s(ding)f(is)g(not)g(the)h Ft(")p FB(standard)p
 
22028
Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g(use)g(it)g(for)390
 
22029
2418 y(non-SRP)d(purp)s(oses.)390 2549 y Fn(Returns:)40
 
22030
b FB(0)31 b(on)f(success,)h(or)g(an)f(error)g(co)s(de.)150
 
22031
2740 y Fv(gn)m(utls)p 483 2740 37 5 v 55 w(srp)p 704
 
22032
2740 V 54 w(base64)p 1112 2740 V 55 w(deco)s(de)3350
 
22033
2929 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_dec)q
 
22034
(ode)f Fg(\()p Ff(const)31 b(gn)m(utls)p 2179 2929 28
 
22035
4 v 41 w(datum)p 2478 2929 V 39 w(t)g(*)g Fe(b64_data)12
 
22036
b Ff(,)565 3039 y(c)m(har)31 b(*)g Fe(result)12 b Ff(,)32
 
22037
b(size)p 1369 3039 V 40 w(t)f(*)g Fe(result_size)12 b
 
22038
Fg(\))390 3148 y Ff(b64)p 537 3148 V 40 w(data)p FB(:)42
 
22039
b(con)m(tain)32 b(the)e(enco)s(ded)g(data)390 3279 y
 
22040
Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(deco)s(ded)h(data)h
 
22041
(will)g(b)s(e)f(copied)390 3409 y Ff(result)p 619 3409
 
22042
V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f(result)390
 
22043
3540 y(This)k(function)g(will)h(deco)s(de)g(the)g(giv)m(en)h(enco)s
 
22044
(ded)e(data,)j(using)d(the)h(base64)h(enco)s(ding)e(found)390
 
22045
3650 y(in)c(libsrp.)390 3780 y(Note)i(that)f(b64)p 954
 
22046
3780 V 40 w(data)g(should)f(b)s(e)f(n)m(ull)i(terminated.)390
 
22047
3911 y(W)-8 b(arning!)46 b(This)31 b(base64)i(enco)s(ding)f(is)g(not)g
22044
22048
(the)h Ft(")p FB(standard)p Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g
22045
 
(use)g(it)g(for)390 1648 y(non-SRP)d(purp)s(oses.)390
22046
 
1790 y Fn(Returns:)40 b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24
 
22049
(use)g(it)g(for)390 4020 y(non-SRP)d(purp)s(oses.)390
 
22050
4151 y Fn(Returns:)40 b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24
22047
22051
b FB(if)30 b(the)g(bu\013er)f(giv)m(en)i(is)g(not)f(long)h(enough,)f
22048
 
(or)390 1900 y(0)h(on)f(success.)150 2106 y Fv(gn)m(utls)p
22049
 
483 2106 37 5 v 55 w(srp)p 704 2106 V 54 w(base64)p 1112
22050
 
2106 V 55 w(enco)s(de)p 1534 2106 V 55 w(allo)s(c)3350
22051
 
2310 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_enc)q
 
22052
(or)390 4260 y(0)h(on)f(success.)150 4452 y Fv(gn)m(utls)p
 
22053
483 4452 37 5 v 55 w(srp)p 704 4452 V 54 w(base64)p 1112
 
22054
4452 V 55 w(enco)s(de)p 1534 4452 V 55 w(allo)s(c)3350
 
22055
4641 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_enc)q
22052
22056
(ode_)q(all)q(oc)f Fg(\()p Ff(const)31 b(gn)m(utls)p
22053
 
2493 2310 28 4 v 40 w(datum)p 2791 2310 V 40 w(t)g(*)565
22054
 
2419 y Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1087 2419 V
22055
 
41 w(datum)p 1386 2419 V 39 w(t)g(*)g Fe(result)12 b
22056
 
Fg(\))390 2529 y Ff(data)p FB(:)41 b(con)m(tains)32 b(the)f(ra)m(w)f
22057
 
(data)390 2670 y Ff(result)r FB(:)41 b(will)30 b(hold)g(the)h(newly)f
22058
 
(allo)s(cated)i(enco)s(ded)e(data)390 2812 y(This)22
 
22057
2493 4641 28 4 v 40 w(datum)p 2791 4641 V 40 w(t)g(*)565
 
22058
4750 y Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1087 4750 V
 
22059
41 w(datum)p 1386 4750 V 39 w(t)g(*)g Fe(result)12 b
 
22060
Fg(\))390 4860 y Ff(data)p FB(:)41 b(con)m(tains)32 b(the)f(ra)m(w)f
 
22061
(data)390 4990 y Ff(result)r FB(:)41 b(will)30 b(hold)g(the)h(newly)f
 
22062
(allo)s(cated)i(enco)s(ded)e(data)390 5121 y(This)22
22059
22063
b(function)h(will)h(con)m(v)m(ert)h(the)e(giv)m(en)h(data)g(to)g(prin)m
22060
22064
(table)g(data,)h(using)e(the)g(base64)i(enco)s(ding.)390
22061
 
2921 y(This)42 b(is)i(the)f(enco)s(ding)g(used)f(in)h(SRP)g(passw)m
 
22065
5230 y(This)42 b(is)i(the)f(enco)s(ding)g(used)f(in)h(SRP)g(passw)m
22062
22066
(ord)f(\014les.)79 b(This)43 b(function)g(will)g(allo)s(cate)j(the)390
22063
 
3031 y(required)30 b(memory)g(to)h(hold)f(the)h(enco)s(ded)f(data.)390
22064
 
3172 y(Y)-8 b(ou)31 b(should)e(use)h Ft(gnutls_free\(\))d
22065
 
FB(to)k(free)g(the)f(returned)f(data.)390 3314 y(W)-8
22066
 
b(arning!)46 b(This)31 b(base64)i(enco)s(ding)f(is)g(not)g(the)h
22067
 
Ft(")p FB(standard)p Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g(use)g(it)
22068
 
g(for)390 3423 y(non-SRP)d(purp)s(oses.)390 3565 y Fn(Returns:)40
22069
 
b FB(0)31 b(on)f(success,)h(or)g(an)f(error)g(co)s(de.)150
22070
 
3771 y Fv(gn)m(utls)p 483 3771 37 5 v 55 w(srp)p 704
22071
 
3771 V 54 w(base64)p 1112 3771 V 55 w(enco)s(de)3350
22072
 
3975 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_enc)q
22073
 
(ode)f Fg(\()p Ff(const)31 b(gn)m(utls)p 2179 3975 28
22074
 
4 v 41 w(datum)p 2478 3975 V 39 w(t)g(*)g Fe(data)12
22075
 
b Ff(,)31 b(c)m(har)g(*)565 4085 y Fe(result)12 b Ff(,)32
22076
 
b(size)p 1093 4085 V 41 w(t)f(*)f Fe(result_size)12 b
22077
 
Fg(\))390 4194 y Ff(data)p FB(:)41 b(con)m(tain)32 b(the)f(ra)m(w)f
22078
 
(data)390 4336 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(base64)
22079
 
j(data)f(will)g(b)s(e)e(copied)390 4477 y Ff(result)p
22080
 
619 4477 V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f
22081
 
(result)390 4619 y(This)22 b(function)h(will)h(con)m(v)m(ert)h(the)e
22082
 
(giv)m(en)h(data)g(to)g(prin)m(table)g(data,)h(using)e(the)g(base64)i
22083
 
(enco)s(ding,)390 4728 y(as)h(used)e(in)i(the)f(libsrp.)38
22084
 
b(This)25 b(is)g(the)h(enco)s(ding)f(used)g(in)g(SRP)g(passw)m(ord)g
22085
 
(\014les.)39 b(If)25 b(the)g(pro)m(vided)390 4838 y(bu\013er)k(is)i
22086
 
(not)f(long)h(enough)f(GNUTLS)p 1800 4838 V 40 w(E)p
22087
 
1902 4838 V 40 w(SHOR)-8 b(T)p 2257 4838 V 39 w(MEMOR)g(Y)p
22088
 
2722 4838 V 41 w(BUFFER)32 b(is)e(returned.)390 4979
22089
 
y(W)-8 b(arning!)46 b(This)31 b(base64)i(enco)s(ding)f(is)g(not)g(the)h
22090
 
Ft(")p FB(standard)p Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g(use)g(it)
22091
 
g(for)390 5089 y(non-SRP)d(purp)s(oses.)390 5230 y Fn(Returns:)40
22092
 
b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24 b FB(if)30 b(the)g(bu\013er)f
22093
 
(giv)m(en)i(is)g(not)f(long)h(enough,)f(or)390 5340 y(0)h(on)f
22094
 
(success.)p eop end
 
22067
5340 y(required)30 b(memory)g(to)h(hold)f(the)h(enco)s(ded)f(data.)p
 
22068
eop end
22095
22069
%%Page: 175 181
22096
22070
TeXDict begin 175 180 bop 150 -116 a FB(Chapter)30 b(9:)41
22097
 
b(F)-8 b(unction)31 b(Reference)2237 b(175)150 299 y
22098
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(srp)p 704 299 V 54
22099
 
w(free)p 957 299 V 55 w(clien)m(t)p 1304 299 V 53 w(creden)m(tials)3350
22100
 
505 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
22101
 
(gnutls_srp_free_client_c)q(red)q(ent)q(ial)q(s)565 615
22102
 
y Fg(\()p Ff(gn)m(utls)p 846 615 28 4 v 41 w(srp)p 1010
22103
 
615 V 39 w(clien)m(t)p 1262 615 V 41 w(creden)m(tials)p
22104
 
1724 615 V 42 w(t)31 b Fe(sc)12 b Fg(\))390 724 y Ff(sc)6
22105
 
b FB(:)40 b(is)31 b(an)f Ft(gnutls_srp_client_credent)o(ial)o(s_t)24
22106
 
b FB(structure.)390 868 y(This)31 b(structure)g(is)h(complex)g(enough)f
22107
 
(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f(function)g
22108
 
(is)390 978 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s(cate\))
22109
 
i(it.)150 1186 y Fv(gn)m(utls)p 483 1186 37 5 v 55 w(srp)p
22110
 
704 1186 V 54 w(free)p 957 1186 V 55 w(serv)m(er)p 1334
22111
 
1186 V 54 w(creden)m(tials)3350 1393 y FB([F)-8 b(unction])-3599
 
22071
b(F)-8 b(unction)31 b(Reference)2237 b(175)390 299 y(Y)-8
 
22072
b(ou)31 b(should)e(use)h Ft(gnutls_free\(\))d FB(to)k(free)g(the)f
 
22073
(returned)f(data.)390 444 y(W)-8 b(arning!)46 b(This)31
 
22074
b(base64)i(enco)s(ding)f(is)g(not)g(the)h Ft(")p FB(standard)p
 
22075
Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g(use)g(it)g(for)390
 
22076
554 y(non-SRP)d(purp)s(oses.)390 699 y Fn(Returns:)40
 
22077
b FB(0)31 b(on)f(success,)h(or)g(an)f(error)g(co)s(de.)150
 
22078
909 y Fv(gn)m(utls)p 483 909 37 5 v 55 w(srp)p 704 909
 
22079
V 54 w(base64)p 1112 909 V 55 w(enco)s(de)3350 1117 y
 
22080
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_base64_enc)q(ode)f
 
22081
Fg(\()p Ff(const)31 b(gn)m(utls)p 2179 1117 28 4 v 41
 
22082
w(datum)p 2478 1117 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31
 
22083
b(c)m(har)g(*)565 1227 y Fe(result)12 b Ff(,)32 b(size)p
 
22084
1093 1227 V 41 w(t)f(*)f Fe(result_size)12 b Fg(\))390
 
22085
1336 y Ff(data)p FB(:)41 b(con)m(tain)32 b(the)f(ra)m(w)f(data)390
 
22086
1481 y Ff(result)r FB(:)41 b(the)30 b(place)i(where)d(base64)j(data)f
 
22087
(will)g(b)s(e)e(copied)390 1627 y Ff(result)p 619 1627
 
22088
V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)h(of)g(the)f(result)390
 
22089
1772 y(This)22 b(function)h(will)h(con)m(v)m(ert)h(the)e(giv)m(en)h
 
22090
(data)g(to)g(prin)m(table)g(data,)h(using)e(the)g(base64)i(enco)s
 
22091
(ding,)390 1882 y(as)h(used)e(in)i(the)f(libsrp.)38 b(This)25
 
22092
b(is)g(the)h(enco)s(ding)f(used)g(in)g(SRP)g(passw)m(ord)g(\014les.)39
 
22093
b(If)25 b(the)g(pro)m(vided)390 1991 y(bu\013er)k(is)i(not)f(long)h
 
22094
(enough)f(GNUTLS)p 1800 1991 V 40 w(E)p 1902 1991 V 40
 
22095
w(SHOR)-8 b(T)p 2257 1991 V 39 w(MEMOR)g(Y)p 2722 1991
 
22096
V 41 w(BUFFER)32 b(is)e(returned.)390 2137 y(W)-8 b(arning!)46
 
22097
b(This)31 b(base64)i(enco)s(ding)f(is)g(not)g(the)h Ft(")p
 
22098
FB(standard)p Ft(")d FB(enco)s(ding,)j(so)f(do)g(not)g(use)g(it)g(for)
 
22099
390 2246 y(non-SRP)d(purp)s(oses.)390 2392 y Fn(Returns:)40
 
22100
b Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24 b FB(if)30 b(the)g(bu\013er)f
 
22101
(giv)m(en)i(is)g(not)f(long)h(enough,)f(or)390 2501 y(0)h(on)f
 
22102
(success.)150 2711 y Fv(gn)m(utls)p 483 2711 37 5 v 55
 
22103
w(srp)p 704 2711 V 54 w(free)p 957 2711 V 55 w(clien)m(t)p
 
22104
1304 2711 V 53 w(creden)m(tials)3350 2919 y FB([F)-8
 
22105
b(unction])-3599 b Fh(void)54 b(gnutls_srp_free_client_c)q(red)q(ent)q
 
22106
(ial)q(s)565 3029 y Fg(\()p Ff(gn)m(utls)p 846 3029 28
 
22107
4 v 41 w(srp)p 1010 3029 V 39 w(clien)m(t)p 1262 3029
 
22108
V 41 w(creden)m(tials)p 1724 3029 V 42 w(t)31 b Fe(sc)12
 
22109
b Fg(\))390 3138 y Ff(sc)6 b FB(:)40 b(is)31 b(an)f Ft
 
22110
(gnutls_srp_client_credent)o(ial)o(s_t)24 b FB(structure.)390
 
22111
3284 y(This)31 b(structure)g(is)h(complex)g(enough)f(to)i(manipulate)f
 
22112
(directly)g(th)m(us)f(this)h(help)s(er)f(function)g(is)390
 
22113
3393 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s(cate\))i(it.)
 
22114
150 3603 y Fv(gn)m(utls)p 483 3603 37 5 v 55 w(srp)p
 
22115
704 3603 V 54 w(free)p 957 3603 V 55 w(serv)m(er)p 1334
 
22116
3603 V 54 w(creden)m(tials)3350 3811 y FB([F)-8 b(unction])-3599
22112
22117
b Fh(void)54 b(gnutls_srp_free_server_c)q(red)q(ent)q(ial)q(s)565
22113
 
1502 y Fg(\()p Ff(gn)m(utls)p 846 1502 28 4 v 41 w(srp)p
22114
 
1010 1502 V 39 w(serv)m(er)p 1282 1502 V 40 w(creden)m(tials)p
22115
 
1743 1502 V 42 w(t)30 b Fe(sc)12 b Fg(\))390 1612 y Ff(sc)6
 
22118
3921 y Fg(\()p Ff(gn)m(utls)p 846 3921 28 4 v 41 w(srp)p
 
22119
1010 3921 V 39 w(serv)m(er)p 1282 3921 V 40 w(creden)m(tials)p
 
22120
1743 3921 V 42 w(t)30 b Fe(sc)12 b Fg(\))390 4030 y Ff(sc)6
22116
22121
b FB(:)40 b(is)31 b(an)f Ft(gnutls_srp_server_credent)o(ial)o(s_t)24
22117
 
b FB(structure.)390 1756 y(This)31 b(structure)g(is)h(complex)g(enough)
 
22122
b FB(structure.)390 4175 y(This)31 b(structure)g(is)h(complex)g(enough)
22118
22123
f(to)i(manipulate)f(directly)g(th)m(us)f(this)h(help)s(er)f(function)g
22119
 
(is)390 1865 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s
22120
 
(cate\))i(it.)150 2074 y Fv(gn)m(utls)p 483 2074 37 5
22121
 
v 55 w(srp)p 704 2074 V 54 w(serv)m(er)p 1080 2074 V
22122
 
54 w(get)p 1299 2074 V 54 w(username)3350 2280 y FB([F)-8
 
22124
(is)390 4285 y(pro)m(vided)f(in)g(order)g(to)h(free)g(\(deallo)s
 
22125
(cate\))i(it.)150 4495 y Fv(gn)m(utls)p 483 4495 37 5
 
22126
v 55 w(srp)p 704 4495 V 54 w(serv)m(er)p 1080 4495 V
 
22127
54 w(get)p 1299 4495 V 54 w(username)3350 4703 y FB([F)-8
22123
22128
b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_srp_server_get_)q
22124
 
(use)q(rnam)q(e)e Fg(\()p Ff(gn)m(utls)p 2725 2280 28
22125
 
4 v 41 w(session)p 3035 2280 V 40 w(t)565 2390 y Fe(session)12
22126
 
b Fg(\))390 2499 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
22127
 
(session)390 2643 y(This)26 b(function)g(will)h(return)e(the)i
 
22129
(use)q(rnam)q(e)e Fg(\()p Ff(gn)m(utls)p 2725 4703 28
 
22130
4 v 41 w(session)p 3035 4703 V 40 w(t)565 4812 y Fe(session)12
 
22131
b Fg(\))390 4922 y Ff(session)p FB(:)41 b(is)30 b(a)h(gn)m(utls)g
 
22132
(session)390 5067 y(This)26 b(function)g(will)h(return)e(the)i
22128
22133
(username)f(of)h(the)f(p)s(eer.)39 b(This)26 b(should)f(only)i(b)s(e)f
22129
 
(called)i(in)e(case)390 2753 y(of)31 b(SRP)e(authen)m(tication)k(and)c
 
22134
(called)i(in)e(case)390 5177 y(of)31 b(SRP)e(authen)m(tication)k(and)c
22130
22135
(in)h(case)i(of)e(a)h(serv)m(er.)41 b(Returns)30 b(NULL)g(in)g(case)h
22131
 
(of)g(an)f(error.)390 2897 y Fn(Returns:)40 b FB(SRP)30
 
22136
(of)g(an)f(error.)390 5322 y Fn(Returns:)40 b FB(SRP)30
22132
22137
b(username)g(of)g(the)h(p)s(eer,)f(or)g(NULL)h(in)f(case)h(of)g(error.)
22133
 
150 3106 y Fv(gn)m(utls)p 483 3106 37 5 v 55 w(srp)p
22134
 
704 3106 V 54 w(set)p 910 3106 V 54 w(clien)m(t)p 1256
22135
 
3106 V 54 w(creden)m(tials)p 1884 3106 V 53 w(function)3350
22136
 
3312 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
22137
 
(gnutls_srp_set_client_cr)q(ede)q(nti)q(als)q(_fun)q(cti)q(on)565
22138
 
3421 y Fg(\()p Ff(gn)m(utls)p 846 3421 28 4 v 41 w(srp)p
22139
 
1010 3421 V 39 w(clien)m(t)p 1262 3421 V 41 w(creden)m(tials)p
22140
 
1724 3421 V 42 w(t)31 b Fe(cred)12 b Ff(,)31 b(gn)m(utls)p
22141
 
2348 3421 V 40 w(srp)p 2511 3421 V 39 w(clien)m(t)p 2763
22142
 
3421 V 42 w(creden)m(tials)p 3226 3421 V 41 w(function)f(*)565
22143
 
3531 y Fe(func)12 b Fg(\))390 3641 y Ff(cred)t FB(:)40
22144
 
b(is)31 b(a)f Ft(gnutls_srp_server_credent)o(ials)o(_t)24
22145
 
b FB(structure.)390 3784 y Ff(func)6 b FB(:)39 b(is)31
22146
 
b(the)f(callbac)m(k)j(function)390 3928 y(This)26 b(function)g(can)h(b)
22147
 
s(e)e(used)h(to)h(set)g(a)g(callbac)m(k)i(to)e(retriev)m(e)h(the)f
22148
 
(username)f(and)f(passw)m(ord)h(for)390 4038 y(clien)m(t)32
22149
 
b(SRP)e(authen)m(tication.)390 4182 y(The)g(callbac)m(k's)i(function)f
22150
 
(form)e(is:)390 4326 y(in)m(t)i(\(*callbac)m(k\)\(gn)m(utls)p
22151
 
1241 4326 V 44 w(session)p 1554 4326 V 40 w(t,)g(c)m(har**)h(username,)
22152
 
e(c)m(har**passw)m(ord\);)390 4470 y(The)j Ft(username)e
22153
 
FB(and)i Ft(password)f FB(m)m(ust)h(b)s(e)g(allo)s(cated)j(using)d
22154
 
Ft(gnutls_malloc\(\))p FB(.)46 b Ft(username)390 4579
 
22138
p eop end
 
22139
%%Page: 176 182
 
22140
TeXDict begin 176 181 bop 150 -116 a FB(Chapter)30 b(9:)41
 
22141
b(F)-8 b(unction)31 b(Reference)2237 b(176)150 299 y
 
22142
Fv(gn)m(utls)p 483 299 37 5 v 55 w(srp)p 704 299 V 54
 
22143
w(set)p 910 299 V 54 w(clien)m(t)p 1256 299 V 54 w(creden)m(tials)p
 
22144
1884 299 V 53 w(function)3350 482 y FB([F)-8 b(unction])-3599
 
22145
b Fh(void)54 b(gnutls_srp_set_client_cr)q(ede)q(nti)q(als)q(_fun)q(cti)
 
22146
q(on)565 591 y Fg(\()p Ff(gn)m(utls)p 846 591 28 4 v
 
22147
41 w(srp)p 1010 591 V 39 w(clien)m(t)p 1262 591 V 41
 
22148
w(creden)m(tials)p 1724 591 V 42 w(t)31 b Fe(cred)12
 
22149
b Ff(,)31 b(gn)m(utls)p 2348 591 V 40 w(srp)p 2511 591
 
22150
V 39 w(clien)m(t)p 2763 591 V 42 w(creden)m(tials)p 3226
 
22151
591 V 41 w(function)f(*)565 701 y Fe(func)12 b Fg(\))390
 
22152
810 y Ff(cred)t FB(:)40 b(is)31 b(a)f Ft(gnutls_srp_server_credent)o
 
22153
(ials)o(_t)24 b FB(structure.)390 938 y Ff(func)6 b FB(:)39
 
22154
b(is)31 b(the)f(callbac)m(k)j(function)390 1065 y(This)26
 
22155
b(function)g(can)h(b)s(e)e(used)h(to)h(set)g(a)g(callbac)m(k)i(to)e
 
22156
(retriev)m(e)h(the)f(username)f(and)f(passw)m(ord)h(for)390
 
22157
1175 y(clien)m(t)32 b(SRP)e(authen)m(tication.)390 1303
 
22158
y(The)g(callbac)m(k's)i(function)f(form)e(is:)390 1430
 
22159
y(in)m(t)i(\(*callbac)m(k\)\(gn)m(utls)p 1241 1430 V
 
22160
44 w(session)p 1554 1430 V 40 w(t,)g(c)m(har**)h(username,)e(c)m
 
22161
(har**passw)m(ord\);)390 1558 y(The)j Ft(username)e FB(and)i
 
22162
Ft(password)f FB(m)m(ust)h(b)s(e)g(allo)s(cated)j(using)d
 
22163
Ft(gnutls_malloc\(\))p FB(.)46 b Ft(username)390 1667
22155
22164
y FB(and)30 b Ft(password)e FB(should)h(b)s(e)h(ASCI)s(I)f(strings)h
22156
22165
(or)g(UTF-8)h(strings)f(prepared)g(using)f(the)i Ft(")p
22157
 
FB(SASL-)390 4689 y(prep)p Ft(")e FB(pro\014le)h(of)h
22158
 
Ft(")p FB(stringprep)p Ft(")p FB(.)390 4833 y(The)20
 
22166
FB(SASL-)390 1777 y(prep)p Ft(")e FB(pro\014le)h(of)h
 
22167
Ft(")p FB(stringprep)p Ft(")p FB(.)390 1904 y(The)20
22159
22168
b(callbac)m(k)j(function)e(will)g(b)s(e)f(called)i(once)g(p)s(er)d
22160
22169
(handshak)m(e)i(b)s(efore)f(the)h(initial)h(hello)g(message)390
22161
 
4943 y(is)30 b(sen)m(t.)390 5086 y(The)c(callbac)m(k)i(should)d(not)h
 
22170
2014 y(is)30 b(sen)m(t.)390 2141 y(The)c(callbac)m(k)i(should)d(not)h
22162
22171
(return)f(a)i(negativ)m(e)h(error)d(co)s(de)i(the)f(second)g(time)h
22163
 
(called,)h(since)f(the)390 5196 y(handshak)m(e)j(pro)s(cedure)f(will)i
22164
 
(b)s(e)f(ab)s(orted.)390 5340 y(The)g(callbac)m(k)i(function)e(should)g
22165
 
(return)f(0)i(on)f(success.)41 b(-1)31 b(indicates)g(an)g(error.)p
22166
 
eop end
22167
 
%%Page: 176 182
22168
 
TeXDict begin 176 181 bop 150 -116 a FB(Chapter)30 b(9:)41
22169
 
b(F)-8 b(unction)31 b(Reference)2237 b(176)150 299 y
22170
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(srp)p 704 299 V 54
22171
 
w(set)p 910 299 V 54 w(clien)m(t)p 1256 299 V 54 w(creden)m(tials)3350
22172
 
493 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_set_client)q
22173
 
(_cre)q(den)q(tia)q(ls)565 602 y Fg(\()p Ff(gn)m(utls)p
22174
 
846 602 28 4 v 41 w(srp)p 1010 602 V 39 w(clien)m(t)p
22175
 
1262 602 V 41 w(creden)m(tials)p 1724 602 V 42 w(t)31
22176
 
b Fe(res)12 b Ff(,)31 b(const)f(c)m(har)h(*)g Fe(username)12
22177
 
b Ff(,)33 b(const)d(c)m(har)h(*)565 712 y Fe(password)12
22178
 
b Fg(\))390 821 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft
22179
 
(gnutls_srp_client_creden)o(tial)o(s_t)24 b FB(structure.)390
22180
 
954 y Ff(username)5 b FB(:)40 b(is)31 b(the)f(user's)g(userid)390
22181
 
1087 y Ff(passw)m(ord)t FB(:)40 b(is)30 b(the)h(user's)e(passw)m(ord)
22182
 
390 1220 y(This)75 b(function)h(sets)g(the)g(username)g(and)f(passw)m
22183
 
(ord,)87 b(in)76 b(a)g Ft(gnutls_srp_client_)390 1330
22184
 
y(credentials_t)27 b FB(structure.)40 b(Those)30 b(will)h(b)s(e)e(used)
22185
 
h(in)g(SRP)g(authen)m(tication.)42 b Ft(username)29 b
22186
 
FB(and)390 1439 y Ft(password)d FB(should)i(b)s(e)g(ASCI)s(I)f(strings)
22187
 
i(or)g(UTF-8)g(strings)g(prepared)e(using)i(the)g Ft(")p
22188
 
FB(SASLprep)p Ft(")390 1549 y FB(pro\014le)h(of)h Ft(")p
22189
 
FB(stringprep)p Ft(")p FB(.)390 1682 y Fn(Returns:)40
22190
 
b FB(On)30 b(success,)h Ft(GNUTLS_E_SUCCESS)26 b FB(\(0\))31
22191
 
b(is)g(returned,)e(or)h(an)h(error)f(co)s(de.)150 1878
22192
 
y Fv(gn)m(utls)p 483 1878 37 5 v 55 w(srp)p 704 1878
22193
 
V 54 w(set)p 910 1878 V 54 w(prime)p 1274 1878 V 55 w(bits)3350
22194
 
2072 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
22195
 
(gnutls_srp_set_prime_bit)q(s)e Fg(\()p Ff(gn)m(utls)p
22196
 
2046 2072 28 4 v 40 w(session)p 2355 2072 V 41 w(t)30
22197
 
b Fe(session)12 b Ff(,)565 2181 y(unsigned)29 b(in)m(t)i
22198
 
Fe(bits)12 b Fg(\))390 2291 y Ff(session)p FB(:)41 b(is)30
22199
 
b(a)h Ft(gnutls_session_t)26 b FB(structure.)390 2424
22200
 
y Ff(bits)t FB(:)40 b(is)31 b(the)f(n)m(um)m(b)s(er)f(of)i(bits)390
22201
 
2557 y(This)42 b(function)g(sets)h(the)f(minim)m(um)g(accepted)i(n)m
22202
 
(um)m(b)s(er)d(of)i(bits,)i(for)e(use)f(in)g(an)g(SRP)g(k)m(ey)390
22203
 
2667 y(exc)m(hange.)g(If)30 b(zero,)i(the)e(default)h(2048)h(bits)e
22204
 
(will)h(b)s(e)f(used.)390 2800 y(In)39 b(the)i(clien)m(t)g(side)g(it)f
22205
 
(sets)h(the)f(minim)m(um)g(accepted)h(n)m(um)m(b)s(er)e(of)h(bits.)70
22206
 
b(If)40 b(a)g(serv)m(er)h(sends)390 2909 y(a)h(prime)f(with)g(less)h
 
22172
(called,)h(since)f(the)390 2251 y(handshak)m(e)j(pro)s(cedure)f(will)i
 
22173
(b)s(e)f(ab)s(orted.)390 2378 y(The)g(callbac)m(k)i(function)e(should)g
 
22174
(return)f(0)i(on)f(success.)41 b(-1)31 b(indicates)g(an)g(error.)150
 
22175
2564 y Fv(gn)m(utls)p 483 2564 37 5 v 55 w(srp)p 704
 
22176
2564 V 54 w(set)p 910 2564 V 54 w(clien)m(t)p 1256 2564
 
22177
V 54 w(creden)m(tials)3350 2746 y FB([F)-8 b(unction])-3599
 
22178
b Fh(int)53 b(gnutls_srp_set_client)q(_cre)q(den)q(tia)q(ls)565
 
22179
2856 y Fg(\()p Ff(gn)m(utls)p 846 2856 28 4 v 41 w(srp)p
 
22180
1010 2856 V 39 w(clien)m(t)p 1262 2856 V 41 w(creden)m(tials)p
 
22181
1724 2856 V 42 w(t)31 b Fe(res)12 b Ff(,)31 b(const)f(c)m(har)h(*)g
 
22182
Fe(username)12 b Ff(,)33 b(const)d(c)m(har)h(*)565 2966
 
22183
y Fe(password)12 b Fg(\))390 3075 y Ff(res)t FB(:)40
 
22184
b(is)31 b(an)f Ft(gnutls_srp_client_creden)o(tial)o(s_t)24
 
22185
b FB(structure.)390 3203 y Ff(username)5 b FB(:)40 b(is)31
 
22186
b(the)f(user's)g(userid)390 3330 y Ff(passw)m(ord)t FB(:)40
 
22187
b(is)30 b(the)h(user's)e(passw)m(ord)390 3458 y(This)75
 
22188
b(function)h(sets)g(the)g(username)g(and)f(passw)m(ord,)87
 
22189
b(in)76 b(a)g Ft(gnutls_srp_client_)390 3567 y(credentials_t)27
 
22190
b FB(structure.)40 b(Those)30 b(will)h(b)s(e)e(used)h(in)g(SRP)g
 
22191
(authen)m(tication.)42 b Ft(username)29 b FB(and)390
 
22192
3677 y Ft(password)d FB(should)i(b)s(e)g(ASCI)s(I)f(strings)i(or)g
 
22193
(UTF-8)g(strings)g(prepared)e(using)i(the)g Ft(")p FB(SASLprep)p
 
22194
Ft(")390 3786 y FB(pro\014le)h(of)h Ft(")p FB(stringprep)p
 
22195
Ft(")p FB(.)390 3914 y Fn(Returns:)40 b FB(On)30 b(success,)h
 
22196
Ft(GNUTLS_E_SUCCESS)26 b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h
 
22197
(error)f(co)s(de.)150 4099 y Fv(gn)m(utls)p 483 4099
 
22198
37 5 v 55 w(srp)p 704 4099 V 54 w(set)p 910 4099 V 54
 
22199
w(prime)p 1274 4099 V 55 w(bits)3350 4282 y FB([F)-8
 
22200
b(unction])-3599 b Fh(void)54 b(gnutls_srp_set_prime_bit)q(s)e
 
22201
Fg(\()p Ff(gn)m(utls)p 2046 4282 28 4 v 40 w(session)p
 
22202
2355 4282 V 41 w(t)30 b Fe(session)12 b Ff(,)565 4392
 
22203
y(unsigned)29 b(in)m(t)i Fe(bits)12 b Fg(\))390 4501
 
22204
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
22205
b FB(structure.)390 4629 y Ff(bits)t FB(:)40 b(is)31
 
22206
b(the)f(n)m(um)m(b)s(er)f(of)i(bits)390 4756 y(This)42
 
22207
b(function)g(sets)h(the)f(minim)m(um)g(accepted)i(n)m(um)m(b)s(er)d(of)
 
22208
i(bits,)i(for)e(use)f(in)g(an)g(SRP)g(k)m(ey)390 4866
 
22209
y(exc)m(hange.)g(If)30 b(zero,)i(the)e(default)h(2048)h(bits)e(will)h
 
22210
(b)s(e)f(used.)390 4993 y(In)39 b(the)i(clien)m(t)g(side)g(it)f(sets)h
 
22211
(the)f(minim)m(um)g(accepted)h(n)m(um)m(b)s(er)e(of)h(bits.)70
 
22212
b(If)40 b(a)g(serv)m(er)h(sends)390 5103 y(a)h(prime)f(with)g(less)h
22207
22213
(bits)f(than)g(that)h Ft(GNUTLS_E_RECEIVED_ILLEGA)o(L_PA)o(RAME)o(TER)
22208
 
35 b FB(will)42 b(b)s(e)390 3019 y(returned)29 b(b)m(y)h(the)h
22209
 
(handshak)m(e.)390 3152 y Fn(Since:)41 b FB(2.6.0)150
22210
 
3348 y Fv(gn)m(utls)p 483 3348 37 5 v 55 w(srp)p 704
22211
 
3348 V 54 w(set)p 910 3348 V 54 w(serv)m(er)p 1286 3348
22212
 
V 54 w(creden)m(tials)p 1914 3348 V 54 w(\014le)3350
22213
 
3542 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_srp_set_server)q
22214
 
(_cre)q(den)q(tia)q(ls_)q(file)565 3651 y Fg(\()p Ff(gn)m(utls)p
22215
 
846 3651 28 4 v 41 w(srp)p 1010 3651 V 39 w(serv)m(er)p
22216
 
1282 3651 V 40 w(creden)m(tials)p 1743 3651 V 42 w(t)30
22217
 
b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(password_file)12
22218
 
b Ff(,)34 b(const)d(c)m(har)565 3761 y(*)g Fe(password_conf_file)12
22219
 
b Fg(\))390 3870 y Ff(res)t FB(:)40 b(is)31 b(an)f Ft
22220
 
(gnutls_srp_server_creden)o(tial)o(s_t)24 b FB(structure.)390
22221
 
4003 y Ff(passw)m(ord)p 759 4003 V 39 w(\014le)5 b FB(:)41
22222
 
b(is)31 b(the)f(SRP)g(passw)m(ord)g(\014le)g(\(tpasswd\))390
22223
 
4136 y Ff(passw)m(ord)p 759 4136 V 39 w(conf)p 962 4136
22224
 
V 41 w(\014le)5 b FB(:)40 b(is)31 b(the)f(SRP)g(passw)m(ord)g(conf)g
22225
 
(\014le)h(\(tpasswd.conf)7 b(\))390 4269 y(This)23 b(function)g(sets)i
22226
 
(the)f(passw)m(ord)f(\014les,)i(in)f(a)g Ft(gnutls_srp_server_crede)o
22227
 
(ntia)o(ls_t)17 b FB(struc-)390 4379 y(ture.)67 b(Those)39
22228
 
b(passw)m(ord)f(\014les)i(hold)e(usernames)h(and)f(v)m(eri\014ers)i
22229
 
(and)e(will)i(b)s(e)e(used)h(for)g(SRP)390 4488 y(authen)m(tication.)
22230
 
390 4621 y Fn(Returns:)h FB(On)30 b(success,)h Ft(GNUTLS_E_SUCCESS)26
22231
 
b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h(error)f(co)s(de.)150
22232
 
4818 y Fv(gn)m(utls)p 483 4818 37 5 v 55 w(srp)p 704
22233
 
4818 V 54 w(set)p 910 4818 V 54 w(serv)m(er)p 1286 4818
22234
 
V 54 w(creden)m(tials)p 1914 4818 V 54 w(function)3350
22235
 
5011 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
22236
 
(gnutls_srp_set_server_cr)q(ede)q(nti)q(als)q(_fun)q(cti)q(on)565
22237
 
5121 y Fg(\()p Ff(gn)m(utls)p 846 5121 28 4 v 41 w(srp)p
22238
 
1010 5121 V 39 w(serv)m(er)p 1282 5121 V 40 w(creden)m(tials)p
22239
 
1743 5121 V 42 w(t)30 b Fe(cred)12 b Ff(,)32 b(gn)m(utls)p
22240
 
2367 5121 V 40 w(srp)p 2530 5121 V 39 w(serv)m(er)p 2802
22241
 
5121 V 40 w(creden)m(tials)p 3263 5121 V 42 w(function)e(*)565
22242
 
5230 y Fe(func)12 b Fg(\))390 5340 y Ff(cred)t FB(:)40
22243
 
b(is)31 b(a)f Ft(gnutls_srp_server_credent)o(ials)o(_t)24
22244
 
b FB(structure.)p eop end
 
22214
35 b FB(will)42 b(b)s(e)390 5212 y(returned)29 b(b)m(y)h(the)h
 
22215
(handshak)m(e.)390 5340 y Fn(Since:)41 b FB(2.6.0)p eop
 
22216
end
22245
22217
%%Page: 177 183
22246
22218
TeXDict begin 177 182 bop 150 -116 a FB(Chapter)30 b(9:)41
22247
 
b(F)-8 b(unction)31 b(Reference)2237 b(177)390 299 y
22248
 
Ff(func)6 b FB(:)39 b(is)31 b(the)f(callbac)m(k)j(function)390
22249
 
434 y(This)24 b(function)g(can)h(b)s(e)f(used)g(to)h(set)g(a)g(callbac)
22250
 
m(k)i(to)e(retriev)m(e)h(the)f(user's)e(SRP)h(creden)m(tials.)40
22251
 
b(The)390 544 y(callbac)m(k's)h(function)e(form)g(is:)58
22252
 
b(in)m(t)40 b(\(*callbac)m(k\)\(gn)m(utls)p 2401 544
22253
 
28 4 v 44 w(session)p 2714 544 V 40 w(t,)i(const)d(c)m(har*)h
22254
 
(username,)390 653 y(gn)m(utls)p 636 653 V 40 w(datum)p
22255
 
934 653 V 40 w(t*)32 b(salt,)h(gn)m(utls)p 1525 653 V
22256
 
40 w(datum)p 1823 653 V 40 w(t)e(*v)m(eri\014er,)i(gn)m(utls)p
22257
 
2545 653 V 40 w(datum)p 2843 653 V 40 w(t*)f(g,)g(gn)m(utls)p
22258
 
3337 653 V 41 w(datum)p 3636 653 V 39 w(t*)390 763 y(n\);)390
22259
 
898 y Ft(username)25 b FB(con)m(tains)k(the)f(actual)h(username.)39
22260
 
b(The)28 b Ft(salt)p FB(,)f Ft(verifier)p FB(,)f Ft(generator)f
22261
 
FB(and)i Ft(prime)390 1008 y FB(m)m(ust)g(b)s(e)g(\014lled)h(in)f
22262
 
(using)g(the)h Ft(gnutls_malloc\(\))p FB(.)35 b(F)-8
22263
 
b(or)29 b(con)m(v)m(enience)g Ft(prime)e FB(and)f Ft(generator)390
22264
 
1117 y FB(ma)m(y)31 b(also)g(b)s(e)f(one)h(of)f(the)h(static)h
22265
 
(parameters)e(de\014ned)g(in)g(extra.h.)390 1253 y(In)39
22266
 
b(case)j(the)e(callbac)m(k)i(returned)d(a)i(negativ)m(e)h(n)m(um)m(b)s
22267
 
(er)d(then)h(gn)m(utls)h(will)f(assume)g(that)h(the)390
22268
 
1362 y(username)30 b(do)s(es)g(not)g(exist.)390 1497
 
22219
b(F)-8 b(unction)31 b(Reference)2237 b(177)150 299 y
 
22220
Fv(gn)m(utls)p 483 299 37 5 v 55 w(srp)p 704 299 V 54
 
22221
w(set)p 910 299 V 54 w(serv)m(er)p 1286 299 V 54 w(creden)m(tials)p
 
22222
1914 299 V 54 w(\014le)3350 494 y FB([F)-8 b(unction])-3599
 
22223
b Fh(int)53 b(gnutls_srp_set_server)q(_cre)q(den)q(tia)q(ls_)q(file)565
 
22224
603 y Fg(\()p Ff(gn)m(utls)p 846 603 28 4 v 41 w(srp)p
 
22225
1010 603 V 39 w(serv)m(er)p 1282 603 V 40 w(creden)m(tials)p
 
22226
1743 603 V 42 w(t)30 b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g
 
22227
Fe(password_file)12 b Ff(,)34 b(const)d(c)m(har)565 713
 
22228
y(*)g Fe(password_conf_file)12 b Fg(\))390 823 y Ff(res)t
 
22229
FB(:)40 b(is)31 b(an)f Ft(gnutls_srp_server_creden)o(tial)o(s_t)24
 
22230
b FB(structure.)390 956 y Ff(passw)m(ord)p 759 956 V
 
22231
39 w(\014le)5 b FB(:)41 b(is)31 b(the)f(SRP)g(passw)m(ord)g(\014le)g
 
22232
(\(tpasswd\))390 1090 y Ff(passw)m(ord)p 759 1090 V 39
 
22233
w(conf)p 962 1090 V 41 w(\014le)5 b FB(:)40 b(is)31 b(the)f(SRP)g
 
22234
(passw)m(ord)g(conf)g(\014le)h(\(tpasswd.conf)7 b(\))390
 
22235
1223 y(This)23 b(function)g(sets)i(the)f(passw)m(ord)f(\014les,)i(in)f
 
22236
(a)g Ft(gnutls_srp_server_crede)o(ntia)o(ls_t)17 b FB(struc-)390
 
22237
1333 y(ture.)67 b(Those)39 b(passw)m(ord)f(\014les)i(hold)e(usernames)h
 
22238
(and)f(v)m(eri\014ers)i(and)e(will)i(b)s(e)e(used)h(for)g(SRP)390
 
22239
1442 y(authen)m(tication.)390 1576 y Fn(Returns:)h FB(On)30
 
22240
b(success,)h Ft(GNUTLS_E_SUCCESS)26 b FB(\(0\))31 b(is)g(returned,)e
 
22241
(or)h(an)h(error)f(co)s(de.)150 1773 y Fv(gn)m(utls)p
 
22242
483 1773 37 5 v 55 w(srp)p 704 1773 V 54 w(set)p 910
 
22243
1773 V 54 w(serv)m(er)p 1286 1773 V 54 w(creden)m(tials)p
 
22244
1914 1773 V 54 w(function)3350 1968 y FB([F)-8 b(unction])-3599
 
22245
b Fh(void)54 b(gnutls_srp_set_server_cr)q(ede)q(nti)q(als)q(_fun)q(cti)
 
22246
q(on)565 2078 y Fg(\()p Ff(gn)m(utls)p 846 2078 28 4
 
22247
v 41 w(srp)p 1010 2078 V 39 w(serv)m(er)p 1282 2078 V
 
22248
40 w(creden)m(tials)p 1743 2078 V 42 w(t)30 b Fe(cred)12
 
22249
b Ff(,)32 b(gn)m(utls)p 2367 2078 V 40 w(srp)p 2530 2078
 
22250
V 39 w(serv)m(er)p 2802 2078 V 40 w(creden)m(tials)p
 
22251
3263 2078 V 42 w(function)e(*)565 2187 y Fe(func)12 b
 
22252
Fg(\))390 2297 y Ff(cred)t FB(:)40 b(is)31 b(a)f Ft
 
22253
(gnutls_srp_server_credent)o(ials)o(_t)24 b FB(structure.)390
 
22254
2431 y Ff(func)6 b FB(:)39 b(is)31 b(the)f(callbac)m(k)j(function)390
 
22255
2564 y(This)24 b(function)g(can)h(b)s(e)f(used)g(to)h(set)g(a)g
 
22256
(callbac)m(k)i(to)e(retriev)m(e)h(the)f(user's)e(SRP)h(creden)m(tials.)
 
22257
40 b(The)390 2674 y(callbac)m(k's)h(function)e(form)g(is:)58
 
22258
b(in)m(t)40 b(\(*callbac)m(k\)\(gn)m(utls)p 2401 2674
 
22259
V 44 w(session)p 2714 2674 V 40 w(t,)i(const)d(c)m(har*)h(username,)390
 
22260
2783 y(gn)m(utls)p 636 2783 V 40 w(datum)p 934 2783 V
 
22261
40 w(t*)32 b(salt,)h(gn)m(utls)p 1525 2783 V 40 w(datum)p
 
22262
1823 2783 V 40 w(t)e(*v)m(eri\014er,)i(gn)m(utls)p 2545
 
22263
2783 V 40 w(datum)p 2843 2783 V 40 w(t*)f(g,)g(gn)m(utls)p
 
22264
3337 2783 V 41 w(datum)p 3636 2783 V 39 w(t*)390 2893
 
22265
y(n\);)390 3026 y Ft(username)25 b FB(con)m(tains)k(the)f(actual)h
 
22266
(username.)39 b(The)28 b Ft(salt)p FB(,)f Ft(verifier)p
 
22267
FB(,)f Ft(generator)f FB(and)i Ft(prime)390 3136 y FB(m)m(ust)g(b)s(e)g
 
22268
(\014lled)h(in)f(using)g(the)h Ft(gnutls_malloc\(\))p
 
22269
FB(.)35 b(F)-8 b(or)29 b(con)m(v)m(enience)g Ft(prime)e
 
22270
FB(and)f Ft(generator)390 3246 y FB(ma)m(y)31 b(also)g(b)s(e)f(one)h
 
22271
(of)f(the)h(static)h(parameters)e(de\014ned)g(in)g(extra.h.)390
 
22272
3379 y(In)39 b(case)j(the)e(callbac)m(k)i(returned)d(a)i(negativ)m(e)h
 
22273
(n)m(um)m(b)s(er)d(then)h(gn)m(utls)h(will)f(assume)g(that)h(the)390
 
22274
3489 y(username)30 b(do)s(es)g(not)g(exist.)390 3622
22269
22275
y(In)f(order)h(to)h(prev)m(en)m(t)f(attac)m(k)m(ers)j(from)d(guessing)g
22270
22276
(v)-5 b(alid)30 b(usernames,)g(if)g(a)h(user)e(do)s(es)h(not)g(exist,)
22271
 
390 1607 y(g)f(and)g(n)f(v)-5 b(alues)30 b(should)e(b)s(e)g(\014lled)h
 
22277
390 3732 y(g)f(and)g(n)f(v)-5 b(alues)30 b(should)e(b)s(e)g(\014lled)h
22272
22278
(in)g(using)f(a)i(random)e(user's)g(parameters.)41 b(In)28
22273
 
b(that)i(case)g(the)390 1717 y(callbac)m(k)i(m)m(ust)f(return)e(the)i
22274
 
(sp)s(ecial)g(v)-5 b(alue)30 b(\(1\).)390 1852 y(The)g(callbac)m(k)k
 
22279
b(that)i(case)g(the)390 3842 y(callbac)m(k)i(m)m(ust)f(return)e(the)i
 
22280
(sp)s(ecial)g(v)-5 b(alue)30 b(\(1\).)390 3975 y(The)g(callbac)m(k)k
22275
22281
(function)c(will)h(only)h(b)s(e)e(called)i(once)g(p)s(er)e(handshak)m
22276
 
(e.)42 b(The)30 b(callbac)m(k)j(function)390 1961 y(should)c(return)h
 
22282
(e.)42 b(The)30 b(callbac)m(k)j(function)390 4085 y(should)c(return)h
22277
22283
(0)g(on)h(success,)g(while)f(-1)h(indicates)g(an)g(error.)150
22278
 
2161 y Fv(gn)m(utls)p 483 2161 37 5 v 55 w(srp)p 704
22279
 
2161 V 54 w(v)m(eri\014er)3350 2359 y FB([F)-8 b(unction])-3599
 
22284
4282 y Fv(gn)m(utls)p 483 4282 37 5 v 55 w(srp)p 704
 
22285
4282 V 54 w(v)m(eri\014er)3350 4477 y FB([F)-8 b(unction])-3599
22280
22286
b Fh(int)53 b(gnutls_srp_verifier)e Fg(\()p Ff(const)32
22281
22287
b(c)m(har)e(*)h Fe(username)12 b Ff(,)33 b(const)e(c)m(har)f(*)565
22282
 
2468 y Fe(password)12 b Ff(,)33 b(const)e(gn)m(utls)p
22283
 
1535 2468 28 4 v 40 w(datum)p 1833 2468 V 39 w(t)g(*)g
22284
 
Fe(salt)12 b Ff(,)31 b(const)g(gn)m(utls)p 2768 2468
22285
 
V 40 w(datum)p 3066 2468 V 40 w(t)g(*)f Fe(generator)12
22286
 
b Ff(,)565 2578 y(const)31 b(gn)m(utls)p 1049 2578 V
22287
 
40 w(datum)p 1347 2578 V 40 w(t)g(*)f Fe(prime)12 b Ff(,)32
22288
 
b(gn)m(utls)p 2097 2578 V 40 w(datum)p 2395 2578 V 40
22289
 
w(t)f(*)f Fe(res)12 b Fg(\))390 2688 y Ff(username)5
22290
 
b FB(:)40 b(is)31 b(the)f(user's)g(name)390 2823 y Ff(passw)m(ord)t
22291
 
FB(:)40 b(is)30 b(the)h(user's)e(passw)m(ord)390 2958
 
22288
4587 y Fe(password)12 b Ff(,)33 b(const)e(gn)m(utls)p
 
22289
1535 4587 28 4 v 40 w(datum)p 1833 4587 V 39 w(t)g(*)g
 
22290
Fe(salt)12 b Ff(,)31 b(const)g(gn)m(utls)p 2768 4587
 
22291
V 40 w(datum)p 3066 4587 V 40 w(t)g(*)f Fe(generator)12
 
22292
b Ff(,)565 4696 y(const)31 b(gn)m(utls)p 1049 4696 V
 
22293
40 w(datum)p 1347 4696 V 40 w(t)g(*)f Fe(prime)12 b Ff(,)32
 
22294
b(gn)m(utls)p 2097 4696 V 40 w(datum)p 2395 4696 V 40
 
22295
w(t)f(*)f Fe(res)12 b Fg(\))390 4806 y Ff(username)5
 
22296
b FB(:)40 b(is)31 b(the)f(user's)g(name)390 4939 y Ff(passw)m(ord)t
 
22297
FB(:)40 b(is)30 b(the)h(user's)e(passw)m(ord)390 5073
22292
22298
y Ff(salt)r FB(:)42 b(should)29 b(b)s(e)h(some)g(randomly)g(generated)i
22293
 
(b)m(ytes)390 3093 y Ff(generator)7 b FB(:)41 b(is)31
22294
 
b(the)f(generator)i(of)e(the)h(group)390 3229 y Ff(prime)5
22295
 
b FB(:)40 b(is)31 b(the)f(group's)g(prime)390 3364 y
 
22299
(b)m(ytes)390 5206 y Ff(generator)7 b FB(:)41 b(is)31
 
22300
b(the)f(generator)i(of)e(the)h(group)390 5340 y Ff(prime)5
 
22301
b FB(:)40 b(is)31 b(the)f(group's)g(prime)p eop end
 
22302
%%Page: 178 184
 
22303
TeXDict begin 178 183 bop 150 -116 a FB(Chapter)30 b(9:)41
 
22304
b(F)-8 b(unction)31 b(Reference)2237 b(178)390 299 y
22296
22305
Ff(res)t FB(:)40 b(where)30 b(the)h(v)m(eri\014er)f(will)h(b)s(e)f
22297
 
(stored.)390 3499 y(This)k(function)h(will)g(create)h(an)f(SRP)f(v)m
 
22306
(stored.)390 427 y(This)k(function)h(will)g(create)h(an)f(SRP)f(v)m
22298
22307
(eri\014er,)j(as)e(sp)s(eci\014ed)f(in)g(RF)m(C2945.)57
22299
 
b(The)34 b Ft(prime)g FB(and)390 3609 y Ft(generator)22
 
22308
b(The)34 b Ft(prime)g FB(and)390 536 y Ft(generator)22
22300
22309
b FB(should)i(b)s(e)g(one)h(of)f(the)h(static)h(parameters)f(de\014ned)
22301
 
f(in)g(gn)m(utls/extra.h)i(or)e(ma)m(y)i(b)s(e)390 3718
 
22310
f(in)g(gn)m(utls/extra.h)i(or)e(ma)m(y)i(b)s(e)390 646
22302
22311
y(generated)37 b(using)e(the)h(libgcrypt)g(functions)g
22303
22312
Ft(gcry_prime_generate\(\))30 b FB(and)35 b Ft(gcry_prime_)390
22304
 
3828 y(group_generator\(\))p FB(.)390 3963 y(The)40 b(v)m(eri\014er)h
 
22313
756 y(group_generator\(\))p FB(.)390 884 y(The)40 b(v)m(eri\014er)h
22305
22314
(will)g(b)s(e)f(allo)s(cated)j(with)e Ft(malloc)e FB(and)h(will)h(b)s
22306
 
(e)f(stored)h(in)g Ft(res)e FB(using)i(binary)390 4073
22307
 
y(format.)390 4208 y Fn(Returns:)f FB(On)30 b(success,)h
 
22315
(e)f(stored)h(in)g Ft(res)e FB(using)i(binary)390 993
 
22316
y(format.)390 1121 y Fn(Returns:)f FB(On)30 b(success,)h
22308
22317
Ft(GNUTLS_E_SUCCESS)26 b FB(\(0\))31 b(is)g(returned,)e(or)h(an)h
22309
 
(error)f(co)s(de.)150 4408 y Fv(gn)m(utls)p 483 4408
22310
 
37 5 v 55 w(strerror)p 951 4408 V 55 w(name)3350 4605
 
22318
(error)f(co)s(de.)150 1307 y Fv(gn)m(utls)p 483 1307
 
22319
37 5 v 55 w(strerror)p 951 1307 V 55 w(name)3350 1491
22311
22320
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
22312
22321
(gnutls_strerror_name)e Fg(\()p Ff(in)m(t)32 b Fe(error)12
22313
 
b Fg(\))390 4715 y Ff(error)7 b FB(:)40 b(is)30 b(an)h(error)f
22314
 
(returned)f(b)m(y)h(a)h(gn)m(utls)f(function.)390 4850
 
22322
b Fg(\))390 1600 y Ff(error)7 b FB(:)40 b(is)30 b(an)h(error)f
 
22323
(returned)f(b)m(y)h(a)h(gn)m(utls)f(function.)390 1728
22315
22324
y(Return)c(the)i(Gn)m(uTLS)e(error)h(co)s(de)g(de\014ne)g(as)g(a)h
22316
22325
(string.)39 b(F)-8 b(or)28 b(example,)h(gn)m(utls)p 3164
22317
 
4850 28 4 v 40 w(strerror)p 3504 4850 V 40 w(name)390
22318
 
4960 y(\(GNUTLS)p 812 4960 V 40 w(E)p 914 4960 V 40 w(DH)p
22319
 
1091 4960 V 41 w(PRIME)p 1439 4960 V 39 w(UNA)m(CCEPT)-8
22320
 
b(ABLE\))184 b(will)g(return)e(the)h(string)390 5069
22321
 
y Ft(")p FB(GNUTLS)p 825 5069 V 39 w(E)p 926 5069 V 40
22322
 
w(DH)p 1103 5069 V 41 w(PRIME)p 1451 5069 V 40 w(UNA)m(CCEPT)-8
22323
 
b(ABLE)p Ft(")p FB(.)390 5205 y Fn(Returns:)40 b FB(A)31
 
22326
1728 28 4 v 40 w(strerror)p 3504 1728 V 40 w(name)390
 
22327
1838 y(\(GNUTLS)p 812 1838 V 40 w(E)p 914 1838 V 40 w(DH)p
 
22328
1091 1838 V 41 w(PRIME)p 1439 1838 V 39 w(UNA)m(CCEPT)-8
 
22329
b(ABLE\))184 b(will)g(return)e(the)h(string)390 1947
 
22330
y Ft(")p FB(GNUTLS)p 825 1947 V 39 w(E)p 926 1947 V 40
 
22331
w(DH)p 1103 1947 V 41 w(PRIME)p 1451 1947 V 40 w(UNA)m(CCEPT)-8
 
22332
b(ABLE)p Ft(")p FB(.)390 2075 y Fn(Returns:)40 b FB(A)31
22324
22333
b(string)f(corresp)s(onding)g(to)h(the)f(sym)m(b)s(ol)g(name)h(of)f
22325
 
(the)h(error)f(co)s(de.)390 5340 y Fn(Since:)41 b FB(2.6.0)p
22326
 
eop end
22327
 
%%Page: 178 184
22328
 
TeXDict begin 178 183 bop 150 -116 a FB(Chapter)30 b(9:)41
22329
 
b(F)-8 b(unction)31 b(Reference)2237 b(178)150 299 y
22330
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(strerror)3350 491
22331
 
y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g(gnutls_strerror)
22332
 
d Fg(\()p Ff(in)m(t)31 b Fe(error)12 b Fg(\))390 601
22333
 
y Ff(error)7 b FB(:)40 b(is)30 b(a)h(Gn)m(uTLS)e(error)h(co)s(de,)h(a)g
22334
 
(negativ)m(e)h(v)-5 b(alue)390 733 y(This)44 b(function)g(is)g(similar)
22335
 
h(to)g Ft(strerror\(\))p FB(.)80 b(Di\013erences:)70
22336
 
b(it)44 b(accepts)i(an)e(error)g(n)m(um)m(b)s(er)390
22337
 
842 y(returned)26 b(b)m(y)g(a)i(gn)m(utls)f(function;)h(In)e(case)i(of)
22338
 
f(an)g(unkno)m(wn)e(error)i(a)g(descriptiv)m(e)h(string)e(is)h(sen)m(t)
22339
 
390 952 y(instead)k(of)f(NULL.)390 1084 y(Error)f(co)s(des)i(are)g(alw)
22340
 
m(a)m(ys)h(a)e(negativ)m(e)j(v)-5 b(alue.)390 1216 y
22341
 
Fn(Returns:)40 b FB(A)31 b(string)f(explaining)h(the)g(Gn)m(uTLS)e
22342
 
(error)h(message.)150 1411 y Fv(gn)m(utls)p 483 1411
22343
 
V 55 w(transp)s(ort)p 1042 1411 V 54 w(get)p 1261 1411
22344
 
V 55 w(ptr2)3350 1603 y FB([F)-8 b(unction])-3599 b Fh(void)54
22345
 
b(gnutls_transport_get_ptr)q(2)e Fg(\()p Ff(gn)m(utls)p
22346
 
2046 1603 28 4 v 40 w(session)p 2355 1603 V 41 w(t)30
22347
 
b Fe(session)12 b Ff(,)565 1713 y(gn)m(utls)p 811 1713
22348
 
V 41 w(transp)s(ort)p 1225 1713 V 39 w(ptr)p 1386 1713
22349
 
V 39 w(t)31 b(*)g Fe(recv_ptr)12 b Ff(,)32 b(gn)m(utls)p
22350
 
2292 1713 V 41 w(transp)s(ort)p 2706 1713 V 39 w(ptr)p
22351
 
2867 1713 V 39 w(t)f(*)g Fe(send_ptr)12 b Fg(\))390 1822
22352
 
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
22353
 
b FB(structure.)390 1954 y Ff(recv)p 560 1954 V 40 w(ptr)7
22354
 
b FB(:)40 b(will)31 b(hold)f(the)g(v)-5 b(alue)31 b(for)f(the)h(pull)f
22355
 
(function)390 2087 y Ff(send)p 574 2087 V 39 w(ptr)7
22356
 
b FB(:)40 b(will)31 b(hold)f(the)g(v)-5 b(alue)31 b(for)f(the)h(push)d
22357
 
(function)390 2219 y(Used)i(to)g(get)h(the)f(argumen)m(ts)g(of)g(the)g
22358
 
(transp)s(ort)f(functions)h(\(lik)m(e)h(PUSH)f(and)f(PULL\).)h(These)
22359
 
390 2328 y(should)f(ha)m(v)m(e)j(b)s(een)e(set)h(using)e
22360
 
Ft(gnutls_transport_set_ptr2\()o(\))p FB(.)150 2523 y
22361
 
Fv(gn)m(utls)p 483 2523 37 5 v 55 w(transp)s(ort)p 1042
22362
 
2523 V 54 w(get)p 1261 2523 V 55 w(ptr)3350 2715 y FB([F)-8
22363
 
b(unction])-3599 b Fh(gnutls_transport_ptr_t)59 b
22364
 
(gnutls_transport_get_p)q(tr)565 2825 y Fg(\()p Ff(gn)m(utls)p
22365
 
846 2825 28 4 v 41 w(session)p 1156 2825 V 40 w(t)31
22366
 
b Fe(session)12 b Fg(\))390 2934 y Ff(session)p FB(:)41
 
22334
(the)h(error)f(co)s(de.)390 2203 y Fn(Since:)41 b FB(2.6.0)150
 
22335
2389 y Fv(gn)m(utls)p 483 2389 37 5 v 55 w(strerror)3350
 
22336
2573 y FB([F)-8 b(unction])-3599 b Fh(const)54 b(char)f(*)g
 
22337
(gnutls_strerror)d Fg(\()p Ff(in)m(t)31 b Fe(error)12
 
22338
b Fg(\))390 2683 y Ff(error)7 b FB(:)40 b(is)30 b(a)h(Gn)m(uTLS)e
 
22339
(error)h(co)s(de,)h(a)g(negativ)m(e)h(v)-5 b(alue)390
 
22340
2811 y(This)44 b(function)g(is)g(similar)h(to)g Ft(strerror\(\))p
 
22341
FB(.)80 b(Di\013erences:)70 b(it)44 b(accepts)i(an)e(error)g(n)m(um)m
 
22342
(b)s(er)390 2920 y(returned)26 b(b)m(y)g(a)i(gn)m(utls)f(function;)h
 
22343
(In)e(case)i(of)f(an)g(unkno)m(wn)e(error)i(a)g(descriptiv)m(e)h
 
22344
(string)e(is)h(sen)m(t)390 3030 y(instead)k(of)f(NULL.)390
 
22345
3158 y(Error)f(co)s(des)i(are)g(alw)m(a)m(ys)h(a)e(negativ)m(e)j(v)-5
 
22346
b(alue.)390 3286 y Fn(Returns:)40 b FB(A)31 b(string)f(explaining)h
 
22347
(the)g(Gn)m(uTLS)e(error)h(message.)150 3472 y Fv(gn)m(utls)p
 
22348
483 3472 V 55 w(transp)s(ort)p 1042 3472 V 54 w(get)p
 
22349
1261 3472 V 55 w(ptr2)3350 3655 y FB([F)-8 b(unction])-3599
 
22350
b Fh(void)54 b(gnutls_transport_get_ptr)q(2)e Fg(\()p
 
22351
Ff(gn)m(utls)p 2046 3655 28 4 v 40 w(session)p 2355 3655
 
22352
V 41 w(t)30 b Fe(session)12 b Ff(,)565 3765 y(gn)m(utls)p
 
22353
811 3765 V 41 w(transp)s(ort)p 1225 3765 V 39 w(ptr)p
 
22354
1386 3765 V 39 w(t)31 b(*)g Fe(recv_ptr)12 b Ff(,)32
 
22355
b(gn)m(utls)p 2292 3765 V 41 w(transp)s(ort)p 2706 3765
 
22356
V 39 w(ptr)p 2867 3765 V 39 w(t)f(*)g Fe(send_ptr)12
 
22357
b Fg(\))390 3875 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
22358
Ft(gnutls_session_t)26 b FB(structure.)390 4002 y Ff(recv)p
 
22359
560 4002 V 40 w(ptr)7 b FB(:)40 b(will)31 b(hold)f(the)g(v)-5
 
22360
b(alue)31 b(for)f(the)h(pull)f(function)390 4130 y Ff(send)p
 
22361
574 4130 V 39 w(ptr)7 b FB(:)40 b(will)31 b(hold)f(the)g(v)-5
 
22362
b(alue)31 b(for)f(the)h(push)d(function)390 4258 y(Used)i(to)g(get)h
 
22363
(the)f(argumen)m(ts)g(of)g(the)g(transp)s(ort)f(functions)h(\(lik)m(e)h
 
22364
(PUSH)f(and)f(PULL\).)h(These)390 4368 y(should)f(ha)m(v)m(e)j(b)s(een)
 
22365
e(set)h(using)e Ft(gnutls_transport_set_ptr2\()o(\))p
 
22366
FB(.)150 4554 y Fv(gn)m(utls)p 483 4554 37 5 v 55 w(transp)s(ort)p
 
22367
1042 4554 V 54 w(get)p 1261 4554 V 55 w(ptr)3350 4738
 
22368
y FB([F)-8 b(unction])-3599 b Fh(gnutls_transport_ptr_t)59
 
22369
b(gnutls_transport_get_p)q(tr)565 4847 y Fg(\()p Ff(gn)m(utls)p
 
22370
846 4847 28 4 v 41 w(session)p 1156 4847 V 40 w(t)31
 
22371
b Fe(session)12 b Fg(\))390 4957 y Ff(session)p FB(:)41
22367
22372
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
22368
 
3067 y(Used)f(to)i(get)f(the)g(\014rst)f(argumen)m(t)h(of)g(the)g
 
22373
5085 y(Used)f(to)i(get)f(the)g(\014rst)f(argumen)m(t)h(of)g(the)g
22369
22374
(transp)s(ort)e(function)i(\(lik)m(e)h(PUSH)e(and)g(PULL\).)h(This)390
22370
 
3176 y(m)m(ust)k(ha)m(v)m(e)i(b)s(een)d(set)i(using)f
22371
 
Ft(gnutls_transport_set_ptr\()o(\))p FB(.)390 3308 y
 
22375
5194 y(m)m(ust)k(ha)m(v)m(e)i(b)s(een)d(set)i(using)f
 
22376
Ft(gnutls_transport_set_ptr\()o(\))p FB(.)390 5322 y
22372
22377
Fn(Returns:)40 b FB(\014rst)30 b(argumen)m(t)h(of)f(the)h(transp)s(ort)
22373
 
e(function.)150 3503 y Fv(gn)m(utls)p 483 3503 37 5 v
22374
 
55 w(transp)s(ort)p 1042 3503 V 54 w(set)p 1248 3503
22375
 
V 55 w(errno)3350 3695 y FB([F)-8 b(unction])-3599 b
22376
 
Fh(void)54 b(gnutls_transport_set_err)q(no)e Fg(\()p
22377
 
Ff(gn)m(utls)p 2098 3695 28 4 v 41 w(session)p 2408 3695
22378
 
V 40 w(t)30 b Fe(session)12 b Ff(,)33 b(in)m(t)565 3805
22379
 
y Fe(err)12 b Fg(\))390 3914 y Ff(session)p FB(:)41 b(is)30
22380
 
b(a)h Ft(gnutls_session_t)26 b FB(structure.)390 4047
22381
 
y Ff(err)7 b FB(:)40 b(error)30 b(v)-5 b(alue)31 b(to)g(store)g(in)f
22382
 
(session-sp)s(eci\014c)g(errno)g(v)-5 b(ariable.)390
22383
 
4179 y(Store)40 b Ft(err)f FB(in)h(the)g(session-sp)s(eci\014c)h(errno)
22384
 
e(v)-5 b(ariable.)71 b(Useful)40 b(v)-5 b(alues)40 b(for)g
22385
 
Ft(err)f FB(is)h(EA)m(GAIN)390 4288 y(and)34 b(EINTR,)g(other)g(v)-5
22386
 
b(alues)35 b(are)g(treated)g(will)g(b)s(e)e(treated)j(as)e(real)h
22387
 
(errors)f(in)g(the)h(push/pull)390 4398 y(function.)390
22388
 
4530 y(This)117 b(function)g(is)h(useful)f(in)g(replacemen)m(t)j
22389
 
(push/pull)c(functions)h(set)h(b)m(y)390 4640 y(gn)m(utls)p
22390
 
636 4640 V 40 w(transp)s(ort)p 1049 4640 V 40 w(set)p
22391
 
1200 4640 V 40 w(push)p 1429 4640 V 39 w(function)133
22392
 
b(and)g(gn)m(utls)p 2447 4640 V 41 w(transp)s(ort)p 2861
22393
 
4640 V 39 w(set)p 3011 4640 V 40 w(pullpush)p 3392 4640
22394
 
V 38 w(function)390 4749 y(under)32 b(Windo)m(ws,)j(where)e(the)g
22395
 
(replacemen)m(t)i(push/pull)d(ma)m(y)i(not)g(ha)m(v)m(e)h(access)g(to)f
22396
 
(the)g(same)390 4859 y Ft(errno)27 b FB(v)-5 b(ariable)30
22397
 
b(that)g(is)e(used)g(b)m(y)h(Gn)m(uTLS)f(\(e.g.,)j(the)e(application)h
22398
 
(is)f(link)m(ed)g(to)h(msv)m(cr71.dll)390 4968 y(and)g(gn)m(utls)g(is)h
22399
 
(link)m(ed)g(to)g(msv)m(crt.dll\).)390 5101 y(If)e(y)m(ou)h(don't)g(ha)
22400
 
m(v)m(e)g(the)g Ft(session)e FB(v)-5 b(ariable)30 b(easily)h
22401
 
(accessible)g(from)e(the)h(push/pull)e(function,)390
22402
 
5210 y(and)38 b(don't)g(w)m(orry)g(ab)s(out)g(thread)g(con\015icts,)j
22403
 
(y)m(ou)d(can)h(also)g(use)f Ft(gnutls_transport_set_)390
22404
 
5320 y(global_errno\(\))p FB(.)p eop end
 
22378
e(function.)p eop end
22405
22379
%%Page: 179 185
22406
22380
TeXDict begin 179 184 bop 150 -116 a FB(Chapter)30 b(9:)41
22407
22381
b(F)-8 b(unction)31 b(Reference)2237 b(179)150 299 y
22408
22382
Fv(gn)m(utls)p 483 299 37 5 v 55 w(transp)s(ort)p 1042
22409
 
299 V 54 w(set)p 1248 299 V 55 w(global)p 1621 299 V
22410
 
54 w(errno)3350 495 y FB([F)-8 b(unction])-3599 b Fh(void)54
22411
 
b(gnutls_transport_set_glo)q(bal)q(_er)q(rno)e Fg(\()p
22412
 
Ff(in)m(t)31 b Fe(err)12 b Fg(\))390 605 y Ff(err)7 b
22413
 
FB(:)40 b(error)30 b(v)-5 b(alue)31 b(to)g(store)g(in)f(global)h(errno)
22414
 
f(v)-5 b(ariable.)390 739 y(Store)27 b Ft(err)f FB(in)h(the)g(global)i
22415
 
(errno)d(v)-5 b(ariable.)41 b(Useful)27 b(v)-5 b(alues)27
22416
 
b(for)g Ft(err)f FB(is)h(EA)m(GAIN)h(and)e(EINTR,)390
22417
 
848 y(other)31 b(v)-5 b(alues)30 b(are)h(treated)g(will)g(b)s(e)f
 
22383
299 V 54 w(set)p 1248 299 V 55 w(errno)3350 510 y FB([F)-8
 
22384
b(unction])-3599 b Fh(void)54 b(gnutls_transport_set_err)q(no)e
 
22385
Fg(\()p Ff(gn)m(utls)p 2098 510 28 4 v 41 w(session)p
 
22386
2408 510 V 40 w(t)30 b Fe(session)12 b Ff(,)33 b(in)m(t)565
 
22387
619 y Fe(err)12 b Fg(\))390 729 y Ff(session)p FB(:)41
 
22388
b(is)30 b(a)h Ft(gnutls_session_t)26 b FB(structure.)390
 
22389
877 y Ff(err)7 b FB(:)40 b(error)30 b(v)-5 b(alue)31
 
22390
b(to)g(store)g(in)f(session-sp)s(eci\014c)g(errno)g(v)-5
 
22391
b(ariable.)390 1025 y(Store)40 b Ft(err)f FB(in)h(the)g(session-sp)s
 
22392
(eci\014c)h(errno)e(v)-5 b(ariable.)71 b(Useful)40 b(v)-5
 
22393
b(alues)40 b(for)g Ft(err)f FB(is)h(EA)m(GAIN)390 1135
 
22394
y(and)34 b(EINTR,)g(other)g(v)-5 b(alues)35 b(are)g(treated)g(will)g(b)
 
22395
s(e)e(treated)j(as)e(real)h(errors)f(in)g(the)h(push/pull)390
 
22396
1245 y(function.)390 1393 y(This)117 b(function)g(is)h(useful)f(in)g
 
22397
(replacemen)m(t)j(push/pull)c(functions)h(set)h(b)m(y)390
 
22398
1503 y(gn)m(utls)p 636 1503 V 40 w(transp)s(ort)p 1049
 
22399
1503 V 40 w(set)p 1200 1503 V 40 w(push)p 1429 1503 V
 
22400
39 w(function)133 b(and)g(gn)m(utls)p 2447 1503 V 41
 
22401
w(transp)s(ort)p 2861 1503 V 39 w(set)p 3011 1503 V 40
 
22402
w(pullpush)p 3392 1503 V 38 w(function)390 1612 y(under)32
 
22403
b(Windo)m(ws,)j(where)e(the)g(replacemen)m(t)i(push/pull)d(ma)m(y)i
 
22404
(not)g(ha)m(v)m(e)h(access)g(to)f(the)g(same)390 1722
 
22405
y Ft(errno)27 b FB(v)-5 b(ariable)30 b(that)g(is)e(used)g(b)m(y)h(Gn)m
 
22406
(uTLS)f(\(e.g.,)j(the)e(application)h(is)f(link)m(ed)g(to)h(msv)m
 
22407
(cr71.dll)390 1831 y(and)g(gn)m(utls)g(is)h(link)m(ed)g(to)g(msv)m
 
22408
(crt.dll\).)390 1980 y(If)e(y)m(ou)h(don't)g(ha)m(v)m(e)g(the)g
 
22409
Ft(session)e FB(v)-5 b(ariable)30 b(easily)h(accessible)g(from)e(the)h
 
22410
(push/pull)e(function,)390 2089 y(and)38 b(don't)g(w)m(orry)g(ab)s(out)
 
22411
g(thread)g(con\015icts,)j(y)m(ou)d(can)h(also)g(use)f
 
22412
Ft(gnutls_transport_set_)390 2199 y(global_errno\(\))p
 
22413
FB(.)150 2412 y Fv(gn)m(utls)p 483 2412 37 5 v 55 w(transp)s(ort)p
 
22414
1042 2412 V 54 w(set)p 1248 2412 V 55 w(global)p 1621
 
22415
2412 V 54 w(errno)3350 2623 y FB([F)-8 b(unction])-3599
 
22416
b Fh(void)54 b(gnutls_transport_set_glo)q(bal)q(_er)q(rno)e
 
22417
Fg(\()p Ff(in)m(t)31 b Fe(err)12 b Fg(\))390 2732 y Ff(err)7
 
22418
b FB(:)40 b(error)30 b(v)-5 b(alue)31 b(to)g(store)g(in)f(global)h
 
22419
(errno)f(v)-5 b(ariable.)390 2880 y(Store)27 b Ft(err)f
 
22420
FB(in)h(the)g(global)i(errno)d(v)-5 b(ariable.)41 b(Useful)27
 
22421
b(v)-5 b(alues)27 b(for)g Ft(err)f FB(is)h(EA)m(GAIN)h(and)e(EINTR,)390
 
22422
2990 y(other)31 b(v)-5 b(alues)30 b(are)h(treated)g(will)g(b)s(e)f
22418
22423
(treated)h(as)g(real)g(errors)f(in)g(the)g(push/pull)f(function.)390
22419
 
983 y(This)117 b(function)g(is)h(useful)f(in)g(replacemen)m(t)j
22420
 
(push/pull)c(functions)h(set)h(b)m(y)390 1092 y(gn)m(utls)p
22421
 
636 1092 28 4 v 40 w(transp)s(ort)p 1049 1092 V 40 w(set)p
22422
 
1200 1092 V 40 w(push)p 1429 1092 V 39 w(function)133
22423
 
b(and)g(gn)m(utls)p 2447 1092 V 41 w(transp)s(ort)p 2861
22424
 
1092 V 39 w(set)p 3011 1092 V 40 w(pullpush)p 3392 1092
22425
 
V 38 w(function)390 1202 y(under)32 b(Windo)m(ws,)j(where)e(the)g
 
22424
3138 y(This)117 b(function)g(is)h(useful)f(in)g(replacemen)m(t)j
 
22425
(push/pull)c(functions)h(set)h(b)m(y)390 3248 y(gn)m(utls)p
 
22426
636 3248 28 4 v 40 w(transp)s(ort)p 1049 3248 V 40 w(set)p
 
22427
1200 3248 V 40 w(push)p 1429 3248 V 39 w(function)133
 
22428
b(and)g(gn)m(utls)p 2447 3248 V 41 w(transp)s(ort)p 2861
 
22429
3248 V 39 w(set)p 3011 3248 V 40 w(pullpush)p 3392 3248
 
22430
V 38 w(function)390 3358 y(under)32 b(Windo)m(ws,)j(where)e(the)g
22426
22431
(replacemen)m(t)i(push/pull)d(ma)m(y)i(not)g(ha)m(v)m(e)h(access)g(to)f
22427
 
(the)g(same)390 1311 y Ft(errno)27 b FB(v)-5 b(ariable)30
 
22432
(the)g(same)390 3467 y Ft(errno)27 b FB(v)-5 b(ariable)30
22428
22433
b(that)g(is)e(used)g(b)m(y)h(Gn)m(uTLS)f(\(e.g.,)j(the)e(application)h
22429
 
(is)f(link)m(ed)g(to)h(msv)m(cr71.dll)390 1421 y(and)g(gn)m(utls)g(is)h
22430
 
(link)m(ed)g(to)g(msv)m(crt.dll\).)390 1555 y(Whether)k(this)f
 
22434
(is)f(link)m(ed)g(to)h(msv)m(cr71.dll)390 3577 y(and)g(gn)m(utls)g(is)h
 
22435
(link)m(ed)g(to)g(msv)m(crt.dll\).)390 3725 y(Whether)k(this)f
22431
22436
(function)h(is)g(thread)f(safe)h(or)g(not)g(dep)s(ends)e(on)h(whether)g
22432
 
(the)h(global)h(v)-5 b(ariable)390 1665 y(errno)40 b(is)g(thread)g
 
22437
(the)h(global)h(v)-5 b(ariable)390 3835 y(errno)40 b(is)g(thread)g
22433
22438
(safe,)j(some)e(system)f(libraries)h(mak)m(e)g(it)g(a)f(thread-lo)s
22434
 
(cal)i(v)-5 b(ariable.)71 b(When)390 1774 y(feasible,)36
 
22439
(cal)i(v)-5 b(ariable.)71 b(When)390 3944 y(feasible,)36
22435
22440
b(using)e(the)g(guaran)m(teed)h(thread-safe)g Ft
22436
22441
(gnutls_transport_set_er)o(rno)o(\(\))28 b FB(ma)m(y)35
22437
 
b(b)s(e)390 1884 y(b)s(etter.)150 2082 y Fv(gn)m(utls)p
22438
 
483 2082 37 5 v 55 w(transp)s(ort)p 1042 2082 V 54 w(set)p
22439
 
1248 2082 V 55 w(lo)m(w)m(at)3350 2279 y FB([F)-8 b(unction])-3599
 
22442
b(b)s(e)390 4054 y(b)s(etter.)150 4267 y Fv(gn)m(utls)p
 
22443
483 4267 37 5 v 55 w(transp)s(ort)p 1042 4267 V 54 w(set)p
 
22444
1248 4267 V 55 w(lo)m(w)m(at)3350 4478 y FB([F)-8 b(unction])-3599
22440
22445
b Fh(void)54 b(gnutls_transport_set_low)q(at)e Fg(\()p
22441
 
Ff(gn)m(utls)p 2098 2279 28 4 v 41 w(session)p 2408 2279
22442
 
V 40 w(t)30 b Fe(session)12 b Ff(,)33 b(in)m(t)565 2388
22443
 
y Fe(num)12 b Fg(\))390 2498 y Ff(session)p FB(:)41 b(is)30
22444
 
b(a)h Ft(gnutls_session_t)26 b FB(structure.)390 2632
 
22446
Ff(gn)m(utls)p 2098 4478 28 4 v 41 w(session)p 2408 4478
 
22447
V 40 w(t)30 b Fe(session)12 b Ff(,)33 b(in)m(t)565 4587
 
22448
y Fe(num)12 b Fg(\))390 4697 y Ff(session)p FB(:)41 b(is)30
 
22449
b(a)h Ft(gnutls_session_t)26 b FB(structure.)390 4845
22445
22450
y Ff(n)m(um)p FB(:)40 b(is)30 b(the)h(lo)m(w)g(w)m(ater)g(v)-5
22446
 
b(alue.)390 2766 y(Used)34 b(to)g(set)h(the)f(lo)m(w)m(at)i(v)-5
 
22451
b(alue.)390 4994 y(Used)34 b(to)g(set)h(the)f(lo)m(w)m(at)i(v)-5
22447
22452
b(alue)34 b(in)g(order)f(for)h(select)h(to)g(c)m(hec)m(k)g(if)f(there)g
22448
 
(are)g(p)s(ending)f(data)h(to)390 2876 y(so)s(c)m(k)m(et)h(bu\013er.)46
 
22453
(are)g(p)s(ending)f(data)h(to)390 5103 y(so)s(c)m(k)m(et)h(bu\013er.)46
22449
22454
b(Used)33 b(only)g(if)f(y)m(ou)h(ha)m(v)m(e)h(c)m(hanged)g(the)f
22450
22455
(default)f(lo)m(w)i(w)m(ater)f(v)-5 b(alue)34 b(\(default)f(is)390
22451
 
2985 y(1\).)59 b(Normally)37 b(y)m(ou)f(will)g(not)h(need)f(that)g
 
22456
5213 y(1\).)59 b(Normally)37 b(y)m(ou)f(will)g(not)h(need)f(that)g
22452
22457
(function.)58 b(This)35 b(function)h(is)g(only)g(useful)f(if)h(using)
22453
 
390 3095 y(b)s(erk)m(eley)31 b(st)m(yle)g(so)s(c)m(k)m(ets.)43
 
22458
390 5322 y(b)s(erk)m(eley)31 b(st)m(yle)g(so)s(c)m(k)m(ets.)43
22454
22459
b(Otherwise)30 b(it)h(m)m(ust)f(b)s(e)g(called)h(and)f(set)h(lo)m(w)m
22455
 
(at)i(to)e(zero.)150 3293 y Fv(gn)m(utls)p 483 3293 37
22456
 
5 v 55 w(transp)s(ort)p 1042 3293 V 54 w(set)p 1248 3293
22457
 
V 55 w(ptr2)3350 3490 y FB([F)-8 b(unction])-3599 b Fh(void)54
22458
 
b(gnutls_transport_set_ptr)q(2)e Fg(\()p Ff(gn)m(utls)p
22459
 
2046 3490 28 4 v 40 w(session)p 2355 3490 V 41 w(t)30
22460
 
b Fe(session)12 b Ff(,)565 3599 y(gn)m(utls)p 811 3599
22461
 
V 41 w(transp)s(ort)p 1225 3599 V 39 w(ptr)p 1386 3599
22462
 
V 39 w(t)31 b Fe(recv_ptr)12 b Ff(,)32 b(gn)m(utls)p
22463
 
2216 3599 V 41 w(transp)s(ort)p 2630 3599 V 39 w(ptr)p
22464
 
2791 3599 V 39 w(t)f Fe(send_ptr)12 b Fg(\))390 3709
22465
 
y Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
22466
 
b FB(structure.)390 3843 y Ff(recv)p 560 3843 V 40 w(ptr)7
 
22460
(at)i(to)e(zero.)p eop end
 
22461
%%Page: 180 186
 
22462
TeXDict begin 180 185 bop 150 -116 a FB(Chapter)30 b(9:)41
 
22463
b(F)-8 b(unction)31 b(Reference)2237 b(180)150 299 y
 
22464
Fv(gn)m(utls)p 483 299 37 5 v 55 w(transp)s(ort)p 1042
 
22465
299 V 54 w(set)p 1248 299 V 55 w(ptr2)3350 506 y FB([F)-8
 
22466
b(unction])-3599 b Fh(void)54 b(gnutls_transport_set_ptr)q(2)e
 
22467
Fg(\()p Ff(gn)m(utls)p 2046 506 28 4 v 40 w(session)p
 
22468
2355 506 V 41 w(t)30 b Fe(session)12 b Ff(,)565 615 y(gn)m(utls)p
 
22469
811 615 V 41 w(transp)s(ort)p 1225 615 V 39 w(ptr)p 1386
 
22470
615 V 39 w(t)31 b Fe(recv_ptr)12 b Ff(,)32 b(gn)m(utls)p
 
22471
2216 615 V 41 w(transp)s(ort)p 2630 615 V 39 w(ptr)p
 
22472
2791 615 V 39 w(t)f Fe(send_ptr)12 b Fg(\))390 725 y
 
22473
Ff(session)p FB(:)41 b(is)30 b(a)h Ft(gnutls_session_t)26
 
22474
b FB(structure.)390 869 y Ff(recv)p 560 869 V 40 w(ptr)7
22467
22475
b FB(:)40 b(is)30 b(the)h(v)-5 b(alue)31 b(for)f(the)h(pull)e(function)
22468
 
390 3977 y Ff(send)p 574 3977 V 39 w(ptr)7 b FB(:)40
 
22476
390 1014 y Ff(send)p 574 1014 V 39 w(ptr)7 b FB(:)40
22469
22477
b(is)30 b(the)h(v)-5 b(alue)31 b(for)f(the)g(push)f(function)390
22470
 
4111 y(Used)k(to)h(set)f(the)g(\014rst)f(argumen)m(t)i(of)f(the)g
 
22478
1159 y(Used)k(to)h(set)f(the)g(\014rst)f(argumen)m(t)i(of)f(the)g
22471
22479
(transp)s(ort)f(function)h(\(lik)m(e)h(PUSH)f(and)f(PULL\).)i(In)390
22472
 
4221 y(b)s(erk)m(eley)27 b(st)m(yle)h(so)s(c)m(k)m(ets)g(this)e
 
22480
1268 y(b)s(erk)m(eley)27 b(st)m(yle)h(so)s(c)m(k)m(ets)g(this)e
22473
22481
(function)g(will)h(set)g(the)f(connection)i(handle.)39
22474
 
b(With)27 b(this)f(function)390 4330 y(y)m(ou)31 b(can)f(use)g(t)m(w)m
 
22482
b(With)27 b(this)f(function)390 1378 y(y)m(ou)31 b(can)f(use)g(t)m(w)m
22475
22483
(o)i(di\013eren)m(t)f(p)s(oin)m(ters)f(for)g(receiving)i(and)e
22476
 
(sending.)150 4529 y Fv(gn)m(utls)p 483 4529 37 5 v 55
22477
 
w(transp)s(ort)p 1042 4529 V 54 w(set)p 1248 4529 V 55
22478
 
w(ptr)3350 4725 y FB([F)-8 b(unction])-3599 b Fh(void)54
 
22484
(sending.)150 1587 y Fv(gn)m(utls)p 483 1587 37 5 v 55
 
22485
w(transp)s(ort)p 1042 1587 V 54 w(set)p 1248 1587 V 55
 
22486
w(ptr)3350 1794 y FB([F)-8 b(unction])-3599 b Fh(void)54
22479
22487
b(gnutls_transport_set_ptr)e Fg(\()p Ff(gn)m(utls)p 1993
22480
 
4725 28 4 v 41 w(session)p 2303 4725 V 40 w(t)31 b Fe(session)12
22481
 
b Ff(,)565 4835 y(gn)m(utls)p 811 4835 V 41 w(transp)s(ort)p
22482
 
1225 4835 V 39 w(ptr)p 1386 4835 V 39 w(t)31 b Fe(ptr)12
22483
 
b Fg(\))390 4944 y Ff(session)p FB(:)41 b(is)30 b(a)h
22484
 
Ft(gnutls_session_t)26 b FB(structure.)390 5079 y Ff(ptr)7
22485
 
b FB(:)40 b(is)30 b(the)h(v)-5 b(alue.)390 5213 y(Used)33
 
22488
1794 28 4 v 41 w(session)p 2303 1794 V 40 w(t)31 b Fe(session)12
 
22489
b Ff(,)565 1904 y(gn)m(utls)p 811 1904 V 41 w(transp)s(ort)p
 
22490
1225 1904 V 39 w(ptr)p 1386 1904 V 39 w(t)31 b Fe(ptr)12
 
22491
b Fg(\))390 2013 y Ff(session)p FB(:)41 b(is)30 b(a)h
 
22492
Ft(gnutls_session_t)26 b FB(structure.)390 2158 y Ff(ptr)7
 
22493
b FB(:)40 b(is)30 b(the)h(v)-5 b(alue.)390 2302 y(Used)33
22486
22494
b(to)h(set)f(the)g(\014rst)f(argumen)m(t)i(of)f(the)g(transp)s(ort)f
22487
22495
(function)h(\(lik)m(e)h(PUSH)f(and)f(PULL\).)i(In)390
22488
 
5322 y(b)s(erk)m(eley)d(st)m(yle)g(so)s(c)m(k)m(ets)i(this)d(function)g
22489
 
(will)h(set)g(the)f(connection)i(handle.)p eop end
22490
 
%%Page: 180 186
22491
 
TeXDict begin 180 185 bop 150 -116 a FB(Chapter)30 b(9:)41
22492
 
b(F)-8 b(unction)31 b(Reference)2237 b(180)150 299 y
22493
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(transp)s(ort)p 1042
22494
 
299 V 54 w(set)p 1248 299 V 55 w(pull)p 1507 299 V 54
22495
 
w(function)3350 518 y FB([F)-8 b(unction])-3599 b Fh(void)54
22496
 
b(gnutls_transport_set_pul)q(l_f)q(unc)q(tio)q(n)d Fg(\()p
22497
 
Ff(gn)m(utls)p 2516 518 28 4 v 41 w(session)p 2826 518
22498
 
V 40 w(t)565 628 y Fe(session)12 b Ff(,)32 b(gn)m(utls)p
22499
 
1244 628 V 41 w(pull)p 1437 628 V 39 w(func)e Fe(pull_func)12
22500
 
b Fg(\))390 737 y Ff(session)p FB(:)41 b(gn)m(utls)31
22501
 
b(session)390 894 y Ff(pull)p 548 894 V 40 w(func)6 b
22502
 
FB(:)39 b(a)31 b(callbac)m(k)h(function)e(similar)h(to)g
22503
 
Ft(read\(\))390 1051 y FB(This)k(is)h(the)h(function)f(where)f(y)m(ou)i
 
22496
2412 y(b)s(erk)m(eley)d(st)m(yle)g(so)s(c)m(k)m(ets)i(this)d(function)g
 
22497
(will)h(set)g(the)f(connection)i(handle.)150 2621 y Fv(gn)m(utls)p
 
22498
483 2621 37 5 v 55 w(transp)s(ort)p 1042 2621 V 54 w(set)p
 
22499
1248 2621 V 55 w(pull)p 1507 2621 V 54 w(function)3350
 
22500
2828 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
22501
(gnutls_transport_set_pul)q(l_f)q(unc)q(tio)q(n)d Fg(\()p
 
22502
Ff(gn)m(utls)p 2516 2828 28 4 v 41 w(session)p 2826 2828
 
22503
V 40 w(t)565 2938 y Fe(session)12 b Ff(,)32 b(gn)m(utls)p
 
22504
1244 2938 V 41 w(pull)p 1437 2938 V 39 w(func)e Fe(pull_func)12
 
22505
b Fg(\))390 3047 y Ff(session)p FB(:)41 b(gn)m(utls)31
 
22506
b(session)390 3192 y Ff(pull)p 548 3192 V 40 w(func)6
 
22507
b FB(:)39 b(a)31 b(callbac)m(k)h(function)e(similar)h(to)g
 
22508
Ft(read\(\))390 3336 y FB(This)k(is)h(the)h(function)f(where)f(y)m(ou)i
22504
22509
(set)f(a)h(function)f(for)f(gn)m(utls)i(to)g(receiv)m(e)h(data.)58
22505
 
b(Normally)-8 b(,)390 1161 y(if)36 b(y)m(ou)g(use)g(b)s(erk)m(eley)h
 
22510
b(Normally)-8 b(,)390 3446 y(if)36 b(y)m(ou)g(use)g(b)s(erk)m(eley)h
22506
22511
(st)m(yle)g(so)s(c)m(k)m(ets,)i(do)d(not)g(need)g(to)h(use)f(this)f
22507
 
(function)h(since)h(the)f(default)390 1270 y(\(recv\(2\)\))d(will)d
22508
 
(probably)g(b)s(e)g(ok.)390 1427 y(PULL)p 640 1427 V
22509
 
40 w(FUNC)20 b(is)h(of)g(the)f(form,)i(ssize)p 1692 1427
22510
 
V 41 w(t)f(\(*gn)m(utls)p 2109 1427 V 41 w(pull)p 2302
22511
 
1427 V 40 w(func\)\(gn)m(utls)p 2822 1427 V 40 w(transp)s(ort)p
22512
 
3235 1427 V 39 w(ptr)p 3396 1427 V 40 w(t,)i(v)m(oid*,)390
22513
 
1537 y(size)p 537 1537 V 41 w(t\);)150 1758 y Fv(gn)m(utls)p
22514
 
483 1758 37 5 v 55 w(transp)s(ort)p 1042 1758 V 54 w(set)p
22515
 
1248 1758 V 55 w(push)p 1555 1758 V 55 w(function)3350
22516
 
1978 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
22512
(function)h(since)h(the)f(default)390 3556 y(\(recv\(2\)\))d(will)d
 
22513
(probably)g(b)s(e)g(ok.)390 3700 y(PULL)p 640 3700 V
 
22514
40 w(FUNC)20 b(is)h(of)g(the)f(form,)i(ssize)p 1692 3700
 
22515
V 41 w(t)f(\(*gn)m(utls)p 2109 3700 V 41 w(pull)p 2302
 
22516
3700 V 40 w(func\)\(gn)m(utls)p 2822 3700 V 40 w(transp)s(ort)p
 
22517
3235 3700 V 39 w(ptr)p 3396 3700 V 40 w(t,)i(v)m(oid*,)390
 
22518
3810 y(size)p 537 3810 V 41 w(t\);)150 4019 y Fv(gn)m(utls)p
 
22519
483 4019 37 5 v 55 w(transp)s(ort)p 1042 4019 V 54 w(set)p
 
22520
1248 4019 V 55 w(push)p 1555 4019 V 55 w(function)3350
 
22521
4226 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
22517
22522
(gnutls_transport_set_pus)q(h_f)q(unc)q(tio)q(n)d Fg(\()p
22518
 
Ff(gn)m(utls)p 2516 1978 28 4 v 41 w(session)p 2826 1978
22519
 
V 40 w(t)565 2087 y Fe(session)12 b Ff(,)32 b(gn)m(utls)p
22520
 
1244 2087 V 41 w(push)p 1474 2087 V 38 w(func)e Fe(push_func)12
22521
 
b Fg(\))390 2197 y Ff(session)p FB(:)41 b(gn)m(utls)31
22522
 
b(session)390 2354 y Ff(push)p 585 2354 V 38 w(func)6
 
22523
Ff(gn)m(utls)p 2516 4226 28 4 v 41 w(session)p 2826 4226
 
22524
V 40 w(t)565 4336 y Fe(session)12 b Ff(,)32 b(gn)m(utls)p
 
22525
1244 4336 V 41 w(push)p 1474 4336 V 38 w(func)e Fe(push_func)12
 
22526
b Fg(\))390 4445 y Ff(session)p FB(:)41 b(gn)m(utls)31
 
22527
b(session)390 4590 y Ff(push)p 585 4590 V 38 w(func)6
22523
22528
b FB(:)40 b(a)30 b(callbac)m(k)j(function)d(similar)h(to)g
22524
 
Ft(write\(\))390 2511 y FB(This)43 b(is)h(the)h(function)f(where)f(y)m
 
22529
Ft(write\(\))390 4734 y FB(This)43 b(is)h(the)h(function)f(where)f(y)m
22525
22530
(ou)i(set)f(a)h(push)d(function)i(for)g(gn)m(utls)g(to)h(use)f(in)g
22526
 
(order)f(to)390 2620 y(send)c(data.)69 b(If)39 b(y)m(ou)h(are)g(going)h
 
22531
(order)f(to)390 4844 y(send)c(data.)69 b(If)39 b(y)m(ou)h(are)g(going)h
22527
22532
(to)g(use)e(b)s(erk)m(eley)h(st)m(yle)h(so)s(c)m(k)m(ets,)j(y)m(ou)c
22528
 
(do)g(not)f(need)h(to)g(use)390 2730 y(this)34 b(function)g(since)g
 
22533
(do)g(not)f(need)h(to)g(use)390 4953 y(this)34 b(function)g(since)g
22529
22534
(the)g(default)h(\(send\(2\)\))g(will)f(probably)f(b)s(e)h(ok.)52
22530
 
b(Otherwise)34 b(y)m(ou)g(should)390 2839 y(sp)s(ecify)c(this)g
 
22535
b(Otherwise)34 b(y)m(ou)g(should)390 5063 y(sp)s(ecify)c(this)g
22531
22536
(function)g(for)g(gn)m(utls)h(to)g(b)s(e)f(able)h(to)g(send)f(data.)390
22532
 
2996 y(PUSH)p 645 2996 V 40 w(FUNC)56 b(is)g(of)h(the)f(form,)63
22533
 
b(ssize)p 1881 2996 V 40 w(t)57 b(\(*gn)m(utls)p 2333
22534
 
2996 V 41 w(push)p 2563 2996 V 38 w(func\)\(gn)m(utls)p
22535
 
3081 2996 V 41 w(transp)s(ort)p 3495 2996 V 39 w(ptr)p
22536
 
3656 2996 V 39 w(t,)390 3106 y(const)31 b(v)m(oid*,)h(size)p
22537
 
1043 3106 V 40 w(t\);)150 3372 y FA(9.2)68 b Fv(X.509)46
22538
 
b FA(Certi\014cate)g(F)-11 b(unctions)150 3531 y FB(The)33
22539
 
b(follo)m(wing)i(functions)d(are)i(to)g(b)s(e)f(used)f(for)h
22540
 
Fu(X.509)f FB(certi\014cate)k(handling.)49 b(Their)32
22541
 
b(protot)m(yp)s(es)i(lie)150 3641 y(in)c(`)p Ft(gnutls/x509.h)p
22542
 
FB('.)150 3863 y Fv(gn)m(utls)p 483 3863 37 5 v 55 w(pk)m(cs12)p
22543
 
893 3863 V 54 w(bag)p 1136 3863 V 54 w(decrypt)3350 4082
 
22537
5208 y(PUSH)p 645 5208 V 40 w(FUNC)56 b(is)g(of)h(the)f(form,)63
 
22538
b(ssize)p 1881 5208 V 40 w(t)57 b(\(*gn)m(utls)p 2333
 
22539
5208 V 41 w(push)p 2563 5208 V 38 w(func\)\(gn)m(utls)p
 
22540
3081 5208 V 41 w(transp)s(ort)p 3495 5208 V 39 w(ptr)p
 
22541
3656 5208 V 39 w(t,)390 5317 y(const)31 b(v)m(oid*,)h(size)p
 
22542
1043 5317 V 40 w(t\);)p eop end
 
22543
%%Page: 181 187
 
22544
TeXDict begin 181 186 bop 150 -116 a FB(Chapter)30 b(9:)41
 
22545
b(F)-8 b(unction)31 b(Reference)2237 b(181)150 299 y
 
22546
FA(9.2)68 b Fv(X.509)46 b FA(Certi\014cate)g(F)-11 b(unctions)150
 
22547
458 y FB(The)33 b(follo)m(wing)i(functions)d(are)i(to)g(b)s(e)f(used)f
 
22548
(for)h Fu(X.509)f FB(certi\014cate)k(handling.)49 b(Their)32
 
22549
b(protot)m(yp)s(es)i(lie)150 568 y(in)c(`)p Ft(gnutls/x509.h)p
 
22550
FB('.)150 777 y Fv(gn)m(utls)p 483 777 37 5 v 55 w(pk)m(cs12)p
 
22551
893 777 V 54 w(bag)p 1136 777 V 54 w(decrypt)3350 983
22544
22552
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_dec)q(rypt)
22545
 
f Fg(\()p Ff(gn)m(utls)p 1993 4082 28 4 v 41 w(pk)m(cs12)p
22546
 
2296 4082 V 41 w(bag)p 2478 4082 V 41 w(t)30 b Fe(bag)12
22547
 
b Ff(,)31 b(const)565 4191 y(c)m(har)g(*)g Fe(pass)12
22548
 
b Fg(\))390 4301 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
22549
 
4458 y Ff(pass)t FB(:)40 b(The)30 b(passw)m(ord)g(used)f(for)h
 
22553
f Fg(\()p Ff(gn)m(utls)p 1993 983 28 4 v 41 w(pk)m(cs12)p
 
22554
2296 983 V 41 w(bag)p 2478 983 V 41 w(t)30 b Fe(bag)12
 
22555
b Ff(,)31 b(const)565 1092 y(c)m(har)g(*)g Fe(pass)12
 
22556
b Fg(\))390 1202 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
 
22557
1346 y Ff(pass)t FB(:)40 b(The)30 b(passw)m(ord)g(used)f(for)h
22550
22558
(encryption.)41 b(This)30 b(can)g(only)h(b)s(e)e(ASCI)s(I.)390
22551
 
4615 y(This)h(function)g(will)g(decrypt)g(the)h(giv)m(en)g(encrypted)f
22552
 
(bag)h(and)f(return)f(0)i(on)f(success.)150 4837 y Fv(gn)m(utls)p
22553
 
483 4837 37 5 v 55 w(pk)m(cs12)p 893 4837 V 54 w(bag)p
22554
 
1136 4837 V 54 w(deinit)3350 5056 y FB([F)-8 b(unction])-3599
 
22559
1490 y(This)h(function)g(will)g(decrypt)g(the)h(giv)m(en)g(encrypted)f
 
22560
(bag)h(and)f(return)f(0)i(on)f(success.)150 1699 y Fv(gn)m(utls)p
 
22561
483 1699 37 5 v 55 w(pk)m(cs12)p 893 1699 V 54 w(bag)p
 
22562
1136 1699 V 54 w(deinit)3350 1905 y FB([F)-8 b(unction])-3599
22555
22563
b Fh(void)54 b(gnutls_pkcs12_bag_deinit)e Fg(\()p Ff(gn)m(utls)p
22556
 
1993 5056 28 4 v 41 w(pk)m(cs12)p 2296 5056 V 41 w(bag)p
22557
 
2478 5056 V 41 w(t)30 b Fe(bag)12 b Fg(\))390 5165 y
 
22564
1993 1905 28 4 v 41 w(pk)m(cs12)p 2296 1905 V 41 w(bag)p
 
22565
2478 1905 V 41 w(t)30 b Fe(bag)12 b Fg(\))390 2015 y
22558
22566
Ff(bag)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e(initialized)390
22559
 
5322 y(This)h(function)g(will)g(deinitialize)j(a)e(PK)m(CS12)f(Bag)i
22560
 
(structure.)p eop end
22561
 
%%Page: 181 187
22562
 
TeXDict begin 181 186 bop 150 -116 a FB(Chapter)30 b(9:)41
22563
 
b(F)-8 b(unction)31 b(Reference)2237 b(181)150 299 y
22564
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs12)p 893 299
22565
 
V 54 w(bag)p 1136 299 V 54 w(encrypt)3350 493 y FB([F)-8
22566
 
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_enc)q(rypt)f
22567
 
Fg(\()p Ff(gn)m(utls)p 1993 493 28 4 v 41 w(pk)m(cs12)p
22568
 
2296 493 V 41 w(bag)p 2478 493 V 41 w(t)30 b Fe(bag)12
22569
 
b Ff(,)31 b(const)565 602 y(c)m(har)g(*)g Fe(pass)12
22570
 
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(flags)12 b Fg(\))390
22571
 
712 y Ff(bag)c FB(:)41 b(The)30 b(bag)390 845 y Ff(pass)t
22572
 
FB(:)40 b(The)30 b(passw)m(ord)g(used)f(for)h(encryption.)41
22573
 
b(This)30 b(can)g(only)h(b)s(e)e(ASCI)s(I.)390 978 y
22574
 
Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(one)g(of)h(gn)m(utls)p
22575
 
1565 978 V 40 w(pk)m(cs)p 1777 978 V 41 w(encrypt)p 2119
22576
 
978 V 39 w(\015ags)p 2335 978 V 41 w(t)f(elemen)m(ts)i(bit)m(wise)f
22577
 
(or'd)390 1111 y(This)f(function)g(will)g(encrypt)g(the)h(giv)m(en)g
22578
 
(bag)g(and)f(return)f(0)i(on)f(success.)150 1307 y Fv(gn)m(utls)p
22579
 
483 1307 37 5 v 55 w(pk)m(cs12)p 893 1307 V 54 w(bag)p
22580
 
1136 1307 V 54 w(get)p 1355 1307 V 54 w(coun)m(t)3350
22581
 
1501 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_get)q
22582
 
(_cou)q(nt)f Fg(\()p Ff(gn)m(utls)p 2098 1501 28 4 v
22583
 
41 w(pk)m(cs12)p 2401 1501 V 41 w(bag)p 2583 1501 V 40
22584
 
w(t)31 b Fe(bag)12 b Fg(\))390 1611 y Ff(bag)c FB(:)41
22585
 
b(The)30 b(bag)390 1744 y(This)g(function)g(will)g(return)g(the)g(n)m
22586
 
(um)m(b)s(er)f(of)i(the)f(elemen)m(ts)i(withing)e(the)h(bag.)150
22587
 
1940 y Fv(gn)m(utls)p 483 1940 37 5 v 55 w(pk)m(cs12)p
22588
 
893 1940 V 54 w(bag)p 1136 1940 V 54 w(get)p 1355 1940
22589
 
V 54 w(data)3350 2134 y FB([F)-8 b(unction])-3599 b Fh(int)53
22590
 
b(gnutls_pkcs12_bag_get)q(_dat)q(a)f Fg(\()p Ff(gn)m(utls)p
22591
 
2046 2134 28 4 v 40 w(pk)m(cs12)p 2348 2134 V 41 w(bag)p
22592
 
2530 2134 V 41 w(t)31 b Fe(bag)12 b Ff(,)31 b(in)m(t)565
22593
 
2243 y Fe(indx)12 b Ff(,)31 b(gn)m(utls)p 1087 2243 V
22594
 
41 w(datum)p 1386 2243 V 39 w(t)g(*)g Fe(data)12 b Fg(\))390
22595
 
2353 y Ff(bag)c FB(:)41 b(The)30 b(bag)390 2486 y Ff(indx)6
22596
 
b FB(:)40 b(The)30 b(elemen)m(t)i(of)e(the)h(bag)g(to)g(get)g(the)g
22597
 
(data)g(from)390 2619 y Ff(data)p FB(:)41 b(where)30
22598
 
b(the)h(bag's)g(data)g(will)f(b)s(e.)41 b(Should)29 b(b)s(e)g(treated)j
22599
 
(as)e(constan)m(t.)390 2752 y(This)k(function)g(will)h(return)e(the)i
22600
 
(bag's)g(data.)54 b(The)34 b(data)h(is)g(a)g(constan)m(t)h(that)f(is)f
22601
 
(stored)h(in)m(to)390 2862 y(the)c(bag.)41 b(Should)29
22602
 
b(not)h(b)s(e)g(accessed)i(after)f(the)f(bag)h(is)f(deleted.)390
22603
 
2995 y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
22604
 
b FB(is)47 b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
22605
 
3104 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(error)d(co)s(de)g(on)h
22606
 
(error.)150 3300 y Fv(gn)m(utls)p 483 3300 37 5 v 55
22607
 
w(pk)m(cs12)p 893 3300 V 54 w(bag)p 1136 3300 V 54 w(get)p
22608
 
1355 3300 V 54 w(friendly)p 1821 3300 V 55 w(name)3350
22609
 
3494 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_get)q
22610
 
(_fri)q(end)q(ly_)q(nam)q(e)e Fg(\()p Ff(gn)m(utls)p
22611
 
2516 3494 28 4 v 41 w(pk)m(cs12)p 2819 3494 V 41 w(bag)p
22612
 
3001 3494 V 41 w(t)565 3604 y Fe(bag)12 b Ff(,)31 b(in)m(t)g
22613
 
Fe(indx)12 b Ff(,)31 b(c)m(har)g(**)g Fe(name)12 b Fg(\))390
22614
 
3713 y Ff(bag)c FB(:)41 b(The)30 b(bag)390 3846 y Ff(indx)6
22615
 
b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)f(add)f(the)g(id)390
22616
 
3979 y Ff(name)5 b FB(:)41 b(will)31 b(hold)f(a)g(p)s(oin)m(ter)h(to)g
22617
 
(the)f(name)h(\(to)g(b)s(e)f(treated)h(as)g(const\))390
22618
 
4112 y(This)c(function)g(will)h(return)f(the)h(friendly)f(name,)i(of)f
22619
 
(the)f(sp)s(eci\014ed)h(bag)g(elemen)m(t.)41 b(The)27
22620
 
b(k)m(ey)i(ID)390 4222 y(is)h(usually)h(used)e(to)i(distinguish)f(the)g
22621
 
(lo)s(cal)i(priv)-5 b(ate)31 b(k)m(ey)g(and)f(the)g(certi\014cate)j
22622
 
(pair.)390 4355 y Fn(Returns:)j FB(On)20 b(success,)j
22623
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
22624
 
(negativ)m(e)h(error)d(v)-5 b(alue.)390 4465 y(or)30
22625
 
b(a)h(negativ)m(e)i(v)-5 b(alue)31 b(on)f(error.)150
22626
 
4661 y Fv(gn)m(utls)p 483 4661 37 5 v 55 w(pk)m(cs12)p
22627
 
893 4661 V 54 w(bag)p 1136 4661 V 54 w(get)p 1355 4661
22628
 
V 54 w(k)m(ey)p 1592 4661 V 53 w(id)3350 4855 y FB([F)-8
22629
 
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_get)q(_key)q(_id)f
22630
 
Fg(\()p Ff(gn)m(utls)p 2150 4855 28 4 v 41 w(pk)m(cs12)p
22631
 
2453 4855 V 41 w(bag)p 2635 4855 V 40 w(t)31 b Fe(bag)12
22632
 
b Ff(,)31 b(in)m(t)565 4964 y Fe(indx)12 b Ff(,)31 b(gn)m(utls)p
22633
 
1087 4964 V 41 w(datum)p 1386 4964 V 39 w(t)g(*)g Fe(id)12
22634
 
b Fg(\))390 5074 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
22635
 
5207 y Ff(indx)6 b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)f(add)f
22636
 
(the)g(id)390 5340 y Ff(id)t FB(:)40 b(where)30 b(the)g(ID)h(will)g(b)s
22637
 
(e)e(copied)i(\(to)h(b)s(e)d(treated)j(as)e(const\))p
22638
 
eop end
 
22567
2158 y(This)h(function)g(will)g(deinitialize)j(a)e(PK)m(CS12)f(Bag)i
 
22568
(structure.)150 2367 y Fv(gn)m(utls)p 483 2367 37 5 v
 
22569
55 w(pk)m(cs12)p 893 2367 V 54 w(bag)p 1136 2367 V 54
 
22570
w(encrypt)3350 2573 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
22571
b(gnutls_pkcs12_bag_enc)q(rypt)f Fg(\()p Ff(gn)m(utls)p
 
22572
1993 2573 28 4 v 41 w(pk)m(cs12)p 2296 2573 V 41 w(bag)p
 
22573
2478 2573 V 41 w(t)30 b Fe(bag)12 b Ff(,)31 b(const)565
 
22574
2683 y(c)m(har)g(*)g Fe(pass)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
22575
Fe(flags)12 b Fg(\))390 2793 y Ff(bag)c FB(:)41 b(The)30
 
22576
b(bag)390 2937 y Ff(pass)t FB(:)40 b(The)30 b(passw)m(ord)g(used)f(for)
 
22577
h(encryption.)41 b(This)30 b(can)g(only)h(b)s(e)e(ASCI)s(I.)390
 
22578
3081 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(one)g(of)h(gn)m(utls)
 
22579
p 1565 3081 V 40 w(pk)m(cs)p 1777 3081 V 41 w(encrypt)p
 
22580
2119 3081 V 39 w(\015ags)p 2335 3081 V 41 w(t)f(elemen)m(ts)i(bit)m
 
22581
(wise)f(or'd)390 3225 y(This)f(function)g(will)g(encrypt)g(the)h(giv)m
 
22582
(en)g(bag)g(and)f(return)f(0)i(on)f(success.)150 3433
 
22583
y Fv(gn)m(utls)p 483 3433 37 5 v 55 w(pk)m(cs12)p 893
 
22584
3433 V 54 w(bag)p 1136 3433 V 54 w(get)p 1355 3433 V
 
22585
54 w(coun)m(t)3350 3640 y FB([F)-8 b(unction])-3599 b
 
22586
Fh(int)53 b(gnutls_pkcs12_bag_get)q(_cou)q(nt)f Fg(\()p
 
22587
Ff(gn)m(utls)p 2098 3640 28 4 v 41 w(pk)m(cs12)p 2401
 
22588
3640 V 41 w(bag)p 2583 3640 V 40 w(t)31 b Fe(bag)12 b
 
22589
Fg(\))390 3749 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
 
22590
3893 y(This)g(function)g(will)g(return)g(the)g(n)m(um)m(b)s(er)f(of)i
 
22591
(the)f(elemen)m(ts)i(withing)e(the)h(bag.)150 4102 y
 
22592
Fv(gn)m(utls)p 483 4102 37 5 v 55 w(pk)m(cs12)p 893 4102
 
22593
V 54 w(bag)p 1136 4102 V 54 w(get)p 1355 4102 V 54 w(data)3350
 
22594
4308 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_get)q
 
22595
(_dat)q(a)f Fg(\()p Ff(gn)m(utls)p 2046 4308 28 4 v 40
 
22596
w(pk)m(cs12)p 2348 4308 V 41 w(bag)p 2530 4308 V 41 w(t)31
 
22597
b Fe(bag)12 b Ff(,)31 b(in)m(t)565 4418 y Fe(indx)12
 
22598
b Ff(,)31 b(gn)m(utls)p 1087 4418 V 41 w(datum)p 1386
 
22599
4418 V 39 w(t)g(*)g Fe(data)12 b Fg(\))390 4527 y Ff(bag)c
 
22600
FB(:)41 b(The)30 b(bag)390 4671 y Ff(indx)6 b FB(:)40
 
22601
b(The)30 b(elemen)m(t)i(of)e(the)h(bag)g(to)g(get)g(the)g(data)g(from)
 
22602
390 4815 y Ff(data)p FB(:)41 b(where)30 b(the)h(bag's)g(data)g(will)f
 
22603
(b)s(e.)41 b(Should)29 b(b)s(e)g(treated)j(as)e(constan)m(t.)390
 
22604
4959 y(This)k(function)g(will)h(return)e(the)i(bag's)g(data.)54
 
22605
b(The)34 b(data)h(is)g(a)g(constan)m(t)h(that)f(is)f(stored)h(in)m(to)
 
22606
390 5069 y(the)c(bag.)41 b(Should)29 b(not)h(b)s(e)g(accessed)i(after)f
 
22607
(the)f(bag)h(is)f(deleted.)390 5213 y Fn(Returns:)73
 
22608
b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42 b FB(is)47
 
22609
b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
 
22610
5322 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(error)d(co)s(de)g(on)h
 
22611
(error.)p eop end
22639
22612
%%Page: 182 188
22640
22613
TeXDict begin 182 187 bop 150 -116 a FB(Chapter)30 b(9:)41
22641
 
b(F)-8 b(unction)31 b(Reference)2237 b(182)390 299 y(This)39
22642
 
b(function)g(will)g(return)g(the)g(k)m(ey)h(ID,)g(of)g(the)g(sp)s
22643
 
(eci\014ed)e(bag)i(elemen)m(t.)69 b(The)39 b(k)m(ey)h(ID)g(is)390
22644
 
408 y(usually)30 b(used)g(to)h(distinguish)e(the)i(lo)s(cal)h(priv)-5
22645
 
b(ate)30 b(k)m(ey)i(and)d(the)i(certi\014cate)h(pair.)390
22646
 
571 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
22647
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22648
 
b(alue.)390 681 y(or)30 b(a)h(negativ)m(e)i(v)-5 b(alue)31
22649
 
b(on)f(error.)150 908 y Fv(gn)m(utls)p 483 908 37 5 v
22650
 
55 w(pk)m(cs12)p 893 908 V 54 w(bag)p 1136 908 V 54 w(get)p
22651
 
1355 908 V 54 w(t)m(yp)s(e)3350 1133 y FB([F)-8 b(unction])-3599
 
22614
b(F)-8 b(unction)31 b(Reference)2237 b(182)150 299 y
 
22615
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs12)p 893 299
 
22616
V 54 w(bag)p 1136 299 V 54 w(get)p 1355 299 V 54 w(friendly)p
 
22617
1821 299 V 55 w(name)3350 496 y FB([F)-8 b(unction])-3599
 
22618
b Fh(int)53 b(gnutls_pkcs12_bag_get)q(_fri)q(end)q(ly_)q(nam)q(e)e
 
22619
Fg(\()p Ff(gn)m(utls)p 2516 496 28 4 v 41 w(pk)m(cs12)p
 
22620
2819 496 V 41 w(bag)p 3001 496 V 41 w(t)565 605 y Fe(bag)12
 
22621
b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)31 b(c)m(har)g(**)g
 
22622
Fe(name)12 b Fg(\))390 715 y Ff(bag)c FB(:)41 b(The)30
 
22623
b(bag)390 850 y Ff(indx)6 b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)
 
22624
f(add)f(the)g(id)390 984 y Ff(name)5 b FB(:)41 b(will)31
 
22625
b(hold)f(a)g(p)s(oin)m(ter)h(to)g(the)f(name)h(\(to)g(b)s(e)f(treated)h
 
22626
(as)g(const\))390 1119 y(This)c(function)g(will)h(return)f(the)h
 
22627
(friendly)f(name,)i(of)f(the)f(sp)s(eci\014ed)h(bag)g(elemen)m(t.)41
 
22628
b(The)27 b(k)m(ey)i(ID)390 1228 y(is)h(usually)h(used)e(to)i
 
22629
(distinguish)f(the)g(lo)s(cal)i(priv)-5 b(ate)31 b(k)m(ey)g(and)f(the)g
 
22630
(certi\014cate)j(pair.)390 1363 y Fn(Returns:)j FB(On)20
 
22631
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
 
22632
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)390 1473 y(or)30
 
22633
b(a)h(negativ)m(e)i(v)-5 b(alue)31 b(on)f(error.)150
 
22634
1672 y Fv(gn)m(utls)p 483 1672 37 5 v 55 w(pk)m(cs12)p
 
22635
893 1672 V 54 w(bag)p 1136 1672 V 54 w(get)p 1355 1672
 
22636
V 54 w(k)m(ey)p 1592 1672 V 53 w(id)3350 1869 y FB([F)-8
 
22637
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_get)q(_key)q(_id)f
 
22638
Fg(\()p Ff(gn)m(utls)p 2150 1869 28 4 v 41 w(pk)m(cs12)p
 
22639
2453 1869 V 41 w(bag)p 2635 1869 V 40 w(t)31 b Fe(bag)12
 
22640
b Ff(,)31 b(in)m(t)565 1978 y Fe(indx)12 b Ff(,)31 b(gn)m(utls)p
 
22641
1087 1978 V 41 w(datum)p 1386 1978 V 39 w(t)g(*)g Fe(id)12
 
22642
b Fg(\))390 2088 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
 
22643
2223 y Ff(indx)6 b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)f(add)f
 
22644
(the)g(id)390 2357 y Ff(id)t FB(:)40 b(where)30 b(the)g(ID)h(will)g(b)s
 
22645
(e)e(copied)i(\(to)h(b)s(e)d(treated)j(as)e(const\))390
 
22646
2492 y(This)39 b(function)g(will)g(return)g(the)g(k)m(ey)h(ID,)g(of)g
 
22647
(the)g(sp)s(eci\014ed)e(bag)i(elemen)m(t.)69 b(The)39
 
22648
b(k)m(ey)h(ID)g(is)390 2601 y(usually)30 b(used)g(to)h(distinguish)e
 
22649
(the)i(lo)s(cal)h(priv)-5 b(ate)30 b(k)m(ey)i(and)d(the)i
 
22650
(certi\014cate)h(pair.)390 2736 y Fn(Returns:)k FB(On)20
 
22651
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
 
22652
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)390 2846 y(or)30
 
22653
b(a)h(negativ)m(e)i(v)-5 b(alue)31 b(on)f(error.)150
 
22654
3045 y Fv(gn)m(utls)p 483 3045 37 5 v 55 w(pk)m(cs12)p
 
22655
893 3045 V 54 w(bag)p 1136 3045 V 54 w(get)p 1355 3045
 
22656
V 54 w(t)m(yp)s(e)3350 3242 y FB([F)-8 b(unction])-3599
22652
22657
b Fh(gnutls_pkcs12_bag_type)q(_t)59 b(gnutls_pkcs12_bag_get_t)q(ype)565
22653
 
1243 y Fg(\()p Ff(gn)m(utls)p 846 1243 28 4 v 41 w(pk)m(cs12)p
22654
 
1149 1243 V 41 w(bag)p 1331 1243 V 40 w(t)31 b Fe(bag)12
22655
 
b Ff(,)31 b(in)m(t)g Fe(indx)12 b Fg(\))390 1352 y Ff(bag)c
22656
 
FB(:)41 b(The)30 b(bag)390 1515 y Ff(indx)6 b FB(:)40
 
22658
3351 y Fg(\()p Ff(gn)m(utls)p 846 3351 28 4 v 41 w(pk)m(cs12)p
 
22659
1149 3351 V 41 w(bag)p 1331 3351 V 40 w(t)31 b Fe(bag)12
 
22660
b Ff(,)31 b(in)m(t)g Fe(indx)12 b Fg(\))390 3461 y Ff(bag)c
 
22661
FB(:)41 b(The)30 b(bag)390 3596 y Ff(indx)6 b FB(:)40
22657
22662
b(The)30 b(elemen)m(t)i(of)e(the)h(bag)g(to)g(get)g(the)g(t)m(yp)s(e)
22658
 
390 1678 y(This)i(function)h(will)h(return)e(the)i(bag's)g(t)m(yp)s(e.)
22659
 
52 b(One)34 b(of)h(the)f(gn)m(utls)p 2778 1678 V 40 w(pk)m(cs12)p
22660
 
3080 1678 V 42 w(bag)p 3263 1678 V 40 w(t)m(yp)s(e)p
22661
 
3477 1678 V 40 w(t)h(en)m(u-)390 1787 y(merations.)150
22662
 
2015 y Fv(gn)m(utls)p 483 2015 37 5 v 55 w(pk)m(cs12)p
22663
 
893 2015 V 54 w(bag)p 1136 2015 V 54 w(init)3350 2240
 
22663
390 3730 y(This)i(function)h(will)h(return)e(the)i(bag's)g(t)m(yp)s(e.)
 
22664
52 b(One)34 b(of)h(the)f(gn)m(utls)p 2778 3730 V 40 w(pk)m(cs12)p
 
22665
3080 3730 V 42 w(bag)p 3263 3730 V 40 w(t)m(yp)s(e)p
 
22666
3477 3730 V 40 w(t)h(en)m(u-)390 3840 y(merations.)150
 
22667
4039 y Fv(gn)m(utls)p 483 4039 37 5 v 55 w(pk)m(cs12)p
 
22668
893 4039 V 54 w(bag)p 1136 4039 V 54 w(init)3350 4236
22664
22669
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_ini)q(t)e
22665
 
Fg(\()p Ff(gn)m(utls)p 1836 2240 28 4 v 41 w(pk)m(cs12)p
22666
 
2139 2240 V 41 w(bag)p 2321 2240 V 41 w(t)30 b(*)h Fe(bag)12
22667
 
b Fg(\))390 2349 y Ff(bag)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e
22668
 
(initialized)390 2512 y(This)j(function)g(will)g(initialize)j(a)e(PK)m
 
22670
Fg(\()p Ff(gn)m(utls)p 1836 4236 28 4 v 41 w(pk)m(cs12)p
 
22671
2139 4236 V 41 w(bag)p 2321 4236 V 41 w(t)30 b(*)h Fe(bag)12
 
22672
b Fg(\))390 4346 y Ff(bag)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e
 
22673
(initialized)390 4480 y(This)j(function)g(will)g(initialize)j(a)e(PK)m
22669
22674
(CS12)f(bag)h(structure.)46 b(PK)m(CS12)32 b(Bags)i(usually)e(con)m
22670
 
(tain)390 2621 y(priv)-5 b(ate)31 b(k)m(eys,)g(lists)g(of)f(X.509)j
 
22675
(tain)390 4590 y(priv)-5 b(ate)31 b(k)m(eys,)g(lists)g(of)f(X.509)j
22671
22676
(Certi\014cates)e(and)f(X.509)i(Certi\014cate)g(rev)m(o)s(cation)g
22672
 
(lists.)390 2784 y Fn(Returns:)k FB(On)20 b(success,)j
 
22677
(lists.)390 4725 y Fn(Returns:)k FB(On)20 b(success,)j
22673
22678
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
22674
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3011 y Fv(gn)m(utls)p
22675
 
483 3011 37 5 v 55 w(pk)m(cs12)p 893 3011 V 54 w(bag)p
22676
 
1136 3011 V 54 w(set)p 1342 3011 V 54 w(crl)3350 3236
 
22679
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4924 y Fv(gn)m(utls)p
 
22680
483 4924 37 5 v 55 w(pk)m(cs12)p 893 4924 V 54 w(bag)p
 
22681
1136 4924 V 54 w(set)p 1342 4924 V 54 w(crl)3350 5121
22677
22682
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_set)q(_crl)f
22678
 
Fg(\()p Ff(gn)m(utls)p 1993 3236 28 4 v 41 w(pk)m(cs12)p
22679
 
2296 3236 V 41 w(bag)p 2478 3236 V 41 w(t)30 b Fe(bag)12
22680
 
b Ff(,)565 3346 y(gn)m(utls)p 811 3346 V 41 w(x509)p
22681
 
1035 3346 V 41 w(crl)p 1177 3346 V 40 w(t)31 b Fe(crl)12
22682
 
b Fg(\))390 3456 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
22683
 
3618 y Ff(crl)t FB(:)40 b(the)31 b(CRL)f(to)h(b)s(e)f(copied.)390
22684
 
3781 y(This)37 b(function)h(will)h(insert)f(the)h(giv)m(en)g(CRL)f(in)m
 
22683
Fg(\()p Ff(gn)m(utls)p 1993 5121 28 4 v 41 w(pk)m(cs12)p
 
22684
2296 5121 V 41 w(bag)p 2478 5121 V 41 w(t)30 b Fe(bag)12
 
22685
b Ff(,)565 5230 y(gn)m(utls)p 811 5230 V 41 w(x509)p
 
22686
1035 5230 V 41 w(crl)p 1177 5230 V 40 w(t)31 b Fe(crl)12
 
22687
b Fg(\))390 5340 y Ff(bag)c FB(:)41 b(The)30 b(bag)p
 
22688
eop end
 
22689
%%Page: 183 189
 
22690
TeXDict begin 183 188 bop 150 -116 a FB(Chapter)30 b(9:)41
 
22691
b(F)-8 b(unction)31 b(Reference)2237 b(183)390 299 y
 
22692
Ff(crl)t FB(:)40 b(the)31 b(CRL)f(to)h(b)s(e)f(copied.)390
 
22693
434 y(This)37 b(function)h(will)h(insert)f(the)h(giv)m(en)g(CRL)f(in)m
22685
22694
(to)h(the)f(bag.)65 b(This)37 b(is)i(just)e(a)i(wrapp)s(er)e(o)m(v)m
22686
 
(er)390 3891 y Ft(gnutls_pkcs12_bag_set_da)o(ta\(\))o
22687
 
FB(.)390 4053 y Fn(Returns:)j FB(the)31 b(index)f(of)g(the)h(added)f
 
22695
(er)390 544 y Ft(gnutls_pkcs12_bag_set_da)o(ta\(\))o
 
22696
FB(.)390 679 y Fn(Returns:)j FB(the)31 b(index)f(of)g(the)h(added)f
22688
22697
(bag)g(on)h(success,)g(or)f(a)h(negativ)m(e)h(v)-5 b(alue)31
22689
 
b(on)f(failure.)150 4281 y Fv(gn)m(utls)p 483 4281 37
22690
 
5 v 55 w(pk)m(cs12)p 893 4281 V 54 w(bag)p 1136 4281
22691
 
V 54 w(set)p 1342 4281 V 54 w(crt)3350 4506 y FB([F)-8
22692
 
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_set)q(_crt)f
22693
 
Fg(\()p Ff(gn)m(utls)p 1993 4506 28 4 v 41 w(pk)m(cs12)p
22694
 
2296 4506 V 41 w(bag)p 2478 4506 V 41 w(t)30 b Fe(bag)12
22695
 
b Ff(,)565 4615 y(gn)m(utls)p 811 4615 V 41 w(x509)p
22696
 
1035 4615 V 41 w(crt)p 1187 4615 V 40 w(t)31 b Fe(crt)12
22697
 
b Fg(\))390 4725 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
22698
 
4887 y Ff(crt)r FB(:)41 b(the)31 b(certi\014cate)h(to)f(b)s(e)f
22699
 
(copied.)390 5050 y(This)25 b(function)g(will)i(insert)e(the)h(giv)m
 
22698
b(on)f(failure.)150 879 y Fv(gn)m(utls)p 483 879 37 5
 
22699
v 55 w(pk)m(cs12)p 893 879 V 54 w(bag)p 1136 879 V 54
 
22700
w(set)p 1342 879 V 54 w(crt)3350 1076 y FB([F)-8 b(unction])-3599
 
22701
b Fh(int)53 b(gnutls_pkcs12_bag_set)q(_crt)f Fg(\()p
 
22702
Ff(gn)m(utls)p 1993 1076 28 4 v 41 w(pk)m(cs12)p 2296
 
22703
1076 V 41 w(bag)p 2478 1076 V 41 w(t)30 b Fe(bag)12 b
 
22704
Ff(,)565 1186 y(gn)m(utls)p 811 1186 V 41 w(x509)p 1035
 
22705
1186 V 41 w(crt)p 1187 1186 V 40 w(t)31 b Fe(crt)12 b
 
22706
Fg(\))390 1295 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
 
22707
1430 y Ff(crt)r FB(:)41 b(the)31 b(certi\014cate)h(to)f(b)s(e)f
 
22708
(copied.)390 1566 y(This)25 b(function)g(will)i(insert)e(the)h(giv)m
22700
22709
(en)h(certi\014cate)h(in)m(to)f(the)f(bag.)39 b(This)25
22701
 
b(is)h(just)f(a)i(wrapp)s(er)d(o)m(v)m(er)390 5160 y
22702
 
Ft(gnutls_pkcs12_bag_set_da)o(ta\(\))o FB(.)390 5322
22703
 
y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(added)f(bag)g(on)h
22704
 
(success,)g(or)f(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(failure.)p
 
22710
b(is)h(just)f(a)i(wrapp)s(er)d(o)m(v)m(er)390 1675 y
 
22711
Ft(gnutls_pkcs12_bag_set_da)o(ta\(\))o FB(.)390 1810
 
22712
y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(added)f(bag)g(on)h
 
22713
(success,)g(or)f(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(failure.)150
 
22714
2010 y Fv(gn)m(utls)p 483 2010 37 5 v 55 w(pk)m(cs12)p
 
22715
893 2010 V 54 w(bag)p 1136 2010 V 54 w(set)p 1342 2010
 
22716
V 54 w(data)3350 2208 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
22717
b(gnutls_pkcs12_bag_set)q(_dat)q(a)f Fg(\()p Ff(gn)m(utls)p
 
22718
2046 2208 28 4 v 40 w(pk)m(cs12)p 2348 2208 V 41 w(bag)p
 
22719
2530 2208 V 41 w(t)31 b Fe(bag)12 b Ff(,)565 2317 y(gn)m(utls)p
 
22720
811 2317 V 41 w(pk)m(cs12)p 1114 2317 V 41 w(bag)p 1296
 
22721
2317 V 40 w(t)m(yp)s(e)p 1510 2317 V 40 w(t)31 b Fe(type)12
 
22722
b Ff(,)31 b(const)g(gn)m(utls)p 2370 2317 V 41 w(datum)p
 
22723
2669 2317 V 39 w(t)g(*)g Fe(data)12 b Fg(\))390 2427
 
22724
y Ff(bag)c FB(:)41 b(The)30 b(bag)390 2562 y Ff(t)m(yp)s(e)5
 
22725
b FB(:)41 b(The)30 b(data's)h(t)m(yp)s(e)390 2697 y Ff(data)p
 
22726
FB(:)41 b(the)31 b(data)g(to)g(b)s(e)f(copied.)390 2832
 
22727
y(This)g(function)g(will)g(insert)h(the)f(giv)m(en)i(data)f(of)f(the)h
 
22728
(giv)m(en)g(t)m(yp)s(e)g(in)m(to)g(the)g(bag.)390 2967
 
22729
y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(added)f(bag)g(on)h
 
22730
(success,)g(or)f(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(error.)150
 
22731
3167 y Fv(gn)m(utls)p 483 3167 37 5 v 55 w(pk)m(cs12)p
 
22732
893 3167 V 54 w(bag)p 1136 3167 V 54 w(set)p 1342 3167
 
22733
V 54 w(friendly)p 1808 3167 V 55 w(name)3350 3365 y FB([F)-8
 
22734
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_set)q(_fri)q(end)q
 
22735
(ly_)q(nam)q(e)e Fg(\()p Ff(gn)m(utls)p 2516 3365 28
 
22736
4 v 41 w(pk)m(cs12)p 2819 3365 V 41 w(bag)p 3001 3365
 
22737
V 41 w(t)565 3474 y Fe(bag)12 b Ff(,)31 b(in)m(t)g Fe(indx)12
 
22738
b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(name)12 b Fg(\))390
 
22739
3584 y Ff(bag)c FB(:)41 b(The)30 b(bag)390 3719 y Ff(indx)6
 
22740
b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)f(add)f(the)g(id)390
 
22741
3854 y Ff(name)5 b FB(:)41 b(the)30 b(name)390 3989 y(This)37
 
22742
b(function)g(will)h(add)f(the)h(giv)m(en)h(k)m(ey)f(friendly)f(name,)j
 
22743
(to)f(the)f(sp)s(eci\014ed,)h(b)m(y)e(the)h(index,)390
 
22744
4099 y(bag)31 b(elemen)m(t.)42 b(The)30 b(name)h(will)f(b)s(e)g(enco)s
 
22745
(ded)g(as)h(a)g('F)-8 b(riendly)31 b(name')f(bag)h(attribute,)h(whic)m
 
22746
(h)e(is)390 4208 y(usually)g(used)g(to)h(set)g(a)f(user)g(name)h(to)g
 
22747
(the)f(lo)s(cal)i(priv)-5 b(ate)31 b(k)m(ey)g(and)f(the)g
 
22748
(certi\014cate)j(pair.)390 4344 y Fn(Returns:)j FB(On)20
 
22749
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
 
22750
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)390 4453 y(or)30
 
22751
b(a)h(negativ)m(e)i(v)-5 b(alue)31 b(on)f(error.)150
 
22752
4653 y Fv(gn)m(utls)p 483 4653 37 5 v 55 w(pk)m(cs12)p
 
22753
893 4653 V 54 w(bag)p 1136 4653 V 54 w(set)p 1342 4653
 
22754
V 54 w(k)m(ey)p 1579 4653 V 53 w(id)3350 4851 y FB([F)-8
 
22755
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_set)q(_key)q(_id)f
 
22756
Fg(\()p Ff(gn)m(utls)p 2150 4851 28 4 v 41 w(pk)m(cs12)p
 
22757
2453 4851 V 41 w(bag)p 2635 4851 V 40 w(t)31 b Fe(bag)12
 
22758
b Ff(,)31 b(in)m(t)565 4960 y Fe(indx)12 b Ff(,)31 b(const)g(gn)m(utls)
 
22759
p 1325 4960 V 41 w(datum)p 1624 4960 V 39 w(t)g(*)g Fe(id)12
 
22760
b Fg(\))390 5070 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
 
22761
5205 y Ff(indx)6 b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)f(add)f
 
22762
(the)g(id)390 5340 y Ff(id)t FB(:)40 b(the)31 b(ID)p
22705
22763
eop end
22706
 
%%Page: 183 189
22707
 
TeXDict begin 183 188 bop 150 -116 a FB(Chapter)30 b(9:)41
22708
 
b(F)-8 b(unction)31 b(Reference)2237 b(183)150 299 y
22709
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs12)p 893 299
22710
 
V 54 w(bag)p 1136 299 V 54 w(set)p 1342 299 V 54 w(data)3350
22711
 
520 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_set)q
22712
 
(_dat)q(a)f Fg(\()p Ff(gn)m(utls)p 2046 520 28 4 v 40
22713
 
w(pk)m(cs12)p 2348 520 V 41 w(bag)p 2530 520 V 41 w(t)31
22714
 
b Fe(bag)12 b Ff(,)565 629 y(gn)m(utls)p 811 629 V 41
22715
 
w(pk)m(cs12)p 1114 629 V 41 w(bag)p 1296 629 V 40 w(t)m(yp)s(e)p
22716
 
1510 629 V 40 w(t)31 b Fe(type)12 b Ff(,)31 b(const)g(gn)m(utls)p
22717
 
2370 629 V 41 w(datum)p 2669 629 V 39 w(t)g(*)g Fe(data)12
22718
 
b Fg(\))390 739 y Ff(bag)c FB(:)41 b(The)30 b(bag)390
22719
 
898 y Ff(t)m(yp)s(e)5 b FB(:)41 b(The)30 b(data's)h(t)m(yp)s(e)390
22720
 
1056 y Ff(data)p FB(:)41 b(the)31 b(data)g(to)g(b)s(e)f(copied.)390
22721
 
1215 y(This)g(function)g(will)g(insert)h(the)f(giv)m(en)i(data)f(of)f
22722
 
(the)h(giv)m(en)g(t)m(yp)s(e)g(in)m(to)g(the)g(bag.)390
22723
 
1374 y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(added)f(bag)g
22724
 
(on)h(success,)g(or)f(a)h(negativ)m(e)h(v)-5 b(alue)31
22725
 
b(on)f(error.)150 1597 y Fv(gn)m(utls)p 483 1597 37 5
22726
 
v 55 w(pk)m(cs12)p 893 1597 V 54 w(bag)p 1136 1597 V
22727
 
54 w(set)p 1342 1597 V 54 w(friendly)p 1808 1597 V 55
22728
 
w(name)3350 1818 y FB([F)-8 b(unction])-3599 b Fh(int)53
22729
 
b(gnutls_pkcs12_bag_set)q(_fri)q(end)q(ly_)q(nam)q(e)e
22730
 
Fg(\()p Ff(gn)m(utls)p 2516 1818 28 4 v 41 w(pk)m(cs12)p
22731
 
2819 1818 V 41 w(bag)p 3001 1818 V 41 w(t)565 1928 y
22732
 
Fe(bag)12 b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)31 b(const)g(c)m(har)g
22733
 
(*)g Fe(name)12 b Fg(\))390 2037 y Ff(bag)c FB(:)41 b(The)30
22734
 
b(bag)390 2196 y Ff(indx)6 b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h
22735
 
(to)f(add)f(the)g(id)390 2354 y Ff(name)5 b FB(:)41 b(the)30
22736
 
b(name)390 2513 y(This)37 b(function)g(will)h(add)f(the)h(giv)m(en)h(k)
22737
 
m(ey)f(friendly)f(name,)j(to)f(the)f(sp)s(eci\014ed,)h(b)m(y)e(the)h
22738
 
(index,)390 2623 y(bag)31 b(elemen)m(t.)42 b(The)30 b(name)h(will)f(b)s
22739
 
(e)g(enco)s(ded)g(as)h(a)g('F)-8 b(riendly)31 b(name')f(bag)h
22740
 
(attribute,)h(whic)m(h)e(is)390 2732 y(usually)g(used)g(to)h(set)g(a)f
22741
 
(user)g(name)h(to)g(the)f(lo)s(cal)i(priv)-5 b(ate)31
22742
 
b(k)m(ey)g(and)f(the)g(certi\014cate)j(pair.)390 2891
22743
 
y Fn(Returns:)j FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
22744
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22745
 
b(alue.)390 3000 y(or)30 b(a)h(negativ)m(e)i(v)-5 b(alue)31
22746
 
b(on)f(error.)150 3224 y Fv(gn)m(utls)p 483 3224 37 5
22747
 
v 55 w(pk)m(cs12)p 893 3224 V 54 w(bag)p 1136 3224 V
22748
 
54 w(set)p 1342 3224 V 54 w(k)m(ey)p 1579 3224 V 53 w(id)3350
22749
 
3445 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_bag_set)q
22750
 
(_key)q(_id)f Fg(\()p Ff(gn)m(utls)p 2150 3445 28 4 v
22751
 
41 w(pk)m(cs12)p 2453 3445 V 41 w(bag)p 2635 3445 V 40
22752
 
w(t)31 b Fe(bag)12 b Ff(,)31 b(in)m(t)565 3554 y Fe(indx)12
22753
 
b Ff(,)31 b(const)g(gn)m(utls)p 1325 3554 V 41 w(datum)p
22754
 
1624 3554 V 39 w(t)g(*)g Fe(id)12 b Fg(\))390 3664 y
22755
 
Ff(bag)c FB(:)41 b(The)30 b(bag)390 3823 y Ff(indx)6
22756
 
b FB(:)40 b(The)30 b(bag's)h(elemen)m(t)h(to)f(add)f(the)g(id)390
22757
 
3981 y Ff(id)t FB(:)40 b(the)31 b(ID)390 4140 y(This)g(function)g(will)
22758
 
h(add)e(the)i(giv)m(en)h(k)m(ey)f(ID,)g(to)g(the)g(sp)s(eci\014ed,)f(b)
22759
 
m(y)g(the)h(index,)f(bag)h(elemen)m(t.)390 4250 y(The)d(k)m(ey)h(ID)g
22760
 
(will)g(b)s(e)f(enco)s(ded)g(as)g(a)h('Lo)s(cal)h(k)m(ey)f(iden)m
22761
 
(ti\014er')g(bag)g(attribute,)g(whic)m(h)g(is)f(usually)390
22762
 
4359 y(used)h(to)h(distinguish)e(the)i(lo)s(cal)h(priv)-5
 
22764
%%Page: 184 190
 
22765
TeXDict begin 184 189 bop 150 -116 a FB(Chapter)30 b(9:)41
 
22766
b(F)-8 b(unction)31 b(Reference)2237 b(184)390 299 y(This)31
 
22767
b(function)g(will)h(add)e(the)i(giv)m(en)h(k)m(ey)f(ID,)g(to)g(the)g
 
22768
(sp)s(eci\014ed,)f(b)m(y)g(the)h(index,)f(bag)h(elemen)m(t.)390
 
22769
408 y(The)d(k)m(ey)h(ID)g(will)g(b)s(e)f(enco)s(ded)g(as)g(a)h('Lo)s
 
22770
(cal)h(k)m(ey)f(iden)m(ti\014er')g(bag)g(attribute,)g(whic)m(h)g(is)f
 
22771
(usually)390 518 y(used)h(to)h(distinguish)e(the)i(lo)s(cal)h(priv)-5
22763
22772
b(ate)30 b(k)m(ey)h(and)f(the)h(certi\014cate)h(pair.)390
22764
 
4518 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
22773
653 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
22765
22774
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22766
 
b(alue.)390 4627 y(or)30 b(a)h(negativ)m(e)i(v)-5 b(alue)31
22767
 
b(on)f(error.)150 4851 y Fv(gn)m(utls)p 483 4851 37 5
22768
 
v 55 w(pk)m(cs12)p 893 4851 V 54 w(deinit)3350 5072 y
22769
 
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_pkcs12_deinit)d
22770
 
Fg(\()p Ff(gn)m(utls)p 1784 5072 28 4 v 41 w(pk)m(cs12)p
22771
 
2087 5072 V 41 w(t)31 b Fe(pkcs12)12 b Fg(\))390 5181
 
22775
b(alue.)390 763 y(or)30 b(a)h(negativ)m(e)i(v)-5 b(alue)31
 
22776
b(on)f(error.)150 963 y Fv(gn)m(utls)p 483 963 37 5 v
 
22777
55 w(pk)m(cs12)p 893 963 V 54 w(deinit)3350 1160 y FB([F)-8
 
22778
b(unction])-3599 b Fh(void)54 b(gnutls_pkcs12_deinit)d
 
22779
Fg(\()p Ff(gn)m(utls)p 1784 1160 28 4 v 41 w(pk)m(cs12)p
 
22780
2087 1160 V 41 w(t)31 b Fe(pkcs12)12 b Fg(\))390 1270
22772
22781
y Ff(pk)m(cs12)7 b FB(:)42 b(The)30 b(structure)g(to)h(b)s(e)f
22773
 
(initialized)390 5340 y(This)g(function)g(will)g(deinitialize)j(a)e(PK)
22774
 
m(CS12)f(structure.)p eop end
22775
 
%%Page: 184 190
22776
 
TeXDict begin 184 189 bop 150 -116 a FB(Chapter)30 b(9:)41
22777
 
b(F)-8 b(unction)31 b(Reference)2237 b(184)150 299 y
22778
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs12)p 893 299
22779
 
V 54 w(exp)s(ort)3350 498 y FB([F)-8 b(unction])-3599
22780
 
b Fh(int)53 b(gnutls_pkcs12_export)f Fg(\()p Ff(gn)m(utls)p
22781
 
1732 498 28 4 v 40 w(pk)m(cs12)p 2034 498 V 42 w(t)30
22782
 
b Fe(pkcs12)12 b Ff(,)565 608 y(gn)m(utls)p 811 608 V
22783
 
41 w(x509)p 1035 608 V 41 w(crt)p 1187 608 V 40 w(fm)m(t)p
22784
 
1363 608 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)g
22785
 
Fe(output_data)12 b Ff(,)33 b(size)p 2906 608 V 41 w(t)e(*)565
22786
 
717 y Fe(output_data_size)12 b Fg(\))390 827 y Ff(pk)m(cs12)7
22787
 
b FB(:)42 b(Holds)31 b(the)f(pk)m(cs12)i(structure)390
22788
 
963 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
22789
 
b(One)30 b(of)h(PEM)f(or)g(DER.)390 1100 y Ff(output)p
22790
 
664 1100 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e(structure)g
22791
 
(PEM)h(or)f(DER)g(enco)s(ded)390 1237 y Ff(output)p 664
22792
 
1237 V 40 w(data)p 880 1237 V 40 w(size)5 b FB(:)49 b(holds)34
22793
 
b(the)g(size)h(of)f(output)p 2093 1237 V 39 w(data)h(\(and)f(will)g(b)s
22794
 
(e)f(replaced)i(b)m(y)e(the)i(actual)390 1347 y(size)c(of)g
22795
 
(parameters\))390 1483 y(This)f(function)g(will)g(exp)s(ort)g(the)h(pk)
 
22782
(initialized)390 1405 y(This)g(function)g(will)g(deinitialize)j(a)e(PK)
 
22783
m(CS12)f(structure.)150 1605 y Fv(gn)m(utls)p 483 1605
 
22784
37 5 v 55 w(pk)m(cs12)p 893 1605 V 54 w(exp)s(ort)3350
 
22785
1802 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_export)f
 
22786
Fg(\()p Ff(gn)m(utls)p 1732 1802 28 4 v 40 w(pk)m(cs12)p
 
22787
2034 1802 V 42 w(t)30 b Fe(pkcs12)12 b Ff(,)565 1912
 
22788
y(gn)m(utls)p 811 1912 V 41 w(x509)p 1035 1912 V 41 w(crt)p
 
22789
1187 1912 V 40 w(fm)m(t)p 1363 1912 V 41 w(t)30 b Fe(format)12
 
22790
b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33
 
22791
b(size)p 2906 1912 V 41 w(t)e(*)565 2021 y Fe(output_data_size)12
 
22792
b Fg(\))390 2131 y Ff(pk)m(cs12)7 b FB(:)42 b(Holds)31
 
22793
b(the)f(pk)m(cs12)i(structure)390 2266 y Ff(format)r
 
22794
FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
 
22795
b(One)30 b(of)h(PEM)f(or)g(DER.)390 2401 y Ff(output)p
 
22796
664 2401 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e(structure)g
 
22797
(PEM)h(or)f(DER)g(enco)s(ded)390 2536 y Ff(output)p 664
 
22798
2536 V 40 w(data)p 880 2536 V 40 w(size)5 b FB(:)49 b(holds)34
 
22799
b(the)g(size)h(of)f(output)p 2093 2536 V 39 w(data)h(\(and)f(will)g(b)s
 
22800
(e)f(replaced)i(b)m(y)e(the)i(actual)390 2646 y(size)c(of)g
 
22801
(parameters\))390 2781 y(This)f(function)g(will)g(exp)s(ort)g(the)h(pk)
22796
22802
m(cs12)g(structure)f(to)h(DER)g(or)f(PEM)h(format.)390
22797
 
1620 y(If)f(the)h(bu\013er)f(pro)m(vided)g(is)g(not)h(long)h(enough)e
22798
 
(to)h(hold)g(the)f(output,)h(then)f(*output)p 3357 1620
22799
 
V 40 w(data)p 3573 1620 V 41 w(size)390 1730 y(will)h(b)s(e)e(up)s
22800
 
(dated)h(and)f(GNUTLS)p 1605 1730 V 40 w(E)p 1707 1730
22801
 
V 40 w(SHOR)-8 b(T)p 2062 1730 V 39 w(MEMOR)g(Y)p 2527
22802
 
1730 V 41 w(BUFFER)31 b(will)g(b)s(e)f(returned.)390
22803
 
1867 y(If)g(the)g(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g(ha)m
 
22803
2916 y(If)f(the)h(bu\013er)f(pro)m(vided)g(is)g(not)h(long)h(enough)e
 
22804
(to)h(hold)g(the)f(output,)h(then)f(*output)p 3357 2916
 
22805
V 40 w(data)p 3573 2916 V 41 w(size)390 3026 y(will)h(b)s(e)e(up)s
 
22806
(dated)h(and)f(GNUTLS)p 1605 3026 V 40 w(E)p 1707 3026
 
22807
V 40 w(SHOR)-8 b(T)p 2062 3026 V 39 w(MEMOR)g(Y)p 2527
 
22808
3026 V 41 w(BUFFER)31 b(will)g(b)s(e)f(returned.)390
 
22809
3161 y(If)g(the)g(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g(ha)m
22804
22810
(v)m(e)h(a)e(header)h(of)f Ft(")p FB(BEGIN)h(PK)m(CS12)p
22805
 
Ft(")p FB(.)390 2003 y Fn(Return)f(v)-5 b(alue:)41 b
 
22811
Ft(")p FB(.)390 3296 y Fn(Return)f(v)-5 b(alue:)41 b
22806
22812
FB(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)i(v)-5
22807
22813
b(alue)30 b(will)h(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
22808
 
2205 y Fv(gn)m(utls)p 483 2205 37 5 v 55 w(pk)m(cs12)p
22809
 
893 2205 V 54 w(generate)p 1402 2205 V 54 w(mac)3350
22810
 
2404 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_generat)q
22811
 
(e_ma)q(c)f Fg(\()p Ff(gn)m(utls)p 2046 2404 28 4 v 40
22812
 
w(pk)m(cs12)p 2348 2404 V 41 w(t)31 b Fe(pkcs12)12 b
22813
 
Ff(,)32 b(const)565 2513 y(c)m(har)f(*)g Fe(pass)12 b
22814
 
Fg(\))390 2623 y Ff(pk)m(cs12)7 b FB(:)42 b(should)29
22815
 
b(con)m(tain)j(a)f(gn)m(utls)p 1657 2623 V 40 w(pk)m(cs12)p
22816
 
1959 2623 V 41 w(t)g(structure)390 2760 y Ff(pass)t FB(:)40
22817
 
b(The)30 b(passw)m(ord)g(for)g(the)g(MA)m(C)390 2897
 
22814
3496 y Fv(gn)m(utls)p 483 3496 37 5 v 55 w(pk)m(cs12)p
 
22815
893 3496 V 54 w(generate)p 1402 3496 V 54 w(mac)3350
 
22816
3693 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_generat)q
 
22817
(e_ma)q(c)f Fg(\()p Ff(gn)m(utls)p 2046 3693 28 4 v 40
 
22818
w(pk)m(cs12)p 2348 3693 V 41 w(t)31 b Fe(pkcs12)12 b
 
22819
Ff(,)32 b(const)565 3803 y(c)m(har)f(*)g Fe(pass)12 b
 
22820
Fg(\))390 3913 y Ff(pk)m(cs12)7 b FB(:)42 b(should)29
 
22821
b(con)m(tain)j(a)f(gn)m(utls)p 1657 3913 V 40 w(pk)m(cs12)p
 
22822
1959 3913 V 41 w(t)g(structure)390 4048 y Ff(pass)t FB(:)40
 
22823
b(The)30 b(passw)m(ord)g(for)g(the)g(MA)m(C)390 4183
22818
22824
y(This)g(function)g(will)g(generate)i(a)f(MA)m(C)g(for)f(the)h(PK)m
22819
 
(CS12)f(structure.)390 3033 y Fn(Returns:)36 b FB(On)20
 
22825
(CS12)f(structure.)390 4318 y Fn(Returns:)36 b FB(On)20
22820
22826
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
22821
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 3235 y Fv(gn)m(utls)p
22822
 
483 3235 37 5 v 55 w(pk)m(cs12)p 893 3235 V 54 w(get)p
22823
 
1112 3235 V 54 w(bag)3350 3434 y FB([F)d(unction])-3599
 
22827
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 4518 y Fv(gn)m(utls)p
 
22828
483 4518 37 5 v 55 w(pk)m(cs12)p 893 4518 V 54 w(get)p
 
22829
1112 4518 V 54 w(bag)3350 4715 y FB([F)d(unction])-3599
22824
22830
b Fh(int)53 b(gnutls_pkcs12_get_bag)f Fg(\()p Ff(gn)m(utls)p
22825
 
1784 3434 28 4 v 41 w(pk)m(cs12)p 2087 3434 V 41 w(t)31
 
22831
1784 4715 28 4 v 41 w(pk)m(cs12)p 2087 4715 V 41 w(t)31
22826
22832
b Fe(pkcs12)12 b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)565
22827
 
3544 y(gn)m(utls)p 811 3544 V 41 w(pk)m(cs12)p 1114 3544
22828
 
V 41 w(bag)p 1296 3544 V 40 w(t)31 b Fe(bag)12 b Fg(\))390
22829
 
3653 y Ff(pk)m(cs12)7 b FB(:)42 b(should)29 b(con)m(tain)j(a)f(gn)m
22830
 
(utls)p 1657 3653 V 40 w(pk)m(cs12)p 1959 3653 V 41 w(t)g(structure)390
22831
 
3790 y Ff(indx)6 b FB(:)40 b(con)m(tains)32 b(the)e(index)g(of)h(the)f
22832
 
(bag)h(to)g(extract)390 3927 y Ff(bag)8 b FB(:)41 b(An)30
 
22833
4825 y(gn)m(utls)p 811 4825 V 41 w(pk)m(cs12)p 1114 4825
 
22834
V 41 w(bag)p 1296 4825 V 40 w(t)31 b Fe(bag)12 b Fg(\))390
 
22835
4935 y Ff(pk)m(cs12)7 b FB(:)42 b(should)29 b(con)m(tain)j(a)f(gn)m
 
22836
(utls)p 1657 4935 V 40 w(pk)m(cs12)p 1959 4935 V 41 w(t)g(structure)390
 
22837
5070 y Ff(indx)6 b FB(:)40 b(con)m(tains)32 b(the)e(index)g(of)h(the)f
 
22838
(bag)h(to)g(extract)390 5205 y Ff(bag)8 b FB(:)41 b(An)30
22833
22839
b(initialized)i(bag,)f(where)f(the)g(con)m(ten)m(ts)j(of)d(the)h(bag)f
22834
 
(will)h(b)s(e)f(copied)390 4064 y(This)g(function)g(will)g(return)g(a)g
22835
 
(Bag)i(from)e(the)g(PK)m(CS12)h(structure.)390 4200 y
22836
 
Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
22837
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22838
 
b(alue.)390 4337 y(After)21 b(the)f(last)h(Bag)h(has)e(b)s(een)f(read)h
22839
 
(GNUTLS)p 2037 4337 V 40 w(E)p 2139 4337 V 40 w(REQUESTED)p
22840
 
2757 4337 V 39 w(D)m(A)-8 b(T)g(A)p 3048 4337 V 42 w(NOT)p
22841
 
3295 4337 V 39 w(A)e(V)g(AILABLE)390 4447 y(will)31 b(b)s(e)e
22842
 
(returned.)150 4648 y Fv(gn)m(utls)p 483 4648 37 5 v
22843
 
55 w(pk)m(cs12)p 893 4648 V 54 w(imp)s(ort)3350 4847
22844
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_import)f
22845
 
Fg(\()p Ff(gn)m(utls)p 1732 4847 28 4 v 40 w(pk)m(cs12)p
22846
 
2034 4847 V 42 w(t)30 b Fe(pkcs12)12 b Ff(,)32 b(const)565
22847
 
4957 y(gn)m(utls)p 811 4957 V 41 w(datum)p 1110 4957
22848
 
V 39 w(t)f(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1807
22849
 
4957 V 40 w(x509)p 2030 4957 V 42 w(crt)p 2183 4957 V
22850
 
40 w(fm)m(t)p 2359 4957 V 40 w(t)g Fe(format)12 b Ff(,)32
22851
 
b(unsigned)d(in)m(t)i Fe(flags)12 b Fg(\))390 5066 y
22852
 
Ff(pk)m(cs12)7 b FB(:)42 b(The)30 b(structure)g(to)h(store)g(the)f
22853
 
(parsed)g(PK)m(CS12.)390 5203 y Ff(data)p FB(:)41 b(The)30
22854
 
b(DER)h(or)f(PEM)h(enco)s(ded)f(PK)m(CS12.)390 5340 y
22855
 
Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM)p
22856
 
eop end
 
22840
(will)h(b)s(e)f(copied)390 5340 y(This)g(function)g(will)g(return)g(a)g
 
22841
(Bag)i(from)e(the)g(PK)m(CS12)h(structure.)p eop end
22857
22842
%%Page: 185 191
22858
22843
TeXDict begin 185 190 bop 150 -116 a FB(Chapter)30 b(9:)41
22859
22844
b(F)-8 b(unction)31 b(Reference)2237 b(185)390 299 y
22860
 
Ff(\015ags)t FB(:)41 b(an)30 b(ORed)g(sequence)h(of)f(gn)m(utls)p
22861
 
1748 299 28 4 v 40 w(privk)m(ey)p 2081 299 V 41 w(pk)m(cs8)p
22862
 
2339 299 V 40 w(\015ags)390 436 y(This)38 b(function)g(will)g(con)m(v)m
22863
 
(ert)i(the)f(giv)m(en)g(DER)g(or)f(PEM)g(enco)s(ded)g(PK)m(CS12)h(to)g
22864
 
(the)g(nativ)m(e)390 546 y(gn)m(utls)p 636 546 V 40 w(pk)m(cs12)p
22865
 
938 546 V 42 w(t)30 b(format.)41 b(The)30 b(output)g(will)h(b)s(e)f
22866
 
(stored)g(in)g('pk)m(cs12'.)390 683 y(If)g(the)g(PK)m(CS12)h(is)f(PEM)h
22867
 
(enco)s(ded)f(it)h(should)e(ha)m(v)m(e)j(a)e(header)h(of)f
22868
 
Ft(")p FB(PK)m(CS12)p Ft(")p FB(.)390 820 y Fn(Returns:)36
 
22845
Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
22846
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
22847
b(alue.)390 448 y(After)21 b(the)f(last)h(Bag)h(has)e(b)s(een)f(read)h
 
22848
(GNUTLS)p 2037 448 28 4 v 40 w(E)p 2139 448 V 40 w(REQUESTED)p
 
22849
2757 448 V 39 w(D)m(A)-8 b(T)g(A)p 3048 448 V 42 w(NOT)p
 
22850
3295 448 V 39 w(A)e(V)g(AILABLE)390 557 y(will)31 b(b)s(e)e(returned.)
 
22851
150 771 y Fv(gn)m(utls)p 483 771 37 5 v 55 w(pk)m(cs12)p
 
22852
893 771 V 54 w(imp)s(ort)3350 982 y FB([F)-8 b(unction])-3599
 
22853
b Fh(int)53 b(gnutls_pkcs12_import)f Fg(\()p Ff(gn)m(utls)p
 
22854
1732 982 28 4 v 40 w(pk)m(cs12)p 2034 982 V 42 w(t)30
 
22855
b Fe(pkcs12)12 b Ff(,)32 b(const)565 1091 y(gn)m(utls)p
 
22856
811 1091 V 41 w(datum)p 1110 1091 V 39 w(t)f(*)g Fe(data)12
 
22857
b Ff(,)31 b(gn)m(utls)p 1807 1091 V 40 w(x509)p 2030
 
22858
1091 V 42 w(crt)p 2183 1091 V 40 w(fm)m(t)p 2359 1091
 
22859
V 40 w(t)g Fe(format)12 b Ff(,)32 b(unsigned)d(in)m(t)i
 
22860
Fe(flags)12 b Fg(\))390 1201 y Ff(pk)m(cs12)7 b FB(:)42
 
22861
b(The)30 b(structure)g(to)h(store)g(the)f(parsed)g(PK)m(CS12.)390
 
22862
1349 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s(ded)f(PK)m
 
22863
(CS12.)390 1498 y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM)
 
22864
390 1647 y Ff(\015ags)t FB(:)41 b(an)30 b(ORed)g(sequence)h(of)f(gn)m
 
22865
(utls)p 1748 1647 V 40 w(privk)m(ey)p 2081 1647 V 41
 
22866
w(pk)m(cs8)p 2339 1647 V 40 w(\015ags)390 1795 y(This)38
 
22867
b(function)g(will)g(con)m(v)m(ert)i(the)f(giv)m(en)g(DER)g(or)f(PEM)g
 
22868
(enco)s(ded)g(PK)m(CS12)h(to)g(the)g(nativ)m(e)390 1905
 
22869
y(gn)m(utls)p 636 1905 V 40 w(pk)m(cs12)p 938 1905 V
 
22870
42 w(t)30 b(format.)41 b(The)30 b(output)g(will)h(b)s(e)f(stored)g(in)g
 
22871
('pk)m(cs12'.)390 2054 y(If)g(the)g(PK)m(CS12)h(is)f(PEM)h(enco)s(ded)f
 
22872
(it)h(should)e(ha)m(v)m(e)j(a)e(header)h(of)f Ft(")p
 
22873
FB(PK)m(CS12)p Ft(")p FB(.)390 2202 y Fn(Returns:)36
22869
22874
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
22870
22875
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22871
 
b(alue.)150 1022 y Fv(gn)m(utls)p 483 1022 37 5 v 55
22872
 
w(pk)m(cs12)p 893 1022 V 54 w(init)3350 1221 y FB([F)d(unction])-3599
 
22876
b(alue.)150 2416 y Fv(gn)m(utls)p 483 2416 37 5 v 55
 
22877
w(pk)m(cs12)p 893 2416 V 54 w(init)3350 2627 y FB([F)d(unction])-3599
22873
22878
b Fh(int)53 b(gnutls_pkcs12_init)e Fg(\()p Ff(gn)m(utls)p
22874
 
1627 1221 28 4 v 41 w(pk)m(cs12)p 1930 1221 V 41 w(t)31
22875
 
b(*)f Fe(pkcs12)12 b Fg(\))390 1331 y Ff(pk)m(cs12)7
 
22879
1627 2627 28 4 v 41 w(pk)m(cs12)p 1930 2627 V 41 w(t)31
 
22880
b(*)f Fe(pkcs12)12 b Fg(\))390 2736 y Ff(pk)m(cs12)7
22876
22881
b FB(:)42 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390
22877
 
1468 y(This)f(function)g(will)h(initialize)i(a)e(PK)m(CS12)g
 
22882
2885 y(This)f(function)g(will)h(initialize)i(a)e(PK)m(CS12)g
22878
22883
(structure.)40 b(PK)m(CS12)29 b(structures)g(usually)h(con)m(tain)390
22879
 
1578 y(lists)h(of)f(X.509)j(Certi\014cates)e(and)f(X.509)i
22880
 
(Certi\014cate)g(rev)m(o)s(cation)g(lists.)390 1715 y
 
22884
2995 y(lists)h(of)f(X.509)j(Certi\014cates)e(and)f(X.509)i
 
22885
(Certi\014cate)g(rev)m(o)s(cation)g(lists.)390 3143 y
22881
22886
Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
22882
22887
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22883
 
b(alue.)150 1917 y Fv(gn)m(utls)p 483 1917 37 5 v 55
22884
 
w(pk)m(cs12)p 893 1917 V 54 w(set)p 1099 1917 V 54 w(bag)3350
22885
 
2116 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_set_bag)f
22886
 
Fg(\()p Ff(gn)m(utls)p 1784 2116 28 4 v 41 w(pk)m(cs12)p
22887
 
2087 2116 V 41 w(t)31 b Fe(pkcs12)12 b Ff(,)565 2226
22888
 
y(gn)m(utls)p 811 2226 V 41 w(pk)m(cs12)p 1114 2226 V
22889
 
41 w(bag)p 1296 2226 V 40 w(t)31 b Fe(bag)12 b Fg(\))390
22890
 
2336 y Ff(pk)m(cs12)7 b FB(:)42 b(should)29 b(con)m(tain)j(a)f(gn)m
22891
 
(utls)p 1657 2336 V 40 w(pk)m(cs12)p 1959 2336 V 41 w(t)g(structure)390
22892
 
2473 y Ff(bag)8 b FB(:)41 b(An)30 b(initialized)i(bag)390
22893
 
2610 y(This)e(function)g(will)g(insert)h(a)f(Bag)i(in)m(to)f(the)g(PK)m
22894
 
(CS12)f(structure.)390 2747 y Fn(Returns:)36 b FB(On)20
 
22888
b(alue.)150 3357 y Fv(gn)m(utls)p 483 3357 37 5 v 55
 
22889
w(pk)m(cs12)p 893 3357 V 54 w(set)p 1099 3357 V 54 w(bag)3350
 
22890
3568 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs12_set_bag)f
 
22891
Fg(\()p Ff(gn)m(utls)p 1784 3568 28 4 v 41 w(pk)m(cs12)p
 
22892
2087 3568 V 41 w(t)31 b Fe(pkcs12)12 b Ff(,)565 3677
 
22893
y(gn)m(utls)p 811 3677 V 41 w(pk)m(cs12)p 1114 3677 V
 
22894
41 w(bag)p 1296 3677 V 40 w(t)31 b Fe(bag)12 b Fg(\))390
 
22895
3787 y Ff(pk)m(cs12)7 b FB(:)42 b(should)29 b(con)m(tain)j(a)f(gn)m
 
22896
(utls)p 1657 3787 V 40 w(pk)m(cs12)p 1959 3787 V 41 w(t)g(structure)390
 
22897
3935 y Ff(bag)8 b FB(:)41 b(An)30 b(initialized)i(bag)390
 
22898
4084 y(This)e(function)g(will)g(insert)h(a)f(Bag)i(in)m(to)f(the)g(PK)m
 
22899
(CS12)f(structure.)390 4233 y Fn(Returns:)36 b FB(On)20
22895
22900
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
22896
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 2949 y Fv(gn)m(utls)p
22897
 
483 2949 37 5 v 55 w(pk)m(cs12)p 893 2949 V 54 w(v)m(erify)p
22898
 
1251 2949 V 54 w(mac)3350 3148 y FB([F)d(unction])-3599
 
22901
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 4446 y Fv(gn)m(utls)p
 
22902
483 4446 37 5 v 55 w(pk)m(cs12)p 893 4446 V 54 w(v)m(erify)p
 
22903
1251 4446 V 54 w(mac)3350 4657 y FB([F)d(unction])-3599
22899
22904
b Fh(int)53 b(gnutls_pkcs12_verify_)q(mac)f Fg(\()p Ff(gn)m(utls)p
22900
 
1941 3148 28 4 v 41 w(pk)m(cs12)p 2244 3148 V 41 w(t)30
22901
 
b Fe(pkcs12)12 b Ff(,)32 b(const)f(c)m(har)565 3258 y(*)g
22902
 
Fe(pass)12 b Fg(\))390 3368 y Ff(pk)m(cs12)7 b FB(:)42
22903
 
b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p 1657 3368
22904
 
V 40 w(pk)m(cs12)p 1959 3368 V 41 w(t)g(structure)390
22905
 
3505 y Ff(pass)t FB(:)40 b(The)30 b(passw)m(ord)g(for)g(the)g(MA)m(C)
22906
 
390 3642 y(This)g(function)g(will)g(v)m(erify)h(the)g(MA)m(C)g(for)f
22907
 
(the)g(PK)m(CS12)h(structure.)390 3779 y Fn(Returns:)36
22908
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
22909
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22910
 
b(alue.)150 3981 y Fv(gn)m(utls)p 483 3981 37 5 v 55
22911
 
w(pk)m(cs7)p 832 3981 V 53 w(deinit)3350 4181 y FB([F)d(unction])-3599
22912
 
b Fh(void)54 b(gnutls_pkcs7_deinit)d Fg(\()p Ff(gn)m(utls)p
22913
 
1732 4181 28 4 v 40 w(pk)m(cs7)p 1989 4181 V 41 w(t)31
22914
 
b Fe(pkcs7)12 b Fg(\))390 4290 y Ff(pk)m(cs7)7 b FB(:)42
22915
 
b(The)29 b(structure)h(to)h(b)s(e)f(initialized)390 4427
22916
 
y(This)g(function)g(will)g(deinitialize)j(a)e(PK)m(CS7)f(structure.)150
22917
 
4629 y Fv(gn)m(utls)p 483 4629 37 5 v 55 w(pk)m(cs7)p
22918
 
832 4629 V 53 w(delete)p 1203 4629 V 54 w(crl)3350 4829
22919
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_delete_c)q(rl)f
22920
 
Fg(\()p Ff(gn)m(utls)p 1889 4829 28 4 v 40 w(pk)m(cs7)p
22921
 
2146 4829 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)31 b(in)m(t)g
22922
 
Fe(indx)12 b Fg(\))390 4938 y Ff(indx)6 b FB(:)40 b(the)31
22923
 
b(index)f(of)g(the)h(crl)f(to)h(delete)390 5076 y(This)g(function)h
22924
 
(will)h(delete)g(a)f(crl)h(from)e(a)i(PK)m(CS7)f(or)g(RF)m(C2630)i(crl)
22925
 
e(set.)47 b(Index)31 b(starts)h(from)390 5185 y(0.)41
22926
 
b(Returns)30 b(0)g(on)h(success.)390 5322 y Fn(Returns:)36
 
22905
1941 4657 28 4 v 41 w(pk)m(cs12)p 2244 4657 V 41 w(t)30
 
22906
b Fe(pkcs12)12 b Ff(,)32 b(const)f(c)m(har)565 4767 y(*)g
 
22907
Fe(pass)12 b Fg(\))390 4876 y Ff(pk)m(cs12)7 b FB(:)42
 
22908
b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p 1657 4876
 
22909
V 40 w(pk)m(cs12)p 1959 4876 V 41 w(t)g(structure)390
 
22910
5025 y Ff(pass)t FB(:)40 b(The)30 b(passw)m(ord)g(for)g(the)g(MA)m(C)
 
22911
390 5174 y(This)g(function)g(will)g(v)m(erify)h(the)g(MA)m(C)g(for)f
 
22912
(the)g(PK)m(CS12)h(structure.)390 5322 y Fn(Returns:)36
22927
22913
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
22928
22914
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22929
22915
b(alue.)p eop end
22931
22917
TeXDict begin 186 191 bop 150 -116 a FB(Chapter)30 b(9:)41
22932
22918
b(F)-8 b(unction)31 b(Reference)2237 b(186)150 299 y
22933
22919
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs7)p 832 299
22934
 
V 53 w(delete)p 1203 299 V 54 w(crt)3350 512 y FB([F)-8
22935
 
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_delete_c)q(rt)f
22936
 
Fg(\()p Ff(gn)m(utls)p 1889 512 28 4 v 40 w(pk)m(cs7)p
22937
 
2146 512 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)31 b(in)m(t)g
22938
 
Fe(indx)12 b Fg(\))390 621 y Ff(indx)6 b FB(:)40 b(the)31
22939
 
b(index)f(of)g(the)h(certi\014cate)h(to)f(delete)390
22940
 
772 y(This)23 b(function)h(will)g(delete)i(a)e(certi\014cate)i(from)e
22941
 
(a)g(PK)m(CS7)g(or)g(RF)m(C2630)i(certi\014cate)h(set.)39
22942
 
b(Index)390 881 y(starts)31 b(from)f(0.)41 b(Returns)29
22943
 
b(0)i(on)f(success.)390 1032 y Fn(Returns:)36 b FB(On)20
22944
 
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
22945
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 1247 y Fv(gn)m(utls)p
22946
 
483 1247 37 5 v 55 w(pk)m(cs7)p 832 1247 V 53 w(exp)s(ort)3350
22947
 
1460 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_export)e
22948
 
Fg(\()p Ff(gn)m(utls)p 1679 1460 28 4 v 41 w(pk)m(cs7)p
22949
 
1937 1460 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)565 1569 y(gn)m(utls)p
22950
 
811 1569 V 41 w(x509)p 1035 1569 V 41 w(crt)p 1187 1569
22951
 
V 40 w(fm)m(t)p 1363 1569 V 41 w(t)30 b Fe(format)12
22952
 
b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33
22953
 
b(size)p 2906 1569 V 41 w(t)e(*)565 1679 y Fe(output_data_size)12
22954
 
b Fg(\))390 1789 y Ff(pk)m(cs7)7 b FB(:)42 b(Holds)30
22955
 
b(the)h(pk)m(cs7)g(structure)390 1939 y Ff(format)r FB(:)41
22956
 
b(the)31 b(format)f(of)h(output)f(params.)40 b(One)30
22957
 
b(of)h(PEM)f(or)g(DER.)390 2090 y Ff(output)p 664 2090
22958
 
V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e(structure)g(PEM)h
22959
 
(or)f(DER)g(enco)s(ded)390 2240 y Ff(output)p 664 2240
22960
 
V 40 w(data)p 880 2240 V 40 w(size)5 b FB(:)49 b(holds)34
22961
 
b(the)g(size)h(of)f(output)p 2093 2240 V 39 w(data)h(\(and)f(will)g(b)s
22962
 
(e)f(replaced)i(b)m(y)e(the)i(actual)390 2350 y(size)c(of)g
22963
 
(parameters\))390 2500 y(This)f(function)g(will)g(exp)s(ort)g(the)h(pk)
 
22920
V 53 w(deinit)3350 509 y FB([F)-8 b(unction])-3599 b
 
22921
Fh(void)54 b(gnutls_pkcs7_deinit)d Fg(\()p Ff(gn)m(utls)p
 
22922
1732 509 28 4 v 40 w(pk)m(cs7)p 1989 509 V 41 w(t)31
 
22923
b Fe(pkcs7)12 b Fg(\))390 618 y Ff(pk)m(cs7)7 b FB(:)42
 
22924
b(The)29 b(structure)h(to)h(b)s(e)f(initialized)390 766
 
22925
y(This)g(function)g(will)g(deinitialize)j(a)e(PK)m(CS7)f(structure.)150
 
22926
978 y Fv(gn)m(utls)p 483 978 37 5 v 55 w(pk)m(cs7)p 832
 
22927
978 V 53 w(delete)p 1203 978 V 54 w(crl)3350 1188 y FB([F)-8
 
22928
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_delete_c)q(rl)f
 
22929
Fg(\()p Ff(gn)m(utls)p 1889 1188 28 4 v 40 w(pk)m(cs7)p
 
22930
2146 1188 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)31 b(in)m(t)g
 
22931
Fe(indx)12 b Fg(\))390 1298 y Ff(indx)6 b FB(:)40 b(the)31
 
22932
b(index)f(of)g(the)h(crl)f(to)h(delete)390 1445 y(This)g(function)h
 
22933
(will)h(delete)g(a)f(crl)h(from)e(a)i(PK)m(CS7)f(or)g(RF)m(C2630)i(crl)
 
22934
e(set.)47 b(Index)31 b(starts)h(from)390 1555 y(0.)41
 
22935
b(Returns)30 b(0)g(on)h(success.)390 1703 y Fn(Returns:)36
 
22936
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
22937
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
22938
b(alue.)150 1915 y Fv(gn)m(utls)p 483 1915 37 5 v 55
 
22939
w(pk)m(cs7)p 832 1915 V 53 w(delete)p 1203 1915 V 54
 
22940
w(crt)3350 2125 y FB([F)d(unction])-3599 b Fh(int)53
 
22941
b(gnutls_pkcs7_delete_c)q(rt)f Fg(\()p Ff(gn)m(utls)p
 
22942
1889 2125 28 4 v 40 w(pk)m(cs7)p 2146 2125 V 41 w(t)31
 
22943
b Fe(pkcs7)12 b Ff(,)31 b(in)m(t)g Fe(indx)12 b Fg(\))390
 
22944
2234 y Ff(indx)6 b FB(:)40 b(the)31 b(index)f(of)g(the)h(certi\014cate)
 
22945
h(to)f(delete)390 2382 y(This)23 b(function)h(will)g(delete)i(a)e
 
22946
(certi\014cate)i(from)e(a)g(PK)m(CS7)g(or)g(RF)m(C2630)i(certi\014cate)
 
22947
h(set.)39 b(Index)390 2492 y(starts)31 b(from)f(0.)41
 
22948
b(Returns)29 b(0)i(on)f(success.)390 2639 y Fn(Returns:)36
 
22949
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
22950
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
22951
b(alue.)150 2852 y Fv(gn)m(utls)p 483 2852 37 5 v 55
 
22952
w(pk)m(cs7)p 832 2852 V 53 w(exp)s(ort)3350 3062 y FB([F)d(unction])
 
22953
-3599 b Fh(int)53 b(gnutls_pkcs7_export)e Fg(\()p Ff(gn)m(utls)p
 
22954
1679 3062 28 4 v 41 w(pk)m(cs7)p 1937 3062 V 41 w(t)31
 
22955
b Fe(pkcs7)12 b Ff(,)565 3171 y(gn)m(utls)p 811 3171
 
22956
V 41 w(x509)p 1035 3171 V 41 w(crt)p 1187 3171 V 40 w(fm)m(t)p
 
22957
1363 3171 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)g
 
22958
Fe(output_data)12 b Ff(,)33 b(size)p 2906 3171 V 41 w(t)e(*)565
 
22959
3281 y Fe(output_data_size)12 b Fg(\))390 3390 y Ff(pk)m(cs7)7
 
22960
b FB(:)42 b(Holds)30 b(the)h(pk)m(cs7)g(structure)390
 
22961
3538 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
 
22962
b(One)30 b(of)h(PEM)f(or)g(DER.)390 3686 y Ff(output)p
 
22963
664 3686 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e(structure)g
 
22964
(PEM)h(or)f(DER)g(enco)s(ded)390 3833 y Ff(output)p 664
 
22965
3833 V 40 w(data)p 880 3833 V 40 w(size)5 b FB(:)49 b(holds)34
 
22966
b(the)g(size)h(of)f(output)p 2093 3833 V 39 w(data)h(\(and)f(will)g(b)s
 
22967
(e)f(replaced)i(b)m(y)e(the)i(actual)390 3943 y(size)c(of)g
 
22968
(parameters\))390 4090 y(This)f(function)g(will)g(exp)s(ort)g(the)h(pk)
22964
22969
m(cs7)g(structure)f(to)h(DER)g(or)f(PEM)g(format.)390
22965
 
2651 y(If)23 b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h(long)f(enough)
 
22970
4238 y(If)23 b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h(long)f(enough)
22966
22971
g(to)h(hold)f(the)g(output,)h(then)f(*)p Ft(output_data_size)390
22967
 
2760 y FB(is)30 b(up)s(dated)f(and)h Ft(GNUTLS_E_SHORT_MEMORY_BUF)o
22968
 
(FER)24 b FB(will)31 b(b)s(e)e(returned.)390 2911 y(If)h(the)g
 
22972
4348 y FB(is)30 b(up)s(dated)f(and)h Ft(GNUTLS_E_SHORT_MEMORY_BUF)o
 
22973
(FER)24 b FB(will)31 b(b)s(e)e(returned.)390 4495 y(If)h(the)g
22969
22974
(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g(ha)m(v)m(e)h(a)e
22970
22975
(header)h(of)f Ft(")p FB(BEGIN)h(PK)m(CS7)p Ft(")p FB(.)390
22971
 
3061 y Fn(Return)f(v)-5 b(alue:)41 b FB(In)30 b(case)h(of)g(failure)f
 
22976
4643 y Fn(Return)f(v)-5 b(alue:)41 b FB(In)30 b(case)h(of)g(failure)f
22972
22977
(a)h(negativ)m(e)i(v)-5 b(alue)30 b(will)h(b)s(e)f(returned,)f(and)h(0)
22973
 
h(on)f(success.)150 3277 y Fv(gn)m(utls)p 483 3277 37
22974
 
5 v 55 w(pk)m(cs7)p 832 3277 V 53 w(get)p 1050 3277 V
22975
 
55 w(crl)p 1244 3277 V 53 w(coun)m(t)3350 3489 y FB([F)-8
 
22978
h(on)f(success.)150 4855 y Fv(gn)m(utls)p 483 4855 37
 
22979
5 v 55 w(pk)m(cs7)p 832 4855 V 53 w(get)p 1050 4855 V
 
22980
55 w(crl)p 1244 4855 V 53 w(coun)m(t)3350 5065 y FB([F)-8
22976
22981
b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_get_crl_)q(coun)q(t)f
22977
 
Fg(\()p Ff(gn)m(utls)p 2046 3489 28 4 v 40 w(pk)m(cs7)p
22978
 
2303 3489 V 41 w(t)31 b Fe(pkcs7)12 b Fg(\))390 3599
 
22982
Fg(\()p Ff(gn)m(utls)p 2046 5065 28 4 v 40 w(pk)m(cs7)p
 
22983
2303 5065 V 41 w(t)31 b Fe(pkcs7)12 b Fg(\))390 5175
22979
22984
y FB(This)26 b(function)h(will)h(return)e(the)i(n)m(um)m(b)s(er)e(of)h
22980
22985
(certifcates)j(in)d(the)g(PK)m(CS7)g(or)g(RF)m(C2630)j(crl)d(set.)390
22981
 
3749 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
22986
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
22982
22987
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
22983
 
b(alue.)150 3965 y Fv(gn)m(utls)p 483 3965 37 5 v 55
22984
 
w(pk)m(cs7)p 832 3965 V 53 w(get)p 1050 3965 V 55 w(crl)p
22985
 
1244 3965 V 53 w(ra)m(w)3350 4177 y FB([F)d(unction])-3599
22986
 
b Fh(int)53 b(gnutls_pkcs7_get_crl_)q(raw)f Fg(\()p Ff(gn)m(utls)p
22987
 
1941 4177 28 4 v 41 w(pk)m(cs7)p 2199 4177 V 40 w(t)31
22988
 
b Fe(pkcs7)12 b Ff(,)32 b(in)m(t)f Fe(indx)12 b Ff(,)565
22989
 
4287 y(v)m(oid)31 b(*)g Fe(crl)12 b Ff(,)31 b(size)p
22990
 
1209 4287 V 41 w(t)f(*)h Fe(crl_size)12 b Fg(\))390 4397
22991
 
y Ff(indx)6 b FB(:)40 b(con)m(tains)32 b(the)e(index)g(of)h(the)f(crl)h
22992
 
(to)g(extract)390 4547 y Ff(crl)t FB(:)40 b(the)31 b(con)m(ten)m(ts)h
22993
 
(of)f(the)f(crl)h(will)g(b)s(e)e(copied)i(there)g(\(ma)m(y)g(b)s(e)f(n)
22994
 
m(ull\))390 4698 y Ff(crl)p 497 4698 V 40 w(size)5 b
22995
 
FB(:)42 b(should)29 b(hold)h(the)h(size)g(of)g(the)f(crl)390
22996
 
4848 y(This)g(function)g(will)g(return)g(a)g(crl)h(of)f(the)h(PK)m(CS7)
22997
 
f(or)g(RF)m(C2630)j(crl)d(set.)390 4999 y Fn(Returns:)36
22998
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
22999
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23000
 
b(alue.)390 5108 y(If)38 b(the)h(pro)m(vided)g(bu\013er)f(is)h(not)g
23001
 
(long)g(enough,)i(then)e Ft(crl_size)d FB(is)j(up)s(dated)f(and)g
23002
 
Ft(GNUTLS_)390 5218 y(E_SHORT_MEMORY_BUFFER)d FB(is)41
23003
 
b(returned.)71 b(After)41 b(the)g(last)g(crl)g(has)g(b)s(een)f(read)g
23004
 
Ft(GNUTLS_E_)390 5327 y(REQUESTED_DATA_NOT_AVAIL)o(ABLE)24
23005
 
b FB(will)30 b(b)s(e)g(returned.)p eop end
 
22988
b(alue.)p eop end
23006
22989
%%Page: 187 193
23007
22990
TeXDict begin 187 192 bop 150 -116 a FB(Chapter)30 b(9:)41
23008
22991
b(F)-8 b(unction)31 b(Reference)2237 b(187)150 299 y
23009
22992
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs7)p 832 299
23010
 
V 53 w(get)p 1050 299 V 55 w(crt)p 1258 299 V 53 w(coun)m(t)3350
23011
 
494 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_get_crt_)q
23012
 
(coun)q(t)f Fg(\()p Ff(gn)m(utls)p 2046 494 28 4 v 40
23013
 
w(pk)m(cs7)p 2303 494 V 41 w(t)31 b Fe(pkcs7)12 b Fg(\))390
23014
 
604 y FB(This)27 b(function)h(will)g(return)f(the)h(n)m(um)m(b)s(er)e
 
22993
V 53 w(get)p 1050 299 V 55 w(crl)p 1244 299 V 53 w(ra)m(w)3350
 
22994
494 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_get_crl_)q
 
22995
(raw)f Fg(\()p Ff(gn)m(utls)p 1941 494 28 4 v 41 w(pk)m(cs7)p
 
22996
2199 494 V 40 w(t)31 b Fe(pkcs7)12 b Ff(,)32 b(in)m(t)f
 
22997
Fe(indx)12 b Ff(,)565 604 y(v)m(oid)31 b(*)g Fe(crl)12
 
22998
b Ff(,)31 b(size)p 1209 604 V 41 w(t)f(*)h Fe(crl_size)12
 
22999
b Fg(\))390 713 y Ff(indx)6 b FB(:)40 b(con)m(tains)32
 
23000
b(the)e(index)g(of)h(the)f(crl)h(to)g(extract)390 847
 
23001
y Ff(crl)t FB(:)40 b(the)31 b(con)m(ten)m(ts)h(of)f(the)f(crl)h(will)g
 
23002
(b)s(e)e(copied)i(there)g(\(ma)m(y)g(b)s(e)f(n)m(ull\))390
 
23003
981 y Ff(crl)p 497 981 V 40 w(size)5 b FB(:)42 b(should)29
 
23004
b(hold)h(the)h(size)g(of)g(the)f(crl)390 1114 y(This)g(function)g(will)
 
23005
g(return)g(a)g(crl)h(of)f(the)h(PK)m(CS7)f(or)g(RF)m(C2630)j(crl)d
 
23006
(set.)390 1248 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23007
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
23008
(negativ)m(e)h(error)d(v)-5 b(alue.)390 1358 y(If)38
 
23009
b(the)h(pro)m(vided)g(bu\013er)f(is)h(not)g(long)g(enough,)i(then)e
 
23010
Ft(crl_size)d FB(is)j(up)s(dated)f(and)g Ft(GNUTLS_)390
 
23011
1467 y(E_SHORT_MEMORY_BUFFER)d FB(is)41 b(returned.)71
 
23012
b(After)41 b(the)g(last)g(crl)g(has)g(b)s(een)f(read)g
 
23013
Ft(GNUTLS_E_)390 1577 y(REQUESTED_DATA_NOT_AVAIL)o(ABLE)24
 
23014
b FB(will)30 b(b)s(e)g(returned.)150 1775 y Fv(gn)m(utls)p
 
23015
483 1775 37 5 v 55 w(pk)m(cs7)p 832 1775 V 53 w(get)p
 
23016
1050 1775 V 55 w(crt)p 1258 1775 V 53 w(coun)m(t)3350
 
23017
1970 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_get_crt_)q
 
23018
(coun)q(t)f Fg(\()p Ff(gn)m(utls)p 2046 1970 28 4 v 40
 
23019
w(pk)m(cs7)p 2303 1970 V 41 w(t)31 b Fe(pkcs7)12 b Fg(\))390
 
23020
2079 y FB(This)27 b(function)h(will)g(return)f(the)h(n)m(um)m(b)s(er)e
23015
23021
(of)i(certifcates)i(in)e(the)g(PK)m(CS7)f(or)h(RF)m(C2630)i(certi\014-)
23016
 
390 713 y(cate)i(set.)390 847 y Fn(Returns:)k FB(On)20
 
23022
390 2189 y(cate)i(set.)390 2323 y Fn(Returns:)k FB(On)20
23017
23023
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
23018
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 1045 y Fv(gn)m(utls)p
23019
 
483 1045 37 5 v 55 w(pk)m(cs7)p 832 1045 V 53 w(get)p
23020
 
1050 1045 V 55 w(crt)p 1258 1045 V 53 w(ra)m(w)3350 1240
 
23024
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 2520 y Fv(gn)m(utls)p
 
23025
483 2520 37 5 v 55 w(pk)m(cs7)p 832 2520 V 53 w(get)p
 
23026
1050 2520 V 55 w(crt)p 1258 2520 V 53 w(ra)m(w)3350 2716
23021
23027
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_get_crt_)q(raw)f
23022
 
Fg(\()p Ff(gn)m(utls)p 1941 1240 28 4 v 41 w(pk)m(cs7)p
23023
 
2199 1240 V 40 w(t)31 b Fe(pkcs7)12 b Ff(,)32 b(in)m(t)f
23024
 
Fe(indx)12 b Ff(,)565 1350 y(v)m(oid)31 b(*)g Fe(certificate)12
23025
 
b Ff(,)33 b(size)p 1627 1350 V 41 w(t)e(*)g Fe(certificate_size)12
23026
 
b Fg(\))390 1459 y Ff(indx)6 b FB(:)40 b(con)m(tains)32
 
23028
Fg(\()p Ff(gn)m(utls)p 1941 2716 28 4 v 41 w(pk)m(cs7)p
 
23029
2199 2716 V 40 w(t)31 b Fe(pkcs7)12 b Ff(,)32 b(in)m(t)f
 
23030
Fe(indx)12 b Ff(,)565 2825 y(v)m(oid)31 b(*)g Fe(certificate)12
 
23031
b Ff(,)33 b(size)p 1627 2825 V 41 w(t)e(*)g Fe(certificate_size)12
 
23032
b Fg(\))390 2935 y Ff(indx)6 b FB(:)40 b(con)m(tains)32
23027
23033
b(the)e(index)g(of)h(the)f(certi\014cate)j(to)e(extract)390
23028
 
1593 y Ff(certi\014cate)5 b FB(:)43 b(the)30 b(con)m(ten)m(ts)j(of)d
 
23034
3068 y Ff(certi\014cate)5 b FB(:)43 b(the)30 b(con)m(ten)m(ts)j(of)d
23029
23035
(the)h(certi\014cate)h(will)f(b)s(e)f(copied)g(there)h(\(ma)m(y)g(b)s
23030
 
(e)f(n)m(ull\))390 1727 y Ff(certi\014cate)p 783 1727
 
23036
(e)f(n)m(ull\))390 3202 y Ff(certi\014cate)p 783 3202
23031
23037
V 42 w(size)5 b FB(:)42 b(should)29 b(hold)h(the)h(size)g(of)g(the)f
23032
 
(certi\014cate)390 1861 y(This)g(function)g(will)g(return)g(a)g
 
23038
(certi\014cate)390 3336 y(This)g(function)g(will)g(return)g(a)g
23033
23039
(certi\014cate)j(of)d(the)h(PK)m(CS7)f(or)g(RF)m(C2630)j(certi\014cate)
23034
 
f(set.)390 1995 y(After)j(the)g(last)g(certi\014cate)i(has)d(b)s(een)g
 
23040
f(set.)390 3470 y(After)j(the)g(last)g(certi\014cate)i(has)d(b)s(een)g
23035
23041
(read)g Ft(GNUTLS_E_REQUESTED_DATA_N)o(OT_)o(AVAI)o(LABL)o(E)390
23036
 
2104 y FB(will)d(b)s(e)e(returned.)390 2238 y Fn(Returns:)36
 
23042
3579 y FB(will)d(b)s(e)e(returned.)390 3713 y Fn(Returns:)36
23037
23043
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
23038
23044
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23039
 
b(alue.)390 2347 y(If)38 b(the)g(pro)m(vided)g(bu\013er)f(is)h(not)g
 
23045
b(alue.)390 3822 y(If)38 b(the)g(pro)m(vided)g(bu\013er)f(is)h(not)g
23040
23046
(long)h(enough,)h(then)e Ft(certificate_size)c FB(is)k(up)s(dated)f
23041
 
(and)390 2457 y Ft(GNUTLS_E_SHORT_MEMORY_BU)o(FFER)24
23042
 
b FB(is)30 b(returned.)150 2655 y Fv(gn)m(utls)p 483
23043
 
2655 37 5 v 55 w(pk)m(cs7)p 832 2655 V 53 w(imp)s(ort)3350
23044
 
2850 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_import)e
23045
 
Fg(\()p Ff(gn)m(utls)p 1679 2850 28 4 v 41 w(pk)m(cs7)p
23046
 
1937 2850 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)31 b(const)565
23047
 
2960 y(gn)m(utls)p 811 2960 V 41 w(datum)p 1110 2960
 
23047
(and)390 3932 y Ft(GNUTLS_E_SHORT_MEMORY_BU)o(FFER)24
 
23048
b FB(is)30 b(returned.)150 4130 y Fv(gn)m(utls)p 483
 
23049
4130 37 5 v 55 w(pk)m(cs7)p 832 4130 V 53 w(imp)s(ort)3350
 
23050
4325 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_import)e
 
23051
Fg(\()p Ff(gn)m(utls)p 1679 4325 28 4 v 41 w(pk)m(cs7)p
 
23052
1937 4325 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)31 b(const)565
 
23053
4435 y(gn)m(utls)p 811 4435 V 41 w(datum)p 1110 4435
23048
23054
V 39 w(t)g(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1807
23049
 
2960 V 40 w(x509)p 2030 2960 V 42 w(crt)p 2183 2960 V
23050
 
40 w(fm)m(t)p 2359 2960 V 40 w(t)g Fe(format)12 b Fg(\))390
23051
 
3069 y Ff(pk)m(cs7)7 b FB(:)42 b(The)29 b(structure)h(to)h(store)g(the)
23052
 
g(parsed)f(PK)m(CS7.)390 3203 y Ff(data)p FB(:)41 b(The)30
23053
 
b(DER)h(or)f(PEM)h(enco)s(ded)f(PK)m(CS7.)390 3337 y
 
23055
4435 V 40 w(x509)p 2030 4435 V 42 w(crt)p 2183 4435 V
 
23056
40 w(fm)m(t)p 2359 4435 V 40 w(t)g Fe(format)12 b Fg(\))390
 
23057
4544 y Ff(pk)m(cs7)7 b FB(:)42 b(The)29 b(structure)h(to)h(store)g(the)
 
23058
g(parsed)f(PK)m(CS7.)390 4678 y Ff(data)p FB(:)41 b(The)30
 
23059
b(DER)h(or)f(PEM)h(enco)s(ded)f(PK)m(CS7.)390 4812 y
23054
23060
Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM)390
23055
 
3471 y(This)41 b(function)h(will)g(con)m(v)m(ert)h(the)f(giv)m(en)h
 
23061
4945 y(This)41 b(function)h(will)g(con)m(v)m(ert)h(the)f(giv)m(en)h
23056
23062
(DER)f(or)g(PEM)g(enco)s(ded)f(PK)m(CS7)h(to)h(the)f(nativ)m(e)390
23057
 
3580 y Ft(gnutls_pkcs7_t)26 b FB(format.)42 b(The)29
 
23063
5055 y Ft(gnutls_pkcs7_t)26 b FB(format.)42 b(The)29
23058
23064
b(output)h(will)h(b)s(e)f(stored)g(in)g('pk)m(cs7'.)390
23059
 
3714 y(If)g(the)g(PK)m(CS7)g(is)h(PEM)f(enco)s(ded)g(it)h(should)f(ha)m
 
23065
5189 y(If)g(the)g(PK)m(CS7)g(is)h(PEM)f(enco)s(ded)g(it)h(should)f(ha)m
23060
23066
(v)m(e)h(a)g(header)f(of)h Ft(")p FB(PK)m(CS7)p Ft(")p
23061
 
FB(.)390 3848 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23067
FB(.)390 5322 y Fn(Returns:)36 b FB(On)20 b(success,)j
23062
23068
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23063
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4046 y Fv(gn)m(utls)p
23064
 
483 4046 37 5 v 55 w(pk)m(cs7)p 832 4046 V 53 w(init)3350
23065
 
4241 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_init)e
23066
 
Fg(\()p Ff(gn)m(utls)p 1575 4241 28 4 v 41 w(pk)m(cs7)p
23067
 
1833 4241 V 40 w(t)31 b(*)g Fe(pkcs7)12 b Fg(\))390 4351
23068
 
y Ff(pk)m(cs7)7 b FB(:)42 b(The)29 b(structure)h(to)h(b)s(e)f
23069
 
(initialized)390 4484 y(This)37 b(function)g(will)g(initialize)j(a)e
23070
 
(PK)m(CS7)f(structure.)61 b(PK)m(CS7)37 b(structures)g(usually)g(con)m
23071
 
(tain)390 4594 y(lists)31 b(of)f(X.509)j(Certi\014cates)e(and)f(X.509)i
23072
 
(Certi\014cate)g(rev)m(o)s(cation)g(lists.)390 4728 y
23073
 
Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23074
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23075
 
b(alue.)150 4925 y Fv(gn)m(utls)p 483 4925 37 5 v 55
23076
 
w(pk)m(cs7)p 832 4925 V 53 w(set)p 1037 4925 V 55 w(crl)p
23077
 
1231 4925 V 53 w(ra)m(w)3350 5121 y FB([F)d(unction])-3599
23078
 
b Fh(int)53 b(gnutls_pkcs7_set_crl_)q(raw)f Fg(\()p Ff(gn)m(utls)p
23079
 
1941 5121 28 4 v 41 w(pk)m(cs7)p 2199 5121 V 40 w(t)31
23080
 
b Fe(pkcs7)12 b Ff(,)32 b(const)565 5230 y(gn)m(utls)p
23081
 
811 5230 V 41 w(datum)p 1110 5230 V 39 w(t)f(*)g Fe(crl)12
23082
 
b Fg(\))390 5340 y Ff(crl)t FB(:)40 b(the)31 b(DER)g(enco)s(ded)f(crl)g
23083
 
(to)h(b)s(e)f(added)p eop end
 
23069
(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
23084
23070
%%Page: 188 194
23085
23071
TeXDict begin 188 193 bop 150 -116 a FB(Chapter)30 b(9:)41
23086
 
b(F)-8 b(unction)31 b(Reference)2237 b(188)390 299 y(This)30
23087
 
b(function)g(will)g(add)g(a)h(crl)f(to)i(the)e(PK)m(CS7)g(or)g(RF)m
23088
 
(C2630)j(crl)e(set.)390 453 y Fn(Returns:)36 b FB(On)20
23089
 
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
23090
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 673 y Fv(gn)m(utls)p
23091
 
483 673 37 5 v 55 w(pk)m(cs7)p 832 673 V 53 w(set)p 1037
23092
 
673 V 55 w(crl)3350 890 y FB([F)d(unction])-3599 b Fh(int)53
23093
 
b(gnutls_pkcs7_set_crl)f Fg(\()p Ff(gn)m(utls)p 1732
23094
 
890 28 4 v 40 w(pk)m(cs7)p 1989 890 V 41 w(t)31 b Fe(pkcs7)12
23095
 
b Ff(,)31 b(gn)m(utls)p 2664 890 V 41 w(x509)p 2888 890
23096
 
V 41 w(crl)p 3030 890 V 40 w(t)565 999 y Fe(crl)12 b
23097
 
Fg(\))390 1109 y Ff(crl)t FB(:)40 b(the)31 b(DER)g(enco)s(ded)f(crl)g
23098
 
(to)h(b)s(e)f(added)390 1263 y(This)g(function)g(will)g(add)g(a)h
23099
 
(parsed)f(CRL)f(to)i(the)g(PK)m(CS7)f(or)g(RF)m(C2630)j(crl)d(set.)390
23100
 
1418 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23101
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23102
 
b(alue.)150 1637 y Fv(gn)m(utls)p 483 1637 37 5 v 55
23103
 
w(pk)m(cs7)p 832 1637 V 53 w(set)p 1037 1637 V 55 w(crt)p
23104
 
1245 1637 V 53 w(ra)m(w)3350 1854 y FB([F)d(unction])-3599
 
23072
b(F)-8 b(unction)31 b(Reference)2237 b(188)150 299 y
 
23073
Fv(gn)m(utls)p 483 299 37 5 v 55 w(pk)m(cs7)p 832 299
 
23074
V 53 w(init)3350 500 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
23075
b(gnutls_pkcs7_init)e Fg(\()p Ff(gn)m(utls)p 1575 500
 
23076
28 4 v 41 w(pk)m(cs7)p 1833 500 V 40 w(t)31 b(*)g Fe(pkcs7)12
 
23077
b Fg(\))390 610 y Ff(pk)m(cs7)7 b FB(:)42 b(The)29 b(structure)h(to)h
 
23078
(b)s(e)f(initialized)390 749 y(This)37 b(function)g(will)g(initialize)j
 
23079
(a)e(PK)m(CS7)f(structure.)61 b(PK)m(CS7)37 b(structures)g(usually)g
 
23080
(con)m(tain)390 858 y(lists)31 b(of)f(X.509)j(Certi\014cates)e(and)f
 
23081
(X.509)i(Certi\014cate)g(rev)m(o)s(cation)g(lists.)390
 
23082
997 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23083
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23084
b(alue.)150 1201 y Fv(gn)m(utls)p 483 1201 37 5 v 55
 
23085
w(pk)m(cs7)p 832 1201 V 53 w(set)p 1037 1201 V 55 w(crl)p
 
23086
1231 1201 V 53 w(ra)m(w)3350 1402 y FB([F)d(unction])-3599
 
23087
b Fh(int)53 b(gnutls_pkcs7_set_crl_)q(raw)f Fg(\()p Ff(gn)m(utls)p
 
23088
1941 1402 28 4 v 41 w(pk)m(cs7)p 2199 1402 V 40 w(t)31
 
23089
b Fe(pkcs7)12 b Ff(,)32 b(const)565 1512 y(gn)m(utls)p
 
23090
811 1512 V 41 w(datum)p 1110 1512 V 39 w(t)f(*)g Fe(crl)12
 
23091
b Fg(\))390 1622 y Ff(crl)t FB(:)40 b(the)31 b(DER)g(enco)s(ded)f(crl)g
 
23092
(to)h(b)s(e)f(added)390 1761 y(This)g(function)g(will)g(add)g(a)h(crl)f
 
23093
(to)i(the)e(PK)m(CS7)g(or)g(RF)m(C2630)j(crl)e(set.)390
 
23094
1900 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23095
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23096
b(alue.)150 2103 y Fv(gn)m(utls)p 483 2103 37 5 v 55
 
23097
w(pk)m(cs7)p 832 2103 V 53 w(set)p 1037 2103 V 55 w(crl)3350
 
23098
2305 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_pkcs7_set_crl)f
 
23099
Fg(\()p Ff(gn)m(utls)p 1732 2305 28 4 v 40 w(pk)m(cs7)p
 
23100
1989 2305 V 41 w(t)31 b Fe(pkcs7)12 b Ff(,)31 b(gn)m(utls)p
 
23101
2664 2305 V 41 w(x509)p 2888 2305 V 41 w(crl)p 3030 2305
 
23102
V 40 w(t)565 2414 y Fe(crl)12 b Fg(\))390 2524 y Ff(crl)t
 
23103
FB(:)40 b(the)31 b(DER)g(enco)s(ded)f(crl)g(to)h(b)s(e)f(added)390
 
23104
2663 y(This)g(function)g(will)g(add)g(a)h(parsed)f(CRL)f(to)i(the)g(PK)
 
23105
m(CS7)f(or)g(RF)m(C2630)j(crl)d(set.)390 2802 y Fn(Returns:)36
 
23106
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
23107
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23108
b(alue.)150 3006 y Fv(gn)m(utls)p 483 3006 37 5 v 55
 
23109
w(pk)m(cs7)p 832 3006 V 53 w(set)p 1037 3006 V 55 w(crt)p
 
23110
1245 3006 V 53 w(ra)m(w)3350 3207 y FB([F)d(unction])-3599
23105
23111
b Fh(int)53 b(gnutls_pkcs7_set_crt_)q(raw)f Fg(\()p Ff(gn)m(utls)p
23106
 
1941 1854 28 4 v 41 w(pk)m(cs7)p 2199 1854 V 40 w(t)31
23107
 
b Fe(pkcs7)12 b Ff(,)32 b(const)565 1964 y(gn)m(utls)p
23108
 
811 1964 V 41 w(datum)p 1110 1964 V 39 w(t)f(*)g Fe(crt)12
23109
 
b Fg(\))390 2073 y Ff(crt)r FB(:)41 b(the)31 b(DER)f(enco)s(ded)g
23110
 
(certi\014cate)j(to)e(b)s(e)e(added)390 2228 y(This)h(function)g(will)g
 
23112
1941 3207 28 4 v 41 w(pk)m(cs7)p 2199 3207 V 40 w(t)31
 
23113
b Fe(pkcs7)12 b Ff(,)32 b(const)565 3316 y(gn)m(utls)p
 
23114
811 3316 V 41 w(datum)p 1110 3316 V 39 w(t)f(*)g Fe(crt)12
 
23115
b Fg(\))390 3426 y Ff(crt)r FB(:)41 b(the)31 b(DER)f(enco)s(ded)g
 
23116
(certi\014cate)j(to)e(b)s(e)e(added)390 3565 y(This)h(function)g(will)g
23111
23117
(add)g(a)h(certi\014cate)h(to)f(the)g(PK)m(CS7)f(or)g(RF)m(C2630)j
23112
 
(certi\014cate)f(set.)390 2382 y Fn(Returns:)k FB(On)20
 
23118
(certi\014cate)f(set.)390 3704 y Fn(Returns:)k FB(On)20
23113
23119
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
23114
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 2601 y Fv(gn)m(utls)p
23115
 
483 2601 37 5 v 55 w(pk)m(cs7)p 832 2601 V 53 w(set)p
23116
 
1037 2601 V 55 w(crt)3350 2818 y FB([F)d(unction])-3599
 
23120
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 3908 y Fv(gn)m(utls)p
 
23121
483 3908 37 5 v 55 w(pk)m(cs7)p 832 3908 V 53 w(set)p
 
23122
1037 3908 V 55 w(crt)3350 4109 y FB([F)d(unction])-3599
23117
23123
b Fh(int)53 b(gnutls_pkcs7_set_crt)f Fg(\()p Ff(gn)m(utls)p
23118
 
1732 2818 28 4 v 40 w(pk)m(cs7)p 1989 2818 V 41 w(t)31
23119
 
b Fe(pkcs7)12 b Ff(,)31 b(gn)m(utls)p 2664 2818 V 41
23120
 
w(x509)p 2888 2818 V 41 w(crt)p 3040 2818 V 41 w(t)565
23121
 
2928 y Fe(crt)12 b Fg(\))390 3037 y Ff(crt)r FB(:)41
23122
 
b(the)31 b(certi\014cate)h(to)f(b)s(e)f(copied.)390 3192
 
23124
1732 4109 28 4 v 40 w(pk)m(cs7)p 1989 4109 V 41 w(t)31
 
23125
b Fe(pkcs7)12 b Ff(,)31 b(gn)m(utls)p 2664 4109 V 41
 
23126
w(x509)p 2888 4109 V 41 w(crt)p 3040 4109 V 41 w(t)565
 
23127
4219 y Fe(crt)12 b Fg(\))390 4328 y Ff(crt)r FB(:)41
 
23128
b(the)31 b(certi\014cate)h(to)f(b)s(e)f(copied.)390 4467
23123
23129
y(This)g(function)g(will)i(add)e(a)h(parsed)f(certi\014cate)j(to)e(the)
23124
23130
g(PK)m(CS7)g(or)f(RF)m(C2630)j(certi\014cate)g(set.)390
23125
 
3302 y(This)d(is)g(a)h(wrapp)s(er)d(function)i(o)m(v)m(er)i
23126
 
Ft(gnutls_pkcs7_set_crt_raw\()o(\))24 b FB(.)390 3456
 
23131
4577 y(This)d(is)g(a)h(wrapp)s(er)d(function)i(o)m(v)m(er)i
 
23132
Ft(gnutls_pkcs7_set_crt_raw\()o(\))24 b FB(.)390 4716
23127
23133
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23128
23134
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23129
 
b(alue.)150 3675 y Fv(gn)m(utls)p 483 3675 37 5 v 55
23130
 
w(x509)p 786 3675 V 54 w(crl)p 979 3675 V 54 w(c)m(hec)m(k)p
23131
 
1326 3675 V 52 w(issuer)3350 3892 y FB([F)d(unction])-3599
 
23135
b(alue.)150 4920 y Fv(gn)m(utls)p 483 4920 37 5 v 55
 
23136
w(x509)p 786 4920 V 54 w(crl)p 979 4920 V 54 w(c)m(hec)m(k)p
 
23137
1326 4920 V 52 w(issuer)3350 5121 y FB([F)d(unction])-3599
23132
23138
b Fh(int)53 b(gnutls_x509_crl_check)q(_iss)q(uer)f Fg(\()p
23133
 
Ff(gn)m(utls)p 2150 3892 28 4 v 41 w(x509)p 2374 3892
23134
 
V 41 w(crl)p 2516 3892 V 41 w(t)30 b Fe(cert)12 b Ff(,)565
23135
 
4002 y(gn)m(utls)p 811 4002 V 41 w(x509)p 1035 4002 V
23136
 
41 w(crt)p 1187 4002 V 40 w(t)31 b Fe(issuer)12 b Fg(\))390
23137
 
4111 y Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(a)f
23138
 
(p)s(ossible)g(issuer)390 4266 y(This)j(function)h(will)g(c)m(hec)m(k)i
23139
 
(if)e(the)g(giv)m(en)h(CRL)e(w)m(as)i(issued)e(b)m(y)h(the)g(giv)m(en)h
23140
 
(issuer)f(certi\014cate.)390 4376 y(It)f(will)f(return)g(true)g(\(1\))h
23141
 
(if)g(the)f(giv)m(en)i(CRL)d(w)m(as)i(issued)f(b)m(y)g(the)h(giv)m(en)g
23142
 
(issuer,)g(and)f(false)h(\(0\))390 4485 y(if)d(not.)390
23143
 
4640 y(A)g(negativ)m(e)j(v)-5 b(alue)31 b(is)f(returned)g(in)g(case)h
23144
 
(of)g(an)f(error.)150 4859 y Fv(gn)m(utls)p 483 4859
23145
 
37 5 v 55 w(x509)p 786 4859 V 54 w(crl)p 979 4859 V 54
23146
 
w(deinit)3350 5076 y FB([F)-8 b(unction])-3599 b Fh(void)54
23147
 
b(gnutls_x509_crl_deinit)e Fg(\()p Ff(gn)m(utls)p 1889
23148
 
5076 28 4 v 40 w(x509)p 2112 5076 V 42 w(crl)p 2255 5076
23149
 
V 40 w(t)31 b Fe(crl)12 b Fg(\))390 5185 y Ff(crl)t FB(:)40
23150
 
b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390 5340
23151
 
y(This)g(function)g(will)g(deinitialize)j(a)e(CRL)e(structure.)p
23152
 
eop end
 
23139
Ff(gn)m(utls)p 2150 5121 28 4 v 41 w(x509)p 2374 5121
 
23140
V 41 w(crl)p 2516 5121 V 41 w(t)30 b Fe(cert)12 b Ff(,)565
 
23141
5230 y(gn)m(utls)p 811 5230 V 41 w(x509)p 1035 5230 V
 
23142
41 w(crt)p 1187 5230 V 40 w(t)31 b Fe(issuer)12 b Fg(\))390
 
23143
5340 y Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(a)f
 
23144
(p)s(ossible)g(issuer)p eop end
23153
23145
%%Page: 189 195
23154
23146
TeXDict begin 189 194 bop 150 -116 a FB(Chapter)30 b(9:)41
23155
 
b(F)-8 b(unction)31 b(Reference)2237 b(189)150 299 y
23156
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23157
 
w(crl)p 979 299 V 54 w(exp)s(ort)3350 492 y FB([F)-8
23158
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_expor)q(t)e
23159
 
Fg(\()p Ff(gn)m(utls)p 1836 492 28 4 v 41 w(x509)p 2060
23160
 
492 V 41 w(crl)p 2202 492 V 41 w(t)30 b Fe(crl)12 b Ff(,)565
23161
 
602 y(gn)m(utls)p 811 602 V 41 w(x509)p 1035 602 V 41
23162
 
w(crt)p 1187 602 V 40 w(fm)m(t)p 1363 602 V 41 w(t)30
23163
 
b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12
23164
 
b Ff(,)33 b(size)p 2906 602 V 41 w(t)e(*)565 711 y Fe(output_data_size)
23165
 
12 b Fg(\))390 821 y Ff(crl)t FB(:)40 b(Holds)31 b(the)g(rev)m(o)s
23166
 
(cation)h(list)390 954 y Ff(format)r FB(:)41 b(the)31
 
23147
b(F)-8 b(unction)31 b(Reference)2237 b(189)390 299 y(This)33
 
23148
b(function)h(will)g(c)m(hec)m(k)i(if)e(the)g(giv)m(en)h(CRL)e(w)m(as)i
 
23149
(issued)e(b)m(y)h(the)g(giv)m(en)h(issuer)f(certi\014cate.)390
 
23150
408 y(It)f(will)f(return)g(true)g(\(1\))h(if)g(the)f(giv)m(en)i(CRL)d
 
23151
(w)m(as)i(issued)f(b)m(y)g(the)h(giv)m(en)g(issuer,)g(and)f(false)h
 
23152
(\(0\))390 518 y(if)d(not.)390 658 y(A)g(negativ)m(e)j(v)-5
 
23153
b(alue)31 b(is)f(returned)g(in)g(case)h(of)g(an)f(error.)150
 
23154
863 y Fv(gn)m(utls)p 483 863 37 5 v 55 w(x509)p 786 863
 
23155
V 54 w(crl)p 979 863 V 54 w(deinit)3350 1065 y FB([F)-8
 
23156
b(unction])-3599 b Fh(void)54 b(gnutls_x509_crl_deinit)e
 
23157
Fg(\()p Ff(gn)m(utls)p 1889 1065 28 4 v 40 w(x509)p 2112
 
23158
1065 V 42 w(crl)p 2255 1065 V 40 w(t)31 b Fe(crl)12 b
 
23159
Fg(\))390 1174 y Ff(crl)t FB(:)40 b(The)30 b(structure)g(to)h(b)s(e)f
 
23160
(initialized)390 1314 y(This)g(function)g(will)g(deinitialize)j(a)e
 
23161
(CRL)e(structure.)150 1519 y Fv(gn)m(utls)p 483 1519
 
23162
37 5 v 55 w(x509)p 786 1519 V 54 w(crl)p 979 1519 V 54
 
23163
w(exp)s(ort)3350 1721 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
23164
b(gnutls_x509_crl_expor)q(t)e Fg(\()p Ff(gn)m(utls)p
 
23165
1836 1721 28 4 v 41 w(x509)p 2060 1721 V 41 w(crl)p 2202
 
23166
1721 V 41 w(t)30 b Fe(crl)12 b Ff(,)565 1831 y(gn)m(utls)p
 
23167
811 1831 V 41 w(x509)p 1035 1831 V 41 w(crt)p 1187 1831
 
23168
V 40 w(fm)m(t)p 1363 1831 V 41 w(t)30 b Fe(format)12
 
23169
b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33
 
23170
b(size)p 2906 1831 V 41 w(t)e(*)565 1940 y Fe(output_data_size)12
 
23171
b Fg(\))390 2050 y Ff(crl)t FB(:)40 b(Holds)31 b(the)g(rev)m(o)s
 
23172
(cation)h(list)390 2190 y Ff(format)r FB(:)41 b(the)31
23167
23173
b(format)f(of)h(output)f(params.)40 b(One)30 b(of)h(PEM)f(or)g(DER.)390
23168
 
1086 y Ff(output)p 664 1086 V 40 w(data)p FB(:)41 b(will)31
 
23174
2330 y Ff(output)p 664 2330 V 40 w(data)p FB(:)41 b(will)31
23169
23175
b(con)m(tain)h(a)e(priv)-5 b(ate)31 b(k)m(ey)g(PEM)g(or)f(DER)h(enco)s
23170
 
(ded)390 1219 y Ff(output)p 664 1219 V 40 w(data)p 880
23171
 
1219 V 40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
23172
 
2093 1219 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
23173
 
(actual)390 1329 y(size)c(of)g(parameters\))390 1461
 
23176
(ded)390 2470 y Ff(output)p 664 2470 V 40 w(data)p 880
 
23177
2470 V 40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
 
23178
2093 2470 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
23179
(actual)390 2579 y(size)c(of)g(parameters\))390 2719
23174
23180
y(This)f(function)g(will)g(exp)s(ort)g(the)h(rev)m(o)s(cation)h(list)f
23175
 
(to)g(DER)g(or)f(PEM)h(format.)390 1594 y(If)91 b(the)g(bu\013er)f(pro)
 
23181
(to)g(DER)g(or)f(PEM)h(format.)390 2859 y(If)91 b(the)g(bu\013er)f(pro)
23176
23182
m(vided)h(is)g(not)h(long)g(enough)f(to)h(hold)f(the)g(output,)106
23177
 
b(then)390 1704 y(GNUTLS)p 777 1704 V 40 w(E)p 879 1704
23178
 
V 40 w(SHOR)-8 b(T)p 1234 1704 V 39 w(MEMOR)g(Y)p 1699
23179
 
1704 V 41 w(BUFFER)31 b(will)g(b)s(e)f(returned.)390
23180
 
1836 y(If)g(the)g(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g(ha)m
 
23183
b(then)390 2969 y(GNUTLS)p 777 2969 V 40 w(E)p 879 2969
 
23184
V 40 w(SHOR)-8 b(T)p 1234 2969 V 39 w(MEMOR)g(Y)p 1699
 
23185
2969 V 41 w(BUFFER)31 b(will)g(b)s(e)f(returned.)390
 
23186
3109 y(If)g(the)g(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g(ha)m
23181
23187
(v)m(e)h(a)e(header)h(of)f Ft(")p FB(BEGIN)h(X509)h(CRL)p
23182
 
Ft(")p FB(.)390 1969 y Fn(Returns:)k FB(On)20 b(success,)j
 
23188
Ft(")p FB(.)390 3248 y Fn(Returns:)k FB(On)20 b(success,)j
23183
23189
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23184
 
(negativ)m(e)h(error)d(v)-5 b(alue.)390 2079 y(and)30
 
23190
(negativ)m(e)h(error)d(v)-5 b(alue.)390 3358 y(and)30
23185
23191
b(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(failure.)150
23186
 
2274 y Fv(gn)m(utls)p 483 2274 37 5 v 55 w(x509)p 786
23187
 
2274 V 54 w(crl)p 979 2274 V 54 w(get)p 1198 2274 V 54
23188
 
w(crt)p 1405 2274 V 54 w(coun)m(t)3350 2468 y FB([F)-8
 
23192
3563 y Fv(gn)m(utls)p 483 3563 37 5 v 55 w(x509)p 786
 
23193
3563 V 54 w(crl)p 979 3563 V 54 w(get)p 1198 3563 V 54
 
23194
w(crt)p 1405 3563 V 54 w(coun)m(t)3350 3765 y FB([F)-8
23189
23195
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_c)q(rt_c)q(oun)q(t)e
23190
 
Fg(\()p Ff(gn)m(utls)p 2202 2468 28 4 v 41 w(x509)p 2426
23191
 
2468 V 42 w(crl)p 2569 2468 V 40 w(t)30 b Fe(crl)12 b
23192
 
Fg(\))390 2577 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
23193
 
Ft(gnutls_x509_crl_t)c FB(structure)390 2710 y(This)k(function)g(will)g
 
23196
Fg(\()p Ff(gn)m(utls)p 2202 3765 28 4 v 41 w(x509)p 2426
 
23197
3765 V 42 w(crl)p 2569 3765 V 40 w(t)30 b Fe(crl)12 b
 
23198
Fg(\))390 3874 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
 
23199
Ft(gnutls_x509_crl_t)c FB(structure)390 4014 y(This)k(function)g(will)g
23194
23200
(return)g(the)g(n)m(um)m(b)s(er)f(of)i(rev)m(ok)m(ed)g(certi\014cates)i
23195
 
(in)d(the)g(giv)m(en)i(CRL.)390 2843 y Fn(Returns:)40
 
23201
(in)d(the)g(giv)m(en)i(CRL.)390 4154 y Fn(Returns:)40
23196
23202
b FB(n)m(um)m(b)s(er)29 b(of)i(certi\014cates,)i(a)d(negativ)m(e)j(v)-5
23197
 
b(alue)31 b(on)f(failure.)150 3038 y Fv(gn)m(utls)p 483
23198
 
3038 37 5 v 55 w(x509)p 786 3038 V 54 w(crl)p 979 3038
23199
 
V 54 w(get)p 1198 3038 V 54 w(crt)p 1405 3038 V 54 w(serial)3350
23200
 
3232 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_c)q
23201
 
(rt_s)q(eri)q(al)f Fg(\()p Ff(gn)m(utls)p 2255 3232 28
23202
 
4 v 41 w(x509)p 2479 3232 V 41 w(crl)p 2621 3232 V 40
23203
 
w(t)31 b Fe(crl)12 b Ff(,)31 b(in)m(t)565 3341 y Fe(indx)12
 
23203
b(alue)31 b(on)f(failure.)150 4359 y Fv(gn)m(utls)p 483
 
23204
4359 37 5 v 55 w(x509)p 786 4359 V 54 w(crl)p 979 4359
 
23205
V 54 w(get)p 1198 4359 V 54 w(crt)p 1405 4359 V 54 w(serial)3350
 
23206
4561 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_c)q
 
23207
(rt_s)q(eri)q(al)f Fg(\()p Ff(gn)m(utls)p 2255 4561 28
 
23208
4 v 41 w(x509)p 2479 4561 V 41 w(crl)p 2621 4561 V 40
 
23209
w(t)31 b Fe(crl)12 b Ff(,)31 b(in)m(t)565 4671 y Fe(indx)12
23204
23210
b Ff(,)31 b(unsigned)f(c)m(har)g(*)h Fe(serial)12 b Ff(,)32
23205
 
b(size)p 2024 3341 V 41 w(t)f(*)f Fe(serial_size)12 b
23206
 
Ff(,)34 b(time)p 3025 3341 V 41 w(t)c(*)h Fe(t)12 b Fg(\))390
23207
 
3451 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
23208
 
Ft(gnutls_x509_crl_t)c FB(structure)390 3584 y Ff(indx)6
 
23211
b(size)p 2024 4671 V 41 w(t)f(*)f Fe(serial_size)12 b
 
23212
Ff(,)34 b(time)p 3025 4671 V 41 w(t)c(*)h Fe(t)12 b Fg(\))390
 
23213
4780 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
 
23214
Ft(gnutls_x509_crl_t)c FB(structure)390 4920 y Ff(indx)6
23209
23215
b FB(:)40 b(the)31 b(index)f(of)g(the)h(certi\014cate)h(to)f(extract)h
23210
 
(\(starting)g(from)e(0\))390 3716 y Ff(serial)t FB(:)41
 
23216
(\(starting)g(from)e(0\))390 5060 y Ff(serial)t FB(:)41
23211
23217
b(where)30 b(the)h(serial)g(n)m(um)m(b)s(er)e(will)h(b)s(e)g(copied)390
23212
 
3849 y Ff(serial)p 603 3849 V 41 w(size)5 b FB(:)41 b(initially)32
23213
 
b(holds)e(the)h(size)g(of)g(serial)390 3982 y Ff(t)r
 
23218
5200 y Ff(serial)p 603 5200 V 41 w(size)5 b FB(:)41 b(initially)32
 
23219
b(holds)e(the)h(size)g(of)g(serial)390 5340 y Ff(t)r
23214
23220
FB(:)41 b(if)30 b(non)g(n)m(ull,)h(will)f(hold)g(the)h(time)g(this)f
23215
 
(certi\014cate)j(w)m(as)d(rev)m(ok)m(ed)390 4114 y(This)k(function)h
23216
 
(will)g(retriev)m(e)h(the)g(serial)f(n)m(um)m(b)s(er)f(of)h(the)g(sp)s
23217
 
(eci\014ed,)h(b)m(y)f(the)g(index,)h(rev)m(ok)m(ed)390
23218
 
4224 y(certi\014cate.)390 4357 y Fn(Returns:)g FB(On)20
 
23221
(certi\014cate)j(w)m(as)d(rev)m(ok)m(ed)p eop end
 
23222
%%Page: 190 196
 
23223
TeXDict begin 190 195 bop 150 -116 a FB(Chapter)30 b(9:)41
 
23224
b(F)-8 b(unction)31 b(Reference)2237 b(190)390 299 y(This)34
 
23225
b(function)h(will)g(retriev)m(e)h(the)g(serial)f(n)m(um)m(b)s(er)f(of)h
 
23226
(the)g(sp)s(eci\014ed,)h(b)m(y)f(the)g(index,)h(rev)m(ok)m(ed)390
 
23227
408 y(certi\014cate.)390 554 y Fn(Returns:)g FB(On)20
23219
23228
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
23220
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)390 4466 y(and)30
 
23229
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)390 663 y(and)30
23221
23230
b(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(error.)150
23222
 
4662 y Fv(gn)m(utls)p 483 4662 37 5 v 55 w(x509)p 786
23223
 
4662 V 54 w(crl)p 979 4662 V 54 w(get)p 1198 4662 V 54
23224
 
w(dn)p 1388 4662 V 55 w(oid)3350 4855 y FB([F)-8 b(unction])-3599
 
23231
873 y Fv(gn)m(utls)p 483 873 37 5 v 55 w(x509)p 786 873
 
23232
V 54 w(crl)p 979 873 V 54 w(get)p 1198 873 V 54 w(dn)p
 
23233
1388 873 V 55 w(oid)3350 1081 y FB([F)-8 b(unction])-3599
23225
23234
b Fh(int)53 b(gnutls_x509_crl_get_d)q(n_oi)q(d)f Fg(\()p
23226
 
Ff(gn)m(utls)p 2046 4855 28 4 v 40 w(x509)p 2269 4855
23227
 
V 42 w(crl)p 2412 4855 V 40 w(t)31 b Fe(crl)12 b Ff(,)31
23228
 
b(in)m(t)f Fe(indx)12 b Ff(,)565 4965 y(v)m(oid)31 b(*)g
23229
 
Fe(oid)12 b Ff(,)31 b(size)p 1209 4965 V 41 w(t)f(*)h
23230
 
Fe(sizeof_oid)12 b Fg(\))390 5075 y Ff(crl)t FB(:)40
23231
 
b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491 5075
23232
 
V 41 w(x509)p 1715 5075 V 41 w(crl)p 1857 5075 V 40 w(t)h(structure)390
23233
 
5207 y Ff(indx)6 b FB(:)40 b(Sp)s(eci\014es)30 b(whic)m(h)g(DN)h(OID)f
 
23235
Ff(gn)m(utls)p 2046 1081 28 4 v 40 w(x509)p 2269 1081
 
23236
V 42 w(crl)p 2412 1081 V 40 w(t)31 b Fe(crl)12 b Ff(,)31
 
23237
b(in)m(t)f Fe(indx)12 b Ff(,)565 1191 y(v)m(oid)31 b(*)g
 
23238
Fe(oid)12 b Ff(,)31 b(size)p 1209 1191 V 41 w(t)f(*)h
 
23239
Fe(sizeof_oid)12 b Fg(\))390 1300 y Ff(crl)t FB(:)40
 
23240
b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491 1300
 
23241
V 41 w(x509)p 1715 1300 V 41 w(crl)p 1857 1300 V 40 w(t)h(structure)390
 
23242
1446 y Ff(indx)6 b FB(:)40 b(Sp)s(eci\014es)30 b(whic)m(h)g(DN)h(OID)f
23234
23243
(to)h(send.)40 b(Use)31 b(zero)g(to)g(get)h(the)e(\014rst)g(one.)390
23235
 
5340 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(structure)g
23236
 
(to)h(hold)f(the)h(name)f(\(ma)m(y)i(b)s(e)e(n)m(ull\))p
23237
 
eop end
23238
 
%%Page: 190 196
23239
 
TeXDict begin 190 195 bop 150 -116 a FB(Chapter)30 b(9:)41
23240
 
b(F)-8 b(unction)31 b(Reference)2237 b(190)390 299 y
23241
 
Ff(sizeof)p 610 299 28 4 v 41 w(oid)t FB(:)41 b(initially)31
23242
 
b(holds)f(the)h(size)g(of)g('oid')390 432 y(This)26 b(function)g(will)h
23243
 
(extract)h(the)f(requested)g(OID)f(of)h(the)g(name)g(of)g(the)g(CRL)f
23244
 
(issuer,)h(sp)s(eci\014ed)390 542 y(b)m(y)j(the)h(giv)m(en)g(index.)390
23245
 
675 y(If)f(oid)g(is)h(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s
23246
 
(e)f(\014lled.)390 809 y Fn(Returns:)39 b Ft(GNUTLS_E_SHORT_MEMORY_B)o
23247
 
(UFFE)o(R)21 b FB(if)27 b(the)h(pro)m(vided)e(bu\013er)h(is)g(not)g
23248
 
(long)h(enough,)390 918 y(and)k(in)g(that)i(case)f(the)g(sizeof)p
23249
 
1450 918 V 41 w(oid)g(will)g(b)s(e)f(up)s(dated)f(with)i(the)g
23250
 
(required)e(size.)49 b(On)32 b(success)h(0)390 1028 y(is)d(returned.)
23251
 
150 1225 y Fv(gn)m(utls)p 483 1225 37 5 v 55 w(x509)p
23252
 
786 1225 V 54 w(crl)p 979 1225 V 54 w(get)p 1198 1225
23253
 
V 54 w(issuer)p 1556 1225 V 55 w(dn)p 1747 1225 V 55
23254
 
w(b)m(y)p 1932 1225 V 53 w(oid)3350 1419 y FB([F)-8 b(unction])-3599
 
23244
1591 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(structure)g
 
23245
(to)h(hold)f(the)h(name)f(\(ma)m(y)i(b)s(e)e(n)m(ull\))390
 
23246
1736 y Ff(sizeof)p 610 1736 V 41 w(oid)t FB(:)41 b(initially)31
 
23247
b(holds)f(the)h(size)g(of)g('oid')390 1881 y(This)26
 
23248
b(function)g(will)h(extract)h(the)f(requested)g(OID)f(of)h(the)g(name)g
 
23249
(of)g(the)g(CRL)f(issuer,)h(sp)s(eci\014ed)390 1991 y(b)m(y)j(the)h
 
23250
(giv)m(en)g(index.)390 2136 y(If)f(oid)g(is)h(n)m(ull)f(then)g(only)h
 
23251
(the)f(size)h(will)g(b)s(e)f(\014lled.)390 2282 y Fn(Returns:)39
 
23252
b Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21 b FB(if)27
 
23253
b(the)h(pro)m(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)390
 
23254
2391 y(and)k(in)g(that)i(case)f(the)g(sizeof)p 1450 2391
 
23255
V 41 w(oid)g(will)g(b)s(e)f(up)s(dated)f(with)i(the)g(required)e(size.)
 
23256
49 b(On)32 b(success)h(0)390 2501 y(is)d(returned.)150
 
23257
2711 y Fv(gn)m(utls)p 483 2711 37 5 v 55 w(x509)p 786
 
23258
2711 V 54 w(crl)p 979 2711 V 54 w(get)p 1198 2711 V 54
 
23259
w(issuer)p 1556 2711 V 55 w(dn)p 1747 2711 V 55 w(b)m(y)p
 
23260
1932 2711 V 53 w(oid)3350 2919 y FB([F)-8 b(unction])-3599
23255
23261
b Fh(int)53 b(gnutls_x509_crl_get_i)q(ssue)q(r_d)q(n_b)q(y_o)q(id)f
23256
 
Fg(\()p Ff(gn)m(utls)p 2569 1419 28 4 v 40 w(x509)p 2792
23257
 
1419 V 42 w(crl)p 2935 1419 V 40 w(t)565 1529 y Fe(crl)12
 
23262
Fg(\()p Ff(gn)m(utls)p 2569 2919 28 4 v 40 w(x509)p 2792
 
23263
2919 V 42 w(crl)p 2935 2919 V 40 w(t)565 3028 y Fe(crl)12
23258
23264
b Ff(,)31 b(const)g(c)m(har)g(*)f Fe(oid)12 b Ff(,)31
23259
23265
b(in)m(t)g Fe(indx)12 b Ff(,)32 b(unsigned)d(in)m(t)i
23260
23266
Fe(raw_flag)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(buf)12 b
23261
 
Ff(,)31 b(size)p 3589 1529 V 41 w(t)g(*)565 1639 y Fe(sizeof_buf)12
23262
 
b Fg(\))390 1748 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
23263
 
(utls)p 1491 1748 V 41 w(x509)p 1715 1748 V 41 w(crl)p
23264
 
1857 1748 V 40 w(t)h(structure)390 1882 y Ff(oid)t FB(:)40
 
23267
Ff(,)31 b(size)p 3589 3028 V 41 w(t)g(*)565 3138 y Fe(sizeof_buf)12
 
23268
b Fg(\))390 3247 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
 
23269
(utls)p 1491 3247 V 41 w(x509)p 1715 3247 V 41 w(crl)p
 
23270
1857 3247 V 40 w(t)h(structure)390 3393 y Ff(oid)t FB(:)40
23265
23271
b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m(ull)g
23266
 
(terminated)h(string)390 2015 y Ff(indx)6 b FB(:)39 b(In)26
 
23272
(terminated)h(string)390 3538 y Ff(indx)6 b FB(:)39 b(In)26
23267
23273
b(case)j(m)m(ultiple)f(same)g(OIDs)f(exist)h(in)f(the)h(RDN,)g(this)f
23268
23274
(sp)s(eci\014es)g(whic)m(h)g(to)i(send.)39 b(Use)390
23269
 
2125 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
23270
 
2258 y Ff(ra)m(w)p 540 2258 V 40 w(\015ag)8 b FB(:)41
 
23275
3648 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
 
23276
3793 y Ff(ra)m(w)p 540 3793 V 40 w(\015ag)8 b FB(:)41
23271
23277
b(If)30 b(non)g(zero)h(returns)e(the)i(ra)m(w)f(DER)h(data)g(of)f(the)h
23272
 
(DN)g(part.)390 2391 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)
 
23278
(DN)g(part.)390 3938 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)
23273
23279
h(a)g(structure)f(to)h(hold)f(the)h(p)s(eer's)e(name)i(\(ma)m(y)g(b)s
23274
 
(e)f(n)m(ull\))390 2525 y Ff(sizeof)p 610 2525 V 41 w(buf)17
 
23280
(e)f(n)m(ull\))390 4083 y Ff(sizeof)p 610 4083 V 41 w(buf)17
23275
23281
b FB(:)40 b(initially)32 b(holds)e(the)g(size)i(of)e
23276
 
Ft(buf)390 2658 y FB(This)37 b(function)g(will)g(extract)i(the)f(part)f
 
23282
Ft(buf)390 4229 y FB(This)37 b(function)g(will)g(extract)i(the)f(part)f
23277
23283
(of)g(the)h(name)f(of)h(the)f(CRL)g(issuer)g(sp)s(eci\014ed)f(b)m(y)i
23278
 
(the)390 2768 y(giv)m(en)31 b(OID.)f(The)f(output)h(will)g(b)s(e)f
 
23284
(the)390 4338 y(giv)m(en)31 b(OID.)f(The)f(output)h(will)g(b)s(e)f
23279
23285
(enco)s(ded)g(as)h(describ)s(ed)f(in)h(RF)m(C2253.)42
23280
 
b(The)30 b(output)f(string)390 2877 y(will)i(b)s(e)e(ASCI)s(I)g(or)i
 
23286
b(The)30 b(output)f(string)390 4448 y(will)i(b)s(e)e(ASCI)s(I)g(or)i
23281
23287
(UTF-8)g(enco)s(ded,)f(dep)s(ending)f(on)h(the)h(certi\014cate)h(data.)
23282
 
390 3011 y(Some)g(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g
 
23288
390 4593 y(Some)g(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g
23283
23289
(b)s(e)g(found)f(in)g(gn)m(utls/x509.h)j(If)e(ra)m(w)g(\015ag)h(is)390
23284
 
3120 y(zero,)39 b(this)e(function)f(will)h(only)f(return)g(kno)m(wn)g
 
23290
4703 y(zero,)39 b(this)e(function)f(will)h(only)f(return)g(kno)m(wn)g
23285
23291
(OIDs)g(as)h(text.)61 b(Other)36 b(OIDs)g(will)h(b)s(e)f(DER)390
23286
 
3230 y(enco)s(ded,)29 b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f
 
23292
4812 y(enco)s(ded,)29 b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f
23287
23293
(hex)g(format)h(with)e(a)i(')p Ft(\\)p FB(#')f(pre\014x.)39
23288
 
b(Y)-8 b(ou)29 b(can)f(c)m(hec)m(k)390 3339 y(ab)s(out)i(kno)m(wn)g
 
23294
b(Y)-8 b(ou)29 b(can)f(c)m(hec)m(k)390 4922 y(ab)s(out)i(kno)m(wn)g
23289
23295
(OIDs)g(using)g Ft(gnutls_x509_dn_oid_known)o(\(\))p
23290
 
FB(.)390 3473 y(If)g(buf)f(is)h(n)m(ull)h(then)f(only)g(the)h(size)g
23291
 
(will)g(b)s(e)f(\014lled.)390 3606 y Fn(Returns:)39 b
 
23296
FB(.)390 5067 y(If)g(buf)f(is)h(n)m(ull)h(then)f(only)g(the)h(size)g
 
23297
(will)g(b)s(e)f(\014lled.)390 5213 y Fn(Returns:)39 b
23292
23298
Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21 b FB(if)27 b(the)h(pro)m
23293
 
(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)390 3716
23294
 
y(and)21 b(in)h(that)g(case)h(the)f(sizeof)p 1396 3716
 
23299
(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)390 5322
 
23300
y(and)21 b(in)h(that)g(case)h(the)f(sizeof)p 1396 5322
23295
23301
V 41 w(buf)f(will)h(b)s(e)f(up)s(dated)f(with)i(the)g(required)f(size,)
23296
 
j(and)e(0)g(on)f(success.)150 3913 y Fv(gn)m(utls)p 483
23297
 
3913 37 5 v 55 w(x509)p 786 3913 V 54 w(crl)p 979 3913
23298
 
V 54 w(get)p 1198 3913 V 54 w(issuer)p 1556 3913 V 55
23299
 
w(dn)3350 4107 y FB([F)-8 b(unction])-3599 b Fh(int)53
23300
 
b(gnutls_x509_crl_get_i)q(ssue)q(r_d)q(n)e Fg(\()p Ff(const)32
23301
 
b(gn)m(utls)p 2441 4107 28 4 v 40 w(x509)p 2664 4107
23302
 
V 41 w(crl)p 2806 4107 V 41 w(t)e Fe(crl)12 b Ff(,)565
23303
 
4217 y(c)m(har)31 b(*)g Fe(buf)12 b Ff(,)31 b(size)p
23304
 
1212 4217 V 41 w(t)f(*)h Fe(sizeof_buf)12 b Fg(\))390
23305
 
4327 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p
23306
 
1491 4327 V 41 w(x509)p 1715 4327 V 41 w(crl)p 1857 4327
23307
 
V 40 w(t)h(structure)390 4460 y Ff(buf)16 b FB(:)41 b(a)31
23308
 
b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f(the)h(p)s(eer's)e
23309
 
(name)i(\(ma)m(y)g(b)s(e)f(n)m(ull\))390 4593 y Ff(sizeof)p
23310
 
610 4593 V 41 w(buf)17 b FB(:)40 b(initially)32 b(holds)e(the)g(size)i
23311
 
(of)e Ft(buf)390 4727 y FB(This)c(function)g(will)i(cop)m(y)f(the)g
23312
 
(name)g(of)g(the)g(CRL)f(issuer)g(in)h(the)g(pro)m(vided)f(bu\013er.)39
23313
 
b(The)26 b(name)390 4836 y(will)45 b(b)s(e)g(in)g(the)g(form)g
23314
 
Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p Ft(")45 b FB(as)g(describ)s(ed)
23315
 
f(in)h(RF)m(C2253.)87 b(The)390 4946 y(output)30 b(string)g(will)h(b)s
23316
 
(e)f(ASCI)s(I)f(or)h(UTF-8)h(enco)s(ded,)f(dep)s(ending)f(on)i(the)f
23317
 
(certi\014cate)j(data.)390 5079 y(If)d(buf)f(is)h Ft(NULL)g
23318
 
FB(then)g(only)g(the)h(size)g(will)g(b)s(e)e(\014lled.)390
23319
 
5213 y Fn(Returns:)39 b Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21
23320
 
b FB(if)27 b(the)h(pro)m(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)
23321
 
390 5322 y(and)21 b(in)h(that)g(case)h(the)f(sizeof)p
23322
 
1396 5322 V 41 w(buf)f(will)h(b)s(e)f(up)s(dated)f(with)i(the)g
23323
 
(required)f(size,)j(and)e(0)g(on)f(success.)p eop end
 
23302
j(and)e(0)g(on)f(success.)p eop end
23324
23303
%%Page: 191 197
23325
23304
TeXDict begin 191 196 bop 150 -116 a FB(Chapter)30 b(9:)41
23326
23305
b(F)-8 b(unction)31 b(Reference)2237 b(191)150 299 y
23327
23306
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23328
 
w(crl)p 979 299 V 54 w(get)p 1198 299 V 54 w(next)p 1489
23329
 
299 V 54 w(up)s(date)3350 521 y FB([F)-8 b(unction])-3599
 
23307
w(crl)p 979 299 V 54 w(get)p 1198 299 V 54 w(issuer)p
 
23308
1556 299 V 55 w(dn)3350 519 y FB([F)-8 b(unction])-3599
 
23309
b Fh(int)53 b(gnutls_x509_crl_get_i)q(ssue)q(r_d)q(n)e
 
23310
Fg(\()p Ff(const)32 b(gn)m(utls)p 2441 519 28 4 v 40
 
23311
w(x509)p 2664 519 V 41 w(crl)p 2806 519 V 41 w(t)e Fe(crl)12
 
23312
b Ff(,)565 629 y(c)m(har)31 b(*)g Fe(buf)12 b Ff(,)31
 
23313
b(size)p 1212 629 V 41 w(t)f(*)h Fe(sizeof_buf)12 b Fg(\))390
 
23314
738 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p
 
23315
1491 738 V 41 w(x509)p 1715 738 V 41 w(crl)p 1857 738
 
23316
V 40 w(t)h(structure)390 896 y Ff(buf)16 b FB(:)41 b(a)31
 
23317
b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f(the)h(p)s(eer's)e
 
23318
(name)i(\(ma)m(y)g(b)s(e)f(n)m(ull\))390 1054 y Ff(sizeof)p
 
23319
610 1054 V 41 w(buf)17 b FB(:)40 b(initially)32 b(holds)e(the)g(size)i
 
23320
(of)e Ft(buf)390 1211 y FB(This)c(function)g(will)i(cop)m(y)f(the)g
 
23321
(name)g(of)g(the)g(CRL)f(issuer)g(in)h(the)g(pro)m(vided)f(bu\013er.)39
 
23322
b(The)26 b(name)390 1321 y(will)45 b(b)s(e)g(in)g(the)g(form)g
 
23323
Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p Ft(")45 b FB(as)g(describ)s(ed)
 
23324
f(in)h(RF)m(C2253.)87 b(The)390 1431 y(output)30 b(string)g(will)h(b)s
 
23325
(e)f(ASCI)s(I)f(or)h(UTF-8)h(enco)s(ded,)f(dep)s(ending)f(on)i(the)f
 
23326
(certi\014cate)j(data.)390 1588 y(If)d(buf)f(is)h Ft(NULL)g
 
23327
FB(then)g(only)g(the)h(size)g(will)g(b)s(e)e(\014lled.)390
 
23328
1746 y Fn(Returns:)39 b Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21
 
23329
b FB(if)27 b(the)h(pro)m(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)
 
23330
390 1856 y(and)21 b(in)h(that)g(case)h(the)f(sizeof)p
 
23331
1396 1856 V 41 w(buf)f(will)h(b)s(e)f(up)s(dated)f(with)i(the)g
 
23332
(required)f(size,)j(and)e(0)g(on)f(success.)150 2078
 
23333
y Fv(gn)m(utls)p 483 2078 37 5 v 55 w(x509)p 786 2078
 
23334
V 54 w(crl)p 979 2078 V 54 w(get)p 1198 2078 V 54 w(next)p
 
23335
1489 2078 V 54 w(up)s(date)3350 2298 y FB([F)-8 b(unction])-3599
23330
23336
b Fh(time_t)54 b(gnutls_x509_crl_get_ne)q(xt_)q(upd)q(ate)e
23331
 
Fg(\()p Ff(gn)m(utls)p 2464 521 28 4 v 41 w(x509)p 2688
23332
 
521 V 41 w(crl)p 2830 521 V 40 w(t)31 b Fe(crl)12 b Fg(\))390
23333
 
631 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
23334
 
Ft(gnutls_x509_crl_t)c FB(structure)390 790 y(This)i(function)h(will)h
 
23337
Fg(\()p Ff(gn)m(utls)p 2464 2298 28 4 v 41 w(x509)p 2688
 
23338
2298 V 41 w(crl)p 2830 2298 V 40 w(t)31 b Fe(crl)12 b
 
23339
Fg(\))390 2408 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
 
23340
Ft(gnutls_x509_crl_t)c FB(structure)390 2566 y(This)i(function)h(will)h
23335
23341
(return)e(the)h(time)h(the)g(next)f(CRL)g(will)g(b)s(e)g(issued.)39
23336
 
b(This)29 b(\014eld)g(is)g(optional)390 900 y(in)h(a)h(CRL)f(so)g(it)h
 
23342
b(This)29 b(\014eld)g(is)g(optional)390 2675 y(in)h(a)h(CRL)f(so)g(it)h
23337
23343
(migh)m(t)g(b)s(e)f(normal)g(to)h(get)h(an)e(error)g(instead.)390
23338
 
1060 y Fn(Returns:)40 b FB(when)30 b(the)g(next)h(CRL)f(will)g(b)s(e)g
23339
 
(issued,)g(or)g(\(time)p 2514 1060 V 41 w(t\)-1)i(on)e(error.)150
23340
 
1285 y Fv(gn)m(utls)p 483 1285 37 5 v 55 w(x509)p 786
23341
 
1285 V 54 w(crl)p 979 1285 V 54 w(get)p 1198 1285 V 54
23342
 
w(signature)p 1745 1285 V 55 w(algorithm)3350 1507 y
 
23344
2833 y Fn(Returns:)40 b FB(when)30 b(the)g(next)h(CRL)f(will)g(b)s(e)g
 
23345
(issued,)g(or)g(\(time)p 2514 2833 V 41 w(t\)-1)i(on)e(error.)150
 
23346
3056 y Fv(gn)m(utls)p 483 3056 37 5 v 55 w(x509)p 786
 
23347
3056 V 54 w(crl)p 979 3056 V 54 w(get)p 1198 3056 V 54
 
23348
w(signature)p 1745 3056 V 55 w(algorithm)3350 3276 y
23343
23349
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_s)q(igna)q
23344
23350
(tur)q(e_a)q(lgo)q(rith)q(m)e Fg(\()p Ff(gn)m(utls)p
23345
 
2725 1507 28 4 v 41 w(x509)p 2949 1507 V 42 w(crl)p 3092
23346
 
1507 V 40 w(t)565 1616 y Fe(crl)12 b Fg(\))390 1726 y
 
23351
2725 3276 28 4 v 41 w(x509)p 2949 3276 V 42 w(crl)p 3092
 
23352
3276 V 40 w(t)565 3385 y Fe(crl)12 b Fg(\))390 3495 y
23347
23353
Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e Ft(gnutls_x509_crl_t)c
23348
 
FB(structure)390 1886 y(This)f(function)h(will)h(return)e(a)h(v)-5
 
23354
FB(structure)390 3653 y(This)f(function)h(will)h(return)e(a)h(v)-5
23349
23355
b(alue)27 b(of)f(the)h Ft(gnutls_sign_algorithm_t)20
23350
 
b FB(en)m(umeration)26 b(that)390 1995 y(is)k(the)h(signature)g
23351
 
(algorithm.)390 2155 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23356
b FB(en)m(umeration)26 b(that)390 3762 y(is)k(the)h(signature)g
 
23357
(algorithm.)390 3920 y Fn(Returns:)36 b FB(On)20 b(success,)j
23352
23358
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23353
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2380 y Fv(gn)m(utls)p
23354
 
483 2380 37 5 v 55 w(x509)p 786 2380 V 54 w(crl)p 979
23355
 
2380 V 54 w(get)p 1198 2380 V 54 w(signature)3350 2602
 
23359
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4142 y Fv(gn)m(utls)p
 
23360
483 4142 37 5 v 55 w(x509)p 786 4142 V 54 w(crl)p 979
 
23361
4142 V 54 w(get)p 1198 4142 V 54 w(signature)3350 4362
23356
23362
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_s)q(igna)q
23357
 
(tur)q(e)e Fg(\()p Ff(gn)m(utls)p 2202 2602 28 4 v 41
23358
 
w(x509)p 2426 2602 V 42 w(crl)p 2569 2602 V 40 w(t)30
23359
 
b Fe(crl)12 b Ff(,)31 b(c)m(har)g(*)565 2712 y Fe(sig)12
23360
 
b Ff(,)31 b(size)p 936 2712 V 41 w(t)g(*)f Fe(sizeof_sig)12
23361
 
b Fg(\))390 2821 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
23362
 
(utls)p 1491 2821 V 41 w(x509)p 1715 2821 V 41 w(crl)p
23363
 
1857 2821 V 40 w(t)h(structure)390 2981 y Ff(sig)8 b
 
23363
(tur)q(e)e Fg(\()p Ff(gn)m(utls)p 2202 4362 28 4 v 41
 
23364
w(x509)p 2426 4362 V 42 w(crl)p 2569 4362 V 40 w(t)30
 
23365
b Fe(crl)12 b Ff(,)31 b(c)m(har)g(*)565 4472 y Fe(sig)12
 
23366
b Ff(,)31 b(size)p 936 4472 V 41 w(t)g(*)f Fe(sizeof_sig)12
 
23367
b Fg(\))390 4582 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
 
23368
(utls)p 1491 4582 V 41 w(x509)p 1715 4582 V 41 w(crl)p
 
23369
1857 4582 V 40 w(t)h(structure)390 4739 y Ff(sig)8 b
23364
23370
FB(:)41 b(a)31 b(p)s(oin)m(ter)f(where)g(the)h(signature)f(part)h(will)
23365
23371
f(b)s(e)g(copied)h(\(ma)m(y)g(b)s(e)f(n)m(ull\).)390
23366
 
3141 y Ff(sizeof)p 610 3141 V 41 w(sig)8 b FB(:)41 b(initially)32
23367
 
b(holds)e(the)g(size)i(of)e Ft(sig)390 3301 y FB(This)g(function)g
 
23372
4897 y Ff(sizeof)p 610 4897 V 41 w(sig)8 b FB(:)41 b(initially)32
 
23373
b(holds)e(the)g(size)i(of)e Ft(sig)390 5055 y FB(This)g(function)g
23368
23374
(will)g(extract)i(the)f(signature)f(\014eld)g(of)h(a)g(CRL.)390
23369
 
3461 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23375
5213 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23370
23376
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23371
 
b(alue.)390 3570 y(and)30 b(a)h(negativ)m(e)h(v)-5 b(alue)31
23372
 
b(on)f(error.)150 3795 y Fv(gn)m(utls)p 483 3795 37 5
23373
 
v 55 w(x509)p 786 3795 V 54 w(crl)p 979 3795 V 54 w(get)p
23374
 
1198 3795 V 54 w(this)p 1450 3795 V 55 w(up)s(date)3350
23375
 
4017 y FB([F)-8 b(unction])-3599 b Fh(time_t)54 b
23376
 
(gnutls_x509_crl_get_th)q(is_)q(upd)q(ate)e Fg(\()p Ff(gn)m(utls)p
23377
 
2464 4017 28 4 v 41 w(x509)p 2688 4017 V 41 w(crl)p 2830
23378
 
4017 V 40 w(t)31 b Fe(crl)12 b Fg(\))390 4126 y Ff(crl)t
23379
 
FB(:)40 b(should)30 b(con)m(tain)i(a)e Ft(gnutls_x509_crl_t)c
23380
 
FB(structure)390 4286 y(This)k(function)g(will)g(return)g(the)g(time)h
23381
 
(this)g(CRL)e(w)m(as)i(issued.)390 4446 y Fn(Returns:)40
23382
 
b FB(when)30 b(the)g(CRL)g(w)m(as)h(issued,)f(or)g(\(time)p
23383
 
2189 4446 V 41 w(t\)-1)i(on)e(error.)150 4671 y Fv(gn)m(utls)p
23384
 
483 4671 37 5 v 55 w(x509)p 786 4671 V 54 w(crl)p 979
23385
 
4671 V 54 w(get)p 1198 4671 V 54 w(v)m(ersion)3350 4893
23386
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_v)q(ersi)
23387
 
q(on)f Fg(\()p Ff(gn)m(utls)p 2098 4893 28 4 v 41 w(x509)p
23388
 
2322 4893 V 41 w(crl)p 2464 4893 V 40 w(t)31 b Fe(crl)12
23389
 
b Fg(\))390 5003 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
23390
 
Ft(gnutls_x509_crl_t)c FB(structure)390 5162 y(This)k(function)g(will)g
23391
 
(return)g(the)g(v)m(ersion)h(of)g(the)f(sp)s(eci\014ed)g(CRL.)390
23392
 
5322 y Fn(Returns:)40 b FB(The)30 b(v)m(ersion)h(n)m(um)m(b)s(er,)e(or)
23393
 
i(a)g(negativ)m(e)h(v)-5 b(alue)31 b(on)f(error.)p eop
23394
 
end
 
23377
b(alue.)390 5322 y(and)30 b(a)h(negativ)m(e)h(v)-5 b(alue)31
 
23378
b(on)f(error.)p eop end
23395
23379
%%Page: 192 198
23396
23380
TeXDict begin 192 197 bop 150 -116 a FB(Chapter)30 b(9:)41
23397
23381
b(F)-8 b(unction)31 b(Reference)2237 b(192)150 299 y
23398
23382
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23399
 
w(crl)p 979 299 V 54 w(imp)s(ort)3350 497 y FB([F)-8
23400
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_impor)q(t)e
23401
 
Fg(\()p Ff(gn)m(utls)p 1836 497 28 4 v 41 w(x509)p 2060
23402
 
497 V 41 w(crl)p 2202 497 V 41 w(t)30 b Fe(crl)12 b Ff(,)31
23403
 
b(const)565 607 y(gn)m(utls)p 811 607 V 41 w(datum)p
23404
 
1110 607 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p
23405
 
1807 607 V 40 w(x509)p 2030 607 V 42 w(crt)p 2183 607
23406
 
V 40 w(fm)m(t)p 2359 607 V 40 w(t)g Fe(format)12 b Fg(\))390
23407
 
716 y Ff(crl)t FB(:)40 b(The)30 b(structure)g(to)h(store)g(the)g
23408
 
(parsed)f(CRL.)390 852 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h
23409
 
(enco)s(ded)f(CRL.)390 988 y Ff(format)r FB(:)41 b(One)30
23410
 
b(of)g(DER)h(or)f(PEM)390 1124 y(This)22 b(function)g(will)g(con)m(v)m
23411
 
(ert)i(the)f(giv)m(en)g(DER)f(or)h(PEM)f(enco)s(ded)g(CRL)g(to)h(the)f
23412
 
(nativ)m(e)i Ft(gnutls_)390 1234 y(x509_crl_t)k FB(format.)41
23413
 
b(The)29 b(output)h(will)h(b)s(e)f(stored)g(in)g('crl'.)390
23414
 
1370 y(If)g(the)g(CRL)g(is)h(PEM)f(enco)s(ded)g(it)h(should)e(ha)m(v)m
23415
 
(e)j(a)f(header)f(of)g Ft(")p FB(X509)i(CRL)p Ft(")p
23416
 
FB(.)390 1506 y Fn(Returns:)k FB(On)20 b(success,)j Ft
23417
 
(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m
23418
 
(e)h(error)d(v)-5 b(alue.)150 1707 y Fv(gn)m(utls)p 483
23419
 
1707 37 5 v 55 w(x509)p 786 1707 V 54 w(crl)p 979 1707
23420
 
V 54 w(init)3350 1905 y FB([F)d(unction])-3599 b Fh(int)53
23421
 
b(gnutls_x509_crl_init)f Fg(\()p Ff(gn)m(utls)p 1732
23422
 
1905 28 4 v 40 w(x509)p 1955 1905 V 42 w(crl)p 2098 1905
23423
 
V 40 w(t)31 b(*)g Fe(crl)12 b Fg(\))390 2015 y Ff(crl)t
23424
 
FB(:)40 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390
23425
 
2151 y(This)40 b(function)g(will)h(initialize)h(a)f(CRL)f(structure.)70
23426
 
b(CRL)40 b(stands)g(for)g(Certi\014cate)i(Rev)m(o)s(ca-)390
23427
 
2260 y(tion)d(List.)65 b(A)38 b(rev)m(o)s(cation)i(list)f(usually)f
23428
 
(con)m(tains)i(lists)f(of)f(certi\014cate)i(serial)f(n)m(um)m(b)s(ers)e
23429
 
(that)390 2370 y(ha)m(v)m(e)d(b)s(een)d(rev)m(ok)m(ed)j(b)m(y)e(an)g
23430
 
(Authorit)m(y)-8 b(.)47 b(The)32 b(rev)m(o)s(cation)i(lists)f(are)g
23431
 
(alw)m(a)m(ys)h(signed)e(with)g(the)390 2480 y(authorit)m(y's)f(priv)-5
23432
 
b(ate)31 b(k)m(ey)-8 b(.)390 2616 y Fn(Returns:)36 b
23433
 
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
23383
w(crl)p 979 299 V 54 w(get)p 1198 299 V 54 w(this)p 1450
 
23384
299 V 55 w(up)s(date)3350 482 y FB([F)-8 b(unction])-3599
 
23385
b Fh(time_t)54 b(gnutls_x509_crl_get_th)q(is_)q(upd)q(ate)e
 
23386
Fg(\()p Ff(gn)m(utls)p 2464 482 28 4 v 41 w(x509)p 2688
 
23387
482 V 41 w(crl)p 2830 482 V 40 w(t)31 b Fe(crl)12 b Fg(\))390
 
23388
592 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e
 
23389
Ft(gnutls_x509_crl_t)c FB(structure)390 720 y(This)k(function)g(will)g
 
23390
(return)g(the)g(time)h(this)g(CRL)e(w)m(as)i(issued.)390
 
23391
848 y Fn(Returns:)40 b FB(when)30 b(the)g(CRL)g(w)m(as)h(issued,)f(or)g
 
23392
(\(time)p 2189 848 V 41 w(t\)-1)i(on)e(error.)150 1034
 
23393
y Fv(gn)m(utls)p 483 1034 37 5 v 55 w(x509)p 786 1034
 
23394
V 54 w(crl)p 979 1034 V 54 w(get)p 1198 1034 V 54 w(v)m(ersion)3350
 
23395
1217 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_get_v)q
 
23396
(ersi)q(on)f Fg(\()p Ff(gn)m(utls)p 2098 1217 28 4 v
 
23397
41 w(x509)p 2322 1217 V 41 w(crl)p 2464 1217 V 40 w(t)31
 
23398
b Fe(crl)12 b Fg(\))390 1327 y Ff(crl)t FB(:)40 b(should)30
 
23399
b(con)m(tain)i(a)e Ft(gnutls_x509_crl_t)c FB(structure)390
 
23400
1455 y(This)k(function)g(will)g(return)g(the)g(v)m(ersion)h(of)g(the)f
 
23401
(sp)s(eci\014ed)g(CRL.)390 1583 y Fn(Returns:)40 b FB(The)30
 
23402
b(v)m(ersion)h(n)m(um)m(b)s(er,)e(or)i(a)g(negativ)m(e)h(v)-5
 
23403
b(alue)31 b(on)f(error.)150 1769 y Fv(gn)m(utls)p 483
 
23404
1769 37 5 v 55 w(x509)p 786 1769 V 54 w(crl)p 979 1769
 
23405
V 54 w(imp)s(ort)3350 1952 y FB([F)-8 b(unction])-3599
 
23406
b Fh(int)53 b(gnutls_x509_crl_impor)q(t)e Fg(\()p Ff(gn)m(utls)p
 
23407
1836 1952 28 4 v 41 w(x509)p 2060 1952 V 41 w(crl)p 2202
 
23408
1952 V 41 w(t)30 b Fe(crl)12 b Ff(,)31 b(const)565 2062
 
23409
y(gn)m(utls)p 811 2062 V 41 w(datum)p 1110 2062 V 39
 
23410
w(t)g(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1807 2062
 
23411
V 40 w(x509)p 2030 2062 V 42 w(crt)p 2183 2062 V 40 w(fm)m(t)p
 
23412
2359 2062 V 40 w(t)g Fe(format)12 b Fg(\))390 2172 y
 
23413
Ff(crl)t FB(:)40 b(The)30 b(structure)g(to)h(store)g(the)g(parsed)f
 
23414
(CRL.)390 2300 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s
 
23415
(ded)f(CRL.)390 2427 y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f
 
23416
(PEM)390 2555 y(This)22 b(function)g(will)g(con)m(v)m(ert)i(the)f(giv)m
 
23417
(en)g(DER)f(or)h(PEM)f(enco)s(ded)g(CRL)g(to)h(the)f(nativ)m(e)i
 
23418
Ft(gnutls_)390 2665 y(x509_crl_t)k FB(format.)41 b(The)29
 
23419
b(output)h(will)h(b)s(e)f(stored)g(in)g('crl'.)390 2793
 
23420
y(If)g(the)g(CRL)g(is)h(PEM)f(enco)s(ded)g(it)h(should)e(ha)m(v)m(e)j
 
23421
(a)f(header)f(of)g Ft(")p FB(X509)i(CRL)p Ft(")p FB(.)390
 
23422
2921 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23423
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23424
b(alue.)150 3107 y Fv(gn)m(utls)p 483 3107 37 5 v 55
 
23425
w(x509)p 786 3107 V 54 w(crl)p 979 3107 V 54 w(init)3350
 
23426
3290 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_init)f
 
23427
Fg(\()p Ff(gn)m(utls)p 1732 3290 28 4 v 40 w(x509)p 1955
 
23428
3290 V 42 w(crl)p 2098 3290 V 40 w(t)31 b(*)g Fe(crl)12
 
23429
b Fg(\))390 3400 y Ff(crl)t FB(:)40 b(The)30 b(structure)g(to)h(b)s(e)f
 
23430
(initialized)390 3528 y(This)40 b(function)g(will)h(initialize)h(a)f
 
23431
(CRL)f(structure.)70 b(CRL)40 b(stands)g(for)g(Certi\014cate)i(Rev)m(o)
 
23432
s(ca-)390 3637 y(tion)d(List.)65 b(A)38 b(rev)m(o)s(cation)i(list)f
 
23433
(usually)f(con)m(tains)i(lists)f(of)f(certi\014cate)i(serial)f(n)m(um)m
 
23434
(b)s(ers)e(that)390 3747 y(ha)m(v)m(e)d(b)s(een)d(rev)m(ok)m(ed)j(b)m
 
23435
(y)e(an)g(Authorit)m(y)-8 b(.)47 b(The)32 b(rev)m(o)s(cation)i(lists)f
 
23436
(are)g(alw)m(a)m(ys)h(signed)e(with)g(the)390 3857 y(authorit)m(y's)f
 
23437
(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 3984 y Fn(Returns:)36
 
23438
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
23434
23439
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23435
 
b(alue.)150 2817 y Fv(gn)m(utls)p 483 2817 37 5 v 55
23436
 
w(x509)p 786 2817 V 54 w(crl)p 979 2817 V 54 w(prin)m(t)3350
23437
 
3015 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_print)f
23438
 
Fg(\()p Ff(gn)m(utls)p 1784 3015 28 4 v 41 w(x509)p 2008
23439
 
3015 V 41 w(crl)p 2150 3015 V 40 w(t)31 b Fe(crl)12 b
23440
 
Ff(,)565 3124 y(gn)m(utls)p 811 3124 V 41 w(certi\014cate)p
23441
 
1239 3124 V 42 w(prin)m(t)p 1476 3124 V 39 w(formats)p
23442
 
1816 3124 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(gn)m(utls)p
23443
 
2543 3124 V 41 w(datum)p 2842 3124 V 39 w(t)f(*)g Fe(out)12
23444
 
b Fg(\))390 3234 y Ff(crl)t FB(:)40 b(The)30 b(structure)g(to)h(b)s(e)f
23445
 
(prin)m(ted)390 3370 y Ff(format)r FB(:)41 b(Indicate)31
23446
 
b(the)g(format)f(to)h(use)390 3506 y Ff(out)r FB(:)41
 
23440
b(alue.)150 4170 y Fv(gn)m(utls)p 483 4170 37 5 v 55
 
23441
w(x509)p 786 4170 V 54 w(crl)p 979 4170 V 54 w(prin)m(t)3350
 
23442
4354 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_print)f
 
23443
Fg(\()p Ff(gn)m(utls)p 1784 4354 28 4 v 41 w(x509)p 2008
 
23444
4354 V 41 w(crl)p 2150 4354 V 40 w(t)31 b Fe(crl)12 b
 
23445
Ff(,)565 4464 y(gn)m(utls)p 811 4464 V 41 w(certi\014cate)p
 
23446
1239 4464 V 42 w(prin)m(t)p 1476 4464 V 39 w(formats)p
 
23447
1816 4464 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(gn)m(utls)p
 
23448
2543 4464 V 41 w(datum)p 2842 4464 V 39 w(t)f(*)g Fe(out)12
 
23449
b Fg(\))390 4573 y Ff(crl)t FB(:)40 b(The)30 b(structure)g(to)h(b)s(e)f
 
23450
(prin)m(ted)390 4701 y Ff(format)r FB(:)41 b(Indicate)31
 
23451
b(the)g(format)f(to)h(use)390 4829 y Ff(out)r FB(:)41
23447
23452
b(Newly)31 b(allo)s(cated)h(datum)e(with)g(zero)h(terminated)g(string.)
23448
 
390 3642 y(This)e(function)h(will)g(prett)m(y)h(prin)m(t)e(a)i(X.509)h
 
23453
390 4957 y(This)e(function)h(will)g(prett)m(y)h(prin)m(t)e(a)i(X.509)h
23449
23454
(certi\014cate)g(rev)m(o)s(cation)f(list,)g(suitable)g(for)f(displa)m
23450
 
(y)390 3752 y(to)h(a)g(h)m(uman.)390 3888 y(The)f(output)g
 
23455
(y)390 5067 y(to)h(a)g(h)m(uman.)390 5194 y(The)f(output)g
23451
23456
Ft(out)f FB(needs)h(to)h(b)s(e)f(deallo)s(cate)j(using)d
23452
 
Ft(gnutls_free\(\))p FB(.)390 4024 y Fn(Returns:)36 b
 
23457
Ft(gnutls_free\(\))p FB(.)390 5322 y Fn(Returns:)36 b
23453
23458
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
23454
23459
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23455
 
b(alue.)150 4225 y Fv(gn)m(utls)p 483 4225 37 5 v 55
23456
 
w(x509)p 786 4225 V 54 w(crl)p 979 4225 V 54 w(set)p
23457
 
1185 4225 V 54 w(crt)p 1392 4225 V 54 w(serial)3350 4423
23458
 
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_set_c)q(rt_s)q
23459
 
(eri)q(al)f Fg(\()p Ff(gn)m(utls)p 2255 4423 28 4 v 41
23460
 
w(x509)p 2479 4423 V 41 w(crl)p 2621 4423 V 40 w(t)31
23461
 
b Fe(crl)12 b Ff(,)31 b(const)565 4532 y(v)m(oid)g(*)g
23462
 
Fe(serial)12 b Ff(,)32 b(size)p 1366 4532 V 41 w(t)e
23463
 
Fe(serial_size)12 b Ff(,)34 b(time)p 2291 4532 V 41 w(t)c
23464
 
Fe(revocation_time)12 b Fg(\))390 4642 y Ff(crl)t FB(:)40
23465
 
b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491 4642
23466
 
V 41 w(x509)p 1715 4642 V 41 w(crl)p 1857 4642 V 40 w(t)h(structure)390
23467
 
4778 y Ff(serial)t FB(:)41 b(The)30 b(rev)m(ok)m(ed)i(certi\014cate's)g
23468
 
(serial)f(n)m(um)m(b)s(er)390 4914 y Ff(serial)p 603
23469
 
4914 V 41 w(size)5 b FB(:)41 b(Holds)31 b(the)g(size)g(of)f(the)h
23470
 
(serial)g(\014eld.)390 5050 y Ff(rev)m(o)s(cation)p 806
23471
 
5050 V 42 w(time)5 b FB(:)41 b(The)30 b(time)h(this)g(certi\014cate)h
23472
 
(w)m(as)f(rev)m(ok)m(ed)390 5186 y(This)f(function)g(will)g(set)h(a)g
23473
 
(rev)m(ok)m(ed)h(certi\014cate's)g(serial)f(n)m(um)m(b)s(er)e(to)i(the)
23474
 
g(CRL.)390 5322 y Fn(Returns:)36 b FB(On)20 b(success,)j
23475
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23476
 
(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
 
23460
b(alue.)p eop end
23477
23461
%%Page: 193 199
23478
23462
TeXDict begin 193 198 bop 150 -116 a FB(Chapter)30 b(9:)41
23479
23463
b(F)-8 b(unction)31 b(Reference)2237 b(193)150 299 y
23480
23464
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23481
 
w(crl)p 979 299 V 54 w(set)p 1185 299 V 54 w(crt)3350
23482
 
498 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_set_c)q
23483
 
(rt)f Fg(\()p Ff(gn)m(utls)p 1889 498 28 4 v 40 w(x509)p
23484
 
2112 498 V 42 w(crl)p 2255 498 V 40 w(t)31 b Fe(crl)12
23485
 
b Ff(,)565 608 y(gn)m(utls)p 811 608 V 41 w(x509)p 1035
23486
 
608 V 41 w(crt)p 1187 608 V 40 w(t)31 b Fe(crt)12 b Ff(,)31
23487
 
b(time)p 1693 608 V 41 w(t)f Fe(revocation_time)12 b
23488
 
Fg(\))390 718 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
23489
 
(utls)p 1491 718 V 41 w(x509)p 1715 718 V 41 w(crl)p
23490
 
1857 718 V 40 w(t)h(structure)390 855 y Ff(crt)r FB(:)41
23491
 
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)c
23492
 
FB(with)k(the)h(rev)m(ok)m(ed)g(certi\014cate)390 992
23493
 
y Ff(rev)m(o)s(cation)p 806 992 V 42 w(time)5 b FB(:)41
 
23465
w(crl)p 979 299 V 54 w(set)p 1185 299 V 54 w(crt)p 1392
 
23466
299 V 54 w(serial)3350 496 y FB([F)-8 b(unction])-3599
 
23467
b Fh(int)53 b(gnutls_x509_crl_set_c)q(rt_s)q(eri)q(al)f
 
23468
Fg(\()p Ff(gn)m(utls)p 2255 496 28 4 v 41 w(x509)p 2479
 
23469
496 V 41 w(crl)p 2621 496 V 40 w(t)31 b Fe(crl)12 b Ff(,)31
 
23470
b(const)565 606 y(v)m(oid)g(*)g Fe(serial)12 b Ff(,)32
 
23471
b(size)p 1366 606 V 41 w(t)e Fe(serial_size)12 b Ff(,)34
 
23472
b(time)p 2291 606 V 41 w(t)c Fe(revocation_time)12 b
 
23473
Fg(\))390 715 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
 
23474
(utls)p 1491 715 V 41 w(x509)p 1715 715 V 41 w(crl)p
 
23475
1857 715 V 40 w(t)h(structure)390 850 y Ff(serial)t FB(:)41
 
23476
b(The)30 b(rev)m(ok)m(ed)i(certi\014cate's)g(serial)f(n)m(um)m(b)s(er)
 
23477
390 985 y Ff(serial)p 603 985 V 41 w(size)5 b FB(:)41
 
23478
b(Holds)31 b(the)g(size)g(of)f(the)h(serial)g(\014eld.)390
 
23479
1120 y Ff(rev)m(o)s(cation)p 806 1120 V 42 w(time)5 b
 
23480
FB(:)41 b(The)30 b(time)h(this)g(certi\014cate)h(w)m(as)f(rev)m(ok)m
 
23481
(ed)390 1255 y(This)f(function)g(will)g(set)h(a)g(rev)m(ok)m(ed)h
 
23482
(certi\014cate's)g(serial)f(n)m(um)m(b)s(er)e(to)i(the)g(CRL.)390
 
23483
1390 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23484
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23485
b(alue.)150 1590 y Fv(gn)m(utls)p 483 1590 37 5 v 55
 
23486
w(x509)p 786 1590 V 54 w(crl)p 979 1590 V 54 w(set)p
 
23487
1185 1590 V 54 w(crt)3350 1787 y FB([F)d(unction])-3599
 
23488
b Fh(int)53 b(gnutls_x509_crl_set_c)q(rt)f Fg(\()p Ff(gn)m(utls)p
 
23489
1889 1787 28 4 v 40 w(x509)p 2112 1787 V 42 w(crl)p 2255
 
23490
1787 V 40 w(t)31 b Fe(crl)12 b Ff(,)565 1897 y(gn)m(utls)p
 
23491
811 1897 V 41 w(x509)p 1035 1897 V 41 w(crt)p 1187 1897
 
23492
V 40 w(t)31 b Fe(crt)12 b Ff(,)31 b(time)p 1693 1897
 
23493
V 41 w(t)f Fe(revocation_time)12 b Fg(\))390 2006 y Ff(crl)t
 
23494
FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491
 
23495
2006 V 41 w(x509)p 1715 2006 V 41 w(crl)p 1857 2006 V
 
23496
40 w(t)h(structure)390 2141 y Ff(crt)r FB(:)41 b(a)31
 
23497
b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)c
 
23498
FB(with)k(the)h(rev)m(ok)m(ed)g(certi\014cate)390 2276
 
23499
y Ff(rev)m(o)s(cation)p 806 2276 V 42 w(time)5 b FB(:)41
23494
23500
b(The)30 b(time)h(this)g(certi\014cate)h(w)m(as)f(rev)m(ok)m(ed)390
23495
 
1129 y(This)f(function)g(will)g(set)h(a)g(rev)m(ok)m(ed)h
 
23501
2411 y(This)f(function)g(will)g(set)h(a)g(rev)m(ok)m(ed)h
23496
23502
(certi\014cate's)g(serial)f(n)m(um)m(b)s(er)e(to)i(the)g(CRL.)390
23497
 
1266 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23503
2546 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23498
23504
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23499
 
b(alue.)150 1468 y Fv(gn)m(utls)p 483 1468 37 5 v 55
23500
 
w(x509)p 786 1468 V 54 w(crl)p 979 1468 V 54 w(set)p
23501
 
1185 1468 V 54 w(next)p 1476 1468 V 54 w(up)s(date)3350
23502
 
1668 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_set_n)q
23503
 
(ext_)q(upd)q(ate)f Fg(\()p Ff(gn)m(utls)p 2307 1668
23504
 
28 4 v 41 w(x509)p 2531 1668 V 41 w(crl)p 2673 1668 V
23505
 
40 w(t)31 b Fe(crl)12 b Ff(,)565 1777 y(time)p 747 1777
23506
 
V 41 w(t)31 b Fe(exp_time)12 b Fg(\))390 1887 y Ff(crl)t
 
23505
b(alue.)150 2746 y Fv(gn)m(utls)p 483 2746 37 5 v 55
 
23506
w(x509)p 786 2746 V 54 w(crl)p 979 2746 V 54 w(set)p
 
23507
1185 2746 V 54 w(next)p 1476 2746 V 54 w(up)s(date)3350
 
23508
2943 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_set_n)q
 
23509
(ext_)q(upd)q(ate)f Fg(\()p Ff(gn)m(utls)p 2307 2943
 
23510
28 4 v 41 w(x509)p 2531 2943 V 41 w(crl)p 2673 2943 V
 
23511
40 w(t)31 b Fe(crl)12 b Ff(,)565 3053 y(time)p 747 3053
 
23512
V 41 w(t)31 b Fe(exp_time)12 b Fg(\))390 3163 y Ff(crl)t
23507
23513
FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491
23508
 
1887 V 41 w(x509)p 1715 1887 V 41 w(crl)p 1857 1887 V
23509
 
40 w(t)h(structure)390 2024 y Ff(exp)p 535 2024 V 40
23510
 
w(time)5 b FB(:)41 b(The)30 b(actual)i(time)390 2161
 
23514
3163 V 41 w(x509)p 1715 3163 V 41 w(crl)p 1857 3163 V
 
23515
40 w(t)h(structure)390 3298 y Ff(exp)p 535 3298 V 40
 
23516
w(time)5 b FB(:)41 b(The)30 b(actual)i(time)390 3433
23511
23517
y(This)e(function)g(will)g(set)h(the)g(time)g(this)f(CRL)g(will)h(b)s
23512
 
(e)e(up)s(dated.)390 2299 y Fn(Returns:)36 b FB(On)20
 
23518
(e)e(up)s(dated.)390 3568 y Fn(Returns:)36 b FB(On)20
23513
23519
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
23514
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 2501 y Fv(gn)m(utls)p
23515
 
483 2501 37 5 v 55 w(x509)p 786 2501 V 54 w(crl)p 979
23516
 
2501 V 54 w(set)p 1185 2501 V 54 w(this)p 1437 2501 V
23517
 
55 w(up)s(date)3350 2700 y FB([F)d(unction])-3599 b Fh(int)53
 
23520
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 3767 y Fv(gn)m(utls)p
 
23521
483 3767 37 5 v 55 w(x509)p 786 3767 V 54 w(crl)p 979
 
23522
3767 V 54 w(set)p 1185 3767 V 54 w(this)p 1437 3767 V
 
23523
55 w(up)s(date)3350 3965 y FB([F)d(unction])-3599 b Fh(int)53
23518
23524
b(gnutls_x509_crl_set_t)q(his_)q(upd)q(ate)f Fg(\()p
23519
 
Ff(gn)m(utls)p 2307 2700 28 4 v 41 w(x509)p 2531 2700
23520
 
V 41 w(crl)p 2673 2700 V 40 w(t)31 b Fe(crl)12 b Ff(,)565
23521
 
2810 y(time)p 747 2810 V 41 w(t)31 b Fe(act_time)12 b
23522
 
Fg(\))390 2919 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
23523
 
(utls)p 1491 2919 V 41 w(x509)p 1715 2919 V 41 w(crl)p
23524
 
1857 2919 V 40 w(t)h(structure)390 3056 y Ff(act)p 516
23525
 
3056 V 41 w(time)5 b FB(:)42 b(The)30 b(actual)h(time)390
23526
 
3194 y(This)f(function)g(will)g(set)h(the)g(time)g(this)f(CRL)g(w)m(as)
23527
 
h(issued.)390 3331 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23525
Ff(gn)m(utls)p 2307 3965 28 4 v 41 w(x509)p 2531 3965
 
23526
V 41 w(crl)p 2673 3965 V 40 w(t)31 b Fe(crl)12 b Ff(,)565
 
23527
4074 y(time)p 747 4074 V 41 w(t)31 b Fe(act_time)12 b
 
23528
Fg(\))390 4184 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
 
23529
(utls)p 1491 4184 V 41 w(x509)p 1715 4184 V 41 w(crl)p
 
23530
1857 4184 V 40 w(t)h(structure)390 4319 y Ff(act)p 516
 
23531
4319 V 41 w(time)5 b FB(:)42 b(The)30 b(actual)h(time)390
 
23532
4454 y(This)f(function)g(will)g(set)h(the)g(time)g(this)f(CRL)g(w)m(as)
 
23533
h(issued.)390 4589 y Fn(Returns:)36 b FB(On)20 b(success,)j
23528
23534
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23529
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3533 y Fv(gn)m(utls)p
23530
 
483 3533 37 5 v 55 w(x509)p 786 3533 V 54 w(crl)p 979
23531
 
3533 V 54 w(set)p 1185 3533 V 54 w(v)m(ersion)3350 3732
 
23535
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4789 y Fv(gn)m(utls)p
 
23536
483 4789 37 5 v 55 w(x509)p 786 4789 V 54 w(crl)p 979
 
23537
4789 V 54 w(set)p 1185 4789 V 54 w(v)m(ersion)3350 4986
23532
23538
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_set_v)q(ersi)q
23533
 
(on)f Fg(\()p Ff(gn)m(utls)p 2098 3732 28 4 v 41 w(x509)p
23534
 
2322 3732 V 41 w(crl)p 2464 3732 V 40 w(t)31 b Fe(crl)12
23535
 
b Ff(,)31 b(unsigned)565 3842 y(in)m(t)g Fe(version)12
23536
 
b Fg(\))390 3951 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
23537
 
(utls)p 1491 3951 V 41 w(x509)p 1715 3951 V 41 w(crl)p
23538
 
1857 3951 V 40 w(t)h(structure)390 4089 y Ff(v)m(ersion)p
 
23539
(on)f Fg(\()p Ff(gn)m(utls)p 2098 4986 28 4 v 41 w(x509)p
 
23540
2322 4986 V 41 w(crl)p 2464 4986 V 40 w(t)31 b Fe(crl)12
 
23541
b Ff(,)31 b(unsigned)565 5095 y(in)m(t)g Fe(version)12
 
23542
b Fg(\))390 5205 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
 
23543
(utls)p 1491 5205 V 41 w(x509)p 1715 5205 V 41 w(crl)p
 
23544
1857 5205 V 40 w(t)h(structure)390 5340 y Ff(v)m(ersion)p
23539
23545
FB(:)41 b(holds)30 b(the)h(v)m(ersion)f(n)m(um)m(b)s(er.)40
23540
 
b(F)-8 b(or)31 b(CRLv1)f(crls)h(m)m(ust)f(b)s(e)g(1.)390
23541
 
4226 y(This)j(function)g(will)h(set)g(the)g(v)m(ersion)g(of)f(the)h
23542
 
(CRL.)f(This)g(m)m(ust)g(b)s(e)g(one)h(for)f(CRL)g(v)m(ersion)h(1,)390
23543
 
4335 y(and)c(so)g(on.)41 b(The)30 b(CRLs)f(generated)j(b)m(y)e(gn)m
23544
 
(utls)h(should)e(ha)m(v)m(e)j(a)f(v)m(ersion)f(n)m(um)m(b)s(er)f(of)i
23545
 
(2.)390 4473 y Fn(Returns:)36 b FB(On)20 b(success,)j
23546
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23547
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4675 y Fv(gn)m(utls)p
23548
 
483 4675 37 5 v 55 w(x509)p 786 4675 V 54 w(crl)p 979
23549
 
4675 V 54 w(sign2)3350 4874 y FB([F)d(unction])-3599
23550
 
b Fh(int)53 b(gnutls_x509_crl_sign2)f Fg(\()p Ff(gn)m(utls)p
23551
 
1784 4874 28 4 v 41 w(x509)p 2008 4874 V 41 w(crl)p 2150
23552
 
4874 V 40 w(t)31 b Fe(crl)12 b Ff(,)31 b(gn)m(utls)p
23553
 
2720 4874 V 40 w(x509)p 2943 4874 V 42 w(crt)p 3096 4874
23554
 
V 40 w(t)565 4984 y Fe(issuer)12 b Ff(,)32 b(gn)m(utls)p
23555
 
1192 4984 V 40 w(x509)p 1415 4984 V 42 w(privk)m(ey)p
23556
 
1750 4984 V 40 w(t)f Fe(issuer_key)12 b Ff(,)33 b(gn)m(utls)p
23557
 
2686 4984 V 40 w(digest)p 2958 4984 V 41 w(algorithm)p
23558
 
3382 4984 V 41 w(t)e Fe(dig)12 b Ff(,)565 5093 y(unsigned)29
23559
 
b(in)m(t)i Fe(flags)12 b Fg(\))390 5203 y Ff(crl)t FB(:)40
23560
 
b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491 5203
23561
 
V 41 w(x509)p 1715 5203 V 41 w(crl)p 1857 5203 V 40 w(t)h(structure)390
23562
 
5340 y Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(the)f
23563
 
(certi\014cate)j(issuer)p eop end
 
23546
b(F)-8 b(or)31 b(CRLv1)f(crls)h(m)m(ust)f(b)s(e)g(1.)p
 
23547
eop end
23564
23548
%%Page: 194 200
23565
23549
TeXDict begin 194 199 bop 150 -116 a FB(Chapter)30 b(9:)41
23566
 
b(F)-8 b(unction)31 b(Reference)2237 b(194)390 299 y
23567
 
Ff(issuer)p 620 299 28 4 v 39 w(k)m(ey)8 b FB(:)42 b(holds)30
23568
 
b(the)g(issuer's)g(priv)-5 b(ate)31 b(k)m(ey)390 446
23569
 
y Ff(dig)8 b FB(:)48 b(The)34 b(message)h(digest)g(to)g(use.)52
23570
 
b(GNUTLS)p 2109 446 V 40 w(DIG)p 2322 446 V 40 w(SHA1)35
23571
 
b(is)f(the)g(safe)h(c)m(hoice)h(unless)e(y)m(ou)390 556
23572
 
y(kno)m(w)c(what)h(y)m(ou're)g(doing.)390 703 y Ff(\015ags)t
23573
 
FB(:)41 b(m)m(ust)30 b(b)s(e)g(0)390 850 y(This)22 b(function)h(will)h
23574
 
(sign)f(the)g(CRL)g(with)f(the)i(issuer's)f(priv)-5 b(ate)23
23575
 
b(k)m(ey)-8 b(,)26 b(and)d(will)g(cop)m(y)h(the)f(issuer's)390
23576
 
959 y(information)31 b(in)m(to)g(the)g(CRL.)390 1106
23577
 
y(This)25 b(m)m(ust)i(b)s(e)e(the)i(last)g(step)f(in)g(a)h
 
23550
b(F)-8 b(unction)31 b(Reference)2237 b(194)390 299 y(This)33
 
23551
b(function)g(will)h(set)g(the)g(v)m(ersion)g(of)f(the)h(CRL.)f(This)g
 
23552
(m)m(ust)g(b)s(e)g(one)h(for)f(CRL)g(v)m(ersion)h(1,)390
 
23553
408 y(and)c(so)g(on.)41 b(The)30 b(CRLs)f(generated)j(b)m(y)e(gn)m
 
23554
(utls)h(should)e(ha)m(v)m(e)j(a)f(v)m(ersion)f(n)m(um)m(b)s(er)f(of)i
 
23555
(2.)390 540 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23556
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
23557
(negativ)m(e)h(error)d(v)-5 b(alue.)150 734 y Fv(gn)m(utls)p
 
23558
483 734 37 5 v 55 w(x509)p 786 734 V 54 w(crl)p 979 734
 
23559
V 54 w(sign2)3350 926 y FB([F)d(unction])-3599 b Fh(int)53
 
23560
b(gnutls_x509_crl_sign2)f Fg(\()p Ff(gn)m(utls)p 1784
 
23561
926 28 4 v 41 w(x509)p 2008 926 V 41 w(crl)p 2150 926
 
23562
V 40 w(t)31 b Fe(crl)12 b Ff(,)31 b(gn)m(utls)p 2720
 
23563
926 V 40 w(x509)p 2943 926 V 42 w(crt)p 3096 926 V 40
 
23564
w(t)565 1035 y Fe(issuer)12 b Ff(,)32 b(gn)m(utls)p 1192
 
23565
1035 V 40 w(x509)p 1415 1035 V 42 w(privk)m(ey)p 1750
 
23566
1035 V 40 w(t)f Fe(issuer_key)12 b Ff(,)33 b(gn)m(utls)p
 
23567
2686 1035 V 40 w(digest)p 2958 1035 V 41 w(algorithm)p
 
23568
3382 1035 V 41 w(t)e Fe(dig)12 b Ff(,)565 1145 y(unsigned)29
 
23569
b(in)m(t)i Fe(flags)12 b Fg(\))390 1254 y Ff(crl)t FB(:)40
 
23570
b(should)30 b(con)m(tain)i(a)e(gn)m(utls)p 1491 1254
 
23571
V 41 w(x509)p 1715 1254 V 41 w(crl)p 1857 1254 V 40 w(t)h(structure)390
 
23572
1386 y Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(the)f
 
23573
(certi\014cate)j(issuer)390 1518 y Ff(issuer)p 620 1518
 
23574
V 39 w(k)m(ey)8 b FB(:)42 b(holds)30 b(the)g(issuer's)g(priv)-5
 
23575
b(ate)31 b(k)m(ey)390 1650 y Ff(dig)8 b FB(:)48 b(The)34
 
23576
b(message)h(digest)g(to)g(use.)52 b(GNUTLS)p 2109 1650
 
23577
V 40 w(DIG)p 2322 1650 V 40 w(SHA1)35 b(is)f(the)g(safe)h(c)m(hoice)h
 
23578
(unless)e(y)m(ou)390 1760 y(kno)m(w)c(what)h(y)m(ou're)g(doing.)390
 
23579
1891 y Ff(\015ags)t FB(:)41 b(m)m(ust)30 b(b)s(e)g(0)390
 
23580
2023 y(This)22 b(function)h(will)h(sign)f(the)g(CRL)g(with)f(the)i
 
23581
(issuer's)f(priv)-5 b(ate)23 b(k)m(ey)-8 b(,)26 b(and)d(will)g(cop)m(y)
 
23582
h(the)f(issuer's)390 2133 y(information)31 b(in)m(to)g(the)g(CRL.)390
 
23583
2265 y(This)25 b(m)m(ust)i(b)s(e)e(the)i(last)g(step)f(in)g(a)h
23578
23584
(certi\014cate)h(CRL)e(since)g(all)h(the)g(previously)f(set)h
23579
 
(parameters)390 1216 y(are)k(no)m(w)f(signed.)390 1363
 
23585
(parameters)390 2374 y(are)k(no)m(w)f(signed.)390 2506
23580
23586
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23581
23587
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23582
 
b(alue.)150 1575 y Fv(gn)m(utls)p 483 1575 37 5 v 55
23583
 
w(x509)p 786 1575 V 54 w(crl)p 979 1575 V 54 w(sign)3350
23584
 
1784 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_sign)f
23585
 
Fg(\()p Ff(gn)m(utls)p 1732 1784 28 4 v 40 w(x509)p 1955
23586
 
1784 V 42 w(crl)p 2098 1784 V 40 w(t)31 b Fe(crl)12 b
23587
 
Ff(,)31 b(gn)m(utls)p 2668 1784 V 40 w(x509)p 2891 1784
23588
 
V 42 w(crt)p 3044 1784 V 40 w(t)565 1894 y Fe(issuer)12
23589
 
b Ff(,)32 b(gn)m(utls)p 1192 1894 V 40 w(x509)p 1415
23590
 
1894 V 42 w(privk)m(ey)p 1750 1894 V 40 w(t)f Fe(issuer_key)12
23591
 
b Fg(\))390 2003 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
23592
 
(utls)p 1491 2003 V 41 w(x509)p 1715 2003 V 41 w(crl)p
23593
 
1857 2003 V 40 w(t)h(structure)390 2150 y Ff(issuer)7
 
23588
b(alue.)150 2700 y Fv(gn)m(utls)p 483 2700 37 5 v 55
 
23589
w(x509)p 786 2700 V 54 w(crl)p 979 2700 V 54 w(sign)3350
 
23590
2891 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_sign)f
 
23591
Fg(\()p Ff(gn)m(utls)p 1732 2891 28 4 v 40 w(x509)p 1955
 
23592
2891 V 42 w(crl)p 2098 2891 V 40 w(t)31 b Fe(crl)12 b
 
23593
Ff(,)31 b(gn)m(utls)p 2668 2891 V 40 w(x509)p 2891 2891
 
23594
V 42 w(crt)p 3044 2891 V 40 w(t)565 3001 y Fe(issuer)12
 
23595
b Ff(,)32 b(gn)m(utls)p 1192 3001 V 40 w(x509)p 1415
 
23596
3001 V 42 w(privk)m(ey)p 1750 3001 V 40 w(t)f Fe(issuer_key)12
 
23597
b Fg(\))390 3111 y Ff(crl)t FB(:)40 b(should)30 b(con)m(tain)i(a)e(gn)m
 
23598
(utls)p 1491 3111 V 41 w(x509)p 1715 3111 V 41 w(crl)p
 
23599
1857 3111 V 40 w(t)h(structure)390 3242 y Ff(issuer)7
23594
23600
b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(the)f(certi\014cate)j
23595
 
(issuer)390 2297 y Ff(issuer)p 620 2297 V 39 w(k)m(ey)8
 
23601
(issuer)390 3374 y Ff(issuer)p 620 3374 V 39 w(k)m(ey)8
23596
23602
b FB(:)42 b(holds)30 b(the)g(issuer's)g(priv)-5 b(ate)31
23597
 
b(k)m(ey)390 2444 y(This)h(function)h(is)f(the)h(same)h(a)f
 
23603
b(k)m(ey)390 3506 y(This)h(function)h(is)f(the)h(same)h(a)f
23598
23604
Ft(gnutls_x509_crl_sign2\(\))26 b FB(with)33 b(no)g(\015ags,)g(and)g
23599
 
(SHA1)g(as)390 2554 y(the)e(hash)e(algorithm.)390 2701
 
23605
(SHA1)g(as)390 3616 y(the)e(hash)e(algorithm.)390 3747
23600
23606
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23601
23607
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23602
 
b(alue.)150 2913 y Fv(gn)m(utls)p 483 2913 37 5 v 55
23603
 
w(x509)p 786 2913 V 54 w(crl)p 979 2913 V 54 w(v)m(erify)3350
23604
 
3122 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_verif)q(y)e
23605
 
Fg(\()p Ff(gn)m(utls)p 1836 3122 28 4 v 41 w(x509)p 2060
23606
 
3122 V 41 w(crl)p 2202 3122 V 41 w(t)30 b Fe(crl)12 b
23607
 
Ff(,)31 b(const)565 3232 y(gn)m(utls)p 811 3232 V 41
23608
 
w(x509)p 1035 3232 V 41 w(crt)p 1187 3232 V 40 w(t)g(*)g
 
23608
b(alue.)150 3941 y Fv(gn)m(utls)p 483 3941 37 5 v 55
 
23609
w(x509)p 786 3941 V 54 w(crl)p 979 3941 V 54 w(v)m(erify)3350
 
23610
4133 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crl_verif)q(y)e
 
23611
Fg(\()p Ff(gn)m(utls)p 1836 4133 28 4 v 41 w(x509)p 2060
 
23612
4133 V 41 w(crl)p 2202 4133 V 41 w(t)30 b Fe(crl)12 b
 
23613
Ff(,)31 b(const)565 4242 y(gn)m(utls)p 811 4242 V 41
 
23614
w(x509)p 1035 4242 V 41 w(crt)p 1187 4242 V 40 w(t)g(*)g
23609
23615
Fe(CA_list)12 b Ff(,)32 b(in)m(t)f Fe(CA_list_length)12
23610
23616
b Ff(,)34 b(unsigned)29 b(in)m(t)i Fe(flags)12 b Ff(,)565
23611
 
3341 y(unsigned)29 b(in)m(t)i(*)g Fe(verify)12 b Fg(\))390
23612
 
3451 y Ff(crl)t FB(:)40 b(is)31 b(the)f(crl)h(to)g(b)s(e)f(v)m
23613
 
(eri\014ed)390 3598 y Ff(CA)p 530 3598 V 40 w(list)r
 
23617
4352 y(unsigned)29 b(in)m(t)i(*)g Fe(verify)12 b Fg(\))390
 
23618
4462 y Ff(crl)t FB(:)40 b(is)31 b(the)f(crl)h(to)g(b)s(e)f(v)m
 
23619
(eri\014ed)390 4593 y Ff(CA)p 530 4593 V 40 w(list)r
23614
23620
FB(:)41 b(is)31 b(a)f(certi\014cate)j(list)e(that)g(is)f(considered)g
23615
 
(to)i(b)s(e)d(trusted)h(one)390 3745 y Ff(CA)p 530 3745
23616
 
V 40 w(list)p 691 3745 V 41 w(length)p FB(:)41 b(holds)30
 
23621
(to)i(b)s(e)d(trusted)h(one)390 4725 y Ff(CA)p 530 4725
 
23622
V 40 w(list)p 691 4725 V 41 w(length)p FB(:)41 b(holds)30
23617
23623
b(the)g(n)m(um)m(b)s(er)f(of)i(CA)f(certi\014cates)i(in)e(CA)p
23618
 
2733 3745 V 40 w(list)390 3892 y Ff(\015ags)t FB(:)51
 
23624
2733 4725 V 40 w(list)390 4857 y Ff(\015ags)t FB(:)51
23619
23625
b(Flags)37 b(that)f(ma)m(y)g(b)s(e)e(used)h(to)h(c)m(hange)h(the)e(v)m
23620
23626
(eri\014cation)i(algorithm.)57 b(Use)36 b(OR)f(of)h(the)390
23621
 
4002 y(gn)m(utls)p 636 4002 V 40 w(certi\014cate)p 1063
23622
 
4002 V 43 w(v)m(erify)p 1328 4002 V 40 w(\015ags)31 b(en)m(umerations.)
23623
 
390 4149 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g(crl)h(v)m
23624
 
(eri\014cation)h(output.)390 4296 y(This)27 b(function)h(will)g(try)f
 
23627
4967 y(gn)m(utls)p 636 4967 V 40 w(certi\014cate)p 1063
 
23628
4967 V 43 w(v)m(erify)p 1328 4967 V 40 w(\015ags)31 b(en)m(umerations.)
 
23629
390 5099 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g(crl)h(v)m
 
23630
(eri\014cation)h(output.)390 5230 y(This)27 b(function)h(will)g(try)f
23625
23631
(to)i(v)m(erify)f(the)g(giv)m(en)h(crl)f(and)f(return)g(its)h(status.)
23626
 
40 b(See)28 b Ft(gnutls_x509_)390 4406 y(crt_list_verify\(\))e
 
23632
40 b(See)28 b Ft(gnutls_x509_)390 5340 y(crt_list_verify\(\))e
23627
23633
FB(for)k(a)h(detailed)g(description)f(of)h(return)e(v)-5
23628
 
b(alues.)390 4553 y Fn(Returns:)73 b FB(On)47 b(success,)k
23629
 
Ft(GNUTLS_E_SUCCESS)42 b FB(is)47 b(returned,)k(otherwise)c(a)g
23630
 
(negativ)m(e)i(error)390 4662 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j
23631
 
(v)-5 b(alue)31 b(in)f(case)h(of)g(an)f(error.)150 4874
23632
 
y Fv(gn)m(utls)p 483 4874 37 5 v 55 w(x509)p 786 4874
23633
 
V 54 w(crq)p 1010 4874 V 54 w(deinit)3350 5083 y FB([F)-8
23634
 
b(unction])-3599 b Fh(void)54 b(gnutls_x509_crq_deinit)e
23635
 
Fg(\()p Ff(gn)m(utls)p 1889 5083 28 4 v 40 w(x509)p 2112
23636
 
5083 V 42 w(crq)p 2278 5083 V 40 w(t)30 b Fe(crq)12 b
23637
 
Fg(\))390 5193 y Ff(crq)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e
23638
 
(initialized)390 5340 y(This)h(function)g(will)g(deinitialize)j(a)e
23639
 
(CRL)e(structure.)p eop end
 
23634
b(alues.)p eop end
23640
23635
%%Page: 195 201
23641
23636
TeXDict begin 195 200 bop 150 -116 a FB(Chapter)30 b(9:)41
23642
 
b(F)-8 b(unction)31 b(Reference)2237 b(195)150 299 y
23643
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23644
 
w(crq)p 1010 299 V 54 w(exp)s(ort)3350 510 y FB([F)-8
23645
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_expor)q(t)e
23646
 
Fg(\()p Ff(gn)m(utls)p 1836 510 28 4 v 41 w(x509)p 2060
23647
 
510 V 41 w(crq)p 2225 510 V 40 w(t)31 b Fe(crq)12 b Ff(,)565
23648
 
620 y(gn)m(utls)p 811 620 V 41 w(x509)p 1035 620 V 41
23649
 
w(crt)p 1187 620 V 40 w(fm)m(t)p 1363 620 V 41 w(t)30
23650
 
b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12
23651
 
b Ff(,)33 b(size)p 2906 620 V 41 w(t)e(*)565 730 y Fe(output_data_size)
23652
 
12 b Fg(\))390 839 y Ff(crq)r FB(:)41 b(Holds)30 b(the)h(request)390
23653
 
988 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
23654
 
b(One)30 b(of)h(PEM)f(or)g(DER.)390 1138 y Ff(output)p
23655
 
664 1138 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e
 
23637
b(F)-8 b(unction)31 b(Reference)2237 b(195)390 299 y
 
23638
Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
 
23639
b FB(is)47 b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
 
23640
408 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
 
23641
b(in)f(case)h(of)g(an)f(error.)150 634 y Fv(gn)m(utls)p
 
23642
483 634 37 5 v 55 w(x509)p 786 634 V 54 w(crq)p 1010
 
23643
634 V 54 w(deinit)3350 857 y FB([F)-8 b(unction])-3599
 
23644
b Fh(void)54 b(gnutls_x509_crq_deinit)e Fg(\()p Ff(gn)m(utls)p
 
23645
1889 857 28 4 v 40 w(x509)p 2112 857 V 42 w(crq)p 2278
 
23646
857 V 40 w(t)30 b Fe(crq)12 b Fg(\))390 967 y Ff(crq)r
 
23647
FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e(initialized)390
 
23648
1128 y(This)h(function)g(will)g(deinitialize)j(a)e(CRL)e(structure.)150
 
23649
1353 y Fv(gn)m(utls)p 483 1353 37 5 v 55 w(x509)p 786
 
23650
1353 V 54 w(crq)p 1010 1353 V 54 w(exp)s(ort)3350 1577
 
23651
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_expor)q(t)e
 
23652
Fg(\()p Ff(gn)m(utls)p 1836 1577 28 4 v 41 w(x509)p 2060
 
23653
1577 V 41 w(crq)p 2225 1577 V 40 w(t)31 b Fe(crq)12 b
 
23654
Ff(,)565 1686 y(gn)m(utls)p 811 1686 V 41 w(x509)p 1035
 
23655
1686 V 41 w(crt)p 1187 1686 V 40 w(fm)m(t)p 1363 1686
 
23656
V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)g
 
23657
Fe(output_data)12 b Ff(,)33 b(size)p 2906 1686 V 41 w(t)e(*)565
 
23658
1796 y Fe(output_data_size)12 b Fg(\))390 1905 y Ff(crq)r
 
23659
FB(:)41 b(Holds)30 b(the)h(request)390 2066 y Ff(format)r
 
23660
FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
 
23661
b(One)30 b(of)h(PEM)f(or)g(DER.)390 2227 y Ff(output)p
 
23662
664 2227 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e
23656
23663
(certi\014cate)j(request)d(PEM)h(or)f(DER)g(enco)s(ded)390
23657
 
1287 y Ff(output)p 664 1287 V 40 w(data)p 880 1287 V
 
23664
2388 y Ff(output)p 664 2388 V 40 w(data)p 880 2388 V
23658
23665
40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
23659
 
2093 1287 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
23660
 
(actual)390 1396 y(size)c(of)g(parameters\))390 1546
 
23666
2093 2388 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
23667
(actual)390 2498 y(size)c(of)g(parameters\))390 2658
23661
23668
y(This)f(function)g(will)g(exp)s(ort)g(the)h(certi\014cate)h(request)f
23662
 
(to)g(a)g(PK)m(CS10)390 1695 y(If)91 b(the)g(bu\013er)f(pro)m(vided)h
 
23669
(to)g(a)g(PK)m(CS10)390 2819 y(If)91 b(the)g(bu\013er)f(pro)m(vided)h
23663
23670
(is)g(not)h(long)g(enough)f(to)h(hold)f(the)g(output,)106
23664
 
b(then)390 1804 y(GNUTLS)p 777 1804 V 40 w(E)p 879 1804
23665
 
V 40 w(SHOR)-8 b(T)p 1234 1804 V 39 w(MEMOR)g(Y)p 1699
23666
 
1804 V 41 w(BUFFER)42 b(will)f(b)s(e)f(returned)g(and)g(*output)p
23667
 
3357 1804 V 40 w(data)p 3573 1804 V 41 w(size)390 1914
23668
 
y(will)31 b(b)s(e)e(up)s(dated.)390 2063 y(If)j(the)h(structure)g(is)g
 
23671
b(then)390 2929 y(GNUTLS)p 777 2929 V 40 w(E)p 879 2929
 
23672
V 40 w(SHOR)-8 b(T)p 1234 2929 V 39 w(MEMOR)g(Y)p 1699
 
23673
2929 V 41 w(BUFFER)42 b(will)f(b)s(e)f(returned)g(and)g(*output)p
 
23674
3357 2929 V 40 w(data)p 3573 2929 V 41 w(size)390 3038
 
23675
y(will)31 b(b)s(e)e(up)s(dated.)390 3199 y(If)j(the)h(structure)g(is)g
23669
23676
(PEM)f(enco)s(ded,)i(it)f(will)g(ha)m(v)m(e)h(a)f(header)g(of)g
23670
 
Ft(")p FB(BEGIN)g(NEW)g(CER)-8 b(TIFI-)390 2173 y(CA)g(TE)30
23671
 
b(REQUEST)p Ft(")p FB(.)390 2322 y Fn(Return)g(v)-5 b(alue:)41
 
23677
Ft(")p FB(BEGIN)g(NEW)g(CER)-8 b(TIFI-)390 3309 y(CA)g(TE)30
 
23678
b(REQUEST)p Ft(")p FB(.)390 3470 y Fn(Return)g(v)-5 b(alue:)41
23672
23679
b FB(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)i(v)-5
23673
23680
b(alue)30 b(will)h(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
23674
 
2536 y Fv(gn)m(utls)p 483 2536 37 5 v 55 w(x509)p 786
23675
 
2536 V 54 w(crq)p 1010 2536 V 54 w(get)p 1229 2536 V
23676
 
54 w(attribute)p 1763 2536 V 53 w(b)m(y)p 1946 2536 V
23677
 
54 w(oid)3350 2747 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
23681
3695 y Fv(gn)m(utls)p 483 3695 37 5 v 55 w(x509)p 786
 
23682
3695 V 54 w(crq)p 1010 3695 V 54 w(get)p 1229 3695 V
 
23683
54 w(attribute)p 1763 3695 V 53 w(b)m(y)p 1946 3695 V
 
23684
54 w(oid)3350 3919 y FB([F)-8 b(unction])-3599 b Fh(int)53
23678
23685
b(gnutls_x509_crq_get_a)q(ttri)q(but)q(e_b)q(y_o)q(id)f
23679
 
Fg(\()p Ff(gn)m(utls)p 2569 2747 28 4 v 40 w(x509)p 2792
23680
 
2747 V 42 w(crq)p 2958 2747 V 40 w(t)565 2857 y Fe(crq)12
 
23686
Fg(\()p Ff(gn)m(utls)p 2569 3919 28 4 v 40 w(x509)p 2792
 
23687
3919 V 42 w(crq)p 2958 3919 V 40 w(t)565 4028 y Fe(crq)12
23681
23688
b Ff(,)31 b(const)g(c)m(har)g(*)f Fe(oid)12 b Ff(,)31
23682
23689
b(in)m(t)g Fe(indx)12 b Ff(,)32 b(v)m(oid)f(*)f Fe(buf)12
23683
 
b Ff(,)31 b(size)p 2585 2857 V 41 w(t)g(*)g Fe(sizeof_buf)12
23684
 
b Fg(\))390 2966 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
23685
 
(utls)p 1513 2966 V 40 w(x509)p 1736 2966 V 41 w(crq)p
23686
 
1901 2966 V 40 w(t)g(structure)390 3116 y Ff(oid)t FB(:)40
 
23690
b Ff(,)31 b(size)p 2585 4028 V 41 w(t)g(*)g Fe(sizeof_buf)12
 
23691
b Fg(\))390 4138 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
 
23692
(utls)p 1513 4138 V 40 w(x509)p 1736 4138 V 41 w(crq)p
 
23693
1901 4138 V 40 w(t)g(structure)390 4299 y Ff(oid)t FB(:)40
23687
23694
b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m(ull)g
23688
 
(terminated)h(string)390 3265 y Ff(indx)6 b FB(:)50 b(In)35
 
23695
(terminated)h(string)390 4460 y Ff(indx)6 b FB(:)50 b(In)35
23689
23696
b(case)h(m)m(ultiple)g(same)g(OIDs)f(exist)h(in)f(the)g(attribute)h
23690
 
(list,)i(this)d(sp)s(eci\014es)g(whic)m(h)g(to)390 3374
 
23697
(list,)i(this)d(sp)s(eci\014es)g(whic)m(h)g(to)390 4569
23691
23698
y(send.)40 b(Use)31 b(zero)g(to)g(get)g(the)g(\014rst)f(one.)390
23692
 
3524 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)
 
23699
4730 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)
23693
23700
f(to)h(hold)f(the)h(attribute)g(data)g(\(ma)m(y)g(b)s(e)f(n)m(ull\))390
23694
 
3673 y Ff(sizeof)p 610 3673 V 41 w(buf)17 b FB(:)40 b(initially)32
23695
 
b(holds)e(the)g(size)i(of)e Ft(buf)390 3822 y FB(This)c(function)g
 
23701
4891 y Ff(sizeof)p 610 4891 V 41 w(buf)17 b FB(:)40 b(initially)32
 
23702
b(holds)e(the)g(size)i(of)e Ft(buf)390 5052 y FB(This)c(function)g
23696
23703
(will)h(return)e(the)i(attribute)h(in)e(the)h(certi\014cate)h(request)f
23697
 
(sp)s(eci\014ed)f(b)m(y)g(the)h(giv)m(en)390 3932 y(Ob)5
 
23704
(sp)s(eci\014ed)f(b)m(y)g(the)h(giv)m(en)390 5161 y(Ob)5
23698
23705
b(ject)31 b(ID.)f(The)g(attribute)h(will)g(b)s(e)f(DER)g(enco)s(ded.)
23699
 
390 4081 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
 
23706
390 5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
23700
23707
16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23701
 
b(alue.)150 4295 y Fv(gn)m(utls)p 483 4295 37 5 v 55
23702
 
w(x509)p 786 4295 V 54 w(crq)p 1010 4295 V 54 w(get)p
23703
 
1229 4295 V 54 w(c)m(hallenge)p 1772 4295 V 54 w(passw)m(ord)3350
23704
 
4506 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_c)q
23705
 
(hall)q(eng)q(e_p)q(ass)q(word)f Fg(\()p Ff(gn)m(utls)p
23706
 
2673 4506 28 4 v 41 w(x509)p 2897 4506 V 41 w(crq)p 3062
23707
 
4506 V 40 w(t)565 4616 y Fe(crq)12 b Ff(,)31 b(c)m(har)g(*)g
23708
 
Fe(pass)12 b Ff(,)31 b(size)p 1488 4616 V 41 w(t)f(*)h
23709
 
Fe(sizeof_pass)12 b Fg(\))390 4725 y Ff(crq)r FB(:)41
23710
 
b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p 1513 4725
23711
 
V 40 w(x509)p 1736 4725 V 41 w(crq)p 1901 4725 V 40 w(t)g(structure)390
23712
 
4875 y Ff(pass)t FB(:)40 b(will)31 b(hold)f(a)h(n)m(ull)f(terminated)h
23713
 
(passw)m(ord)390 5024 y Ff(sizeof)p 610 5024 V 41 w(pass)t
23714
 
FB(:)40 b(Initially)32 b(holds)e(the)g(size)h(of)g Ft(pass)p
23715
 
FB(.)390 5173 y(This)f(function)g(will)g(return)g(the)g(c)m(hallenge)j
23716
 
(passw)m(ord)c(in)h(the)h(request.)390 5322 y Fn(Returns:)36
23717
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
23718
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23719
23708
b(alue.)p eop end
23720
23709
%%Page: 196 202
23721
23710
TeXDict begin 196 201 bop 150 -116 a FB(Chapter)30 b(9:)41
23722
23711
b(F)-8 b(unction)31 b(Reference)2237 b(196)150 299 y
23723
23712
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23724
 
w(crq)p 1010 299 V 54 w(get)p 1229 299 V 54 w(dn)p 1419
23725
 
299 V 54 w(b)m(y)p 1603 299 V 54 w(oid)3350 499 y FB([F)-8
23726
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_d)q(n_by)q(_oi)q(d)e
23727
 
Fg(\()p Ff(gn)m(utls)p 2202 499 28 4 v 41 w(x509)p 2426
23728
 
499 V 42 w(crq)p 2592 499 V 40 w(t)30 b Fe(crq)12 b Ff(,)31
23729
 
b(const)565 608 y(c)m(har)g(*)g Fe(oid)12 b Ff(,)31 b(in)m(t)g
23730
 
Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(raw_flag)12
23731
 
b Ff(,)32 b(v)m(oid)f(*)g Fe(buf)12 b Ff(,)31 b(size)p
23732
 
3127 608 V 41 w(t)g(*)565 718 y Fe(sizeof_buf)12 b Fg(\))390
23733
 
828 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
23734
 
1513 828 V 40 w(x509)p 1736 828 V 41 w(crq)p 1901 828
23735
 
V 40 w(t)g(structure)390 965 y Ff(oid)t FB(:)40 b(holds)30
23736
 
b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m(ull)g(terminated)h
23737
 
(string)390 1103 y Ff(indx)6 b FB(:)39 b(In)26 b(case)j(m)m(ultiple)f
23738
 
(same)g(OIDs)f(exist)h(in)f(the)h(RDN,)g(this)f(sp)s(eci\014es)g(whic)m
23739
 
(h)g(to)i(send.)39 b(Use)390 1212 y(zero)31 b(to)g(get)h(the)e(\014rst)
23740
 
g(one.)390 1350 y Ff(ra)m(w)p 540 1350 V 40 w(\015ag)8
23741
 
b FB(:)41 b(If)30 b(non)g(zero)h(returns)e(the)i(ra)m(w)f(DER)h(data)g
23742
 
(of)f(the)h(DN)g(part.)390 1488 y Ff(buf)16 b FB(:)41
23743
 
b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f(the)h(name)f
23744
 
(\(ma)m(y)h(b)s(e)f(n)m(ull\))390 1625 y Ff(sizeof)p
23745
 
610 1625 V 41 w(buf)17 b FB(:)40 b(initially)32 b(holds)e(the)g(size)i
23746
 
(of)e Ft(buf)390 1763 y FB(This)39 b(function)h(will)g(extract)i(the)e
23747
 
(part)g(of)g(the)g(name)g(of)g(the)h(Certi\014cate)g(request)f(sub)5
23748
 
b(ject,)390 1872 y(sp)s(eci\014ed)37 b(b)m(y)h(the)g(giv)m(en)h(OID.)f
 
23713
w(crq)p 1010 299 V 54 w(get)p 1229 299 V 54 w(c)m(hallenge)p
 
23714
1772 299 V 54 w(passw)m(ord)3350 496 y FB([F)-8 b(unction])-3599
 
23715
b Fh(int)53 b(gnutls_x509_crq_get_c)q(hall)q(eng)q(e_p)q(ass)q(word)f
 
23716
Fg(\()p Ff(gn)m(utls)p 2673 496 28 4 v 41 w(x509)p 2897
 
23717
496 V 41 w(crq)p 3062 496 V 40 w(t)565 606 y Fe(crq)12
 
23718
b Ff(,)31 b(c)m(har)g(*)g Fe(pass)12 b Ff(,)31 b(size)p
 
23719
1488 606 V 41 w(t)f(*)h Fe(sizeof_pass)12 b Fg(\))390
 
23720
715 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
 
23721
1513 715 V 40 w(x509)p 1736 715 V 41 w(crq)p 1901 715
 
23722
V 40 w(t)g(structure)390 850 y Ff(pass)t FB(:)40 b(will)31
 
23723
b(hold)f(a)h(n)m(ull)f(terminated)h(passw)m(ord)390 986
 
23724
y Ff(sizeof)p 610 986 V 41 w(pass)t FB(:)40 b(Initially)32
 
23725
b(holds)e(the)g(size)h(of)g Ft(pass)p FB(.)390 1121 y(This)f(function)g
 
23726
(will)g(return)g(the)g(c)m(hallenge)j(passw)m(ord)c(in)h(the)h
 
23727
(request.)390 1256 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23728
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
23729
(negativ)m(e)h(error)d(v)-5 b(alue.)150 1455 y Fv(gn)m(utls)p
 
23730
483 1455 37 5 v 55 w(x509)p 786 1455 V 54 w(crq)p 1010
 
23731
1455 V 54 w(get)p 1229 1455 V 54 w(dn)p 1419 1455 V 54
 
23732
w(b)m(y)p 1603 1455 V 54 w(oid)3350 1653 y FB([F)d(unction])-3599
 
23733
b Fh(int)53 b(gnutls_x509_crq_get_d)q(n_by)q(_oi)q(d)e
 
23734
Fg(\()p Ff(gn)m(utls)p 2202 1653 28 4 v 41 w(x509)p 2426
 
23735
1653 V 42 w(crq)p 2592 1653 V 40 w(t)30 b Fe(crq)12 b
 
23736
Ff(,)31 b(const)565 1762 y(c)m(har)g(*)g Fe(oid)12 b
 
23737
Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
23738
Fe(raw_flag)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(buf)12 b
 
23739
Ff(,)31 b(size)p 3127 1762 V 41 w(t)g(*)565 1872 y Fe(sizeof_buf)12
 
23740
b Fg(\))390 1982 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
 
23741
(utls)p 1513 1982 V 40 w(x509)p 1736 1982 V 41 w(crq)p
 
23742
1901 1982 V 40 w(t)g(structure)390 2117 y Ff(oid)t FB(:)40
 
23743
b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m(ull)g
 
23744
(terminated)h(string)390 2252 y Ff(indx)6 b FB(:)39 b(In)26
 
23745
b(case)j(m)m(ultiple)f(same)g(OIDs)f(exist)h(in)f(the)h(RDN,)g(this)f
 
23746
(sp)s(eci\014es)g(whic)m(h)g(to)i(send.)39 b(Use)390
 
23747
2361 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
 
23748
2496 y Ff(ra)m(w)p 540 2496 V 40 w(\015ag)8 b FB(:)41
 
23749
b(If)30 b(non)g(zero)h(returns)e(the)i(ra)m(w)f(DER)h(data)g(of)f(the)h
 
23750
(DN)g(part.)390 2631 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)
 
23751
h(a)g(structure)f(to)h(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m
 
23752
(ull\))390 2766 y Ff(sizeof)p 610 2766 V 41 w(buf)17
 
23753
b FB(:)40 b(initially)32 b(holds)e(the)g(size)i(of)e
 
23754
Ft(buf)390 2902 y FB(This)39 b(function)h(will)g(extract)i(the)e(part)g
 
23755
(of)g(the)g(name)g(of)g(the)h(Certi\014cate)g(request)f(sub)5
 
23756
b(ject,)390 3011 y(sp)s(eci\014ed)37 b(b)m(y)h(the)g(giv)m(en)h(OID.)f
23749
23757
(The)f(output)g(will)i(b)s(e)e(enco)s(ded)g(as)h(describ)s(ed)f(in)h
23750
 
(RF)m(C2253.)390 1982 y(The)23 b(output)g(string)g(will)h(b)s(e)f(ASCI)
 
23758
(RF)m(C2253.)390 3121 y(The)23 b(output)g(string)g(will)h(b)s(e)f(ASCI)
23751
23759
s(I)f(or)h(UTF-8)h(enco)s(ded,)h(dep)s(ending)d(on)h(the)h
23752
 
(certi\014cate)h(data.)390 2120 y(Some)32 b(help)s(er)f(macros)i(with)f
 
23760
(certi\014cate)h(data.)390 3256 y(Some)32 b(help)s(er)f(macros)i(with)f
23753
23761
(p)s(opular)f(OIDs)h(can)g(b)s(e)g(found)f(in)g(gn)m(utls/x509.h)j(If)e
23754
 
(ra)m(w)g(\015ag)h(is)390 2229 y(zero,)39 b(this)e(function)f(will)h
 
23762
(ra)m(w)g(\015ag)h(is)390 3365 y(zero,)39 b(this)e(function)f(will)h
23755
23763
(only)f(return)g(kno)m(wn)g(OIDs)g(as)h(text.)61 b(Other)36
23756
 
b(OIDs)g(will)h(b)s(e)f(DER)390 2339 y(enco)s(ded,)29
 
23764
b(OIDs)g(will)h(b)s(e)f(DER)390 3475 y(enco)s(ded,)29
23757
23765
b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f(hex)g(format)h(with)e
23758
23766
(a)i(')p Ft(\\)p FB(#')f(pre\014x.)39 b(Y)-8 b(ou)29
23759
 
b(can)f(c)m(hec)m(k)390 2448 y(ab)s(out)i(kno)m(wn)g(OIDs)g(using)g
23760
 
Ft(gnutls_x509_dn_oid_known)o(\(\))p FB(.)390 2586 y(If)g
 
23767
b(can)f(c)m(hec)m(k)390 3585 y(ab)s(out)i(kno)m(wn)g(OIDs)g(using)g
 
23768
Ft(gnutls_x509_dn_oid_known)o(\(\))p FB(.)390 3720 y(If)g
23761
23769
Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s(e)f
23762
 
(\014lled.)390 2724 y Fn(Returns:)71 b FB(GNUTLS)p 1196
23763
 
2724 V 39 w(E)p 1297 2724 V 40 w(SHOR)-8 b(T)p 1652 2724
23764
 
V 39 w(MEMOR)g(Y)p 2117 2724 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)
23765
 
f(bu\013er)f(is)i(not)390 2833 y(long)31 b(enough,)f(and)g(in)f(that)i
23766
 
(case)g(the)g(*sizeof)p 2018 2833 V 41 w(buf)e(will)i(b)s(e)e(up)s
23767
 
(dated)g(with)h(the)g(required)g(size.)390 2943 y(On)g(success)g(0)h
23768
 
(is)f(returned.)150 3145 y Fv(gn)m(utls)p 483 3145 37
23769
 
5 v 55 w(x509)p 786 3145 V 54 w(crq)p 1010 3145 V 54
23770
 
w(get)p 1229 3145 V 54 w(dn)p 1419 3145 V 54 w(oid)3350
23771
 
3345 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_d)q
23772
 
(n_oi)q(d)f Fg(\()p Ff(gn)m(utls)p 2046 3345 28 4 v 40
23773
 
w(x509)p 2269 3345 V 42 w(crq)p 2435 3345 V 40 w(t)30
 
23770
(\014lled.)390 3855 y Fn(Returns:)71 b FB(GNUTLS)p 1196
 
23771
3855 V 39 w(E)p 1297 3855 V 40 w(SHOR)-8 b(T)p 1652 3855
 
23772
V 39 w(MEMOR)g(Y)p 2117 3855 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)
 
23773
f(bu\013er)f(is)i(not)390 3964 y(long)31 b(enough,)f(and)g(in)f(that)i
 
23774
(case)g(the)g(*sizeof)p 2018 3964 V 41 w(buf)e(will)i(b)s(e)e(up)s
 
23775
(dated)g(with)h(the)g(required)g(size.)390 4074 y(On)g(success)g(0)h
 
23776
(is)f(returned.)150 4274 y Fv(gn)m(utls)p 483 4274 37
 
23777
5 v 55 w(x509)p 786 4274 V 54 w(crq)p 1010 4274 V 54
 
23778
w(get)p 1229 4274 V 54 w(dn)p 1419 4274 V 54 w(oid)3350
 
23779
4471 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_d)q
 
23780
(n_oi)q(d)f Fg(\()p Ff(gn)m(utls)p 2046 4471 28 4 v 40
 
23781
w(x509)p 2269 4471 V 42 w(crq)p 2435 4471 V 40 w(t)30
23774
23782
b Fe(crq)12 b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)565
23775
 
3455 y(v)m(oid)31 b(*)g Fe(oid)12 b Ff(,)31 b(size)p
23776
 
1209 3455 V 41 w(t)f(*)h Fe(sizeof_oid)12 b Fg(\))390
23777
 
3564 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
23778
 
1513 3564 V 40 w(x509)p 1736 3564 V 41 w(crq)p 1901 3564
23779
 
V 40 w(t)g(structure)390 3702 y Ff(indx)6 b FB(:)40 b(Sp)s(eci\014es)30
 
23783
4581 y(v)m(oid)31 b(*)g Fe(oid)12 b Ff(,)31 b(size)p
 
23784
1209 4581 V 41 w(t)f(*)h Fe(sizeof_oid)12 b Fg(\))390
 
23785
4690 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
 
23786
1513 4690 V 40 w(x509)p 1736 4690 V 41 w(crq)p 1901 4690
 
23787
V 40 w(t)g(structure)390 4825 y Ff(indx)6 b FB(:)40 b(Sp)s(eci\014es)30
23780
23788
b(whic)m(h)g(DN)h(OID)f(to)h(send.)40 b(Use)31 b(zero)g(to)g(get)h(the)
23781
 
e(\014rst)g(one.)390 3839 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g
 
23789
e(\014rst)g(one.)390 4960 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g
23782
23790
(to)g(a)f(structure)g(to)h(hold)f(the)h(name)f(\(ma)m(y)i(b)s(e)e(n)m
23783
 
(ull\))390 3977 y Ff(sizeof)p 610 3977 V 41 w(oid)t FB(:)41
 
23791
(ull\))390 5095 y Ff(sizeof)p 610 5095 V 41 w(oid)t FB(:)41
23784
23792
b(initially)31 b(holds)f(the)h(size)g(of)g Ft(oid)390
23785
 
4115 y FB(This)j(function)g(will)h(extract)h(the)e(requested)h(OID)f
 
23793
5230 y FB(This)j(function)g(will)h(extract)h(the)e(requested)h(OID)f
23786
23794
(of)h(the)f(name)h(of)f(the)h(Certi\014cate)h(request)390
23787
 
4224 y(sub)5 b(ject,)30 b(sp)s(eci\014ed)g(b)m(y)g(the)h(giv)m(en)g
23788
 
(index.)390 4362 y(If)f(oid)g(is)h(n)m(ull)f(then)g(only)h(the)f(size)h
23789
 
(will)g(b)s(e)f(\014lled.)390 4499 y Fn(Returns:)71 b
23790
 
FB(GNUTLS)p 1196 4499 V 39 w(E)p 1297 4499 V 40 w(SHOR)-8
23791
 
b(T)p 1652 4499 V 39 w(MEMOR)g(Y)p 2117 4499 V 41 w(BUFFER)47
23792
 
b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i(not)390 4609
23793
 
y(long)31 b(enough,)g(and)f(in)h(that)g(case)h(the)f(*sizeof)p
23794
 
2022 4609 V 41 w(oid)g(will)g(b)s(e)f(up)s(dated)g(with)g(the)h
23795
 
(required)f(size.)390 4719 y(On)g(success)g(0)h(is)f(returned.)150
23796
 
4921 y Fv(gn)m(utls)p 483 4921 37 5 v 55 w(x509)p 786
23797
 
4921 V 54 w(crq)p 1010 4921 V 54 w(get)p 1229 4921 V
23798
 
54 w(dn)3350 5121 y FB([F)-8 b(unction])-3599 b Fh(int)53
23799
 
b(gnutls_x509_crq_get_d)q(n)e Fg(\()p Ff(gn)m(utls)p
23800
 
1836 5121 28 4 v 41 w(x509)p 2060 5121 V 41 w(crq)p 2225
23801
 
5121 V 40 w(t)31 b Fe(crq)12 b Ff(,)31 b(c)m(har)g(*)g
23802
 
Fe(buf)12 b Ff(,)565 5230 y(size)p 712 5230 V 41 w(t)31
23803
 
b(*)f Fe(sizeof_buf)12 b Fg(\))390 5340 y Ff(crq)r FB(:)41
23804
 
b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p 1513 5340
23805
 
V 40 w(x509)p 1736 5340 V 41 w(crq)p 1901 5340 V 40 w(t)g(structure)p
23806
 
eop end
 
23795
5340 y(sub)5 b(ject,)30 b(sp)s(eci\014ed)g(b)m(y)g(the)h(giv)m(en)g
 
23796
(index.)p eop end
23807
23797
%%Page: 197 203
23808
23798
TeXDict begin 197 202 bop 150 -116 a FB(Chapter)30 b(9:)41
23809
 
b(F)-8 b(unction)31 b(Reference)2237 b(197)390 299 y
23810
 
Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h
23811
 
(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
23812
 
442 y Ff(sizeof)p 610 442 28 4 v 41 w(buf)17 b FB(:)40
23813
 
b(initially)32 b(holds)e(the)g(size)i(of)e Ft(buf)390
23814
 
584 y FB(This)35 b(function)g(will)h(cop)m(y)h(the)f(name)g(of)g(the)g
23815
 
(Certi\014cate)h(request)e(sub)5 b(ject)36 b(in)f(the)h(pro)m(vided)390
23816
 
694 y(bu\013er.)57 b(The)36 b(name)g(will)h(b)s(e)e(in)h(the)h(form)e
 
23799
b(F)-8 b(unction)31 b(Reference)2237 b(197)390 299 y(If)30
 
23800
b(oid)g(is)h(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s(e)f
 
23801
(\014lled.)390 433 y Fn(Returns:)71 b FB(GNUTLS)p 1196
 
23802
433 28 4 v 39 w(E)p 1297 433 V 40 w(SHOR)-8 b(T)p 1652
 
23803
433 V 39 w(MEMOR)g(Y)p 2117 433 V 41 w(BUFFER)47 b(if)e(the)h(pro)m
 
23804
(vided)f(bu\013er)f(is)i(not)390 542 y(long)31 b(enough,)g(and)f(in)h
 
23805
(that)g(case)h(the)f(*sizeof)p 2022 542 V 41 w(oid)g(will)g(b)s(e)f(up)
 
23806
s(dated)g(with)g(the)h(required)f(size.)390 652 y(On)g(success)g(0)h
 
23807
(is)f(returned.)150 850 y Fv(gn)m(utls)p 483 850 37 5
 
23808
v 55 w(x509)p 786 850 V 54 w(crq)p 1010 850 V 54 w(get)p
 
23809
1229 850 V 54 w(dn)3350 1045 y FB([F)-8 b(unction])-3599
 
23810
b Fh(int)53 b(gnutls_x509_crq_get_d)q(n)e Fg(\()p Ff(gn)m(utls)p
 
23811
1836 1045 28 4 v 41 w(x509)p 2060 1045 V 41 w(crq)p 2225
 
23812
1045 V 40 w(t)31 b Fe(crq)12 b Ff(,)31 b(c)m(har)g(*)g
 
23813
Fe(buf)12 b Ff(,)565 1155 y(size)p 712 1155 V 41 w(t)31
 
23814
b(*)f Fe(sizeof_buf)12 b Fg(\))390 1264 y Ff(crq)r FB(:)41
 
23815
b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p 1513 1264
 
23816
V 40 w(x509)p 1736 1264 V 41 w(crq)p 1901 1264 V 40 w(t)g(structure)390
 
23817
1398 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)
 
23818
f(to)h(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
 
23819
1532 y Ff(sizeof)p 610 1532 V 41 w(buf)17 b FB(:)40 b(initially)32
 
23820
b(holds)e(the)g(size)i(of)e Ft(buf)390 1666 y FB(This)35
 
23821
b(function)g(will)h(cop)m(y)h(the)f(name)g(of)g(the)g(Certi\014cate)h
 
23822
(request)e(sub)5 b(ject)36 b(in)f(the)h(pro)m(vided)390
 
23823
1775 y(bu\013er.)57 b(The)36 b(name)g(will)h(b)s(e)e(in)h(the)h(form)e
23817
23824
Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p Ft(")37 b FB(as)f(describ)s(ed)
23818
 
f(in)390 804 y(RF)m(C2253.)69 b(The)39 b(output)g(string)g(will)g(b)s
 
23825
f(in)390 1885 y(RF)m(C2253.)69 b(The)39 b(output)g(string)g(will)g(b)s
23819
23826
(e)g(ASCI)s(I)f(or)h(UTF-8)h(enco)s(ded,)h(dep)s(ending)d(on)h(the)390
23820
 
913 y(certi\014cate)32 b(data.)390 1056 y(If)e Ft(buf)f
 
23827
1994 y(certi\014cate)32 b(data.)390 2128 y(If)e Ft(buf)f
23821
23828
FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s(e)f(\014lled.)
23822
 
390 1199 y Fn(Returns:)71 b FB(GNUTLS)p 1196 1199 V 39
23823
 
w(E)p 1297 1199 V 40 w(SHOR)-8 b(T)p 1652 1199 V 39 w(MEMOR)g(Y)p
23824
 
2117 1199 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i
23825
 
(not)390 1308 y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g
23826
 
(*sizeof)p 2018 1308 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h
23827
 
(the)g(required)g(size.)390 1418 y(On)g(success)g(0)h(is)f(returned.)
23828
 
150 1626 y Fv(gn)m(utls)p 483 1626 37 5 v 55 w(x509)p
23829
 
786 1626 V 54 w(crq)p 1010 1626 V 54 w(get)p 1229 1626
23830
 
V 54 w(pk)p 1416 1626 V 54 w(algorithm)3350 1831 y FB([F)-8
 
23829
390 2262 y Fn(Returns:)71 b FB(GNUTLS)p 1196 2262 V 39
 
23830
w(E)p 1297 2262 V 40 w(SHOR)-8 b(T)p 1652 2262 V 39 w(MEMOR)g(Y)p
 
23831
2117 2262 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i
 
23832
(not)390 2371 y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g
 
23833
(*sizeof)p 2018 2371 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h
 
23834
(the)g(required)g(size.)390 2481 y(On)g(success)g(0)h(is)f(returned.)
 
23835
150 2679 y Fv(gn)m(utls)p 483 2679 37 5 v 55 w(x509)p
 
23836
786 2679 V 54 w(crq)p 1010 2679 V 54 w(get)p 1229 2679
 
23837
V 54 w(pk)p 1416 2679 V 54 w(algorithm)3350 2874 y FB([F)-8
23831
23838
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_p)q(k_al)q(gor)q
23832
 
(ith)q(m)e Fg(\()p Ff(gn)m(utls)p 2359 1831 28 4 v 41
23833
 
w(x509)p 2583 1831 V 41 w(crq)p 2748 1831 V 40 w(t)31
23834
 
b Fe(crq)12 b Ff(,)565 1940 y(unsigned)29 b(in)m(t)i(*)g
23835
 
Fe(bits)12 b Fg(\))390 2050 y Ff(crq)r FB(:)41 b(should)29
23836
 
b(con)m(tain)j(a)f(gn)m(utls)p 1513 2050 V 40 w(x509)p
23837
 
1736 2050 V 41 w(crq)p 1901 2050 V 40 w(t)g(structure)390
23838
 
2193 y Ff(bits)t FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h
 
23839
(ith)q(m)e Fg(\()p Ff(gn)m(utls)p 2359 2874 28 4 v 41
 
23840
w(x509)p 2583 2874 V 41 w(crq)p 2748 2874 V 40 w(t)31
 
23841
b Fe(crq)12 b Ff(,)565 2984 y(unsigned)29 b(in)m(t)i(*)g
 
23842
Fe(bits)12 b Fg(\))390 3093 y Ff(crq)r FB(:)41 b(should)29
 
23843
b(con)m(tain)j(a)f(gn)m(utls)p 1513 3093 V 40 w(x509)p
 
23844
1736 3093 V 41 w(crq)p 1901 3093 V 40 w(t)g(structure)390
 
23845
3227 y Ff(bits)t FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h
23839
23846
(will)g(hold)f(the)h(size)g(of)f(the)h(parameters')g(in)f(bits)390
23840
 
2335 y(This)e(function)g(will)h(return)f(the)h(public)f(k)m(ey)h
 
23847
3361 y(This)e(function)g(will)h(return)f(the)h(public)f(k)m(ey)h
23841
23848
(algorithm)h(of)f(a)g(PK)m(CS)f Ft(\\10)g FB(certi\014cate)j(request.)
23842
 
390 2478 y(If)e(bits)g(is)g(non)g(n)m(ull,)g(it)h(should)e(ha)m(v)m(e)i
 
23849
390 3495 y(If)e(bits)g(is)g(non)g(n)m(ull,)g(it)h(should)e(ha)m(v)m(e)i
23843
23850
(enough)f(size)h(to)g(hold)f(the)h(parameters)f(size)h(in)f(bits.)40
23844
 
b(F)-8 b(or)390 2588 y(RSA)33 b(the)h(bits)f(returned)f(is)i(the)f(mo)s
 
23851
b(F)-8 b(or)390 3604 y(RSA)33 b(the)h(bits)f(returned)f(is)i(the)f(mo)s
23845
23852
(dulus.)49 b(F)-8 b(or)34 b(DSA)f(the)h(bits)f(returned)f(are)i(of)g
23846
 
(the)g(public)390 2697 y(exp)s(onen)m(t.)390 2840 y Fn(Returns:)61
 
23853
(the)g(public)390 3714 y(exp)s(onen)m(t.)390 3848 y Fn(Returns:)61
23847
23854
b FB(a)40 b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
23848
 
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 2950
23849
 
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 3157
23850
 
y Fv(gn)m(utls)p 483 3157 37 5 v 55 w(x509)p 786 3157
23851
 
V 54 w(crq)p 1010 3157 V 54 w(get)p 1229 3157 V 54 w(v)m(ersion)3350
23852
 
3362 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_v)q
23853
 
(ersi)q(on)f Fg(\()p Ff(gn)m(utls)p 2098 3362 28 4 v
23854
 
41 w(x509)p 2322 3362 V 41 w(crq)p 2487 3362 V 40 w(t)31
23855
 
b Fe(crq)12 b Fg(\))390 3472 y Ff(crq)r FB(:)41 b(should)29
23856
 
b(con)m(tain)j(a)f(gn)m(utls)p 1513 3472 V 40 w(x509)p
23857
 
1736 3472 V 41 w(crq)p 1901 3472 V 40 w(t)g(structure)390
23858
 
3615 y(This)f(function)g(will)g(return)g(the)g(v)m(ersion)h(of)g(the)f
23859
 
(sp)s(eci\014ed)g(Certi\014cate)i(request.)390 3757 y
 
23855
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 3957
 
23856
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 4155
 
23857
y Fv(gn)m(utls)p 483 4155 37 5 v 55 w(x509)p 786 4155
 
23858
V 54 w(crq)p 1010 4155 V 54 w(get)p 1229 4155 V 54 w(v)m(ersion)3350
 
23859
4350 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_get_v)q
 
23860
(ersi)q(on)f Fg(\()p Ff(gn)m(utls)p 2098 4350 28 4 v
 
23861
41 w(x509)p 2322 4350 V 41 w(crq)p 2487 4350 V 40 w(t)31
 
23862
b Fe(crq)12 b Fg(\))390 4460 y Ff(crq)r FB(:)41 b(should)29
 
23863
b(con)m(tain)j(a)f(gn)m(utls)p 1513 4460 V 40 w(x509)p
 
23864
1736 4460 V 41 w(crq)p 1901 4460 V 40 w(t)g(structure)390
 
23865
4594 y(This)f(function)g(will)g(return)g(the)g(v)m(ersion)h(of)g(the)f
 
23866
(sp)s(eci\014ed)g(Certi\014cate)i(request.)390 4728 y
23860
23867
Fn(Returns:)40 b FB(v)m(ersion)31 b(of)g(certi\014cate)h(request,)f(or)
23861
23868
f(a)h(negativ)m(e)i(v)-5 b(alue)30 b(on)h(error.)150
23862
 
3965 y Fv(gn)m(utls)p 483 3965 37 5 v 55 w(x509)p 786
23863
 
3965 V 54 w(crq)p 1010 3965 V 54 w(imp)s(ort)3350 4170
 
23869
4925 y Fv(gn)m(utls)p 483 4925 37 5 v 55 w(x509)p 786
 
23870
4925 V 54 w(crq)p 1010 4925 V 54 w(imp)s(ort)3350 5121
23864
23871
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_impor)q(t)e
23865
 
Fg(\()p Ff(gn)m(utls)p 1836 4170 28 4 v 41 w(x509)p 2060
23866
 
4170 V 41 w(crq)p 2225 4170 V 40 w(t)31 b Fe(crq)12 b
23867
 
Ff(,)31 b(const)565 4280 y(gn)m(utls)p 811 4280 V 41
23868
 
w(datum)p 1110 4280 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31
23869
 
b(gn)m(utls)p 1807 4280 V 40 w(x509)p 2030 4280 V 42
23870
 
w(crt)p 2183 4280 V 40 w(fm)m(t)p 2359 4280 V 40 w(t)g
23871
 
Fe(format)12 b Fg(\))390 4389 y Ff(crq)r FB(:)41 b(The)30
23872
 
b(structure)g(to)h(store)g(the)f(parsed)g(certi\014cate)i(request.)390
23873
 
4532 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s(ded)f
23874
 
(certi\014cate.)390 4675 y Ff(format)r FB(:)41 b(One)30
23875
 
b(of)g(DER)h(or)f(PEM)390 4818 y(This)i(function)g(will)h(con)m(v)m
23876
 
(ert)h(the)e(giv)m(en)i(DER)e(or)h(PEM)f(enco)s(ded)g(Certi\014cate)i
23877
 
(to)f(the)g(nativ)m(e)390 4927 y(gn)m(utls)p 636 4927
23878
 
V 40 w(x509)p 859 4927 V 42 w(crq)p 1025 4927 V 40 w(t)d(format.)41
 
23872
Fg(\()p Ff(gn)m(utls)p 1836 5121 28 4 v 41 w(x509)p 2060
 
23873
5121 V 41 w(crq)p 2225 5121 V 40 w(t)31 b Fe(crq)12 b
 
23874
Ff(,)31 b(const)565 5230 y(gn)m(utls)p 811 5230 V 41
 
23875
w(datum)p 1110 5230 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31
 
23876
b(gn)m(utls)p 1807 5230 V 40 w(x509)p 2030 5230 V 42
 
23877
w(crt)p 2183 5230 V 40 w(fm)m(t)p 2359 5230 V 40 w(t)g
 
23878
Fe(format)12 b Fg(\))390 5340 y Ff(crq)r FB(:)41 b(The)30
 
23879
b(structure)g(to)h(store)g(the)f(parsed)g(certi\014cate)i(request.)p
 
23880
eop end
 
23881
%%Page: 198 204
 
23882
TeXDict begin 198 203 bop 150 -116 a FB(Chapter)30 b(9:)41
 
23883
b(F)-8 b(unction)31 b(Reference)2237 b(198)390 299 y
 
23884
Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s(ded)f
 
23885
(certi\014cate.)390 432 y Ff(format)r FB(:)41 b(One)30
 
23886
b(of)g(DER)h(or)f(PEM)390 566 y(This)i(function)g(will)h(con)m(v)m(ert)
 
23887
h(the)e(giv)m(en)i(DER)e(or)h(PEM)f(enco)s(ded)g(Certi\014cate)i(to)f
 
23888
(the)g(nativ)m(e)390 675 y(gn)m(utls)p 636 675 28 4 v
 
23889
40 w(x509)p 859 675 V 42 w(crq)p 1025 675 V 40 w(t)d(format.)41
23879
23890
b(The)30 b(output)g(will)h(b)s(e)f(stored)g(in)g Ft(cert)p
23880
 
FB(.)390 5070 y(If)f(the)i(Certi\014cate)g(is)f(PEM)g(enco)s(ded)f(it)i
 
23891
FB(.)390 809 y(If)f(the)i(Certi\014cate)g(is)f(PEM)g(enco)s(ded)f(it)i
23881
23892
(should)d(ha)m(v)m(e)k(a)e(header)g(of)g Ft(")p FB(NEW)g(CER)-8
23882
 
b(TIFICA)g(TE)390 5180 y(REQUEST)p Ft(")p FB(.)390 5322
23883
 
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
23884
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23885
 
b(alue.)p eop end
23886
 
%%Page: 198 204
23887
 
TeXDict begin 198 203 bop 150 -116 a FB(Chapter)30 b(9:)41
23888
 
b(F)-8 b(unction)31 b(Reference)2237 b(198)150 299 y
23889
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23890
 
w(crq)p 1010 299 V 54 w(init)3350 491 y FB([F)-8 b(unction])-3599
23891
 
b Fh(int)53 b(gnutls_x509_crq_init)f Fg(\()p Ff(gn)m(utls)p
23892
 
1732 491 28 4 v 40 w(x509)p 1955 491 V 42 w(crq)p 2121
23893
 
491 V 40 w(t)30 b(*)h Fe(crq)12 b Fg(\))390 601 y Ff(crq)r
23894
 
FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e(initialized)390
23895
 
733 y(This)h(function)g(will)g(initialize)j(a)e(PK)m(CS10)f
23896
 
(certi\014cate)j(request)d(structure.)390 865 y Fn(Returns:)36
23897
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
23898
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23899
 
b(alue.)150 1059 y Fv(gn)m(utls)p 483 1059 37 5 v 55
23900
 
w(x509)p 786 1059 V 54 w(crq)p 1010 1059 V 54 w(set)p
23901
 
1216 1059 V 54 w(attribute)p 1750 1059 V 53 w(b)m(y)p
23902
 
1933 1059 V 54 w(oid)3350 1252 y FB([F)d(unction])-3599
 
23893
b(TIFICA)g(TE)390 918 y(REQUEST)p Ft(")p FB(.)390 1052
 
23894
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23895
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23896
b(alue.)150 1249 y Fv(gn)m(utls)p 483 1249 37 5 v 55
 
23897
w(x509)p 786 1249 V 54 w(crq)p 1010 1249 V 54 w(init)3350
 
23898
1444 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_init)f
 
23899
Fg(\()p Ff(gn)m(utls)p 1732 1444 28 4 v 40 w(x509)p 1955
 
23900
1444 V 42 w(crq)p 2121 1444 V 40 w(t)30 b(*)h Fe(crq)12
 
23901
b Fg(\))390 1553 y Ff(crq)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)e
 
23902
(initialized)390 1687 y(This)h(function)g(will)g(initialize)j(a)e(PK)m
 
23903
(CS10)f(certi\014cate)j(request)d(structure.)390 1820
 
23904
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
23905
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
23906
b(alue.)150 2017 y Fv(gn)m(utls)p 483 2017 37 5 v 55
 
23907
w(x509)p 786 2017 V 54 w(crq)p 1010 2017 V 54 w(set)p
 
23908
1216 2017 V 54 w(attribute)p 1750 2017 V 53 w(b)m(y)p
 
23909
1933 2017 V 54 w(oid)3350 2212 y FB([F)d(unction])-3599
23903
23910
b Fh(int)53 b(gnutls_x509_crq_set_a)q(ttri)q(but)q(e_b)q(y_o)q(id)f
23904
 
Fg(\()p Ff(gn)m(utls)p 2569 1252 28 4 v 40 w(x509)p 2792
23905
 
1252 V 42 w(crq)p 2958 1252 V 40 w(t)565 1361 y Fe(crq)12
 
23911
Fg(\()p Ff(gn)m(utls)p 2569 2212 28 4 v 40 w(x509)p 2792
 
23912
2212 V 42 w(crq)p 2958 2212 V 40 w(t)565 2321 y Fe(crq)12
23906
23913
b Ff(,)31 b(const)g(c)m(har)g(*)f Fe(oid)12 b Ff(,)31
23907
 
b(v)m(oid)g(*)g Fe(buf)12 b Ff(,)31 b(size)p 2170 1361
23908
 
V 41 w(t)g Fe(sizeof_buf)12 b Fg(\))390 1471 y Ff(crq)r
 
23914
b(v)m(oid)g(*)g Fe(buf)12 b Ff(,)31 b(size)p 2170 2321
 
23915
V 41 w(t)g Fe(sizeof_buf)12 b Fg(\))390 2431 y Ff(crq)r
23909
23916
FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p 1513
23910
 
1471 V 40 w(x509)p 1736 1471 V 41 w(crq)p 1901 1471 V
23911
 
40 w(t)g(structure)390 1603 y Ff(oid)t FB(:)40 b(holds)30
 
23917
2431 V 40 w(x509)p 1736 2431 V 41 w(crq)p 1901 2431 V
 
23918
40 w(t)g(structure)390 2564 y Ff(oid)t FB(:)40 b(holds)30
23912
23919
b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m(ull)g(terminated)h
23913
 
(string)390 1735 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)
 
23920
(string)390 2698 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)
23914
23921
g(structure)f(that)h(holds)f(the)g(attribute)h(data)390
23915
 
1867 y Ff(sizeof)p 610 1867 V 41 w(buf)17 b FB(:)40 b(holds)30
23916
 
b(the)h(size)g(of)f Ft(buf)390 1999 y FB(This)36 b(function)h(will)g
 
23922
2831 y Ff(sizeof)p 610 2831 V 41 w(buf)17 b FB(:)40 b(holds)30
 
23923
b(the)h(size)g(of)f Ft(buf)390 2965 y FB(This)36 b(function)h(will)g
23917
23924
(set)h(the)f(attribute)h(in)f(the)g(certi\014cate)i(request)e(sp)s
23918
 
(eci\014ed)g(b)m(y)g(the)g(giv)m(en)390 2109 y(Ob)5 b(ject)31
 
23925
(eci\014ed)g(b)m(y)g(the)g(giv)m(en)390 3074 y(Ob)5 b(ject)31
23919
23926
b(ID.)f(The)g(attribute)h(m)m(ust)g(b)s(e)e(b)s(e)h(DER)h(enco)s(ded.)
23920
 
390 2241 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
 
23927
390 3208 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
23921
23928
16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23922
 
b(alue.)150 2436 y Fv(gn)m(utls)p 483 2436 37 5 v 55
23923
 
w(x509)p 786 2436 V 54 w(crq)p 1010 2436 V 54 w(set)p
23924
 
1216 2436 V 54 w(c)m(hallenge)p 1759 2436 V 54 w(passw)m(ord)3350
23925
 
2628 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_set_c)q
 
23929
b(alue.)150 3405 y Fv(gn)m(utls)p 483 3405 37 5 v 55
 
23930
w(x509)p 786 3405 V 54 w(crq)p 1010 3405 V 54 w(set)p
 
23931
1216 3405 V 54 w(c)m(hallenge)p 1759 3405 V 54 w(passw)m(ord)3350
 
23932
3600 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_set_c)q
23926
23933
(hall)q(eng)q(e_p)q(ass)q(word)f Fg(\()p Ff(gn)m(utls)p
23927
 
2673 2628 28 4 v 41 w(x509)p 2897 2628 V 41 w(crq)p 3062
23928
 
2628 V 40 w(t)565 2737 y Fe(crq)12 b Ff(,)31 b(const)g(c)m(har)g(*)f
23929
 
Fe(pass)12 b Fg(\))390 2847 y Ff(crq)r FB(:)41 b(should)29
23930
 
b(con)m(tain)j(a)f(gn)m(utls)p 1513 2847 V 40 w(x509)p
23931
 
1736 2847 V 41 w(crq)p 1901 2847 V 40 w(t)g(structure)390
23932
 
2979 y Ff(pass)t FB(:)40 b(holds)30 b(a)h(n)m(ull)f(terminated)h(passw)
23933
 
m(ord)390 3111 y(This)f(function)g(will)g(set)h(a)g(c)m(hallenge)h
 
23934
2673 3600 28 4 v 41 w(x509)p 2897 3600 V 41 w(crq)p 3062
 
23935
3600 V 40 w(t)565 3709 y Fe(crq)12 b Ff(,)31 b(const)g(c)m(har)g(*)f
 
23936
Fe(pass)12 b Fg(\))390 3819 y Ff(crq)r FB(:)41 b(should)29
 
23937
b(con)m(tain)j(a)f(gn)m(utls)p 1513 3819 V 40 w(x509)p
 
23938
1736 3819 V 41 w(crq)p 1901 3819 V 40 w(t)g(structure)390
 
23939
3952 y Ff(pass)t FB(:)40 b(holds)30 b(a)h(n)m(ull)f(terminated)h(passw)
 
23940
m(ord)390 4086 y(This)f(function)g(will)g(set)h(a)g(c)m(hallenge)h
23934
23941
(passw)m(ord)e(to)h(b)s(e)f(used)g(when)f(rev)m(oking)i(the)g(request.)
23935
 
390 3243 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
 
23942
390 4219 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
23936
23943
16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23937
 
b(alue.)150 3438 y Fv(gn)m(utls)p 483 3438 37 5 v 55
23938
 
w(x509)p 786 3438 V 54 w(crq)p 1010 3438 V 54 w(set)p
23939
 
1216 3438 V 54 w(dn)p 1406 3438 V 54 w(b)m(y)p 1590 3438
23940
 
V 54 w(oid)3350 3630 y FB([F)d(unction])-3599 b Fh(int)53
 
23944
b(alue.)150 4416 y Fv(gn)m(utls)p 483 4416 37 5 v 55
 
23945
w(x509)p 786 4416 V 54 w(crq)p 1010 4416 V 54 w(set)p
 
23946
1216 4416 V 54 w(dn)p 1406 4416 V 54 w(b)m(y)p 1590 4416
 
23947
V 54 w(oid)3350 4611 y FB([F)d(unction])-3599 b Fh(int)53
23941
23948
b(gnutls_x509_crq_set_d)q(n_by)q(_oi)q(d)e Fg(\()p Ff(gn)m(utls)p
23942
 
2202 3630 28 4 v 41 w(x509)p 2426 3630 V 42 w(crq)p 2592
23943
 
3630 V 40 w(t)30 b Fe(crq)12 b Ff(,)31 b(const)565 3740
 
23949
2202 4611 28 4 v 41 w(x509)p 2426 4611 V 42 w(crq)p 2592
 
23950
4611 V 40 w(t)30 b Fe(crq)12 b Ff(,)31 b(const)565 4720
23944
23951
y(c)m(har)g(*)g Fe(oid)12 b Ff(,)31 b(unsigned)e(in)m(t)i
23945
23952
Fe(raw_flag)12 b Ff(,)32 b(const)f(v)m(oid)g(*)g Fe(data)12
23946
 
b Ff(,)31 b(unsigned)f(in)m(t)565 3849 y Fe(sizeof_data)12
23947
 
b Fg(\))390 3959 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
23948
 
(utls)p 1513 3959 V 40 w(x509)p 1736 3959 V 41 w(crq)p
23949
 
1901 3959 V 40 w(t)g(structure)390 4091 y Ff(oid)t FB(:)40
 
23953
b Ff(,)31 b(unsigned)f(in)m(t)565 4830 y Fe(sizeof_data)12
 
23954
b Fg(\))390 4940 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
 
23955
(utls)p 1513 4940 V 40 w(x509)p 1736 4940 V 41 w(crq)p
 
23956
1901 4940 V 40 w(t)g(structure)390 5073 y Ff(oid)t FB(:)40
23950
23957
b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014er)g(in)g(a)h(n)m(ull)f
23951
 
(terminated)h(string)390 4223 y Ff(ra)m(w)p 540 4223
 
23958
(terminated)h(string)390 5207 y Ff(ra)m(w)p 540 5207
23952
23959
V 40 w(\015ag)8 b FB(:)41 b(m)m(ust)30 b(b)s(e)g(0,)h(or)f(1)h(if)g
23953
 
(the)f(data)h(are)g(DER)f(enco)s(ded)390 4355 y Ff(data)p
23954
 
FB(:)41 b(a)31 b(p)s(oin)m(ter)g(to)g(the)f(input)g(data)390
23955
 
4487 y Ff(sizeof)p 610 4487 V 41 w(data)p FB(:)42 b(holds)29
23956
 
b(the)i(size)g(of)g Ft(data)390 4620 y FB(This)24 b(function)h(will)h
 
23960
(the)f(data)h(are)g(DER)f(enco)s(ded)390 5340 y Ff(data)p
 
23961
FB(:)41 b(a)31 b(p)s(oin)m(ter)g(to)g(the)f(input)g(data)p
 
23962
eop end
 
23963
%%Page: 199 205
 
23964
TeXDict begin 199 204 bop 150 -116 a FB(Chapter)30 b(9:)41
 
23965
b(F)-8 b(unction)31 b(Reference)2237 b(199)390 299 y
 
23966
Ff(sizeof)p 610 299 28 4 v 41 w(data)p FB(:)42 b(holds)29
 
23967
b(the)i(size)g(of)g Ft(data)390 460 y FB(This)24 b(function)h(will)h
23957
23968
(set)f(the)h(part)f(of)g(the)g(name)g(of)h(the)f(Certi\014cate)h
23958
 
(request)f(sub)5 b(ject,)27 b(sp)s(eci\014ed)390 4729
 
23969
(request)f(sub)5 b(ject,)27 b(sp)s(eci\014ed)390 569
23959
23970
y(b)m(y)j(the)h(giv)m(en)g(OID.)g(The)f(input)f(string)h(should)g(b)s
23960
 
(e)f(ASCI)s(I)g(or)i(UTF-8)g(enco)s(ded.)390 4861 y(Some)42
 
23971
(e)f(ASCI)s(I)g(or)i(UTF-8)g(enco)s(ded.)390 730 y(Some)42
23961
23972
b(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g(b)s(e)g(found)f
23962
 
(in)g(gn)m(utls/x509.h)j(With)f(this)390 4971 y(function)g(y)m(ou)g
23963
 
(can)g(only)g(set)h(the)f(kno)m(wn)f(OIDs.)78 b(Y)-8
23964
 
b(ou)44 b(can)f(test)h(for)e(kno)m(wn)h(OIDs)f(using)390
23965
 
5081 y Ft(gnutls_x509_dn_oid_known)o(\(\))p FB(.)33 b(F)-8
 
23973
(in)g(gn)m(utls/x509.h)j(With)f(this)390 840 y(function)g(y)m(ou)g(can)
 
23974
g(only)g(set)h(the)f(kno)m(wn)f(OIDs.)78 b(Y)-8 b(ou)44
 
23975
b(can)f(test)h(for)e(kno)m(wn)h(OIDs)f(using)390 949
 
23976
y Ft(gnutls_x509_dn_oid_known)o(\(\))p FB(.)33 b(F)-8
23966
23977
b(or)26 b(OIDs)g(that)g(are)g(not)g(kno)m(wn)f(\(b)m(y)h(gn)m(utls\))g
23967
 
(y)m(ou)g(should)390 5190 y(prop)s(erly)j(DER)i(enco)s(de)f(y)m(our)h
 
23978
(y)m(ou)g(should)390 1059 y(prop)s(erly)j(DER)i(enco)s(de)f(y)m(our)h
23968
23979
(data,)g(and)f(call)h(this)g(function)f(with)g(ra)m(w)p
23969
 
2957 5190 V 40 w(\015ag)h(set.)390 5322 y Fn(Returns:)36
 
23980
2957 1059 V 40 w(\015ag)h(set.)390 1220 y Fn(Returns:)36
23970
23981
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
23971
23982
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
23972
 
b(alue.)p eop end
23973
 
%%Page: 199 205
23974
 
TeXDict begin 199 204 bop 150 -116 a FB(Chapter)30 b(9:)41
23975
 
b(F)-8 b(unction)31 b(Reference)2237 b(199)150 299 y
23976
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
23977
 
w(crq)p 1010 299 V 54 w(set)p 1216 299 V 54 w(k)m(ey)p
23978
 
1453 299 V 53 w(rsa)p 1664 299 V 54 w(ra)m(w)3350 495
23979
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_set_k)q(ey_r)
23980
 
q(sa_)q(raw)f Fg(\()p Ff(gn)m(utls)p 2307 495 28 4 v
23981
 
41 w(x509)p 2531 495 V 41 w(crq)p 2696 495 V 40 w(t)31
23982
 
b Fe(crq)12 b Ff(,)565 605 y(const)31 b(gn)m(utls)p 1049
23983
 
605 V 40 w(datum)p 1347 605 V 40 w(t)g(*)f Fe(m)12 b
23984
 
Ff(,)31 b(const)g(gn)m(utls)p 2126 605 V 40 w(datum)p
23985
 
2424 605 V 40 w(t)f(*)h Fe(e)12 b Fg(\))390 714 y Ff(crq)r
23986
 
FB(:)41 b(should)29 b(con)m(tain)j(a)f Ft(gnutls_x509_crq_t)25
23987
 
b FB(structure)390 849 y Ff(m)p FB(:)40 b(holds)30 b(the)h(mo)s(dulus)
23988
 
390 983 y Ff(e)5 b FB(:)41 b(holds)30 b(the)h(public)e(exp)s(onen)m(t)
23989
 
390 1117 y(This)24 b(function)h(will)g(set)h(the)f(public)f(parameters)
 
23983
b(alue.)150 1446 y Fv(gn)m(utls)p 483 1446 37 5 v 55
 
23984
w(x509)p 786 1446 V 54 w(crq)p 1010 1446 V 54 w(set)p
 
23985
1216 1446 V 54 w(k)m(ey)p 1453 1446 V 53 w(rsa)p 1664
 
23986
1446 V 54 w(ra)m(w)3350 1669 y FB([F)d(unction])-3599
 
23987
b Fh(int)53 b(gnutls_x509_crq_set_k)q(ey_r)q(sa_)q(raw)f
 
23988
Fg(\()p Ff(gn)m(utls)p 2307 1669 28 4 v 41 w(x509)p 2531
 
23989
1669 V 41 w(crq)p 2696 1669 V 40 w(t)31 b Fe(crq)12 b
 
23990
Ff(,)565 1778 y(const)31 b(gn)m(utls)p 1049 1778 V 40
 
23991
w(datum)p 1347 1778 V 40 w(t)g(*)f Fe(m)12 b Ff(,)31
 
23992
b(const)g(gn)m(utls)p 2126 1778 V 40 w(datum)p 2424 1778
 
23993
V 40 w(t)f(*)h Fe(e)12 b Fg(\))390 1888 y Ff(crq)r FB(:)41
 
23994
b(should)29 b(con)m(tain)j(a)f Ft(gnutls_x509_crq_t)25
 
23995
b FB(structure)390 2049 y Ff(m)p FB(:)40 b(holds)30 b(the)h(mo)s(dulus)
 
23996
390 2210 y Ff(e)5 b FB(:)41 b(holds)30 b(the)h(public)e(exp)s(onen)m(t)
 
23997
390 2371 y(This)24 b(function)h(will)g(set)h(the)f(public)f(parameters)
23990
23998
i(from)e(the)h(giv)m(en)h(priv)-5 b(ate)26 b(k)m(ey)g(to)f(the)h
23991
 
(request.)390 1227 y(Only)k(RSA)g(k)m(eys)h(are)f(curren)m(tly)h(supp)s
23992
 
(orted.)390 1361 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
23999
(request.)390 2480 y(Only)k(RSA)g(k)m(eys)h(are)f(curren)m(tly)h(supp)s
 
24000
(orted.)390 2641 y Fn(Returns:)36 b FB(On)20 b(success,)j
23993
24001
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
23994
 
(negativ)m(e)h(error)d(v)-5 b(alue.)390 1496 y Fn(Since:)41
23995
 
b FB(2.6.0)150 1695 y Fv(gn)m(utls)p 483 1695 37 5 v
23996
 
55 w(x509)p 786 1695 V 54 w(crq)p 1010 1695 V 54 w(set)p
23997
 
1216 1695 V 54 w(k)m(ey)3350 1891 y FB([F)-8 b(unction])-3599
 
24002
(negativ)m(e)h(error)d(v)-5 b(alue.)390 2802 y Fn(Since:)41
 
24003
b FB(2.6.0)150 3028 y Fv(gn)m(utls)p 483 3028 37 5 v
 
24004
55 w(x509)p 786 3028 V 54 w(crq)p 1010 3028 V 54 w(set)p
 
24005
1216 3028 V 54 w(k)m(ey)3350 3251 y FB([F)-8 b(unction])-3599
23998
24006
b Fh(int)53 b(gnutls_x509_crq_set_k)q(ey)f Fg(\()p Ff(gn)m(utls)p
23999
 
1889 1891 28 4 v 40 w(x509)p 2112 1891 V 42 w(crq)p 2278
24000
 
1891 V 40 w(t)30 b Fe(crq)12 b Ff(,)565 2001 y(gn)m(utls)p
24001
 
811 2001 V 41 w(x509)p 1035 2001 V 41 w(privk)m(ey)p
24002
 
1369 2001 V 40 w(t)31 b Fe(key)12 b Fg(\))390 2110 y
 
24007
1889 3251 28 4 v 40 w(x509)p 2112 3251 V 42 w(crq)p 2278
 
24008
3251 V 40 w(t)30 b Fe(crq)12 b Ff(,)565 3360 y(gn)m(utls)p
 
24009
811 3360 V 41 w(x509)p 1035 3360 V 41 w(privk)m(ey)p
 
24010
1369 3360 V 40 w(t)31 b Fe(key)12 b Fg(\))390 3470 y
24003
24011
Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
24004
 
1513 2110 V 40 w(x509)p 1736 2110 V 41 w(crq)p 1901 2110
24005
 
V 40 w(t)g(structure)390 2245 y Ff(k)m(ey)8 b FB(:)41
24006
 
b(holds)30 b(a)h(priv)-5 b(ate)31 b(k)m(ey)390 2379 y(This)24
 
24012
1513 3470 V 40 w(x509)p 1736 3470 V 41 w(crq)p 1901 3470
 
24013
V 40 w(t)g(structure)390 3631 y Ff(k)m(ey)8 b FB(:)41
 
24014
b(holds)30 b(a)h(priv)-5 b(ate)31 b(k)m(ey)390 3792 y(This)24
24007
24015
b(function)h(will)g(set)h(the)f(public)f(parameters)i(from)e(the)h(giv)
24008
24016
m(en)h(priv)-5 b(ate)26 b(k)m(ey)g(to)f(the)h(request.)390
24009
 
2488 y(Only)k(RSA)g(k)m(eys)h(are)f(curren)m(tly)h(supp)s(orted.)390
24010
 
2623 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
24017
3901 y(Only)k(RSA)g(k)m(eys)h(are)f(curren)m(tly)h(supp)s(orted.)390
 
24018
4062 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
24011
24019
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
24012
 
b(alue.)150 2822 y Fv(gn)m(utls)p 483 2822 37 5 v 55
24013
 
w(x509)p 786 2822 V 54 w(crq)p 1010 2822 V 54 w(set)p
24014
 
1216 2822 V 54 w(v)m(ersion)3350 3018 y FB([F)d(unction])-3599
 
24020
b(alue.)150 4288 y Fv(gn)m(utls)p 483 4288 37 5 v 55
 
24021
w(x509)p 786 4288 V 54 w(crq)p 1010 4288 V 54 w(set)p
 
24022
1216 4288 V 54 w(v)m(ersion)3350 4511 y FB([F)d(unction])-3599
24015
24023
b Fh(int)53 b(gnutls_x509_crq_set_v)q(ersi)q(on)f Fg(\()p
24016
 
Ff(gn)m(utls)p 2098 3018 28 4 v 41 w(x509)p 2322 3018
24017
 
V 41 w(crq)p 2487 3018 V 40 w(t)31 b Fe(crq)12 b Ff(,)31
24018
 
b(unsigned)565 3128 y(in)m(t)g Fe(version)12 b Fg(\))390
24019
 
3237 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
24020
 
1513 3237 V 40 w(x509)p 1736 3237 V 41 w(crq)p 1901 3237
24021
 
V 40 w(t)g(structure)390 3372 y Ff(v)m(ersion)p FB(:)41
 
24024
Ff(gn)m(utls)p 2098 4511 28 4 v 41 w(x509)p 2322 4511
 
24025
V 41 w(crq)p 2487 4511 V 40 w(t)31 b Fe(crq)12 b Ff(,)31
 
24026
b(unsigned)565 4620 y(in)m(t)g Fe(version)12 b Fg(\))390
 
24027
4730 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m(utls)p
 
24028
1513 4730 V 40 w(x509)p 1736 4730 V 41 w(crq)p 1901 4730
 
24029
V 40 w(t)g(structure)390 4891 y Ff(v)m(ersion)p FB(:)41
24022
24030
b(holds)30 b(the)h(v)m(ersion)f(n)m(um)m(b)s(er.)40 b(F)-8
24023
 
b(or)31 b(v1)g(Requests)f(m)m(ust)h(b)s(e)e(1.)390 3506
 
24031
b(or)31 b(v1)g(Requests)f(m)m(ust)h(b)s(e)e(1.)390 5052
24024
24032
y(This)c(function)g(will)i(set)f(the)g(v)m(ersion)g(of)g(the)g
24025
24033
(certi\014cate)i(request.)39 b(F)-8 b(or)27 b(v)m(ersion)f(1)g
24026
 
(requests)g(this)390 3615 y(m)m(ust)k(b)s(e)g(one.)390
24027
 
3750 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
24034
(requests)g(this)390 5161 y(m)m(ust)k(b)s(e)g(one.)390
 
24035
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
24028
24036
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
24029
 
b(alue.)150 3949 y Fv(gn)m(utls)p 483 3949 37 5 v 55
24030
 
w(x509)p 786 3949 V 54 w(crq)p 1010 3949 V 54 w(sign2)3350
24031
 
4145 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_sign2)f
24032
 
Fg(\()p Ff(gn)m(utls)p 1784 4145 28 4 v 41 w(x509)p 2008
24033
 
4145 V 41 w(crq)p 2173 4145 V 40 w(t)31 b Fe(crq)12 b
24034
 
Ff(,)565 4255 y(gn)m(utls)p 811 4255 V 41 w(x509)p 1035
24035
 
4255 V 41 w(privk)m(ey)p 1369 4255 V 40 w(t)31 b Fe(key)12
24036
 
b Ff(,)31 b(gn)m(utls)p 1939 4255 V 40 w(digest)p 2211
24037
 
4255 V 41 w(algorithm)p 2635 4255 V 41 w(t)g Fe(dig)12
24038
 
b Ff(,)31 b(unsigned)e(in)m(t)565 4364 y Fe(flags)12
24039
 
b Fg(\))390 4474 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f
24040
 
Ft(gnutls_x509_crq_t)25 b FB(structure)390 4608 y Ff(k)m(ey)8
24041
 
b FB(:)41 b(holds)30 b(a)h(priv)-5 b(ate)31 b(k)m(ey)390
24042
 
4743 y Ff(dig)8 b FB(:)40 b(The)28 b(message)i(digest)g(to)f(use,)g
24043
 
Ft(GNUTLS_DIG_SHA1)c FB(is)k(the)g(safe)g(c)m(hoice)i(unless)d(y)m(ou)h
24044
 
(kno)m(w)390 4852 y(what)h(y)m(ou're)h(doing.)390 4986
24045
 
y Ff(\015ags)t FB(:)41 b(m)m(ust)30 b(b)s(e)g(0)390 5121
24046
 
y(This)35 b(function)g(will)h(sign)f(the)h(certi\014cate)h(request)f
24047
 
(with)f(a)h(priv)-5 b(ate)36 b(k)m(ey)-8 b(.)57 b(This)35
24048
 
b(m)m(ust)g(b)s(e)g(the)390 5230 y(same)30 b(k)m(ey)g(as)g(the)g(one)g
24049
 
(used)f(in)g Ft(gnutls_x509_crt_set_key\(\))23 b FB(since)30
24050
 
b(a)g(certi\014cate)i(request)390 5340 y(is)e(self)h(signed.)p
24051
 
eop end
 
24037
b(alue.)p eop end
24052
24038
%%Page: 200 206
24053
24039
TeXDict begin 200 205 bop 150 -116 a FB(Chapter)30 b(9:)41
24054
 
b(F)-8 b(unction)31 b(Reference)2237 b(200)390 299 y(This)30
24055
 
b(m)m(ust)h(b)s(e)g(the)g(last)h(step)f(in)g(a)g(certi\014cate)i
24056
 
(request)e(generation)i(since)e(all)h(the)f(previously)390
24057
 
408 y(set)g(parameters)g(are)f(no)m(w)h(signed.)390 542
24058
 
y Fn(Returns:)38 b Ft(GNUTLS_E_SUCCESS)21 b FB(on)k(success,)i
24059
 
(otherwise)f(an)g(error.)38 b Ft(GNUTLS_E_ASN1_VALUE_)390
24060
 
652 y(NOT_FOUND)25 b FB(is)i(returned)f(if)i(y)m(ou)f(didn't)g(set)h
24061
 
(all)g(information)g(in)f(the)g(certi\014cate)j(request)d(\(e.g.,)390
24062
 
761 y(the)k(v)m(ersion)f(using)g Ft(gnutls_x509_crq_set_versi)o(on\(\))
24063
 
o FB(\).)150 959 y Fv(gn)m(utls)p 483 959 37 5 v 55 w(x509)p
24064
 
786 959 V 54 w(crq)p 1010 959 V 54 w(sign)3350 1155 y
24065
 
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_sign)f
24066
 
Fg(\()p Ff(gn)m(utls)p 1732 1155 28 4 v 40 w(x509)p 1955
24067
 
1155 V 42 w(crq)p 2121 1155 V 40 w(t)30 b Fe(crq)12 b
24068
 
Ff(,)565 1264 y(gn)m(utls)p 811 1264 V 41 w(x509)p 1035
24069
 
1264 V 41 w(privk)m(ey)p 1369 1264 V 40 w(t)31 b Fe(key)12
24070
 
b Fg(\))390 1374 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
24071
 
(utls)p 1513 1374 V 40 w(x509)p 1736 1374 V 41 w(crq)p
24072
 
1901 1374 V 40 w(t)g(structure)390 1508 y Ff(k)m(ey)8
 
24040
b(F)-8 b(unction)31 b(Reference)2237 b(200)150 299 y
 
24041
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
24042
w(crq)p 1010 299 V 54 w(sign2)3350 493 y FB([F)-8 b(unction])-3599
 
24043
b Fh(int)53 b(gnutls_x509_crq_sign2)f Fg(\()p Ff(gn)m(utls)p
 
24044
1784 493 28 4 v 41 w(x509)p 2008 493 V 41 w(crq)p 2173
 
24045
493 V 40 w(t)31 b Fe(crq)12 b Ff(,)565 602 y(gn)m(utls)p
 
24046
811 602 V 41 w(x509)p 1035 602 V 41 w(privk)m(ey)p 1369
 
24047
602 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1939
 
24048
602 V 40 w(digest)p 2211 602 V 41 w(algorithm)p 2635
 
24049
602 V 41 w(t)g Fe(dig)12 b Ff(,)31 b(unsigned)e(in)m(t)565
 
24050
712 y Fe(flags)12 b Fg(\))390 821 y Ff(crq)r FB(:)41
 
24051
b(should)29 b(con)m(tain)j(a)f Ft(gnutls_x509_crq_t)25
 
24052
b FB(structure)390 954 y Ff(k)m(ey)8 b FB(:)41 b(holds)30
 
24053
b(a)h(priv)-5 b(ate)31 b(k)m(ey)390 1087 y Ff(dig)8 b
 
24054
FB(:)40 b(The)28 b(message)i(digest)g(to)f(use,)g Ft(GNUTLS_DIG_SHA1)c
 
24055
FB(is)k(the)g(safe)g(c)m(hoice)i(unless)d(y)m(ou)h(kno)m(w)390
 
24056
1197 y(what)h(y)m(ou're)h(doing.)390 1330 y Ff(\015ags)t
 
24057
FB(:)41 b(m)m(ust)30 b(b)s(e)g(0)390 1463 y(This)35 b(function)g(will)h
 
24058
(sign)f(the)h(certi\014cate)h(request)f(with)f(a)h(priv)-5
 
24059
b(ate)36 b(k)m(ey)-8 b(.)57 b(This)35 b(m)m(ust)g(b)s(e)g(the)390
 
24060
1572 y(same)30 b(k)m(ey)g(as)g(the)g(one)g(used)f(in)g
 
24061
Ft(gnutls_x509_crt_set_key\(\))23 b FB(since)30 b(a)g(certi\014cate)i
 
24062
(request)390 1682 y(is)e(self)h(signed.)390 1815 y(This)f(m)m(ust)h(b)s
 
24063
(e)g(the)g(last)h(step)f(in)g(a)g(certi\014cate)i(request)e(generation)
 
24064
i(since)e(all)h(the)f(previously)390 1925 y(set)g(parameters)g(are)f
 
24065
(no)m(w)h(signed.)390 2057 y Fn(Returns:)38 b Ft(GNUTLS_E_SUCCESS)21
 
24066
b FB(on)k(success,)i(otherwise)f(an)g(error.)38 b Ft
 
24067
(GNUTLS_E_ASN1_VALUE_)390 2167 y(NOT_FOUND)25 b FB(is)i(returned)f(if)i
 
24068
(y)m(ou)f(didn't)g(set)h(all)g(information)g(in)f(the)g(certi\014cate)j
 
24069
(request)d(\(e.g.,)390 2277 y(the)k(v)m(ersion)f(using)g
 
24070
Ft(gnutls_x509_crq_set_versi)o(on\(\))o FB(\).)150 2473
 
24071
y Fv(gn)m(utls)p 483 2473 37 5 v 55 w(x509)p 786 2473
 
24072
V 54 w(crq)p 1010 2473 V 54 w(sign)3350 2667 y FB([F)-8
 
24073
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crq_sign)f
 
24074
Fg(\()p Ff(gn)m(utls)p 1732 2667 28 4 v 40 w(x509)p 1955
 
24075
2667 V 42 w(crq)p 2121 2667 V 40 w(t)30 b Fe(crq)12 b
 
24076
Ff(,)565 2776 y(gn)m(utls)p 811 2776 V 41 w(x509)p 1035
 
24077
2776 V 41 w(privk)m(ey)p 1369 2776 V 40 w(t)31 b Fe(key)12
 
24078
b Fg(\))390 2886 y Ff(crq)r FB(:)41 b(should)29 b(con)m(tain)j(a)f(gn)m
 
24079
(utls)p 1513 2886 V 40 w(x509)p 1736 2886 V 41 w(crq)p
 
24080
1901 2886 V 40 w(t)g(structure)390 3019 y Ff(k)m(ey)8
24073
24081
b FB(:)41 b(holds)30 b(a)h(priv)-5 b(ate)31 b(k)m(ey)390
24074
 
1641 y(This)h(function)h(is)f(the)h(same)h(a)f Ft
 
24082
3152 y(This)h(function)h(is)f(the)h(same)h(a)f Ft
24075
24083
(gnutls_x509_crq_sign2\(\))26 b FB(with)33 b(no)g(\015ags,)g(and)g
24076
 
(SHA1)g(as)390 1751 y(the)e(hash)e(algorithm.)390 1885
 
24084
(SHA1)g(as)390 3261 y(the)e(hash)e(algorithm.)390 3394
24077
24085
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
24078
24086
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
24079
 
b(alue.)150 2083 y Fv(gn)m(utls)p 483 2083 37 5 v 55
24080
 
w(x509)p 786 2083 V 54 w(crt)p 993 2083 V 54 w(c)m(hec)m(k)p
24081
 
1340 2083 V 52 w(hostname)3350 2278 y FB([F)d(unction])-3599
 
24087
b(alue.)150 3590 y Fv(gn)m(utls)p 483 3590 37 5 v 55
 
24088
w(x509)p 786 3590 V 54 w(crt)p 993 3590 V 54 w(c)m(hec)m(k)p
 
24089
1340 3590 V 52 w(hostname)3350 3784 y FB([F)d(unction])-3599
24082
24090
b Fh(int)53 b(gnutls_x509_crt_check)q(_hos)q(tna)q(me)f
24083
 
Fg(\()p Ff(gn)m(utls)p 2255 2278 28 4 v 41 w(x509)p 2479
24084
 
2278 V 41 w(crt)p 2631 2278 V 40 w(t)31 b Fe(cert)12
24085
 
b Ff(,)565 2387 y(const)31 b(c)m(har)g(*)f Fe(hostname)12
24086
 
b Fg(\))390 2497 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(an)g
24087
 
(gn)m(utls)p 1591 2497 V 40 w(x509)p 1814 2497 V 42 w(crt)p
24088
 
1967 2497 V 40 w(t)g(structure)390 2631 y Ff(hostname)5
 
24091
Fg(\()p Ff(gn)m(utls)p 2255 3784 28 4 v 41 w(x509)p 2479
 
24092
3784 V 41 w(crt)p 2631 3784 V 40 w(t)31 b Fe(cert)12
 
24093
b Ff(,)565 3894 y(const)31 b(c)m(har)g(*)f Fe(hostname)12
 
24094
b Fg(\))390 4003 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(an)g
 
24095
(gn)m(utls)p 1591 4003 V 40 w(x509)p 1814 4003 V 42 w(crt)p
 
24096
1967 4003 V 40 w(t)g(structure)390 4136 y Ff(hostname)5
24089
24097
b FB(:)41 b(A)31 b(n)m(ull)f(terminated)h(string)f(that)h(con)m(tains)h
24090
 
(a)e(DNS)h(name)390 2765 y(This)26 b(function)g(will)h(c)m(hec)m(k)i
 
24098
(a)e(DNS)h(name)390 4269 y(This)26 b(function)g(will)h(c)m(hec)m(k)i
24091
24099
(if)d(the)h(giv)m(en)h(certi\014cate's)h(sub)5 b(ject)26
24092
 
b(matc)m(hes)i(the)f(giv)m(en)g(hostname.)390 2874 y(This)42
 
24100
b(matc)m(hes)i(the)f(giv)m(en)g(hostname.)390 4379 y(This)42
24093
24101
b(is)g(a)h(basic)g(implemen)m(tation)i(of)d(the)h(matc)m(hing)h
24094
 
(describ)s(ed)d(in)h(RF)m(C2818)j(\(HTTPS\),)390 2984
 
24102
(describ)s(ed)d(in)h(RF)m(C2818)j(\(HTTPS\),)390 4488
24095
24103
y(whic)m(h)24 b(tak)m(es)h(in)m(to)h(accoun)m(t)f(wildcards,)g(and)f
24096
24104
(the)g(DNSName/IP)-8 b(Address)25 b(sub)5 b(ject)24 b(alternativ)m(e)
24097
 
390 3093 y(name)30 b(PKIX)g(extension.)390 3227 y Fn(Returns:)40
 
24105
390 4598 y(name)30 b(PKIX)g(extension.)390 4731 y Fn(Returns:)40
24098
24106
b FB(non)30 b(zero)h(for)f(a)h(successful)f(matc)m(h,)i(and)e(zero)h
24099
 
(on)f(failure.)150 3425 y Fv(gn)m(utls)p 483 3425 37
24100
 
5 v 55 w(x509)p 786 3425 V 54 w(crt)p 993 3425 V 54 w(c)m(hec)m(k)p
24101
 
1340 3425 V 52 w(issuer)3350 3620 y FB([F)-8 b(unction])-3599
 
24107
(on)f(failure.)150 4927 y Fv(gn)m(utls)p 483 4927 37
 
24108
5 v 55 w(x509)p 786 4927 V 54 w(crt)p 993 4927 V 54 w(c)m(hec)m(k)p
 
24109
1340 4927 V 52 w(issuer)3350 5121 y FB([F)-8 b(unction])-3599
24102
24110
b Fh(int)53 b(gnutls_x509_crt_check)q(_iss)q(uer)f Fg(\()p
24103
 
Ff(gn)m(utls)p 2150 3620 28 4 v 41 w(x509)p 2374 3620
24104
 
V 41 w(crt)p 2526 3620 V 41 w(t)30 b Fe(cert)12 b Ff(,)565
24105
 
3730 y(gn)m(utls)p 811 3730 V 41 w(x509)p 1035 3730 V
24106
 
41 w(crt)p 1187 3730 V 40 w(t)31 b Fe(issuer)12 b Fg(\))390
24107
 
3840 y Ff(cert)r FB(:)41 b(is)31 b(the)f(certi\014cate)j(to)e(b)s(e)f
24108
 
(c)m(hec)m(k)m(ed)390 3973 y Ff(issuer)7 b FB(:)40 b(is)30
24109
 
b(the)h(certi\014cate)h(of)f(a)f(p)s(ossible)g(issuer)390
24110
 
4107 y(This)f(function)g(will)h(c)m(hec)m(k)i(if)d(the)h(giv)m(en)h
24111
 
(certi\014cate)h(w)m(as)e(issued)f(b)m(y)g(the)h(giv)m(en)h(issuer.)40
24112
 
b(It)30 b(will)390 4217 y(return)36 b(true)g(\(1\))i(if)f(the)g(giv)m
24113
 
(en)h(certi\014cate)h(is)e(issued)f(b)m(y)h(the)g(giv)m(en)h(issuer,)g
24114
 
(and)e(false)i(\(0\))g(if)390 4326 y(not.)390 4460 y(A)30
24115
 
b(negativ)m(e)j(v)-5 b(alue)31 b(is)f(returned)g(in)g(case)h(of)g(an)f
24116
 
(error.)150 4658 y Fv(gn)m(utls)p 483 4658 37 5 v 55
24117
 
w(x509)p 786 4658 V 54 w(crt)p 993 4658 V 54 w(c)m(hec)m(k)p
24118
 
1340 4658 V 52 w(rev)m(o)s(cation)3350 4853 y FB([F)-8
 
24111
Ff(gn)m(utls)p 2150 5121 28 4 v 41 w(x509)p 2374 5121
 
24112
V 41 w(crt)p 2526 5121 V 41 w(t)30 b Fe(cert)12 b Ff(,)565
 
24113
5230 y(gn)m(utls)p 811 5230 V 41 w(x509)p 1035 5230 V
 
24114
41 w(crt)p 1187 5230 V 40 w(t)31 b Fe(issuer)12 b Fg(\))390
 
24115
5340 y Ff(cert)r FB(:)41 b(is)31 b(the)f(certi\014cate)j(to)e(b)s(e)f
 
24116
(c)m(hec)m(k)m(ed)p eop end
 
24117
%%Page: 201 207
 
24118
TeXDict begin 201 206 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24119
b(F)-8 b(unction)31 b(Reference)2237 b(201)390 299 y
 
24120
Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(a)f(p)s
 
24121
(ossible)g(issuer)390 436 y(This)f(function)g(will)h(c)m(hec)m(k)i(if)d
 
24122
(the)h(giv)m(en)h(certi\014cate)h(w)m(as)e(issued)f(b)m(y)g(the)h(giv)m
 
24123
(en)h(issuer.)40 b(It)30 b(will)390 546 y(return)36 b(true)g(\(1\))i
 
24124
(if)f(the)g(giv)m(en)h(certi\014cate)h(is)e(issued)f(b)m(y)h(the)g(giv)
 
24125
m(en)h(issuer,)g(and)e(false)i(\(0\))g(if)390 656 y(not.)390
 
24126
793 y(A)30 b(negativ)m(e)j(v)-5 b(alue)31 b(is)f(returned)g(in)g(case)h
 
24127
(of)g(an)f(error.)150 996 y Fv(gn)m(utls)p 483 996 37
 
24128
5 v 55 w(x509)p 786 996 V 54 w(crt)p 993 996 V 54 w(c)m(hec)m(k)p
 
24129
1340 996 V 52 w(rev)m(o)s(cation)3350 1195 y FB([F)-8
24119
24130
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_check)q(_rev)q(oca)q
24120
 
(tio)q(n)e Fg(\()p Ff(gn)m(utls)p 2359 4853 28 4 v 41
24121
 
w(x509)p 2583 4853 V 41 w(crt)p 2735 4853 V 41 w(t)31
24122
 
b Fe(cert)12 b Ff(,)565 4963 y(const)31 b(gn)m(utls)p
24123
 
1049 4963 V 40 w(x509)p 1272 4963 V 42 w(crl)p 1415 4963
 
24131
(tio)q(n)e Fg(\()p Ff(gn)m(utls)p 2359 1195 28 4 v 41
 
24132
w(x509)p 2583 1195 V 41 w(crt)p 2735 1195 V 41 w(t)31
 
24133
b Fe(cert)12 b Ff(,)565 1305 y(const)31 b(gn)m(utls)p
 
24134
1049 1305 V 40 w(x509)p 1272 1305 V 42 w(crl)p 1415 1305
24124
24135
V 40 w(t)g(*)f Fe(crl_list)12 b Ff(,)33 b(in)m(t)e Fe(crl_list_length)
24125
 
12 b Fg(\))390 5072 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24126
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 5206 y Ff(crl)p
24127
 
497 5206 V 40 w(list)r FB(:)42 b(should)29 b(con)m(tain)j(a)e(list)h
24128
 
(of)g(gn)m(utls)p 1907 5206 V 40 w(x509)p 2130 5206 V
24129
 
42 w(crl)p 2273 5206 V 40 w(t)g(structures)390 5340 y
24130
 
Ff(crl)p 497 5340 V 40 w(list)p 658 5340 V 41 w(length)p
24131
 
FB(:)41 b(the)31 b(length)f(of)h(the)g(crl)p 1808 5340
24132
 
V 40 w(list)p eop end
24133
 
%%Page: 201 207
24134
 
TeXDict begin 201 206 bop 150 -116 a FB(Chapter)30 b(9:)41
24135
 
b(F)-8 b(unction)31 b(Reference)2237 b(201)390 299 y(This)31
24136
 
b(function)h(will)g(return)e(c)m(hec)m(k)k(if)e(the)g(giv)m(en)g
24137
 
(certi\014cate)i(is)e(rev)m(ok)m(ed.)46 b(It)32 b(is)g(assumed)f(that)
24138
 
390 408 y(the)g(CRLs)e(ha)m(v)m(e)j(b)s(een)d(v)m(eri\014ed)i(b)s
24139
 
(efore.)390 544 y Fn(Returns:)36 b FB(0)23 b(if)g(the)f(certi\014cate)j
24140
 
(is)d(NOT)g(rev)m(ok)m(ed,)k(and)21 b(1)i(if)g(it)f(is.)39
24141
 
b(A)22 b(negativ)m(e)j(v)-5 b(alue)23 b(is)f(returned)390
24142
 
653 y(on)30 b(error.)150 853 y Fv(gn)m(utls)p 483 853
24143
 
37 5 v 55 w(x509)p 786 853 V 54 w(crt)p 993 853 V 54
24144
 
w(cp)m(y)p 1232 853 V 53 w(crl)p 1424 853 V 54 w(dist)p
24145
 
1676 853 V 54 w(p)s(oin)m(ts)3350 1051 y FB([F)-8 b(unction])-3599
24146
 
b Fh(int)53 b(gnutls_x509_crt_cpy_c)q(rl_d)q(ist)q(_po)q(int)q(s)e
24147
 
Fg(\()p Ff(gn)m(utls)p 2516 1051 28 4 v 41 w(x509)p 2740
24148
 
1051 V 41 w(crt)p 2892 1051 V 41 w(t)30 b Fe(dst)12 b
24149
 
Ff(,)565 1160 y(gn)m(utls)p 811 1160 V 41 w(x509)p 1035
24150
 
1160 V 41 w(crt)p 1187 1160 V 40 w(t)31 b Fe(src)12 b
24151
 
Fg(\))390 1270 y Ff(dst)r FB(:)40 b(a)31 b(certi\014cate)i(of)d(t)m(yp)
24152
 
s(e)h Ft(gnutls_x509_crt_t)390 1405 y Ff(src)6 b FB(:)40
24153
 
b(the)31 b(certi\014cate)h(where)e(the)g(dist)h(p)s(oin)m(ts)f(will)h
24154
 
(b)s(e)e(copied)i(from)390 1541 y(This)37 b(function)g(will)h(cop)m(y)g
24155
 
(the)f(CRL)g(distribution)g(p)s(oin)m(ts)g(certi\014cate)j(extension,)g
24156
 
(from)d(the)390 1650 y(source)25 b(to)i(the)e(destination)h
24157
 
(certi\014cate.)41 b(This)25 b(ma)m(y)h(b)s(e)e(useful)h(to)h(cop)m(y)g
24158
 
(from)f(a)h(CA)f(certi\014cate)390 1760 y(to)31 b(issued)f(ones.)390
24159
 
1895 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
24136
12 b Fg(\))390 1415 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24137
Ft(gnutls_x509_crt_t)26 b FB(structure)390 1552 y Ff(crl)p
 
24138
497 1552 V 40 w(list)r FB(:)42 b(should)29 b(con)m(tain)j(a)e(list)h
 
24139
(of)g(gn)m(utls)p 1907 1552 V 40 w(x509)p 2130 1552 V
 
24140
42 w(crl)p 2273 1552 V 40 w(t)g(structures)390 1690 y
 
24141
Ff(crl)p 497 1690 V 40 w(list)p 658 1690 V 41 w(length)p
 
24142
FB(:)41 b(the)31 b(length)f(of)h(the)g(crl)p 1808 1690
 
24143
V 40 w(list)390 1827 y(This)g(function)h(will)g(return)e(c)m(hec)m(k)k
 
24144
(if)e(the)g(giv)m(en)g(certi\014cate)i(is)e(rev)m(ok)m(ed.)46
 
24145
b(It)32 b(is)g(assumed)f(that)390 1937 y(the)g(CRLs)e(ha)m(v)m(e)j(b)s
 
24146
(een)d(v)m(eri\014ed)i(b)s(efore.)390 2074 y Fn(Returns:)36
 
24147
b FB(0)23 b(if)g(the)f(certi\014cate)j(is)d(NOT)g(rev)m(ok)m(ed,)k(and)
 
24148
21 b(1)i(if)g(it)f(is.)39 b(A)22 b(negativ)m(e)j(v)-5
 
24149
b(alue)23 b(is)f(returned)390 2184 y(on)30 b(error.)150
 
24150
2386 y Fv(gn)m(utls)p 483 2386 37 5 v 55 w(x509)p 786
 
24151
2386 V 54 w(crt)p 993 2386 V 54 w(cp)m(y)p 1232 2386
 
24152
V 53 w(crl)p 1424 2386 V 54 w(dist)p 1676 2386 V 54 w(p)s(oin)m(ts)3350
 
24153
2586 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_cpy_c)q
 
24154
(rl_d)q(ist)q(_po)q(int)q(s)e Fg(\()p Ff(gn)m(utls)p
 
24155
2516 2586 28 4 v 41 w(x509)p 2740 2586 V 41 w(crt)p 2892
 
24156
2586 V 41 w(t)30 b Fe(dst)12 b Ff(,)565 2696 y(gn)m(utls)p
 
24157
811 2696 V 41 w(x509)p 1035 2696 V 41 w(crt)p 1187 2696
 
24158
V 40 w(t)31 b Fe(src)12 b Fg(\))390 2805 y Ff(dst)r FB(:)40
 
24159
b(a)31 b(certi\014cate)i(of)d(t)m(yp)s(e)h Ft(gnutls_x509_crt_t)390
 
24160
2943 y Ff(src)6 b FB(:)40 b(the)31 b(certi\014cate)h(where)e(the)g
 
24161
(dist)h(p)s(oin)m(ts)f(will)h(b)s(e)e(copied)i(from)390
 
24162
3081 y(This)37 b(function)g(will)h(cop)m(y)g(the)f(CRL)g(distribution)g
 
24163
(p)s(oin)m(ts)g(certi\014cate)j(extension,)g(from)d(the)390
 
24164
3190 y(source)25 b(to)i(the)e(destination)h(certi\014cate.)41
 
24165
b(This)25 b(ma)m(y)h(b)s(e)e(useful)h(to)h(cop)m(y)g(from)f(a)h(CA)f
 
24166
(certi\014cate)390 3300 y(to)31 b(issued)f(ones.)390
 
24167
3437 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
24160
24168
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
24161
 
b(alue.)150 2095 y Fv(gn)m(utls)p 483 2095 37 5 v 55
24162
 
w(x509)p 786 2095 V 54 w(crt)p 993 2095 V 54 w(deinit)3350
24163
 
2293 y FB([F)d(unction])-3599 b Fh(void)54 b(gnutls_x509_crt_deinit)e
24164
 
Fg(\()p Ff(gn)m(utls)p 1889 2293 28 4 v 40 w(x509)p 2112
24165
 
2293 V 42 w(crt)p 2265 2293 V 40 w(t)31 b Fe(cert)12
24166
 
b Fg(\))390 2402 y Ff(cert)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)
24167
 
f(initialized)390 2538 y(This)g(function)g(will)g(deinitialize)j(a)e
24168
 
(CRL)e(structure.)150 2738 y Fv(gn)m(utls)p 483 2738
24169
 
37 5 v 55 w(x509)p 786 2738 V 54 w(crt)p 993 2738 V 54
24170
 
w(exp)s(ort)3350 2935 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
24169
b(alue.)150 3640 y Fv(gn)m(utls)p 483 3640 37 5 v 55
 
24170
w(x509)p 786 3640 V 54 w(crt)p 993 3640 V 54 w(deinit)3350
 
24171
3840 y FB([F)d(unction])-3599 b Fh(void)54 b(gnutls_x509_crt_deinit)e
 
24172
Fg(\()p Ff(gn)m(utls)p 1889 3840 28 4 v 40 w(x509)p 2112
 
24173
3840 V 42 w(crt)p 2265 3840 V 40 w(t)31 b Fe(cert)12
 
24174
b Fg(\))390 3949 y Ff(cert)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)
 
24175
f(initialized)390 4087 y(This)g(function)g(will)g(deinitialize)j(a)e
 
24176
(CRL)e(structure.)150 4289 y Fv(gn)m(utls)p 483 4289
 
24177
37 5 v 55 w(x509)p 786 4289 V 54 w(crt)p 993 4289 V 54
 
24178
w(exp)s(ort)3350 4489 y FB([F)-8 b(unction])-3599 b Fh(int)53
24171
24179
b(gnutls_x509_crt_expor)q(t)e Fg(\()p Ff(gn)m(utls)p
24172
 
1836 2935 28 4 v 41 w(x509)p 2060 2935 V 41 w(crt)p 2212
24173
 
2935 V 41 w(t)30 b Fe(cert)12 b Ff(,)565 3045 y(gn)m(utls)p
24174
 
811 3045 V 41 w(x509)p 1035 3045 V 41 w(crt)p 1187 3045
24175
 
V 40 w(fm)m(t)p 1363 3045 V 41 w(t)30 b Fe(format)12
 
24180
1836 4489 28 4 v 41 w(x509)p 2060 4489 V 41 w(crt)p 2212
 
24181
4489 V 41 w(t)30 b Fe(cert)12 b Ff(,)565 4598 y(gn)m(utls)p
 
24182
811 4598 V 41 w(x509)p 1035 4598 V 41 w(crt)p 1187 4598
 
24183
V 40 w(fm)m(t)p 1363 4598 V 41 w(t)30 b Fe(format)12
24176
24184
b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33
24177
 
b(size)p 2906 3045 V 41 w(t)e(*)565 3154 y Fe(output_data_size)12
24178
 
b Fg(\))390 3264 y Ff(cert)r FB(:)41 b(Holds)31 b(the)g(certi\014cate)
24179
 
390 3399 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f
24180
 
(params.)40 b(One)30 b(of)h(PEM)f(or)g(DER.)390 3534
24181
 
y Ff(output)p 664 3534 V 40 w(data)p FB(:)41 b(will)31
 
24185
b(size)p 2906 4598 V 41 w(t)e(*)565 4708 y Fe(output_data_size)12
 
24186
b Fg(\))390 4818 y Ff(cert)r FB(:)41 b(Holds)31 b(the)g(certi\014cate)
 
24187
390 4955 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f
 
24188
(params.)40 b(One)30 b(of)h(PEM)f(or)g(DER.)390 5093
 
24189
y Ff(output)p 664 5093 V 40 w(data)p FB(:)41 b(will)31
24182
24190
b(con)m(tain)h(a)e(certi\014cate)j(PEM)d(or)g(DER)h(enco)s(ded)390
24183
 
3670 y Ff(output)p 664 3670 V 40 w(data)p 880 3670 V
 
24191
5230 y Ff(output)p 664 5230 V 40 w(data)p 880 5230 V
24184
24192
40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
24185
 
2093 3670 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
24186
 
(actual)390 3779 y(size)c(of)g(parameters\))390 3915
24187
 
y(This)f(function)g(will)g(exp)s(ort)g(the)h(certi\014cate)h(to)g(DER)e
24188
 
(or)h(PEM)f(format.)390 4050 y(If)g(the)h(bu\013er)f(pro)m(vided)g(is)g
24189
 
(not)h(long)h(enough)e(to)h(hold)g(the)f(output,)h(then)f(*output)p
24190
 
3357 4050 V 40 w(data)p 3573 4050 V 41 w(size)390 4159
24191
 
y(is)g(up)s(dated)f(and)h(GNUTLS)p 1401 4159 V 40 w(E)p
24192
 
1503 4159 V 40 w(SHOR)-8 b(T)p 1858 4159 V 39 w(MEMOR)g(Y)p
24193
 
2323 4159 V 41 w(BUFFER)31 b(will)g(b)s(e)f(returned.)390
24194
 
4295 y(If)f(the)h(structure)f(is)h(PEM)g(enco)s(ded,)g(it)g(will)g(ha)m
 
24193
2093 5230 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
24194
(actual)390 5340 y(size)c(of)g(parameters\))p eop end
 
24195
%%Page: 202 208
 
24196
TeXDict begin 202 207 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24197
b(F)-8 b(unction)31 b(Reference)2237 b(202)390 299 y(This)30
 
24198
b(function)g(will)g(exp)s(ort)g(the)h(certi\014cate)h(to)g(DER)e(or)h
 
24199
(PEM)f(format.)390 445 y(If)g(the)h(bu\013er)f(pro)m(vided)g(is)g(not)h
 
24200
(long)h(enough)e(to)h(hold)g(the)f(output,)h(then)f(*output)p
 
24201
3357 445 28 4 v 40 w(data)p 3573 445 V 41 w(size)390
 
24202
555 y(is)g(up)s(dated)f(and)h(GNUTLS)p 1401 555 V 40
 
24203
w(E)p 1503 555 V 40 w(SHOR)-8 b(T)p 1858 555 V 39 w(MEMOR)g(Y)p
 
24204
2323 555 V 41 w(BUFFER)31 b(will)g(b)s(e)f(returned.)390
 
24205
701 y(If)f(the)h(structure)f(is)h(PEM)g(enco)s(ded,)g(it)g(will)g(ha)m
24195
24206
(v)m(e)h(a)f(header)g(of)g Ft(")p FB(BEGIN)g(CER)-8 b(TIFICA)g(TE)p
24196
 
Ft(")p FB(.)390 4430 y Fn(Return)30 b(v)-5 b(alue:)41
 
24207
Ft(")p FB(.)390 847 y Fn(Return)30 b(v)-5 b(alue:)41
24197
24208
b FB(In)30 b(case)h(of)g(failure)f(a)h(negativ)m(e)i(v)-5
24198
24209
b(alue)30 b(will)h(b)s(e)f(returned,)f(and)h(0)h(on)f(success.)150
24199
 
4630 y Fv(gn)m(utls)p 483 4630 37 5 v 55 w(x509)p 786
24200
 
4630 V 54 w(crt)p 993 4630 V 54 w(get)p 1212 4630 V 54
24201
 
w(activ)-7 b(ation)p 1792 4630 V 53 w(time)3350 4828
 
24210
1058 y Fv(gn)m(utls)p 483 1058 37 5 v 55 w(x509)p 786
 
24211
1058 V 54 w(crt)p 993 1058 V 54 w(get)p 1212 1058 V 54
 
24212
w(activ)-7 b(ation)p 1792 1058 V 53 w(time)3350 1267
24202
24213
y FB([F)f(unction])-3599 b Fh(time_t)54 b(gnutls_x509_crt_get_ac)q(tiv)
24203
 
q(ati)q(on_)q(time)e Fg(\()p Ff(gn)m(utls)p 2673 4828
24204
 
28 4 v 41 w(x509)p 2897 4828 V 41 w(crt)p 3049 4828 V
24205
 
41 w(t)565 4937 y Fe(cert)12 b Fg(\))390 5047 y Ff(cert)r
 
24214
q(ati)q(on_)q(time)e Fg(\()p Ff(gn)m(utls)p 2673 1267
 
24215
28 4 v 41 w(x509)p 2897 1267 V 41 w(crt)p 3049 1267 V
 
24216
41 w(t)565 1376 y Fe(cert)12 b Fg(\))390 1486 y Ff(cert)r
24206
24217
FB(:)41 b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
24207
 
b FB(structure)390 5182 y(This)k(function)g(will)g(return)g(the)g(time)
 
24218
b FB(structure)390 1632 y(This)k(function)g(will)g(return)g(the)g(time)
24208
24219
h(this)g(Certi\014cate)g(w)m(as)g(or)f(will)h(b)s(e)f(activ)-5
24209
 
b(ated.)390 5317 y Fn(Returns:)40 b FB(activ)-5 b(ation)33
24210
 
b(time,)e(or)g(\(time)p 1761 5317 V 41 w(t\)-1)h(on)e(error.)p
24211
 
eop end
24212
 
%%Page: 202 208
24213
 
TeXDict begin 202 207 bop 150 -116 a FB(Chapter)30 b(9:)41
24214
 
b(F)-8 b(unction)31 b(Reference)2237 b(202)150 299 y
24215
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
24216
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(authorit)m(y)p
24217
 
1765 299 V 53 w(k)m(ey)p 2001 299 V 53 w(id)3350 504
24218
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_a)q(utho)
24219
 
q(rit)q(y_k)q(ey_)q(id)f Fg(\()p Ff(gn)m(utls)p 2569
24220
 
504 28 4 v 40 w(x509)p 2792 504 V 42 w(crt)p 2945 504
24221
 
V 40 w(t)565 613 y Fe(cert)12 b Ff(,)31 b(v)m(oid)g(*)g
24222
 
Fe(ret)12 b Ff(,)31 b(size)p 1485 613 V 41 w(t)g(*)f
24223
 
Fe(ret_size)12 b Ff(,)33 b(unsigned)c(in)m(t)i(*)g Fe(critical)12
24224
 
b Fg(\))390 723 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24225
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 865 y Ff(critical)t
24226
 
FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f
24227
 
(mark)m(ed)g(as)h(critical)h(\(ma)m(y)g(b)s(e)d(n)m(ull\))390
24228
 
1008 y(This)38 b(function)g(will)h(return)e(the)i(X.509v3)i
24229
 
(certi\014cate)g(authorit)m(y's)e(k)m(ey)h(iden)m(ti\014er.)65
24230
 
b(This)38 b(is)390 1118 y(obtained)29 b(b)m(y)f(the)h(X.509)h(Authorit)
24231
 
m(y)f(Key)g(iden)m(ti\014er)f(extension)h(\014eld)f(\(2.5.29.35\).)45
24232
 
b(Note)29 b(that)390 1227 y(this)h(function)g(only)h(returns)e(the)i(k)
24233
 
m(eyIden)m(ti\014er)g(\014eld)e(of)i(the)g(extension.)390
24234
 
1370 y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
 
24220
b(ated.)390 1779 y Fn(Returns:)40 b FB(activ)-5 b(ation)33
 
24221
b(time,)e(or)g(\(time)p 1761 1779 V 41 w(t\)-1)h(on)e(error.)150
 
24222
1990 y Fv(gn)m(utls)p 483 1990 37 5 v 55 w(x509)p 786
 
24223
1990 V 54 w(crt)p 993 1990 V 54 w(get)p 1212 1990 V 54
 
24224
w(authorit)m(y)p 1765 1990 V 53 w(k)m(ey)p 2001 1990
 
24225
V 53 w(id)3350 2198 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
24226
b(gnutls_x509_crt_get_a)q(utho)q(rit)q(y_k)q(ey_)q(id)f
 
24227
Fg(\()p Ff(gn)m(utls)p 2569 2198 28 4 v 40 w(x509)p 2792
 
24228
2198 V 42 w(crt)p 2945 2198 V 40 w(t)565 2308 y Fe(cert)12
 
24229
b Ff(,)31 b(v)m(oid)g(*)g Fe(ret)12 b Ff(,)31 b(size)p
 
24230
1485 2308 V 41 w(t)g(*)f Fe(ret_size)12 b Ff(,)33 b(unsigned)c(in)m(t)i
 
24231
(*)g Fe(critical)12 b Fg(\))390 2417 y Ff(cert)r FB(:)41
 
24232
b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
 
24233
b FB(structure)390 2564 y Ff(critical)t FB(:)42 b(will)31
 
24234
b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f(mark)m(ed)g(as)h
 
24235
(critical)h(\(ma)m(y)g(b)s(e)d(n)m(ull\))390 2710 y(This)38
 
24236
b(function)g(will)h(return)e(the)i(X.509v3)i(certi\014cate)g(authorit)m
 
24237
(y's)e(k)m(ey)h(iden)m(ti\014er.)65 b(This)38 b(is)390
 
24238
2820 y(obtained)29 b(b)m(y)f(the)h(X.509)h(Authorit)m(y)f(Key)g(iden)m
 
24239
(ti\014er)f(extension)h(\014eld)f(\(2.5.29.35\).)45 b(Note)29
 
24240
b(that)390 2929 y(this)h(function)g(only)h(returns)e(the)i(k)m(eyIden)m
 
24241
(ti\014er)g(\014eld)e(of)i(the)g(extension.)390 3075
 
24242
y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
24235
24243
b FB(is)47 b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
24236
 
1479 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
24237
 
b(in)f(case)h(of)g(an)f(error.)150 1687 y Fv(gn)m(utls)p
24238
 
483 1687 37 5 v 55 w(x509)p 786 1687 V 54 w(crt)p 993
24239
 
1687 V 54 w(get)p 1212 1687 V 54 w(basic)p 1531 1687
24240
 
V 54 w(constrain)m(ts)3350 1891 y FB([F)-8 b(unction])-3599
 
24244
3185 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
 
24245
b(in)f(case)h(of)g(an)f(error.)150 3396 y Fv(gn)m(utls)p
 
24246
483 3396 37 5 v 55 w(x509)p 786 3396 V 54 w(crt)p 993
 
24247
3396 V 54 w(get)p 1212 3396 V 54 w(basic)p 1531 3396
 
24248
V 54 w(constrain)m(ts)3350 3605 y FB([F)-8 b(unction])-3599
24241
24249
b Fh(int)53 b(gnutls_x509_crt_get_b)q(asic)q(_co)q(nst)q(rai)q(nts)f
24242
 
Fg(\()p Ff(gn)m(utls)p 2621 1891 28 4 v 41 w(x509)p 2845
24243
 
1891 V 41 w(crt)p 2997 1891 V 40 w(t)565 2001 y Fe(cert)12
 
24250
Fg(\()p Ff(gn)m(utls)p 2621 3605 28 4 v 41 w(x509)p 2845
 
24251
3605 V 41 w(crt)p 2997 3605 V 40 w(t)565 3714 y Fe(cert)12
24244
24252
b Ff(,)31 b(unsigned)f(in)m(t)h(*)f Fe(critical)12 b
24245
24253
Ff(,)33 b(in)m(t)e(*)g Fe(ca)12 b Ff(,)30 b(in)m(t)h(*)g
24246
 
Fe(pathlen)12 b Fg(\))390 2111 y Ff(cert)r FB(:)41 b(should)30
 
24254
Fe(pathlen)12 b Fg(\))390 3824 y Ff(cert)r FB(:)41 b(should)30
24247
24255
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
24248
 
2253 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)
24249
 
h(extension)g(is)f(mark)m(ed)g(as)h(critical)390 2396
 
24256
3970 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)
 
24257
h(extension)g(is)f(mark)m(ed)g(as)h(critical)390 4116
24250
24258
y Ff(ca)p FB(:)50 b(p)s(oin)m(ter)34 b(to)h(output)f(in)m(teger)i
24251
24259
(indicating)f(CA)f(status,)i(ma)m(y)f(b)s(e)f(NULL,)g(v)-5
24252
 
b(alue)35 b(is)g(1)f(if)h(the)390 2505 y(certi\014cate)d(CA)f(\015ag)f
24253
 
(is)h(set,)g(0)g(otherwise.)390 2648 y Ff(pathlen)p FB(:)72
 
24260
b(alue)35 b(is)g(1)f(if)h(the)390 4226 y(certi\014cate)d(CA)f(\015ag)f
 
24261
(is)h(set,)g(0)g(otherwise.)390 4372 y Ff(pathlen)p FB(:)72
24254
24262
b(p)s(oin)m(ter)45 b(to)i(output)e(in)m(teger)i(indicating)g(path)f
24255
 
(length)g(\(ma)m(y)h(b)s(e)e(NULL\),)h(non-)390 2757
 
24263
(length)g(\(ma)m(y)h(b)s(e)e(NULL\),)h(non-)390 4482
24256
24264
y(negativ)m(e)39 b(v)-5 b(alues)37 b(indicate)h(a)g(presen)m(t)f
24257
24265
(pathLenConstrain)m(t)g(\014eld)f(and)h(the)g(actual)h(v)-5
24258
 
b(alue,)39 b(-1)390 2867 y(indicate)31 b(that)g(the)g(\014eld)f(is)g
24259
 
(absen)m(t.)390 3010 y(This)i(function)h(will)h(read)f(the)h
 
24266
b(alue,)39 b(-1)390 4591 y(indicate)31 b(that)g(the)g(\014eld)f(is)g
 
24267
(absen)m(t.)390 4738 y(This)i(function)h(will)h(read)f(the)h
24260
24268
(certi\014cate's)h(basic)f(constrain)m(ts,)h(and)d(return)h(the)g
24261
 
(certi\014cates)390 3119 y(CA)d(status.)41 b(It)31 b(reads)f(the)g
 
24269
(certi\014cates)390 4847 y(CA)d(status.)41 b(It)31 b(reads)f(the)g
24262
24270
(basicConstrain)m(ts)h(X.509)i(extension)e(\(2.5.29.19\).)390
24263
 
3262 y Fn(Return)40 b(v)-5 b(alue:)61 b FB(If)40 b(the)h(certi\014cate)
 
24271
4994 y Fn(Return)40 b(v)-5 b(alue:)61 b FB(If)40 b(the)h(certi\014cate)
24264
24272
h(is)f(a)g(CA)f(a)h(p)s(ositiv)m(e)g(v)-5 b(alue)41 b(will)g(b)s(e)f
24265
 
(returned,)i(or)e(zero)390 3371 y(if)f(the)h(certi\014cate)h(do)s(es)f
 
24273
(returned,)i(or)e(zero)390 5103 y(if)f(the)h(certi\014cate)h(do)s(es)f
24266
24274
(not)f(ha)m(v)m(e)i(CA)e(\015ag)h(set.)68 b(A)40 b(negativ)m(e)h(v)-5
24267
 
b(alue)40 b(ma)m(y)g(b)s(e)f(returned)f(in)390 3481 y(case)47
 
24275
b(alue)40 b(ma)m(y)g(b)s(e)f(returned)f(in)390 5213 y(case)47
24268
24276
b(of)f(errors.)87 b(If)45 b(the)h(certi\014cate)i(do)s(es)d(not)h(con)m
24269
 
(tain)i(the)e(basicConstrain)m(ts)g(extension)390 3591
24270
 
y(GNUTLS)p 777 3591 V 40 w(E)p 879 3591 V 40 w(REQUESTED)p
24271
 
1497 3591 V 39 w(D)m(A)-8 b(T)g(A)p 1788 3591 V 41 w(NOT)p
24272
 
2034 3591 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)150
24273
 
3798 y Fv(gn)m(utls)p 483 3798 37 5 v 55 w(x509)p 786
24274
 
3798 V 54 w(crt)p 993 3798 V 54 w(get)p 1212 3798 V 54
24275
 
w(ca)p 1381 3798 V 53 w(status)3350 4003 y FB([F)-8 b(unction])-3599
 
24277
(tain)i(the)e(basicConstrain)m(ts)g(extension)390 5322
 
24278
y(GNUTLS)p 777 5322 V 40 w(E)p 879 5322 V 40 w(REQUESTED)p
 
24279
1497 5322 V 39 w(D)m(A)-8 b(T)g(A)p 1788 5322 V 41 w(NOT)p
 
24280
2034 5322 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)p
 
24281
eop end
 
24282
%%Page: 203 209
 
24283
TeXDict begin 203 208 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24284
b(F)-8 b(unction)31 b(Reference)2237 b(203)150 299 y
 
24285
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
24286
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(ca)p 1381
 
24287
299 V 53 w(status)3350 513 y FB([F)-8 b(unction])-3599
24276
24288
b Fh(int)53 b(gnutls_x509_crt_get_c)q(a_st)q(atu)q(s)e
24277
 
Fg(\()p Ff(gn)m(utls)p 2202 4003 28 4 v 41 w(x509)p 2426
24278
 
4003 V 42 w(crt)p 2579 4003 V 40 w(t)31 b Fe(cert)12
24279
 
b Ff(,)565 4112 y(unsigned)29 b(in)m(t)i(*)g Fe(critical)12
24280
 
b Fg(\))390 4222 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24281
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4364 y Ff(critical)t
 
24289
Fg(\()p Ff(gn)m(utls)p 2202 513 28 4 v 41 w(x509)p 2426
 
24290
513 V 42 w(crt)p 2579 513 V 40 w(t)31 b Fe(cert)12 b
 
24291
Ff(,)565 622 y(unsigned)29 b(in)m(t)i(*)g Fe(critical)12
 
24292
b Fg(\))390 732 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24293
Ft(gnutls_x509_crt_t)26 b FB(structure)390 883 y Ff(critical)t
24282
24294
FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f
24283
 
(mark)m(ed)g(as)h(critical)390 4507 y(This)21 b(function)h(will)h
 
24295
(mark)m(ed)g(as)h(critical)390 1035 y(This)21 b(function)h(will)h
24284
24296
(return)e(certi\014cates)j(CA)d(status,)k(b)m(y)d(reading)g(the)g
24285
 
(basicConstrain)m(ts)h(X.509)390 4617 y(extension)35
 
24297
(basicConstrain)m(ts)h(X.509)390 1144 y(extension)35
24286
24298
b(\(2.5.29.19\).)55 b(If)33 b(the)h(certi\014cate)i(is)e(a)h(CA)e(a)h
24287
24299
(p)s(ositiv)m(e)h(v)-5 b(alue)35 b(will)f(b)s(e)f(returned,)h(or)390
24288
 
4726 y(zero)d(if)g(the)f(certi\014cate)j(do)s(es)d(not)g(ha)m(v)m(e)i
24289
 
(CA)e(\015ag)h(set.)390 4869 y(Use)e Ft(gnutls_x509_crt_get_basic)o
 
24300
1254 y(zero)d(if)g(the)f(certi\014cate)j(do)s(es)d(not)g(ha)m(v)m(e)i
 
24301
(CA)e(\015ag)h(set.)390 1405 y(Use)e Ft(gnutls_x509_crt_get_basic)o
24290
24302
(_co)o(nstr)o(ain)o(ts\(\))22 b FB(if)29 b(y)m(ou)g(w)m(an)m(t)g(to)h
24291
 
(read)e(the)h(pathLen-)390 4978 y(Constrain)m(t)i(\014eld)f(to)s(o.)390
24292
 
5121 y(A)g(negativ)m(e)i(v)-5 b(alue)31 b(ma)m(y)g(b)s(e)e(returned)g
 
24303
(read)e(the)h(pathLen-)390 1515 y(Constrain)m(t)i(\014eld)f(to)s(o.)390
 
24304
1666 y(A)g(negativ)m(e)i(v)-5 b(alue)31 b(ma)m(y)g(b)s(e)e(returned)g
24293
24305
(in)h(case)h(of)f(parsing)g(error.)40 b(If)30 b(the)g(certi\014cate)i
24294
 
(do)s(es)e(not)390 5230 y(con)m(tain)22 b(the)e(basicConstrain)m(ts)h
24295
 
(extension)g(GNUTLS)p 2302 5230 V 40 w(E)p 2404 5230
24296
 
V 40 w(REQUESTED)p 3022 5230 V 39 w(D)m(A)-8 b(T)g(A)p
24297
 
3313 5230 V 41 w(NOT)p 3559 5230 V 40 w(A)e(V)g(AILABLE)390
24298
 
5340 y(will)31 b(b)s(e)e(returned.)p eop end
24299
 
%%Page: 203 209
24300
 
TeXDict begin 203 208 bop 150 -116 a FB(Chapter)30 b(9:)41
24301
 
b(F)-8 b(unction)31 b(Reference)2237 b(203)150 299 y
24302
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
24303
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(crl)p 1405
24304
 
299 V 54 w(dist)p 1657 299 V 54 w(p)s(oin)m(ts)3350 497
24305
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_c)q(rl_d)
24306
 
q(ist)q(_po)q(int)q(s)e Fg(\()p Ff(gn)m(utls)p 2516 497
24307
 
28 4 v 41 w(x509)p 2740 497 V 41 w(crt)p 2892 497 V 41
24308
 
w(t)565 606 y Fe(cert)12 b Ff(,)31 b(unsigned)f(in)m(t)h
 
24306
(do)s(es)e(not)390 1776 y(con)m(tain)22 b(the)e(basicConstrain)m(ts)h
 
24307
(extension)g(GNUTLS)p 2302 1776 V 40 w(E)p 2404 1776
 
24308
V 40 w(REQUESTED)p 3022 1776 V 39 w(D)m(A)-8 b(T)g(A)p
 
24309
3313 1776 V 41 w(NOT)p 3559 1776 V 40 w(A)e(V)g(AILABLE)390
 
24310
1886 y(will)31 b(b)s(e)e(returned.)150 2102 y Fv(gn)m(utls)p
 
24311
483 2102 37 5 v 55 w(x509)p 786 2102 V 54 w(crt)p 993
 
24312
2102 V 54 w(get)p 1212 2102 V 54 w(crl)p 1405 2102 V
 
24313
54 w(dist)p 1657 2102 V 54 w(p)s(oin)m(ts)3350 2315 y
 
24314
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_c)q(rl_d)q
 
24315
(ist)q(_po)q(int)q(s)e Fg(\()p Ff(gn)m(utls)p 2516 2315
 
24316
28 4 v 41 w(x509)p 2740 2315 V 41 w(crt)p 2892 2315 V
 
24317
41 w(t)565 2425 y Fe(cert)12 b Ff(,)31 b(unsigned)f(in)m(t)h
24309
24318
Fe(seq)12 b Ff(,)31 b(v)m(oid)g(*)f Fe(ret)12 b Ff(,)31
24310
 
b(size)p 2227 606 V 41 w(t)g(*)g Fe(ret_size)12 b Ff(,)32
24311
 
b(unsigned)d(in)m(t)i(*)565 716 y Fe(reason_flags)12
 
24319
b(size)p 2227 2425 V 41 w(t)g(*)g Fe(ret_size)12 b Ff(,)32
 
24320
b(unsigned)d(in)m(t)i(*)565 2535 y Fe(reason_flags)12
24312
24321
b Ff(,)34 b(unsigned)29 b(in)m(t)i(*)g Fe(critical)12
24313
 
b Fg(\))390 826 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24314
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 961 y Ff(seq)r
 
24322
b Fg(\))390 2644 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24323
Ft(gnutls_x509_crt_t)26 b FB(structure)390 2796 y Ff(seq)r
24315
24324
FB(:)41 b(sp)s(eci\014es)29 b(the)g(sequence)h(n)m(um)m(b)s(er)e(of)i
24316
24325
(the)g(distribution)f(p)s(oin)m(t)g(\(0)h(for)g(the)f(\014rst)g(one,)h
24317
 
(1)g(for)390 1071 y(the)h(second)f(etc.\))390 1206 y
 
24326
(1)g(for)390 2905 y(the)h(second)f(etc.\))390 3057 y
24318
24327
Ff(ret)r FB(:)41 b(is)30 b(the)h(place)g(where)f(the)h(distribution)e
24319
 
(p)s(oin)m(t)i(will)g(b)s(e)e(copied)i(to)390 1342 y
24320
 
Ff(ret)p 507 1342 V 40 w(size)5 b FB(:)42 b(holds)30
24321
 
b(the)g(size)i(of)e(ret.)390 1478 y Ff(reason)p 649 1478
 
24328
(p)s(oin)m(t)i(will)g(b)s(e)e(copied)i(to)390 3208 y
 
24329
Ff(ret)p 507 3208 V 40 w(size)5 b FB(:)42 b(holds)30
 
24330
b(the)g(size)i(of)e(ret.)390 3360 y Ff(reason)p 649 3360
24322
24331
V 40 w(\015ags)t FB(:)41 b(Rev)m(o)s(cation)32 b(reasons)f(\015ags.)390
24323
 
1613 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)
 
24332
3511 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)
24324
24333
h(extension)g(is)f(mark)m(ed)g(as)h(critical)h(\(ma)m(y)g(b)s(e)d(n)m
24325
 
(ull\))390 1749 y(This)37 b(function)g(will)h(return)f(the)h(CRL)f
 
24334
(ull\))390 3662 y(This)37 b(function)g(will)h(return)f(the)h(CRL)f
24326
24335
(distribution)g(p)s(oin)m(ts)g(\(2.5.29.31\),)44 b(con)m(tained)39
24327
 
b(in)f(the)390 1858 y(giv)m(en)31 b(certi\014cate.)390
24328
 
1994 y Ft(reason_flags)26 b FB(should)i(b)s(e)g(an)h(ORed)g(sequence)h
24329
 
(of)f(GNUTLS)p 2649 1994 V 40 w(CRL)p 2879 1994 V 39
24330
 
w(REASON)p 3305 1994 V 39 w(UNUSED,)390 2104 y(GNUTLS)p
24331
 
777 2104 V 40 w(CRL)p 1007 2104 V 39 w(REASON)p 1433
24332
 
2104 V 39 w(KEY)p 1673 2104 V 40 w(COMPR)m(OMISE,)20
24333
 
b(GNUTLS)p 2785 2104 V 40 w(CRL)p 3015 2104 V 39 w(REASON)p
24334
 
3441 2104 V 39 w(CA)p 3614 2104 V 40 w(COMPR)m(OMISE,)390
24335
 
2213 y(GNUTLS)p 777 2213 V 40 w(CRL)p 1007 2213 V 39
24336
 
w(REASON)p 1433 2213 V 39 w(AFFILIA)-8 b(TION)p 2079
24337
 
2213 V 41 w(CHANGED,)21 b(GNUTLS)p 3019 2213 V 40 w(CRL)p
24338
 
3249 2213 V 39 w(REASON)p 3675 2213 V 40 w(SUPERSEEDED,)390
24339
 
2323 y(GNUTLS)p 777 2323 V 40 w(CRL)p 1007 2323 V 39
24340
 
w(REASON)p 1433 2323 V 39 w(CESSA)-8 b(TION)p 2000 2323
24341
 
V 39 w(OF)p 2169 2323 V 40 w(OPERA)g(TION,)20 b(GNUTLS)p
24342
 
3195 2323 V 39 w(CRL)p 3424 2323 V 40 w(REASON)p 3851
24343
 
2323 V 39 w(CER)-8 b(TIFICA)g(TE)p 4522 2323 V 40 w(HOLD,)390
24344
 
2432 y(GNUTLS)p 777 2432 V 40 w(CRL)p 1007 2432 V 39
24345
 
w(REASON)p 1433 2432 V 39 w(PRIVILEGE)p 1987 2432 V 40
24346
 
w(WITHDRA)e(WN,)22 b(GNUTLS)p 3070 2432 V 39 w(CRL)p
24347
 
3299 2432 V 40 w(REASON)p 3726 2432 V 39 w(AA)p 3901
24348
 
2432 V 40 w(COMPR)m(OMISE,)390 2542 y(or)30 b(zero)i(for)e(all)h(p)s
24349
 
(ossible)f(reasons.)390 2677 y(This)35 b(is)g(sp)s(eci\014ed)g(in)g
 
24336
b(in)f(the)390 3772 y(giv)m(en)31 b(certi\014cate.)390
 
24337
3924 y Ft(reason_flags)26 b FB(should)i(b)s(e)g(an)h(ORed)g(sequence)h
 
24338
(of)f(GNUTLS)p 2649 3924 V 40 w(CRL)p 2879 3924 V 39
 
24339
w(REASON)p 3305 3924 V 39 w(UNUSED,)390 4033 y(GNUTLS)p
 
24340
777 4033 V 40 w(CRL)p 1007 4033 V 39 w(REASON)p 1433
 
24341
4033 V 39 w(KEY)p 1673 4033 V 40 w(COMPR)m(OMISE,)20
 
24342
b(GNUTLS)p 2785 4033 V 40 w(CRL)p 3015 4033 V 39 w(REASON)p
 
24343
3441 4033 V 39 w(CA)p 3614 4033 V 40 w(COMPR)m(OMISE,)390
 
24344
4143 y(GNUTLS)p 777 4143 V 40 w(CRL)p 1007 4143 V 39
 
24345
w(REASON)p 1433 4143 V 39 w(AFFILIA)-8 b(TION)p 2079
 
24346
4143 V 41 w(CHANGED,)21 b(GNUTLS)p 3019 4143 V 40 w(CRL)p
 
24347
3249 4143 V 39 w(REASON)p 3675 4143 V 40 w(SUPERSEEDED,)390
 
24348
4252 y(GNUTLS)p 777 4252 V 40 w(CRL)p 1007 4252 V 39
 
24349
w(REASON)p 1433 4252 V 39 w(CESSA)-8 b(TION)p 2000 4252
 
24350
V 39 w(OF)p 2169 4252 V 40 w(OPERA)g(TION,)20 b(GNUTLS)p
 
24351
3195 4252 V 39 w(CRL)p 3424 4252 V 40 w(REASON)p 3851
 
24352
4252 V 39 w(CER)-8 b(TIFICA)g(TE)p 4522 4252 V 40 w(HOLD,)390
 
24353
4362 y(GNUTLS)p 777 4362 V 40 w(CRL)p 1007 4362 V 39
 
24354
w(REASON)p 1433 4362 V 39 w(PRIVILEGE)p 1987 4362 V 40
 
24355
w(WITHDRA)e(WN,)22 b(GNUTLS)p 3070 4362 V 39 w(CRL)p
 
24356
3299 4362 V 40 w(REASON)p 3726 4362 V 39 w(AA)p 3901
 
24357
4362 V 40 w(COMPR)m(OMISE,)390 4471 y(or)30 b(zero)i(for)e(all)h(p)s
 
24358
(ossible)f(reasons.)390 4623 y(This)35 b(is)g(sp)s(eci\014ed)g(in)g
24350
24359
(X509v3)i(Certi\014cate)g(Extensions.)55 b(GNUTLS)35
24351
 
b(will)h(return)e(the)i(distri-)390 2787 y(bution)30
 
24360
b(will)h(return)e(the)i(distri-)390 4732 y(bution)30
24352
24361
b(p)s(oin)m(t)g(t)m(yp)s(e,)h(or)f(a)h(negativ)m(e)i(error)d(co)s(de)g
24353
 
(on)h(error.)390 2923 y Fn(Returns:)60 b Ft(GNUTLS_E_SHORT_MEMORY_BU)o
 
24362
(on)h(error.)390 4884 y Fn(Returns:)60 b Ft(GNUTLS_E_SHORT_MEMORY_BU)o
24354
24363
(FFE)o(R)34 b FB(and)40 b(up)s(dates)f(&)p Ft(ret_size)e
24355
 
FB(if)j(&)p Ft(ret_size)390 3032 y FB(is)g(not)f(enough)h(to)g(hold)f
 
24364
FB(if)j(&)p Ft(ret_size)390 4994 y FB(is)g(not)f(enough)h(to)g(hold)f
24356
24365
(the)h(distribution)f(p)s(oin)m(t,)j(or)d(the)h(t)m(yp)s(e)g(of)f(the)h
24357
 
(distribution)f(p)s(oin)m(t)390 3142 y(if)i(ev)m(erything)h(w)m(as)f
 
24366
(distribution)f(p)s(oin)m(t)390 5103 y(if)i(ev)m(erything)h(w)m(as)f
24358
24367
(ok.)73 b(The)41 b(t)m(yp)s(e)g(is)g(one)h(of)f(the)g(en)m(umerated)g
24359
 
Ft(gnutls_x509_subject_)390 3251 y(alt_name_t)p FB(.)j(If)32
 
24368
Ft(gnutls_x509_subject_)390 5213 y(alt_name_t)p FB(.)j(If)32
24360
24369
b(the)g(certi\014cate)j(do)s(es)d(not)g(ha)m(v)m(e)i(an)e(Alternativ)m
24361
 
(e)j(name)d(with)g(the)h(sp)s(eci\014ed)390 3361 y(sequence)e(n)m(um)m
 
24370
(e)j(name)d(with)g(the)h(sp)s(eci\014ed)390 5322 y(sequence)e(n)m(um)m
24362
24371
(b)s(er)e(then)h Ft(GNUTLS_E_REQUESTED_DATA_)o(NOT_)o(AVA)o(ILAB)o(LE)
24363
 
24 b FB(is)31 b(returned.)150 3561 y Fv(gn)m(utls)p 483
24364
 
3561 37 5 v 55 w(x509)p 786 3561 V 54 w(crt)p 993 3561
24365
 
V 54 w(get)p 1212 3561 V 54 w(dn)p 1402 3561 V 54 w(b)m(y)p
24366
 
1586 3561 V 54 w(oid)3350 3759 y FB([F)-8 b(unction])-3599
24367
 
b Fh(int)53 b(gnutls_x509_crt_get_d)q(n_by)q(_oi)q(d)e
24368
 
Fg(\()p Ff(gn)m(utls)p 2202 3759 28 4 v 41 w(x509)p 2426
24369
 
3759 V 42 w(crt)p 2579 3759 V 40 w(t)31 b Fe(cert)12
24370
 
b Ff(,)31 b(const)565 3869 y(c)m(har)g(*)g Fe(oid)12
24371
 
b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
24372
24 b FB(is)31 b(returned.)p eop end
 
24373
%%Page: 204 210
 
24374
TeXDict begin 204 209 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24375
b(F)-8 b(unction)31 b(Reference)2237 b(204)150 299 y
 
24376
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
24377
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(dn)p 1402
 
24378
299 V 54 w(b)m(y)p 1586 299 V 54 w(oid)3350 492 y FB([F)-8
 
24379
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_d)q(n_by)q(_oi)q(d)e
 
24380
Fg(\()p Ff(gn)m(utls)p 2202 492 28 4 v 41 w(x509)p 2426
 
24381
492 V 42 w(crt)p 2579 492 V 40 w(t)31 b Fe(cert)12 b
 
24382
Ff(,)31 b(const)565 601 y(c)m(har)g(*)g Fe(oid)12 b Ff(,)31
 
24383
b(in)m(t)g Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m(t)i
24372
24384
Fe(raw_flag)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(buf)12 b
24373
 
Ff(,)31 b(size)p 3127 3869 V 41 w(t)g(*)565 3978 y Fe(sizeof_buf)12
24374
 
b Fg(\))390 4088 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24375
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4224 y Ff(oid)t
 
24385
Ff(,)31 b(size)p 3127 601 V 41 w(t)g(*)565 711 y Fe(sizeof_buf)12
 
24386
b Fg(\))390 821 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24387
Ft(gnutls_x509_crt_t)26 b FB(structure)390 953 y Ff(oid)t
24376
24388
FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m
24377
 
(ull)g(terminated)h(string)390 4359 y Ff(indx)6 b FB(:)39
 
24389
(ull)g(terminated)h(string)390 1086 y Ff(indx)6 b FB(:)39
24378
24390
b(In)26 b(case)j(m)m(ultiple)f(same)g(OIDs)f(exist)h(in)f(the)h(RDN,)g
24379
24391
(this)f(sp)s(eci\014es)g(whic)m(h)g(to)i(send.)39 b(Use)390
24380
 
4469 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
24381
 
4604 y Ff(ra)m(w)p 540 4604 V 40 w(\015ag)8 b FB(:)41
 
24392
1195 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
 
24393
1328 y Ff(ra)m(w)p 540 1328 V 40 w(\015ag)8 b FB(:)41
24382
24394
b(If)30 b(non)g(zero)h(returns)e(the)i(ra)m(w)f(DER)h(data)g(of)f(the)h
24383
 
(DN)g(part.)390 4740 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f
 
24395
(DN)g(part.)390 1461 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f
24384
24396
(where)g(the)h(DN)g(part)f(will)g(b)s(e)g(copied)h(\(ma)m(y)g(b)s(e)f
24385
 
(n)m(ull\).)390 4876 y Ff(sizeof)p 610 4876 V 41 w(buf)17
 
24397
(n)m(ull\).)390 1593 y Ff(sizeof)p 610 1593 V 41 w(buf)17
24386
24398
b FB(:)40 b(initially)32 b(holds)e(the)g(size)i(of)e
24387
 
Ft(buf)390 5011 y FB(This)e(function)g(will)h(extract)h(the)e(part)h
 
24399
Ft(buf)390 1726 y FB(This)e(function)g(will)h(extract)h(the)e(part)h
24388
24400
(of)f(the)h(name)g(of)f(the)h(Certi\014cate)h(sub)5 b(ject)28
24389
 
b(sp)s(eci\014ed)g(b)m(y)390 5121 y(the)k(giv)m(en)h(OID.)f(The)f
 
24401
b(sp)s(eci\014ed)g(b)m(y)390 1835 y(the)k(giv)m(en)h(OID.)f(The)f
24390
24402
(output,)i(if)f(the)g(ra)m(w)g(\015ag)g(is)g(not)g(used,)g(will)g(b)s
24391
 
(e)f(enco)s(ded)h(as)g(describ)s(ed)390 5230 y(in)44
 
24403
(e)f(enco)s(ded)h(as)g(describ)s(ed)390 1945 y(in)44
24392
24404
b(RF)m(C2253.)83 b(Th)m(us)43 b(a)h(string)g(that)g(is)g(ASCI)s(I)e(or)
24393
24405
i(UTF-8)h(enco)s(ded,)i(dep)s(ending)42 b(on)i(the)390
24394
 
5340 y(certi\014cate)32 b(data.)p eop end
24395
 
%%Page: 204 210
24396
 
TeXDict begin 204 209 bop 150 -116 a FB(Chapter)30 b(9:)41
24397
 
b(F)-8 b(unction)31 b(Reference)2237 b(204)390 299 y(Some)32
24398
 
b(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g(b)s(e)g(found)f
24399
 
(in)g(gn)m(utls/x509.h)j(If)e(ra)m(w)g(\015ag)h(is)390
24400
 
408 y(zero,)39 b(this)e(function)f(will)h(only)f(return)g(kno)m(wn)g
24401
 
(OIDs)g(as)h(text.)61 b(Other)36 b(OIDs)g(will)h(b)s(e)f(DER)390
24402
 
518 y(enco)s(ded,)29 b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f
 
24406
2055 y(certi\014cate)32 b(data.)390 2187 y(Some)g(help)s(er)f(macros)i
 
24407
(with)f(p)s(opular)f(OIDs)h(can)g(b)s(e)g(found)f(in)g(gn)m
 
24408
(utls/x509.h)j(If)e(ra)m(w)g(\015ag)h(is)390 2297 y(zero,)39
 
24409
b(this)e(function)f(will)h(only)f(return)g(kno)m(wn)g(OIDs)g(as)h
 
24410
(text.)61 b(Other)36 b(OIDs)g(will)h(b)s(e)f(DER)390
 
24411
2406 y(enco)s(ded,)29 b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f
24403
24412
(hex)g(format)h(with)e(a)i(')p Ft(\\)p FB(#')f(pre\014x.)39
24404
 
b(Y)-8 b(ou)29 b(can)f(c)m(hec)m(k)390 628 y(ab)s(out)i(kno)m(wn)g
 
24413
b(Y)-8 b(ou)29 b(can)f(c)m(hec)m(k)390 2516 y(ab)s(out)i(kno)m(wn)g
24405
24414
(OIDs)g(using)g Ft(gnutls_x509_dn_oid_known)o(\(\))p
24406
 
FB(.)390 756 y(If)g Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f
24407
 
(size)h(will)g(b)s(e)f(\014lled.)390 885 y Fn(Returns:)71
24408
 
b FB(GNUTLS)p 1196 885 28 4 v 39 w(E)p 1297 885 V 40
24409
 
w(SHOR)-8 b(T)p 1652 885 V 39 w(MEMOR)g(Y)p 2117 885
24410
 
V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i(not)390
24411
 
994 y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g(*sizeof)p
24412
 
2018 994 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h(the)g
24413
 
(required)g(size.)390 1104 y(On)g(success)g(0)h(is)f(returned.)150
24414
 
1291 y Fv(gn)m(utls)p 483 1291 37 5 v 55 w(x509)p 786
24415
 
1291 V 54 w(crt)p 993 1291 V 54 w(get)p 1212 1291 V 54
24416
 
w(dn)p 1402 1291 V 54 w(oid)3350 1476 y FB([F)-8 b(unction])-3599
 
24415
FB(.)390 2649 y(If)g Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f
 
24416
(size)h(will)g(b)s(e)f(\014lled.)390 2781 y Fn(Returns:)71
 
24417
b FB(GNUTLS)p 1196 2781 V 39 w(E)p 1297 2781 V 40 w(SHOR)-8
 
24418
b(T)p 1652 2781 V 39 w(MEMOR)g(Y)p 2117 2781 V 41 w(BUFFER)47
 
24419
b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i(not)390 2891
 
24420
y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g(*sizeof)p
 
24421
2018 2891 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h(the)g
 
24422
(required)g(size.)390 3000 y(On)g(success)g(0)h(is)f(returned.)150
 
24423
3196 y Fv(gn)m(utls)p 483 3196 37 5 v 55 w(x509)p 786
 
24424
3196 V 54 w(crt)p 993 3196 V 54 w(get)p 1212 3196 V 54
 
24425
w(dn)p 1402 3196 V 54 w(oid)3350 3389 y FB([F)-8 b(unction])-3599
24417
24426
b Fh(int)53 b(gnutls_x509_crt_get_d)q(n_oi)q(d)f Fg(\()p
24418
 
Ff(gn)m(utls)p 2046 1476 28 4 v 40 w(x509)p 2269 1476
24419
 
V 42 w(crt)p 2422 1476 V 40 w(t)31 b Fe(cert)12 b Ff(,)31
24420
 
b(in)m(t)g Fe(indx)12 b Ff(,)565 1586 y(v)m(oid)31 b(*)g
24421
 
Fe(oid)12 b Ff(,)31 b(size)p 1209 1586 V 41 w(t)f(*)h
24422
 
Fe(sizeof_oid)12 b Fg(\))390 1696 y Ff(cert)r FB(:)41
 
24427
Ff(gn)m(utls)p 2046 3389 28 4 v 40 w(x509)p 2269 3389
 
24428
V 42 w(crt)p 2422 3389 V 40 w(t)31 b Fe(cert)12 b Ff(,)31
 
24429
b(in)m(t)g Fe(indx)12 b Ff(,)565 3498 y(v)m(oid)31 b(*)g
 
24430
Fe(oid)12 b Ff(,)31 b(size)p 1209 3498 V 41 w(t)f(*)h
 
24431
Fe(sizeof_oid)12 b Fg(\))390 3608 y Ff(cert)r FB(:)41
24423
24432
b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
24424
 
b FB(structure)390 1824 y Ff(indx)6 b FB(:)40 b(This)30
 
24433
b FB(structure)390 3741 y Ff(indx)6 b FB(:)40 b(This)30
24425
24434
b(sp)s(eci\014es)g(whic)m(h)g(OID)g(to)h(return.)40 b(Use)31
24426
 
b(zero)g(to)g(get)g(the)g(\014rst)f(one.)390 1953 y Ff(oid)t
 
24435
b(zero)g(to)g(get)g(the)g(\014rst)f(one.)390 3873 y Ff(oid)t
24427
24436
FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(bu\013er)g(to)h(hold)f(the)h
24428
 
(OID)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390 2081 y Ff(sizeof)p
24429
 
610 2081 V 41 w(oid)t FB(:)41 b(initially)31 b(holds)f(the)h(size)g(of)
24430
 
g Ft(oid)390 2210 y FB(This)j(function)h(will)g(extract)h(the)f(OIDs)g
 
24437
(OID)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390 4006 y Ff(sizeof)p
 
24438
610 4006 V 41 w(oid)t FB(:)41 b(initially)31 b(holds)f(the)h(size)g(of)
 
24439
g Ft(oid)390 4138 y FB(This)j(function)h(will)g(extract)h(the)f(OIDs)g
24431
24440
(of)g(the)g(name)g(of)g(the)g(Certi\014cate)h(sub)5 b(ject)35
24432
 
b(sp)s(eci\014ed)390 2319 y(b)m(y)30 b(the)h(giv)m(en)g(index.)390
24433
 
2448 y(If)f(oid)g(is)h(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s
24434
 
(e)f(\014lled.)390 2577 y Fn(Returns:)71 b FB(GNUTLS)p
24435
 
1196 2577 V 39 w(E)p 1297 2577 V 40 w(SHOR)-8 b(T)p 1652
24436
 
2577 V 39 w(MEMOR)g(Y)p 2117 2577 V 41 w(BUFFER)47 b(if)e(the)h(pro)m
24437
 
(vided)f(bu\013er)f(is)i(not)390 2686 y(long)31 b(enough,)g(and)f(in)h
24438
 
(that)g(case)h(the)f(*sizeof)p 2022 2686 V 41 w(oid)g(will)g(b)s(e)f
24439
 
(up)s(dated)g(with)g(the)h(required)f(size.)390 2796
24440
 
y(On)g(success)g(0)h(is)f(returned.)150 2983 y Fv(gn)m(utls)p
24441
 
483 2983 37 5 v 55 w(x509)p 786 2983 V 54 w(crt)p 993
24442
 
2983 V 54 w(get)p 1212 2983 V 54 w(dn)3350 3168 y FB([F)-8
 
24441
b(sp)s(eci\014ed)390 4248 y(b)m(y)30 b(the)h(giv)m(en)g(index.)390
 
24442
4381 y(If)f(oid)g(is)h(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s
 
24443
(e)f(\014lled.)390 4513 y Fn(Returns:)71 b FB(GNUTLS)p
 
24444
1196 4513 V 39 w(E)p 1297 4513 V 40 w(SHOR)-8 b(T)p 1652
 
24445
4513 V 39 w(MEMOR)g(Y)p 2117 4513 V 41 w(BUFFER)47 b(if)e(the)h(pro)m
 
24446
(vided)f(bu\013er)f(is)i(not)390 4623 y(long)31 b(enough,)g(and)f(in)h
 
24447
(that)g(case)h(the)f(*sizeof)p 2022 4623 V 41 w(oid)g(will)g(b)s(e)f
 
24448
(up)s(dated)g(with)g(the)h(required)f(size.)390 4732
 
24449
y(On)g(success)g(0)h(is)f(returned.)150 4928 y Fv(gn)m(utls)p
 
24450
483 4928 37 5 v 55 w(x509)p 786 4928 V 54 w(crt)p 993
 
24451
4928 V 54 w(get)p 1212 4928 V 54 w(dn)3350 5121 y FB([F)-8
24443
24452
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_d)q(n)e
24444
 
Fg(\()p Ff(gn)m(utls)p 1836 3168 28 4 v 41 w(x509)p 2060
24445
 
3168 V 41 w(crt)p 2212 3168 V 41 w(t)30 b Fe(cert)12
24446
 
b Ff(,)32 b(c)m(har)f(*)f Fe(buf)12 b Ff(,)565 3278 y(size)p
24447
 
712 3278 V 41 w(t)31 b(*)f Fe(sizeof_buf)12 b Fg(\))390
24448
 
3387 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24449
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 3516 y Ff(buf)16
24450
 
b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f
24451
 
(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390 3644 y
24452
 
Ff(sizeof)p 610 3644 V 41 w(buf)17 b FB(:)40 b(initially)32
24453
 
b(holds)e(the)g(size)i(of)e Ft(buf)390 3773 y FB(This)e(function)g
24454
 
(will)h(cop)m(y)h(the)f(name)f(of)h(the)g(Certi\014cate)h(in)e(the)h
24455
 
(pro)m(vided)g(bu\013er.)39 b(The)28 b(name)390 3883
24456
 
y(will)45 b(b)s(e)g(in)g(the)g(form)g Ft(")p FB(C=xxxx,O=yyyy)-8
24457
 
b(,CN=zzzz)p Ft(")45 b FB(as)g(describ)s(ed)f(in)h(RF)m(C2253.)87
24458
 
b(The)390 3992 y(output)30 b(string)g(will)h(b)s(e)f(ASCI)s(I)f(or)h
24459
 
(UTF-8)h(enco)s(ded,)f(dep)s(ending)f(on)i(the)f(certi\014cate)j(data.)
24460
 
390 4121 y(If)d Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h
24461
 
(will)g(b)s(e)f(\014lled.)390 4249 y Fn(Returns:)71 b
24462
 
FB(GNUTLS)p 1196 4249 V 39 w(E)p 1297 4249 V 40 w(SHOR)-8
24463
 
b(T)p 1652 4249 V 39 w(MEMOR)g(Y)p 2117 4249 V 41 w(BUFFER)47
24464
 
b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i(not)390 4359
24465
 
y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g(*sizeof)p
24466
 
2018 4359 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h(the)g
24467
 
(required)g(size.)390 4469 y(On)g(success)g(0)h(is)f(returned.)150
24468
 
4656 y Fv(gn)m(utls)p 483 4656 37 5 v 55 w(x509)p 786
24469
 
4656 V 54 w(crt)p 993 4656 V 54 w(get)p 1212 4656 V 54
24470
 
w(expiration)p 1810 4656 V 54 w(time)3350 4841 y FB([F)-8
24471
 
b(unction])-3599 b Fh(time_t)54 b(gnutls_x509_crt_get_ex)q(pir)q(ati)q
24472
 
(on_)q(time)e Fg(\()p Ff(gn)m(utls)p 2673 4841 28 4 v
24473
 
41 w(x509)p 2897 4841 V 41 w(crt)p 3049 4841 V 41 w(t)565
24474
 
4950 y Fe(cert)12 b Fg(\))390 5060 y Ff(cert)r FB(:)41
24475
 
b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
24476
 
b FB(structure)390 5189 y(This)k(function)g(will)g(return)g(the)g(time)
24477
 
h(this)g(Certi\014cate)g(w)m(as)g(or)f(will)h(b)s(e)f(expired.)390
24478
 
5317 y Fn(Returns:)40 b FB(expiration)31 b(time,)h(or)e(\(time)p
24479
 
1771 5317 V 41 w(t\)-1)i(on)e(error.)p eop end
 
24453
Fg(\()p Ff(gn)m(utls)p 1836 5121 28 4 v 41 w(x509)p 2060
 
24454
5121 V 41 w(crt)p 2212 5121 V 41 w(t)30 b Fe(cert)12
 
24455
b Ff(,)32 b(c)m(har)f(*)f Fe(buf)12 b Ff(,)565 5230 y(size)p
 
24456
712 5230 V 41 w(t)31 b(*)f Fe(sizeof_buf)12 b Fg(\))390
 
24457
5340 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24458
Ft(gnutls_x509_crt_t)26 b FB(structure)p eop end
24480
24459
%%Page: 205 211
24481
24460
TeXDict begin 205 210 bop 150 -116 a FB(Chapter)30 b(9:)41
24482
 
b(F)-8 b(unction)31 b(Reference)2237 b(205)150 299 y
24483
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
24484
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(extension)p
24485
 
1770 299 V 55 w(b)m(y)p 1955 299 V 53 w(oid)3350 496
24486
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q(xten)
24487
 
q(sio)q(n_b)q(y_o)q(id)f Fg(\()p Ff(gn)m(utls)p 2569
24488
 
496 28 4 v 40 w(x509)p 2792 496 V 42 w(crt)p 2945 496
24489
 
V 40 w(t)565 606 y Fe(cert)12 b Ff(,)31 b(const)g(c)m(har)f(*)h
 
24461
b(F)-8 b(unction)31 b(Reference)2237 b(205)390 299 y
 
24462
Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h
 
24463
(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
 
24464
436 y Ff(sizeof)p 610 436 28 4 v 41 w(buf)17 b FB(:)40
 
24465
b(initially)32 b(holds)e(the)g(size)i(of)e Ft(buf)390
 
24466
573 y FB(This)e(function)g(will)h(cop)m(y)h(the)f(name)f(of)h(the)g
 
24467
(Certi\014cate)h(in)e(the)h(pro)m(vided)g(bu\013er.)39
 
24468
b(The)28 b(name)390 683 y(will)45 b(b)s(e)g(in)g(the)g(form)g
 
24469
Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p Ft(")45 b FB(as)g(describ)s(ed)
 
24470
f(in)h(RF)m(C2253.)87 b(The)390 792 y(output)30 b(string)g(will)h(b)s
 
24471
(e)f(ASCI)s(I)f(or)h(UTF-8)h(enco)s(ded,)f(dep)s(ending)f(on)i(the)f
 
24472
(certi\014cate)j(data.)390 929 y(If)d Ft(buf)f FB(is)i(n)m(ull)f(then)g
 
24473
(only)h(the)f(size)h(will)g(b)s(e)f(\014lled.)390 1066
 
24474
y Fn(Returns:)71 b FB(GNUTLS)p 1196 1066 V 39 w(E)p 1297
 
24475
1066 V 40 w(SHOR)-8 b(T)p 1652 1066 V 39 w(MEMOR)g(Y)p
 
24476
2117 1066 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i
 
24477
(not)390 1176 y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g
 
24478
(*sizeof)p 2018 1176 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h
 
24479
(the)g(required)g(size.)390 1286 y(On)g(success)g(0)h(is)f(returned.)
 
24480
150 1487 y Fv(gn)m(utls)p 483 1487 37 5 v 55 w(x509)p
 
24481
786 1487 V 54 w(crt)p 993 1487 V 54 w(get)p 1212 1487
 
24482
V 54 w(expiration)p 1810 1487 V 54 w(time)3350 1687 y
 
24483
FB([F)-8 b(unction])-3599 b Fh(time_t)54 b(gnutls_x509_crt_get_ex)q
 
24484
(pir)q(ati)q(on_)q(time)e Fg(\()p Ff(gn)m(utls)p 2673
 
24485
1687 28 4 v 41 w(x509)p 2897 1687 V 41 w(crt)p 3049 1687
 
24486
V 41 w(t)565 1796 y Fe(cert)12 b Fg(\))390 1906 y Ff(cert)r
 
24487
FB(:)41 b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
 
24488
b FB(structure)390 2043 y(This)k(function)g(will)g(return)g(the)g(time)
 
24489
h(this)g(Certi\014cate)g(w)m(as)g(or)f(will)h(b)s(e)f(expired.)390
 
24490
2180 y Fn(Returns:)40 b FB(expiration)31 b(time,)h(or)e(\(time)p
 
24491
1771 2180 V 41 w(t\)-1)i(on)e(error.)150 2382 y Fv(gn)m(utls)p
 
24492
483 2382 37 5 v 55 w(x509)p 786 2382 V 54 w(crt)p 993
 
24493
2382 V 54 w(get)p 1212 2382 V 54 w(extension)p 1770 2382
 
24494
V 55 w(b)m(y)p 1955 2382 V 53 w(oid)3350 2581 y FB([F)-8
 
24495
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q(xten)q(sio)q
 
24496
(n_b)q(y_o)q(id)f Fg(\()p Ff(gn)m(utls)p 2569 2581 28
 
24497
4 v 40 w(x509)p 2792 2581 V 42 w(crt)p 2945 2581 V 40
 
24498
w(t)565 2691 y Fe(cert)12 b Ff(,)31 b(const)g(c)m(har)f(*)h
24490
24499
Fe(oid)12 b Ff(,)31 b(in)m(t)f Fe(indx)12 b Ff(,)31 b(v)m(oid)g(*)g
24491
 
Fe(buf)12 b Ff(,)30 b(size)p 2635 606 V 41 w(t)h(*)f
24492
 
Fe(sizeof_buf)12 b Ff(,)33 b(unsigned)565 715 y(in)m(t)e(*)g
24493
 
Fe(critical)12 b Fg(\))390 825 y Ff(cert)r FB(:)41 b(should)30
 
24500
Fe(buf)12 b Ff(,)30 b(size)p 2635 2691 V 41 w(t)h(*)f
 
24501
Fe(sizeof_buf)12 b Ff(,)33 b(unsigned)565 2801 y(in)m(t)e(*)g
 
24502
Fe(critical)12 b Fg(\))390 2910 y Ff(cert)r FB(:)41 b(should)30
24494
24503
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
24495
 
960 y Ff(oid)t FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30
 
24504
3047 y Ff(oid)t FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30
24496
24505
b(Iden)m(ti\014ed)g(in)g(n)m(ull)g(terminated)h(string)390
24497
 
1095 y Ff(indx)6 b FB(:)38 b(In)25 b(case)i(m)m(ultiple)g(same)f(OIDs)g
 
24506
3184 y Ff(indx)6 b FB(:)38 b(In)25 b(case)i(m)m(ultiple)g(same)f(OIDs)g
24498
24507
(exist)g(in)g(the)g(extensions,)i(this)e(sp)s(eci\014es)f(whic)m(h)h
24499
 
(to)g(send.)390 1205 y(Use)31 b(zero)g(to)g(get)h(the)e(\014rst)g(one.)
24500
 
390 1340 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g
 
24508
(to)g(send.)390 3294 y(Use)31 b(zero)g(to)g(get)h(the)e(\014rst)g(one.)
 
24509
390 3431 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g
24501
24510
(structure)f(to)h(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
24502
 
1475 y Ff(sizeof)p 610 1475 V 41 w(buf)17 b FB(:)40 b(initially)32
24503
 
b(holds)e(the)g(size)i(of)e Ft(buf)390 1610 y Ff(critical)t
 
24511
3568 y Ff(sizeof)p 610 3568 V 41 w(buf)17 b FB(:)40 b(initially)32
 
24512
b(holds)e(the)g(size)i(of)e Ft(buf)390 3705 y Ff(critical)t
24504
24513
FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f
24505
 
(mark)m(ed)g(as)h(critical)390 1745 y(This)j(function)g(will)h(return)e
 
24514
(mark)m(ed)g(as)h(critical)390 3842 y(This)j(function)g(will)h(return)e
24506
24515
(the)i(extension)g(sp)s(eci\014ed)e(b)m(y)i(the)f(OID)h(in)f(the)g
24507
 
(certi\014cate.)55 b(The)390 1855 y(extensions)31 b(will)g(b)s(e)e
 
24516
(certi\014cate.)55 b(The)390 3952 y(extensions)31 b(will)g(b)s(e)e
24508
24517
(returned)h(as)g(binary)g(data)h(DER)f(enco)s(ded,)h(in)f(the)g(pro)m
24509
 
(vided)g(bu\013er.)390 1990 y(A)g(negativ)m(e)i(v)-5
 
24518
(vided)g(bu\013er.)390 4089 y(A)g(negativ)m(e)i(v)-5
24510
24519
b(alue)31 b(ma)m(y)g(b)s(e)e(returned)g(in)h(case)h(of)f(parsing)g
24511
24520
(error.)40 b(If)30 b(the)g(certi\014cate)i(do)s(es)e(not)390
24512
 
2099 y(con)m(tain)22 b(the)e(sp)s(eci\014ed)g(extension)h(GNUTLS)p
24513
 
1983 2099 V 39 w(E)p 2084 2099 V 40 w(REQUESTED)p 2702
24514
 
2099 V 39 w(D)m(A)-8 b(T)g(A)p 2993 2099 V 42 w(NOT)p
24515
 
3240 2099 V 39 w(A)e(V)g(AILABLE)390 2209 y(will)31 b(b)s(e)e
24516
 
(returned.)150 2409 y Fv(gn)m(utls)p 483 2409 37 5 v
24517
 
55 w(x509)p 786 2409 V 54 w(crt)p 993 2409 V 54 w(get)p
24518
 
1212 2409 V 54 w(extension)p 1770 2409 V 55 w(data)3350
24519
 
2606 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q
 
24521
4199 y(con)m(tain)22 b(the)e(sp)s(eci\014ed)g(extension)h(GNUTLS)p
 
24522
1983 4199 V 39 w(E)p 2084 4199 V 40 w(REQUESTED)p 2702
 
24523
4199 V 39 w(D)m(A)-8 b(T)g(A)p 2993 4199 V 42 w(NOT)p
 
24524
3240 4199 V 39 w(A)e(V)g(AILABLE)390 4308 y(will)31 b(b)s(e)e
 
24525
(returned.)150 4510 y Fv(gn)m(utls)p 483 4510 37 5 v
 
24526
55 w(x509)p 786 4510 V 54 w(crt)p 993 4510 V 54 w(get)p
 
24527
1212 4510 V 54 w(extension)p 1770 4510 V 55 w(data)3350
 
24528
4709 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q
24520
24529
(xten)q(sio)q(n_d)q(ata)f Fg(\()p Ff(gn)m(utls)p 2464
24521
 
2606 28 4 v 41 w(x509)p 2688 2606 V 41 w(crt)p 2840 2606
24522
 
V 40 w(t)31 b Fe(cert)12 b Ff(,)565 2715 y(in)m(t)31
 
24530
4709 28 4 v 41 w(x509)p 2688 4709 V 41 w(crt)p 2840 4709
 
24531
V 40 w(t)31 b Fe(cert)12 b Ff(,)565 4819 y(in)m(t)31
24523
24532
b Fe(indx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(data)12 b Ff(,)31
24524
 
b(size)p 1676 2715 V 41 w(t)g(*)g Fe(sizeof_data)12 b
24525
 
Fg(\))390 2825 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24526
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 2960 y Ff(indx)6
 
24533
b(size)p 1676 4819 V 41 w(t)g(*)g Fe(sizeof_data)12 b
 
24534
Fg(\))390 4929 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24535
Ft(gnutls_x509_crt_t)26 b FB(structure)390 5066 y Ff(indx)6
24527
24536
b FB(:)40 b(Sp)s(eci\014es)30 b(whic)m(h)g(extension)h(OID)f(to)h
24528
24537
(send.)40 b(Use)31 b(zero)g(to)g(get)h(the)e(\014rst)g(one.)390
24529
 
3095 y Ff(data)p FB(:)41 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(structure)g
 
24538
5203 y Ff(data)p FB(:)41 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(structure)g
24530
24539
(to)h(hold)f(the)h(data)g(\(ma)m(y)g(b)s(e)f(n)m(ull\))390
24531
 
3230 y Ff(sizeof)p 610 3230 V 41 w(data)p FB(:)42 b(initially)31
24532
 
b(holds)f(the)h(size)g(of)g Ft(oid)390 3365 y FB(This)21
 
24540
5340 y Ff(sizeof)p 610 5340 V 41 w(data)p FB(:)42 b(initially)31
 
24541
b(holds)f(the)h(size)g(of)g Ft(oid)p eop end
 
24542
%%Page: 206 212
 
24543
TeXDict begin 206 211 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24544
b(F)-8 b(unction)31 b(Reference)2237 b(206)390 299 y(This)21
24533
24545
b(function)g(will)g(return)f(the)i(requested)f(extension)h(data)g(in)f
24534
 
(the)h(certi\014cate.)39 b(The)21 b(extension)390 3475
 
24546
(the)h(certi\014cate.)39 b(The)21 b(extension)390 408
24535
24547
y(data)31 b(will)g(b)s(e)f(stored)g(as)h(a)f(string)h(in)f(the)g(pro)m
24536
 
(vided)g(bu\013er.)390 3610 y(Use)i Ft(gnutls_x509_crt_get_ext)o(ensi)o
 
24548
(vided)g(bu\013er.)390 571 y(Use)i Ft(gnutls_x509_crt_get_ext)o(ensi)o
24537
24549
(on_i)o(nfo)o(\(\))25 b FB(to)32 b(extract)h(the)f(OID)f(and)g
24538
 
(critical)i(\015ag.)390 3720 y(Use)41 b Ft(gnutls_x509_crt_get_exten)o
 
24550
(critical)i(\015ag.)390 681 y(Use)41 b Ft(gnutls_x509_crt_get_exten)o
24539
24551
(sio)o(n_by)o(_oid)o(\(\))34 b FB(instead,)44 b(if)d(y)m(ou)g(w)m(an)m
24540
 
(t)h(to)f(get)h(data)390 3829 y(indexed)30 b(b)m(y)g(the)h(extension)g
24541
 
(OID)f(rather)g(than)g(sequence.)390 3964 y(Return)95
 
24552
(t)h(to)f(get)h(data)390 790 y(indexed)30 b(b)m(y)g(the)h(extension)g
 
24553
(OID)f(rather)g(than)g(sequence.)390 953 y(Return)95
24542
24554
b(0)i(on)f(success.)237 b(A)97 b(negativ)m(e)h(v)-5 b(alue)96
24543
 
b(ma)m(y)h(b)s(e)e(returned)g(in)h(case)390 4074 y(of)h(parsing)g
 
24555
b(ma)m(y)h(b)s(e)e(returned)g(in)h(case)390 1062 y(of)h(parsing)g
24544
24556
(error.)241 b(If)97 b(y)m(ou)g(ha)m(v)m(e)h(reac)m(hed)g(the)g(last)g
24545
 
(extension)g(a)m(v)-5 b(ailable)390 4183 y(GNUTLS)p 777
24546
 
4183 V 40 w(E)p 879 4183 V 40 w(REQUESTED)p 1497 4183
24547
 
V 39 w(D)m(A)d(T)g(A)p 1788 4183 V 41 w(NOT)p 2034 4183
24548
 
V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)150
24549
 
4383 y Fv(gn)m(utls)p 483 4383 37 5 v 55 w(x509)p 786
24550
 
4383 V 54 w(crt)p 993 4383 V 54 w(get)p 1212 4383 V 54
24551
 
w(extension)p 1770 4383 V 55 w(info)3350 4581 y FB([F)-8
 
24557
(extension)g(a)m(v)-5 b(ailable)390 1172 y(GNUTLS)p 777
 
24558
1172 28 4 v 40 w(E)p 879 1172 V 40 w(REQUESTED)p 1497
 
24559
1172 V 39 w(D)m(A)d(T)g(A)p 1788 1172 V 41 w(NOT)p 2034
 
24560
1172 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)150
 
24561
1399 y Fv(gn)m(utls)p 483 1399 37 5 v 55 w(x509)p 786
 
24562
1399 V 54 w(crt)p 993 1399 V 54 w(get)p 1212 1399 V 54
 
24563
w(extension)p 1770 1399 V 55 w(info)3350 1624 y FB([F)-8
24552
24564
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q(xten)q(sio)q
24553
 
(n_i)q(nfo)f Fg(\()p Ff(gn)m(utls)p 2464 4581 28 4 v
24554
 
41 w(x509)p 2688 4581 V 41 w(crt)p 2840 4581 V 40 w(t)31
24555
 
b Fe(cert)12 b Ff(,)565 4690 y(in)m(t)31 b Fe(indx)12
 
24565
(n_i)q(nfo)f Fg(\()p Ff(gn)m(utls)p 2464 1624 28 4 v
 
24566
41 w(x509)p 2688 1624 V 41 w(crt)p 2840 1624 V 40 w(t)31
 
24567
b Fe(cert)12 b Ff(,)565 1733 y(in)m(t)31 b Fe(indx)12
24556
24568
b Ff(,)31 b(v)m(oid)g(*)g Fe(oid)12 b Ff(,)31 b(size)p
24557
 
1624 4690 V 41 w(t)g(*)f Fe(sizeof_oid)12 b Ff(,)33 b(in)m(t)e(*)g
24558
 
Fe(critical)12 b Fg(\))390 4800 y Ff(cert)r FB(:)41 b(should)30
 
24569
1624 1733 V 41 w(t)g(*)f Fe(sizeof_oid)12 b Ff(,)33 b(in)m(t)e(*)g
 
24570
Fe(critical)12 b Fg(\))390 1843 y Ff(cert)r FB(:)41 b(should)30
24559
24571
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
24560
 
4935 y Ff(indx)6 b FB(:)40 b(Sp)s(eci\014es)30 b(whic)m(h)g(extension)h
 
24572
2005 y Ff(indx)6 b FB(:)40 b(Sp)s(eci\014es)30 b(whic)m(h)g(extension)h
24561
24573
(OID)f(to)h(send.)40 b(Use)31 b(zero)g(to)g(get)h(the)e(\014rst)g(one.)
24562
 
390 5070 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f
24563
 
(structure)g(to)h(hold)f(the)h(OID)390 5205 y Ff(sizeof)p
24564
 
610 5205 V 41 w(oid)t FB(:)38 b(initially)26 b(holds)e(the)h(maxim)m
 
24574
390 2168 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f
 
24575
(structure)g(to)h(hold)f(the)h(OID)390 2330 y Ff(sizeof)p
 
24576
610 2330 V 41 w(oid)t FB(:)38 b(initially)26 b(holds)e(the)h(maxim)m
24565
24577
(um)g(size)h(of)f Ft(oid)p FB(,)g(on)g(return)e(holds)i(actual)h(size)g
24566
 
(of)f Ft(oid)p FB(.)390 5340 y Ff(critical)t FB(:)42
 
24578
(of)f Ft(oid)p FB(.)390 2493 y Ff(critical)t FB(:)42
24567
24579
b(output)30 b(v)-5 b(ariable)31 b(with)f(critical)j(\015ag,)e(ma)m(y)g
24568
 
(b)s(e)e(NULL.)p eop end
24569
 
%%Page: 206 212
24570
 
TeXDict begin 206 211 bop 150 -116 a FB(Chapter)30 b(9:)41
24571
 
b(F)-8 b(unction)31 b(Reference)2237 b(206)390 299 y(This)43
24572
 
b(function)h(will)g(return)f(the)h(requested)g(extension)h(OID)f(in)f
24573
 
(the)i(certi\014cate,)k(and)44 b(the)390 408 y(critical)g(\015ag)f(for)
24574
 
g(it.)77 b(The)42 b(extension)h(OID)g(will)g(b)s(e)f(stored)g(as)h(a)g
24575
 
(string)f(in)h(the)f(pro)m(vided)390 518 y(bu\013er.)e(Use)30
24576
 
b Ft(gnutls_x509_crt_get_extens)o(ion_)o(dat)o(a\(\))24
24577
 
b FB(to)31 b(extract)h(the)e(data.)390 658 y(If)37 b(the)h(bu\013er)e
 
24580
(b)s(e)e(NULL.)390 2655 y(This)43 b(function)h(will)g(return)f(the)h
 
24581
(requested)g(extension)h(OID)f(in)f(the)i(certi\014cate,)k(and)44
 
24582
b(the)390 2765 y(critical)g(\015ag)f(for)g(it.)77 b(The)42
 
24583
b(extension)h(OID)g(will)g(b)s(e)f(stored)g(as)h(a)g(string)f(in)h(the)
 
24584
f(pro)m(vided)390 2874 y(bu\013er.)e(Use)30 b Ft
 
24585
(gnutls_x509_crt_get_extens)o(ion_)o(dat)o(a\(\))24 b
 
24586
FB(to)31 b(extract)h(the)e(data.)390 3037 y(If)37 b(the)h(bu\013er)e
24578
24587
(pro)m(vided)h(is)h(not)f(long)h(enough)g(to)g(hold)f(the)h(output,)h
24579
 
(then)e(*)p Ft(sizeof_oid)e FB(is)390 767 y(up)s(dated)29
 
24588
(then)e(*)p Ft(sizeof_oid)e FB(is)390 3146 y(up)s(dated)29
24580
24589
b(and)h Ft(GNUTLS_E_SHORT_MEMORY_BU)o(FFE)o(R)24 b FB(will)31
24581
 
b(b)s(e)f(returned.)390 907 y(Return)95 b(0)i(on)f(success.)237
 
24590
b(b)s(e)f(returned.)390 3309 y(Return)95 b(0)i(on)f(success.)237
24582
24591
b(A)97 b(negativ)m(e)h(v)-5 b(alue)96 b(ma)m(y)h(b)s(e)e(returned)g(in)
24583
 
h(case)390 1017 y(of)h(parsing)g(error.)241 b(If)97 b(y)m(ou)g(ha)m(v)m
 
24592
h(case)390 3418 y(of)h(parsing)g(error.)241 b(If)97 b(y)m(ou)g(ha)m(v)m
24584
24593
(e)h(reac)m(hed)g(the)g(last)g(extension)g(a)m(v)-5 b(ailable)390
24585
 
1127 y(GNUTLS)p 777 1127 28 4 v 40 w(E)p 879 1127 V 40
24586
 
w(REQUESTED)p 1497 1127 V 39 w(D)m(A)d(T)g(A)p 1788 1127
24587
 
V 41 w(NOT)p 2034 1127 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f
24588
 
(returned.)150 1331 y Fv(gn)m(utls)p 483 1331 37 5 v
24589
 
55 w(x509)p 786 1331 V 54 w(crt)p 993 1331 V 54 w(get)p
24590
 
1212 1331 V 54 w(extension)p 1770 1331 V 55 w(oid)3350
24591
 
1533 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q
24592
 
(xten)q(sio)q(n_o)q(id)f Fg(\()p Ff(gn)m(utls)p 2412
24593
 
1533 28 4 v 40 w(x509)p 2635 1533 V 42 w(crt)p 2788 1533
24594
 
V 40 w(t)31 b Fe(cert)12 b Ff(,)565 1643 y(in)m(t)31
24595
 
b Fe(indx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(oid)12 b Ff(,)31
24596
 
b(size)p 1624 1643 V 41 w(t)g(*)f Fe(sizeof_oid)12 b
24597
 
Fg(\))390 1752 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24598
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 1892 y Ff(indx)6
 
24594
3528 y(GNUTLS)p 777 3528 V 40 w(E)p 879 3528 V 40 w(REQUESTED)p
 
24595
1497 3528 V 39 w(D)m(A)d(T)g(A)p 1788 3528 V 41 w(NOT)p
 
24596
2034 3528 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)150
 
24597
3755 y Fv(gn)m(utls)p 483 3755 37 5 v 55 w(x509)p 786
 
24598
3755 V 54 w(crt)p 993 3755 V 54 w(get)p 1212 3755 V 54
 
24599
w(extension)p 1770 3755 V 55 w(oid)3350 3980 y FB([F)-8
 
24600
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_e)q(xten)q(sio)q
 
24601
(n_o)q(id)f Fg(\()p Ff(gn)m(utls)p 2412 3980 28 4 v 40
 
24602
w(x509)p 2635 3980 V 42 w(crt)p 2788 3980 V 40 w(t)31
 
24603
b Fe(cert)12 b Ff(,)565 4089 y(in)m(t)31 b Fe(indx)12
 
24604
b Ff(,)31 b(v)m(oid)g(*)g Fe(oid)12 b Ff(,)31 b(size)p
 
24605
1624 4089 V 41 w(t)g(*)f Fe(sizeof_oid)12 b Fg(\))390
 
24606
4199 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24607
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4361 y Ff(indx)6
24599
24608
b FB(:)40 b(Sp)s(eci\014es)30 b(whic)m(h)g(extension)h(OID)f(to)h
24600
24609
(send.)40 b(Use)31 b(zero)g(to)g(get)h(the)e(\014rst)g(one.)390
24601
 
2032 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(structure)g
 
24610
4524 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(structure)g
24602
24611
(to)h(hold)f(the)h(OID)f(\(ma)m(y)i(b)s(e)d(n)m(ull\))390
24603
 
2172 y Ff(sizeof)p 610 2172 V 41 w(oid)t FB(:)41 b(initially)31
24604
 
b(holds)f(the)h(size)g(of)g Ft(oid)390 2312 y FB(This)21
 
24612
4686 y Ff(sizeof)p 610 4686 V 41 w(oid)t FB(:)41 b(initially)31
 
24613
b(holds)f(the)h(size)g(of)g Ft(oid)390 4849 y FB(This)21
24605
24614
b(function)g(will)h(return)f(the)h(requested)f(extension)i(OID)e(in)g
24606
 
(the)h(certi\014cate.)40 b(The)21 b(extension)390 2421
 
24615
(the)h(certi\014cate.)40 b(The)21 b(extension)390 4958
24607
24616
y(OID)30 b(will)h(b)s(e)f(stored)g(as)h(a)g(string)f(in)g(the)h(pro)m
24608
 
(vided)f(bu\013er.)390 2561 y(A)i(negativ)m(e)j(v)-5
 
24617
(vided)f(bu\013er.)390 5121 y(A)i(negativ)m(e)j(v)-5
24609
24618
b(alue)33 b(ma)m(y)g(b)s(e)f(returned)f(in)h(case)h(of)g(parsing)f
24610
24619
(error.)46 b(If)32 b(y)m(our)g(ha)m(v)m(e)i(reac)m(hed)f(the)390
24611
 
2671 y(last)41 b(extension)f(a)m(v)-5 b(ailable)42 b(GNUTLS)p
24612
 
1753 2671 V 40 w(E)p 1855 2671 V 39 w(REQUESTED)p 2472
24613
 
2671 V 39 w(D)m(A)-8 b(T)g(A)p 2763 2671 V 42 w(NOT)p
24614
 
3010 2671 V 40 w(A)e(V)g(AILABLE)40 b(will)390 2780 y(b)s(e)30
24615
 
b(returned.)150 2985 y Fv(gn)m(utls)p 483 2985 37 5 v
24616
 
55 w(x509)p 786 2985 V 54 w(crt)p 993 2985 V 54 w(get)p
24617
 
1212 2985 V 54 w(\014ngerprin)m(t)3350 3187 y FB([F)-8
24618
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_f)q(inge)q(rpr)q
24619
 
(int)f Fg(\()p Ff(gn)m(utls)p 2307 3187 28 4 v 41 w(x509)p
24620
 
2531 3187 V 41 w(crt)p 2683 3187 V 41 w(t)30 b Fe(cert)12
24621
 
b Ff(,)565 3297 y(gn)m(utls)p 811 3297 V 41 w(digest)p
24622
 
1084 3297 V 40 w(algorithm)p 1507 3297 V 41 w(t)31 b
24623
 
Fe(algo)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(buf)12 b Ff(,)31
24624
 
b(size)p 2528 3297 V 41 w(t)g(*)f Fe(sizeof_buf)12 b
24625
 
Fg(\))390 3406 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24626
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 3546 y Ff(algo)5
24627
 
b FB(:)42 b(is)30 b(a)h(digest)g(algorithm)390 3686 y
 
24620
5230 y(last)41 b(extension)f(a)m(v)-5 b(ailable)42 b(GNUTLS)p
 
24621
1753 5230 V 40 w(E)p 1855 5230 V 39 w(REQUESTED)p 2472
 
24622
5230 V 39 w(D)m(A)-8 b(T)g(A)p 2763 5230 V 42 w(NOT)p
 
24623
3010 5230 V 40 w(A)e(V)g(AILABLE)40 b(will)390 5340 y(b)s(e)30
 
24624
b(returned.)p eop end
 
24625
%%Page: 207 213
 
24626
TeXDict begin 207 212 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24627
b(F)-8 b(unction)31 b(Reference)2237 b(207)150 299 y
 
24628
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
24629
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(\014ngerprin)m(t)3350
 
24630
499 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_f)q
 
24631
(inge)q(rpr)q(int)f Fg(\()p Ff(gn)m(utls)p 2307 499 28
 
24632
4 v 41 w(x509)p 2531 499 V 41 w(crt)p 2683 499 V 41 w(t)30
 
24633
b Fe(cert)12 b Ff(,)565 608 y(gn)m(utls)p 811 608 V 41
 
24634
w(digest)p 1084 608 V 40 w(algorithm)p 1507 608 V 41
 
24635
w(t)31 b Fe(algo)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(buf)12
 
24636
b Ff(,)31 b(size)p 2528 608 V 41 w(t)g(*)f Fe(sizeof_buf)12
 
24637
b Fg(\))390 718 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24638
Ft(gnutls_x509_crt_t)26 b FB(structure)390 856 y Ff(algo)5
 
24639
b FB(:)42 b(is)30 b(a)h(digest)g(algorithm)390 993 y
24628
24640
Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h
24629
24641
(hold)f(the)h(\014ngerprin)m(t)e(\(ma)m(y)i(b)s(e)f(n)m(ull\))390
24630
 
3826 y Ff(sizeof)p 610 3826 V 41 w(buf)17 b FB(:)40 b(initially)32
24631
 
b(holds)e(the)g(size)i(of)e Ft(buf)390 3966 y FB(This)20
 
24642
1131 y Ff(sizeof)p 610 1131 V 41 w(buf)17 b FB(:)40 b(initially)32
 
24643
b(holds)e(the)g(size)i(of)e Ft(buf)390 1268 y FB(This)20
24632
24644
b(function)g(will)g(calculate)j(and)d(cop)m(y)h(the)g(certi\014cate's)h
24633
24645
(\014ngerprin)m(t)e(in)g(the)h(pro)m(vided)f(bu\013er.)390
24634
 
4106 y(If)30 b(the)g(bu\013er)g(is)g(n)m(ull)h(then)f(only)g(the)h
24635
 
(size)g(will)g(b)s(e)e(\014lled.)390 4245 y Fn(Returns:)39
 
24646
1406 y(If)30 b(the)g(bu\013er)g(is)g(n)m(ull)h(then)f(only)g(the)h
 
24647
(size)g(will)g(b)s(e)e(\014lled.)390 1544 y Fn(Returns:)39
24636
24648
b Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21 b FB(if)27
24637
24649
b(the)h(pro)m(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)390
24638
 
4355 y(and)h(in)g(that)h(case)g(the)g(*sizeof)p 1479
24639
 
4355 V 41 w(buf)e(will)i(b)s(e)f(up)s(dated)f(with)h(the)h(required)e
24640
 
(size.)41 b(On)29 b(success)h(0)390 4465 y(is)g(returned.)150
24641
 
4669 y Fv(gn)m(utls)p 483 4669 37 5 v 55 w(x509)p 786
24642
 
4669 V 54 w(crt)p 993 4669 V 54 w(get)p 1212 4669 V 54
24643
 
w(issuer)p 1570 4669 V 55 w(dn)p 1761 4669 V 54 w(b)m(y)p
24644
 
1945 4669 V 54 w(oid)3350 4871 y FB([F)-8 b(unction])-3599
 
24650
1653 y(and)h(in)g(that)h(case)g(the)g(*sizeof)p 1479
 
24651
1653 V 41 w(buf)e(will)i(b)s(e)f(up)s(dated)f(with)h(the)h(required)e
 
24652
(size.)41 b(On)29 b(success)h(0)390 1763 y(is)g(returned.)150
 
24653
1965 y Fv(gn)m(utls)p 483 1965 37 5 v 55 w(x509)p 786
 
24654
1965 V 54 w(crt)p 993 1965 V 54 w(get)p 1212 1965 V 54
 
24655
w(issuer)p 1570 1965 V 55 w(dn)p 1761 1965 V 54 w(b)m(y)p
 
24656
1945 1965 V 54 w(oid)3350 2165 y FB([F)-8 b(unction])-3599
24645
24657
b Fh(int)53 b(gnutls_x509_crt_get_i)q(ssue)q(r_d)q(n_b)q(y_o)q(id)f
24646
 
Fg(\()p Ff(gn)m(utls)p 2569 4871 28 4 v 40 w(x509)p 2792
24647
 
4871 V 42 w(crt)p 2945 4871 V 40 w(t)565 4981 y Fe(cert)12
 
24658
Fg(\()p Ff(gn)m(utls)p 2569 2165 28 4 v 40 w(x509)p 2792
 
24659
2165 V 42 w(crt)p 2945 2165 V 40 w(t)565 2275 y Fe(cert)12
24648
24660
b Ff(,)31 b(const)g(c)m(har)g(*)g Fe(oid)12 b Ff(,)31
24649
24661
b(in)m(t)g Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m(t)i
24650
24662
Fe(raw_flag)12 b Ff(,)33 b(v)m(oid)e(*)f Fe(buf)12 b
24651
 
Ff(,)31 b(size)p 3641 4981 V 41 w(t)565 5091 y(*)g Fe(sizeof_buf)12
24652
 
b Fg(\))390 5200 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24653
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 5340 y Ff(oid)t
 
24663
Ff(,)31 b(size)p 3641 2275 V 41 w(t)565 2384 y(*)g Fe(sizeof_buf)12
 
24664
b Fg(\))390 2494 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24665
Ft(gnutls_x509_crt_t)26 b FB(structure)390 2631 y Ff(oid)t
24654
24666
FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g(in)g(n)m
24655
 
(ull)g(terminated)h(string)p eop end
24656
 
%%Page: 207 213
24657
 
TeXDict begin 207 212 bop 150 -116 a FB(Chapter)30 b(9:)41
24658
 
b(F)-8 b(unction)31 b(Reference)2237 b(207)390 299 y
24659
 
Ff(indx)6 b FB(:)39 b(In)26 b(case)j(m)m(ultiple)f(same)g(OIDs)f(exist)
24660
 
h(in)f(the)h(RDN,)g(this)f(sp)s(eci\014es)g(whic)m(h)g(to)i(send.)39
24661
 
b(Use)390 408 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
24662
 
543 y Ff(ra)m(w)p 540 543 28 4 v 40 w(\015ag)8 b FB(:)41
 
24667
(ull)g(terminated)h(string)390 2769 y Ff(indx)6 b FB(:)39
 
24668
b(In)26 b(case)j(m)m(ultiple)f(same)g(OIDs)f(exist)h(in)f(the)h(RDN,)g
 
24669
(this)f(sp)s(eci\014es)g(whic)m(h)g(to)i(send.)39 b(Use)390
 
24670
2879 y(zero)31 b(to)g(get)h(the)e(\014rst)g(one.)390
 
24671
3016 y Ff(ra)m(w)p 540 3016 V 40 w(\015ag)8 b FB(:)41
24663
24672
b(If)30 b(non)g(zero)h(returns)e(the)i(ra)m(w)f(DER)h(data)g(of)f(the)h
24664
 
(DN)g(part.)390 677 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h
24665
 
(a)g(structure)f(to)h(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))
24666
 
390 811 y Ff(sizeof)p 610 811 V 41 w(buf)17 b FB(:)40
24667
 
b(initially)32 b(holds)e(the)g(size)i(of)e Ft(buf)390
24668
 
945 y FB(This)i(function)h(will)g(extract)i(the)e(part)g(of)g(the)g
24669
 
(name)g(of)g(the)g(Certi\014cate)h(issuer)f(sp)s(eci\014ed)f(b)m(y)390
24670
 
1054 y(the)g(giv)m(en)h(OID.)f(The)f(output,)i(if)f(the)g(ra)m(w)g
24671
 
(\015ag)g(is)g(not)g(used,)g(will)g(b)s(e)f(enco)s(ded)h(as)g(describ)s
24672
 
(ed)390 1164 y(in)44 b(RF)m(C2253.)83 b(Th)m(us)43 b(a)h(string)g(that)
24673
 
g(is)g(ASCI)s(I)e(or)i(UTF-8)h(enco)s(ded,)i(dep)s(ending)42
24674
 
b(on)i(the)390 1274 y(certi\014cate)32 b(data.)390 1408
24675
 
y(Some)g(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g(b)s(e)g
24676
 
(found)f(in)g(gn)m(utls/x509.h)j(If)e(ra)m(w)g(\015ag)h(is)390
24677
 
1517 y(zero,)39 b(this)e(function)f(will)h(only)f(return)g(kno)m(wn)g
 
24673
(DN)g(part.)390 3154 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)
 
24674
h(a)g(structure)f(to)h(hold)f(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m
 
24675
(ull\))390 3291 y Ff(sizeof)p 610 3291 V 41 w(buf)17
 
24676
b FB(:)40 b(initially)32 b(holds)e(the)g(size)i(of)e
 
24677
Ft(buf)390 3429 y FB(This)i(function)h(will)g(extract)i(the)e(part)g
 
24678
(of)g(the)g(name)g(of)g(the)g(Certi\014cate)h(issuer)f(sp)s(eci\014ed)f
 
24679
(b)m(y)390 3539 y(the)g(giv)m(en)h(OID.)f(The)f(output,)i(if)f(the)g
 
24680
(ra)m(w)g(\015ag)g(is)g(not)g(used,)g(will)g(b)s(e)f(enco)s(ded)h(as)g
 
24681
(describ)s(ed)390 3648 y(in)44 b(RF)m(C2253.)83 b(Th)m(us)43
 
24682
b(a)h(string)g(that)g(is)g(ASCI)s(I)e(or)i(UTF-8)h(enco)s(ded,)i(dep)s
 
24683
(ending)42 b(on)i(the)390 3758 y(certi\014cate)32 b(data.)390
 
24684
3895 y(Some)g(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g(b)s
 
24685
(e)g(found)f(in)g(gn)m(utls/x509.h)j(If)e(ra)m(w)g(\015ag)h(is)390
 
24686
4005 y(zero,)39 b(this)e(function)f(will)h(only)f(return)g(kno)m(wn)g
24678
24687
(OIDs)g(as)h(text.)61 b(Other)36 b(OIDs)g(will)h(b)s(e)f(DER)390
24679
 
1627 y(enco)s(ded,)29 b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f
 
24688
4115 y(enco)s(ded,)29 b(as)f(describ)s(ed)f(in)h(RF)m(C2253)i({)f(in)f
24680
24689
(hex)g(format)h(with)e(a)i(')p Ft(\\)p FB(#')f(pre\014x.)39
24681
 
b(Y)-8 b(ou)29 b(can)f(c)m(hec)m(k)390 1736 y(ab)s(out)i(kno)m(wn)g
 
24690
b(Y)-8 b(ou)29 b(can)f(c)m(hec)m(k)390 4224 y(ab)s(out)i(kno)m(wn)g
24682
24691
(OIDs)g(using)g Ft(gnutls_x509_dn_oid_known)o(\(\))p
24683
 
FB(.)390 1871 y(If)g Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f
24684
 
(size)h(will)g(b)s(e)f(\014lled.)390 2005 y Fn(Returns:)71
24685
 
b FB(GNUTLS)p 1196 2005 V 39 w(E)p 1297 2005 V 40 w(SHOR)-8
24686
 
b(T)p 1652 2005 V 39 w(MEMOR)g(Y)p 2117 2005 V 41 w(BUFFER)47
24687
 
b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i(not)390 2114
 
24692
FB(.)390 4362 y(If)g Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f
 
24693
(size)h(will)g(b)s(e)f(\014lled.)390 4499 y Fn(Returns:)71
 
24694
b FB(GNUTLS)p 1196 4499 V 39 w(E)p 1297 4499 V 40 w(SHOR)-8
 
24695
b(T)p 1652 4499 V 39 w(MEMOR)g(Y)p 2117 4499 V 41 w(BUFFER)47
 
24696
b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i(not)390 4609
24688
24697
y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g(*sizeof)p
24689
 
2018 2114 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h(the)g
24690
 
(required)g(size.)390 2224 y(On)g(success)g(0)h(is)f(returned.)150
24691
 
2422 y Fv(gn)m(utls)p 483 2422 37 5 v 55 w(x509)p 786
24692
 
2422 V 54 w(crt)p 993 2422 V 54 w(get)p 1212 2422 V 54
24693
 
w(issuer)p 1570 2422 V 55 w(dn)p 1761 2422 V 54 w(oid)3350
24694
 
2618 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_i)q
 
24698
2018 4609 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h(the)g
 
24699
(required)g(size.)390 4719 y(On)g(success)g(0)h(is)f(returned.)150
 
24700
4921 y Fv(gn)m(utls)p 483 4921 37 5 v 55 w(x509)p 786
 
24701
4921 V 54 w(crt)p 993 4921 V 54 w(get)p 1212 4921 V 54
 
24702
w(issuer)p 1570 4921 V 55 w(dn)p 1761 4921 V 54 w(oid)3350
 
24703
5121 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_i)q
24695
24704
(ssue)q(r_d)q(n_o)q(id)f Fg(\()p Ff(gn)m(utls)p 2412
24696
 
2618 28 4 v 40 w(x509)p 2635 2618 V 42 w(crt)p 2788 2618
24697
 
V 40 w(t)31 b Fe(cert)12 b Ff(,)565 2728 y(in)m(t)31
 
24705
5121 28 4 v 40 w(x509)p 2635 5121 V 42 w(crt)p 2788 5121
 
24706
V 40 w(t)31 b Fe(cert)12 b Ff(,)565 5230 y(in)m(t)31
24698
24707
b Fe(indx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(oid)12 b Ff(,)31
24699
 
b(size)p 1624 2728 V 41 w(t)g(*)f Fe(sizeof_oid)12 b
24700
 
Fg(\))390 2837 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24701
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 2972 y Ff(indx)6
24702
 
b FB(:)40 b(This)30 b(sp)s(eci\014es)g(whic)m(h)g(OID)g(to)h(return.)40
24703
 
b(Use)31 b(zero)g(to)g(get)g(the)g(\014rst)f(one.)390
24704
 
3106 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(bu\013er)g
24705
 
(to)h(hold)f(the)h(OID)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
24706
 
3240 y Ff(sizeof)p 610 3240 V 41 w(oid)t FB(:)41 b(initially)31
24707
 
b(holds)f(the)h(size)g(of)g Ft(oid)390 3374 y FB(This)e(function)h
24708
 
(will)g(extract)i(the)e(OIDs)f(of)i(the)f(name)g(of)g(the)g
24709
 
(Certi\014cate)h(issuer)f(sp)s(eci\014ed)f(b)m(y)390
24710
 
3483 y(the)i(giv)m(en)g(index.)390 3618 y(If)f Ft(oid)f
24711
 
FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)g(b)s(e)f(\014lled.)
24712
 
390 3752 y Fn(Returns:)71 b FB(GNUTLS)p 1196 3752 V 39
24713
 
w(E)p 1297 3752 V 40 w(SHOR)-8 b(T)p 1652 3752 V 39 w(MEMOR)g(Y)p
24714
 
2117 3752 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i
24715
 
(not)390 3861 y(long)31 b(enough,)g(and)f(in)h(that)g(case)h(the)f
24716
 
(*sizeof)p 2022 3861 V 41 w(oid)g(will)g(b)s(e)f(up)s(dated)g(with)g
24717
 
(the)h(required)f(size.)390 3971 y(On)g(success)g(0)h(is)f(returned.)
24718
 
150 4169 y Fv(gn)m(utls)p 483 4169 37 5 v 55 w(x509)p
24719
 
786 4169 V 54 w(crt)p 993 4169 V 54 w(get)p 1212 4169
24720
 
V 54 w(issuer)p 1570 4169 V 55 w(dn)3350 4365 y FB([F)-8
24721
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_i)q(ssue)q(r_d)q(n)e
24722
 
Fg(\()p Ff(gn)m(utls)p 2202 4365 28 4 v 41 w(x509)p 2426
24723
 
4365 V 42 w(crt)p 2579 4365 V 40 w(t)31 b Fe(cert)12
24724
 
b Ff(,)31 b(c)m(har)g(*)565 4475 y Fe(buf)12 b Ff(,)31
24725
 
b(size)p 936 4475 V 41 w(t)g(*)f Fe(sizeof_buf)12 b Fg(\))390
24726
 
4584 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24727
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4719 y Ff(buf)16
24728
 
b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f
24729
 
(the)h(name)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390 4853 y
24730
 
Ff(sizeof)p 610 4853 V 41 w(buf)17 b FB(:)40 b(initially)32
24731
 
b(holds)e(the)g(size)i(of)e Ft(buf)390 4987 y FB(This)d(function)h
24732
 
(will)g(cop)m(y)g(the)g(name)g(of)g(the)g(Certi\014cate)h(issuer)f(in)f
24733
 
(the)h(pro)m(vided)g(bu\013er.)38 b(The)390 5096 y(name)24
24734
 
b(will)h(b)s(e)e(in)h(the)g(form)g Ft(")p FB(C=xxxx,O=yyyy)-8
24735
 
b(,CN=zzzz)p Ft(")24 b FB(as)g(describ)s(ed)f(in)h(RF)m(C2253.)40
24736
 
b(The)390 5206 y(output)30 b(string)g(will)h(b)s(e)f(ASCI)s(I)f(or)h
24737
 
(UTF-8)h(enco)s(ded,)f(dep)s(ending)f(on)i(the)f(certi\014cate)j(data.)
24738
 
390 5340 y(If)d Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h
24739
 
(will)g(b)s(e)f(\014lled.)p eop end
 
24708
b(size)p 1624 5230 V 41 w(t)g(*)f Fe(sizeof_oid)12 b
 
24709
Fg(\))390 5340 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24710
Ft(gnutls_x509_crt_t)26 b FB(structure)p eop end
24740
24711
%%Page: 208 214
24741
24712
TeXDict begin 208 213 bop 150 -116 a FB(Chapter)30 b(9:)41
24742
24713
b(F)-8 b(unction)31 b(Reference)2237 b(208)390 299 y
24743
 
Fn(Returns:)71 b FB(GNUTLS)p 1196 299 28 4 v 39 w(E)p
24744
 
1297 299 V 40 w(SHOR)-8 b(T)p 1652 299 V 39 w(MEMOR)g(Y)p
24745
 
2117 299 V 41 w(BUFFER)47 b(if)e(the)h(pro)m(vided)f(bu\013er)f(is)i
24746
 
(not)390 408 y(long)31 b(enough,)f(and)g(in)f(that)i(case)g(the)g
24747
 
(*sizeof)p 2018 408 V 41 w(buf)e(will)i(b)s(e)e(up)s(dated)g(with)h
24748
 
(the)g(required)g(size.)390 518 y(On)g(success)g(0)h(is)f(returned.)150
24749
 
721 y Fv(gn)m(utls)p 483 721 37 5 v 55 w(x509)p 786 721
24750
 
V 54 w(crt)p 993 721 V 54 w(get)p 1212 721 V 54 w(issuer)3350
24751
 
922 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_i)q
24752
 
(ssue)q(r)f Fg(\()p Ff(gn)m(utls)p 2046 922 28 4 v 40
24753
 
w(x509)p 2269 922 V 42 w(crt)p 2422 922 V 40 w(t)31 b
24754
 
Fe(cert)12 b Ff(,)565 1031 y(gn)m(utls)p 811 1031 V 41
24755
 
w(x509)p 1035 1031 V 41 w(dn)p 1178 1031 V 39 w(t)31
24756
 
b(*)f Fe(dn)12 b Fg(\))390 1141 y Ff(cert)r FB(:)41 b(should)30
24757
 
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
24758
 
1279 y Ff(dn)p FB(:)40 b(output)30 b(v)-5 b(ariable)31
24759
 
b(with)f(p)s(oin)m(ter)g(to)h(opaque)g(DN)390 1418 y(Return)k(the)i
24760
 
(Certi\014cate's)h(Issuer)d(DN)i(as)f(an)g(opaque)h(data)g(t)m(yp)s(e.)
24761
 
58 b(Y)-8 b(ou)37 b(ma)m(y)g(use)f Ft(gnutls_)390 1527
24762
 
y(x509_dn_get_rdn_ava\(\))25 b FB(to)31 b(deco)s(de)f(the)h(DN.)390
24763
 
1666 y(Note)d(that)g Ft(dn)e FB(should)g(b)s(e)g(treated)i(as)f
24764
 
(constan)m(t.)41 b(Because)28 b(p)s(oin)m(ts)e(in)m(to)i(the)f
24765
 
Ft(cert)f FB(ob)5 b(ject,)29 b(y)m(ou)390 1775 y(ma)m(y)i(not)g(deallo)
24766
 
s(cate)h Ft(cert)e FB(and)f(con)m(tin)m(ue)j(to)f(access)h
24767
 
Ft(dn)p FB(.)390 1914 y Fn(Returns:)40 b FB(Returns)30
24768
 
b(0)h(on)f(success,)h(or)f(an)g(error)g(co)s(de.)150
24769
 
2117 y Fv(gn)m(utls)p 483 2117 37 5 v 55 w(x509)p 786
24770
 
2117 V 54 w(crt)p 993 2117 V 54 w(get)p 1212 2117 V 54
24771
 
w(k)m(ey)p 1449 2117 V 53 w(id)3350 2318 y FB([F)-8 b(unction])-3599
24772
 
b Fh(int)53 b(gnutls_x509_crt_get_k)q(ey_i)q(d)f Fg(\()p
24773
 
Ff(gn)m(utls)p 2046 2318 28 4 v 40 w(x509)p 2269 2318
24774
 
V 42 w(crt)p 2422 2318 V 40 w(t)31 b Fe(crt)12 b Ff(,)31
24775
 
b(unsigned)565 2427 y(in)m(t)g Fe(flags)12 b Ff(,)32
24776
 
b(unsigned)d(c)m(har)i(*)f Fe(output_data)12 b Ff(,)34
24777
 
b(size)p 2477 2427 V 41 w(t)c(*)h Fe(output_data_size)12
24778
 
b Fg(\))390 2537 y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)
24779
 
390 2675 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)
24780
 
390 2814 y Ff(output)p 664 2814 V 40 w(data)p FB(:)41
24781
 
b(will)31 b(con)m(tain)h(the)e(k)m(ey)h(ID)390 2952 y
24782
 
Ff(output)p 664 2952 V 40 w(data)p 880 2952 V 40 w(size)5
 
24714
Ff(indx)6 b FB(:)40 b(This)30 b(sp)s(eci\014es)g(whic)m(h)g(OID)g(to)h
 
24715
(return.)40 b(Use)31 b(zero)g(to)g(get)g(the)g(\014rst)f(one.)390
 
24716
436 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(bu\013er)g(to)
 
24717
h(hold)f(the)h(OID)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
 
24718
573 y Ff(sizeof)p 610 573 28 4 v 41 w(oid)t FB(:)41 b(initially)31
 
24719
b(holds)f(the)h(size)g(of)g Ft(oid)390 710 y FB(This)e(function)h(will)
 
24720
g(extract)i(the)e(OIDs)f(of)i(the)f(name)g(of)g(the)g(Certi\014cate)h
 
24721
(issuer)f(sp)s(eci\014ed)f(b)m(y)390 820 y(the)i(giv)m(en)g(index.)390
 
24722
957 y(If)f Ft(oid)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)g
 
24723
(b)s(e)f(\014lled.)390 1094 y Fn(Returns:)71 b FB(GNUTLS)p
 
24724
1196 1094 V 39 w(E)p 1297 1094 V 40 w(SHOR)-8 b(T)p 1652
 
24725
1094 V 39 w(MEMOR)g(Y)p 2117 1094 V 41 w(BUFFER)47 b(if)e(the)h(pro)m
 
24726
(vided)f(bu\013er)f(is)i(not)390 1204 y(long)31 b(enough,)g(and)f(in)h
 
24727
(that)g(case)h(the)f(*sizeof)p 2022 1204 V 41 w(oid)g(will)g(b)s(e)f
 
24728
(up)s(dated)g(with)g(the)h(required)f(size.)390 1313
 
24729
y(On)g(success)g(0)h(is)f(returned.)150 1515 y Fv(gn)m(utls)p
 
24730
483 1515 37 5 v 55 w(x509)p 786 1515 V 54 w(crt)p 993
 
24731
1515 V 54 w(get)p 1212 1515 V 54 w(issuer)p 1570 1515
 
24732
V 55 w(dn)3350 1714 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
24733
b(gnutls_x509_crt_get_i)q(ssue)q(r_d)q(n)e Fg(\()p Ff(gn)m(utls)p
 
24734
2202 1714 28 4 v 41 w(x509)p 2426 1714 V 42 w(crt)p 2579
 
24735
1714 V 40 w(t)31 b Fe(cert)12 b Ff(,)31 b(c)m(har)g(*)565
 
24736
1824 y Fe(buf)12 b Ff(,)31 b(size)p 936 1824 V 41 w(t)g(*)f
 
24737
Fe(sizeof_buf)12 b Fg(\))390 1934 y Ff(cert)r FB(:)41
 
24738
b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
 
24739
b FB(structure)390 2071 y Ff(buf)16 b FB(:)41 b(a)31
 
24740
b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f(the)h(name)f(\(ma)m
 
24741
(y)h(b)s(e)f(n)m(ull\))390 2208 y Ff(sizeof)p 610 2208
 
24742
V 41 w(buf)17 b FB(:)40 b(initially)32 b(holds)e(the)g(size)i(of)e
 
24743
Ft(buf)390 2345 y FB(This)d(function)h(will)g(cop)m(y)g(the)g(name)g
 
24744
(of)g(the)g(Certi\014cate)h(issuer)f(in)f(the)h(pro)m(vided)g
 
24745
(bu\013er.)38 b(The)390 2454 y(name)24 b(will)h(b)s(e)e(in)h(the)g
 
24746
(form)g Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p Ft(")24
 
24747
b FB(as)g(describ)s(ed)f(in)h(RF)m(C2253.)40 b(The)390
 
24748
2564 y(output)30 b(string)g(will)h(b)s(e)f(ASCI)s(I)f(or)h(UTF-8)h
 
24749
(enco)s(ded,)f(dep)s(ending)f(on)i(the)f(certi\014cate)j(data.)390
 
24750
2701 y(If)d Ft(buf)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)
 
24751
g(b)s(e)f(\014lled.)390 2838 y Fn(Returns:)71 b FB(GNUTLS)p
 
24752
1196 2838 V 39 w(E)p 1297 2838 V 40 w(SHOR)-8 b(T)p 1652
 
24753
2838 V 39 w(MEMOR)g(Y)p 2117 2838 V 41 w(BUFFER)47 b(if)e(the)h(pro)m
 
24754
(vided)f(bu\013er)f(is)i(not)390 2948 y(long)31 b(enough,)f(and)g(in)f
 
24755
(that)i(case)g(the)g(*sizeof)p 2018 2948 V 41 w(buf)e(will)i(b)s(e)e
 
24756
(up)s(dated)g(with)h(the)g(required)g(size.)390 3057
 
24757
y(On)g(success)g(0)h(is)f(returned.)150 3259 y Fv(gn)m(utls)p
 
24758
483 3259 37 5 v 55 w(x509)p 786 3259 V 54 w(crt)p 993
 
24759
3259 V 54 w(get)p 1212 3259 V 54 w(issuer)3350 3459 y
 
24760
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_i)q(ssue)q
 
24761
(r)f Fg(\()p Ff(gn)m(utls)p 2046 3459 28 4 v 40 w(x509)p
 
24762
2269 3459 V 42 w(crt)p 2422 3459 V 40 w(t)31 b Fe(cert)12
 
24763
b Ff(,)565 3568 y(gn)m(utls)p 811 3568 V 41 w(x509)p
 
24764
1035 3568 V 41 w(dn)p 1178 3568 V 39 w(t)31 b(*)f Fe(dn)12
 
24765
b Fg(\))390 3678 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24766
Ft(gnutls_x509_crt_t)26 b FB(structure)390 3815 y Ff(dn)p
 
24767
FB(:)40 b(output)30 b(v)-5 b(ariable)31 b(with)f(p)s(oin)m(ter)g(to)h
 
24768
(opaque)g(DN)390 3952 y(Return)k(the)i(Certi\014cate's)h(Issuer)d(DN)i
 
24769
(as)f(an)g(opaque)h(data)g(t)m(yp)s(e.)58 b(Y)-8 b(ou)37
 
24770
b(ma)m(y)g(use)f Ft(gnutls_)390 4062 y(x509_dn_get_rdn_ava\(\))25
 
24771
b FB(to)31 b(deco)s(de)f(the)h(DN.)390 4199 y(Note)d(that)g
 
24772
Ft(dn)e FB(should)g(b)s(e)g(treated)i(as)f(constan)m(t.)41
 
24773
b(Because)28 b(p)s(oin)m(ts)e(in)m(to)i(the)f Ft(cert)f
 
24774
FB(ob)5 b(ject,)29 b(y)m(ou)390 4308 y(ma)m(y)i(not)g(deallo)s(cate)h
 
24775
Ft(cert)e FB(and)f(con)m(tin)m(ue)j(to)f(access)h Ft(dn)p
 
24776
FB(.)390 4445 y Fn(Returns:)40 b FB(Returns)30 b(0)h(on)f(success,)h
 
24777
(or)f(an)g(error)g(co)s(de.)150 4647 y Fv(gn)m(utls)p
 
24778
483 4647 37 5 v 55 w(x509)p 786 4647 V 54 w(crt)p 993
 
24779
4647 V 54 w(get)p 1212 4647 V 54 w(k)m(ey)p 1449 4647
 
24780
V 53 w(id)3350 4847 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
24781
b(gnutls_x509_crt_get_k)q(ey_i)q(d)f Fg(\()p Ff(gn)m(utls)p
 
24782
2046 4847 28 4 v 40 w(x509)p 2269 4847 V 42 w(crt)p 2422
 
24783
4847 V 40 w(t)31 b Fe(crt)12 b Ff(,)31 b(unsigned)565
 
24784
4956 y(in)m(t)g Fe(flags)12 b Ff(,)32 b(unsigned)d(c)m(har)i(*)f
 
24785
Fe(output_data)12 b Ff(,)34 b(size)p 2477 4956 V 41 w(t)c(*)h
 
24786
Fe(output_data_size)12 b Fg(\))390 5066 y Ff(crt)r FB(:)41
 
24787
b(Holds)31 b(the)f(certi\014cate)390 5203 y Ff(\015ags)t
 
24788
FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390 5340
 
24789
y Ff(output)p 664 5340 V 40 w(data)p FB(:)41 b(will)31
 
24790
b(con)m(tain)h(the)e(k)m(ey)h(ID)p eop end
 
24791
%%Page: 209 215
 
24792
TeXDict begin 209 214 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24793
b(F)-8 b(unction)31 b(Reference)2237 b(209)390 299 y
 
24794
Ff(output)p 664 299 28 4 v 40 w(data)p 880 299 V 40 w(size)5
24783
24795
b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p 2093
24784
 
2952 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
24785
 
(actual)390 3062 y(size)c(of)g(parameters\))390 3200
24786
 
y(This)24 b(function)h(will)h(return)e(a)i(unique)e(ID)h(the)h(dep)s
24787
 
(ends)d(on)i(the)h(public)e(k)m(ey)i(parameters.)40 b(This)390
24788
 
3310 y(ID)27 b(can)g(b)s(e)g(used)f(in)g(c)m(hec)m(king)j(whether)d(a)i
 
24796
299 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
24797
(actual)390 408 y(size)c(of)g(parameters\))390 564 y(This)24
 
24798
b(function)h(will)h(return)e(a)i(unique)e(ID)h(the)h(dep)s(ends)d(on)i
 
24799
(the)h(public)e(k)m(ey)i(parameters.)40 b(This)390 674
 
24800
y(ID)27 b(can)g(b)s(e)g(used)f(in)g(c)m(hec)m(king)j(whether)d(a)i
24789
24801
(certi\014cate)h(corresp)s(onds)c(to)j(the)f(giv)m(en)h(priv)-5
24790
 
b(ate)27 b(k)m(ey)-8 b(.)390 3448 y(If)30 b(the)h(bu\013er)f(pro)m
 
24802
b(ate)27 b(k)m(ey)-8 b(.)390 830 y(If)30 b(the)h(bu\013er)f(pro)m
24791
24803
(vided)g(is)g(not)h(long)h(enough)e(to)h(hold)g(the)f(output,)h(then)f
24792
 
(*output)p 3357 3448 V 40 w(data)p 3573 3448 V 41 w(size)390
24793
 
3558 y(is)44 b(up)s(dated)f(and)h(GNUTLS)p 1443 3558
24794
 
V 40 w(E)p 1545 3558 V 40 w(SHOR)-8 b(T)p 1900 3558 V
24795
 
39 w(MEMOR)g(Y)p 2365 3558 V 41 w(BUFFER)45 b(will)g(b)s(e)e(returned.)
24796
 
81 b(The)390 3667 y(output)30 b(will)h(normally)f(b)s(e)g(a)h(SHA-1)g
 
24804
(*output)p 3357 830 V 40 w(data)p 3573 830 V 41 w(size)390
 
24805
939 y(is)44 b(up)s(dated)f(and)h(GNUTLS)p 1443 939 V
 
24806
40 w(E)p 1545 939 V 40 w(SHOR)-8 b(T)p 1900 939 V 39
 
24807
w(MEMOR)g(Y)p 2365 939 V 41 w(BUFFER)45 b(will)g(b)s(e)e(returned.)81
 
24808
b(The)390 1049 y(output)30 b(will)h(normally)f(b)s(e)g(a)h(SHA-1)g
24797
24809
(hash)e(output,)i(whic)m(h)f(is)g(20)h(b)m(ytes.)390
24798
 
3806 y Fn(Return)f(v)-5 b(alue:)41 b FB(In)30 b(case)h(of)g(failure)f
 
24810
1205 y Fn(Return)f(v)-5 b(alue:)41 b FB(In)30 b(case)h(of)g(failure)f
24799
24811
(a)h(negativ)m(e)i(v)-5 b(alue)30 b(will)h(b)s(e)f(returned,)f(and)h(0)
24800
 
h(on)f(success.)150 4009 y Fv(gn)m(utls)p 483 4009 37
24801
 
5 v 55 w(x509)p 786 4009 V 54 w(crt)p 993 4009 V 54 w(get)p
24802
 
1212 4009 V 54 w(k)m(ey)p 1449 4009 V 53 w(purp)s(ose)p
24803
 
1924 4009 V 56 w(oid)3350 4210 y FB([F)-8 b(unction])-3599
 
24812
h(on)f(success.)150 1426 y Fv(gn)m(utls)p 483 1426 37
 
24813
5 v 55 w(x509)p 786 1426 V 54 w(crt)p 993 1426 V 54 w(get)p
 
24814
1212 1426 V 54 w(k)m(ey)p 1449 1426 V 53 w(purp)s(ose)p
 
24815
1924 1426 V 56 w(oid)3350 1644 y FB([F)-8 b(unction])-3599
24804
24816
b Fh(int)53 b(gnutls_x509_crt_get_k)q(ey_p)q(urp)q(ose)q(_oi)q(d)e
24805
 
Fg(\()p Ff(gn)m(utls)p 2516 4210 28 4 v 41 w(x509)p 2740
24806
 
4210 V 41 w(crt)p 2892 4210 V 41 w(t)565 4319 y Fe(cert)12
 
24817
Fg(\()p Ff(gn)m(utls)p 2516 1644 28 4 v 41 w(x509)p 2740
 
24818
1644 V 41 w(crt)p 2892 1644 V 41 w(t)565 1753 y Fe(cert)12
24807
24819
b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)32 b(v)m(oid)f(*)f
24808
 
Fe(oid)12 b Ff(,)31 b(size)p 1900 4319 V 41 w(t)g(*)g
 
24820
Fe(oid)12 b Ff(,)31 b(size)p 1900 1753 V 41 w(t)g(*)g
24809
24821
Fe(sizeof_oid)12 b Ff(,)33 b(unsigned)c(in)m(t)i(*)g
24810
 
Fe(critical)12 b Fg(\))390 4429 y Ff(cert)r FB(:)41 b(should)30
 
24822
Fe(critical)12 b Fg(\))390 1863 y Ff(cert)r FB(:)41 b(should)30
24811
24823
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
24812
 
4567 y Ff(indx)6 b FB(:)40 b(This)30 b(sp)s(eci\014es)g(whic)m(h)g(OID)
 
24824
2019 y Ff(indx)6 b FB(:)40 b(This)30 b(sp)s(eci\014es)g(whic)m(h)g(OID)
24813
24825
g(to)h(return.)40 b(Use)31 b(zero)g(to)g(get)g(the)g(\014rst)f(one.)390
24814
 
4706 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(bu\013er)g
 
24826
2175 y Ff(oid)t FB(:)40 b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(bu\013er)g
24815
24827
(to)h(hold)f(the)h(OID)f(\(ma)m(y)h(b)s(e)f(n)m(ull\))390
24816
 
4844 y Ff(sizeof)p 610 4844 V 41 w(oid)t FB(:)41 b(initially)31
24817
 
b(holds)f(the)h(size)g(of)g Ft(oid)390 4982 y FB(This)36
 
24828
2330 y Ff(sizeof)p 610 2330 V 41 w(oid)t FB(:)41 b(initially)31
 
24829
b(holds)f(the)h(size)g(of)g Ft(oid)390 2486 y FB(This)36
24818
24830
b(function)h(will)h(extract)g(the)g(k)m(ey)g(purp)s(ose)d(OIDs)i(of)g
24819
24831
(the)h(Certi\014cate)g(sp)s(eci\014ed)f(b)m(y)g(the)390
24820
 
5092 y(giv)m(en)e(index.)50 b(These)33 b(are)h(stored)g(in)f(the)h
 
24832
2596 y(giv)m(en)e(index.)50 b(These)33 b(are)h(stored)g(in)f(the)h
24821
24833
(Extended)f(Key)h(Usage)h(extension)f(\(2.5.29.37\))k(See)390
24822
 
5202 y(the)31 b(GNUTLS)p 934 5202 V 39 w(KP)p 1106 5202
 
24834
2706 y(the)31 b(GNUTLS)p 934 2706 V 39 w(KP)p 1106 2706
24823
24835
V 40 w(*)g(de\014nitions)e(for)i(h)m(uman)e(readable)i(names.)390
24824
 
5340 y(If)f Ft(oid)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)
24825
 
g(b)s(e)f(\014lled.)p eop end
24826
 
%%Page: 209 215
24827
 
TeXDict begin 209 214 bop 150 -116 a FB(Chapter)30 b(9:)41
24828
 
b(F)-8 b(unction)31 b(Reference)2237 b(209)390 299 y
24829
 
Fn(Returns:)39 b Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21
24830
 
b FB(if)27 b(the)h(pro)m(vided)e(bu\013er)h(is)g(not)g(long)h(enough,)
24831
 
390 408 y(and)h(in)h(that)g(case)h(the)f(*sizeof)p 1481
24832
 
408 28 4 v 42 w(oid)g(will)g(b)s(e)g(up)s(dated)e(with)i(the)g
24833
 
(required)f(size.)41 b(On)29 b(success)i(0)390 518 y(is)f(returned.)150
24834
 
724 y Fv(gn)m(utls)p 483 724 37 5 v 55 w(x509)p 786 724
24835
 
V 54 w(crt)p 993 724 V 54 w(get)p 1212 724 V 54 w(k)m(ey)p
24836
 
1449 724 V 53 w(usage)3350 928 y FB([F)-8 b(unction])-3599
24837
 
b Fh(int)53 b(gnutls_x509_crt_get_k)q(ey_u)q(sag)q(e)e
24838
 
Fg(\()p Ff(gn)m(utls)p 2202 928 28 4 v 41 w(x509)p 2426
24839
 
928 V 42 w(crt)p 2579 928 V 40 w(t)31 b Fe(cert)12 b
24840
 
Ff(,)565 1038 y(unsigned)29 b(in)m(t)i(*)g Fe(key_usage)12
24841
 
b Ff(,)33 b(unsigned)c(in)m(t)i(*)g Fe(critical)12 b
24842
 
Fg(\))390 1147 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24843
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 1289 y Ff(k)m(ey)p
24844
 
529 1289 V 41 w(usage)5 b FB(:)41 b(where)30 b(the)h(k)m(ey)g(usage)g
24845
 
(bits)f(will)h(b)s(e)f(stored)390 1430 y Ff(critical)t
 
24836
2861 y(If)f Ft(oid)f FB(is)i(n)m(ull)f(then)g(only)h(the)f(size)h(will)
 
24837
g(b)s(e)f(\014lled.)390 3017 y Fn(Returns:)39 b Ft
 
24838
(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)21 b FB(if)27 b(the)h(pro)m(vided)e
 
24839
(bu\013er)h(is)g(not)g(long)h(enough,)390 3127 y(and)h(in)h(that)g
 
24840
(case)h(the)f(*sizeof)p 1481 3127 V 42 w(oid)g(will)g(b)s(e)g(up)s
 
24841
(dated)e(with)i(the)g(required)f(size.)41 b(On)29 b(success)i(0)390
 
24842
3236 y(is)f(returned.)150 3457 y Fv(gn)m(utls)p 483 3457
 
24843
37 5 v 55 w(x509)p 786 3457 V 54 w(crt)p 993 3457 V 54
 
24844
w(get)p 1212 3457 V 54 w(k)m(ey)p 1449 3457 V 53 w(usage)3350
 
24845
3675 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_k)q
 
24846
(ey_u)q(sag)q(e)e Fg(\()p Ff(gn)m(utls)p 2202 3675 28
 
24847
4 v 41 w(x509)p 2426 3675 V 42 w(crt)p 2579 3675 V 40
 
24848
w(t)31 b Fe(cert)12 b Ff(,)565 3785 y(unsigned)29 b(in)m(t)i(*)g
 
24849
Fe(key_usage)12 b Ff(,)33 b(unsigned)c(in)m(t)i(*)g Fe(critical)12
 
24850
b Fg(\))390 3894 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24851
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4050 y Ff(k)m(ey)p
 
24852
529 4050 V 41 w(usage)5 b FB(:)41 b(where)30 b(the)h(k)m(ey)g(usage)g
 
24853
(bits)f(will)h(b)s(e)f(stored)390 4206 y Ff(critical)t
24846
24854
FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f
24847
 
(mark)m(ed)g(as)h(critical)390 1571 y(This)i(function)h(will)g(return)f
 
24855
(mark)m(ed)g(as)h(critical)390 4362 y(This)i(function)h(will)g(return)f
24848
24856
(certi\014cate's)j(k)m(ey)f(usage,)h(b)m(y)d(reading)h(the)h(k)m
24849
 
(eyUsage)h(X.509)f(ex-)390 1681 y(tension)c(\(2.5.29.15\).)44
 
24857
(eyUsage)h(X.509)f(ex-)390 4472 y(tension)c(\(2.5.29.15\).)44
24850
24858
b(The)30 b(k)m(ey)h(usage)g(v)-5 b(alue)31 b(will)390
24851
 
1823 y Fn(ORed)98 b(v)-5 b(alues)98 b(of)g(the:)177 b
 
24859
4628 y Fn(ORed)98 b(v)-5 b(alues)98 b(of)g(the:)177 b
24852
24860
Ft(GNUTLS_KEY_DIGITAL_SIGN)o(ATUR)o(E)p FB(,)109 b Ft(GNUTLS_KEY_NON_)
24853
 
390 1932 y(REPUDIATION)p FB(,)64 b Ft(GNUTLS_KEY_KEY_ENCIPHERMEN)o(T)p
 
24861
390 4737 y(REPUDIATION)p FB(,)64 b Ft(GNUTLS_KEY_KEY_ENCIPHERMEN)o(T)p
24854
24862
FB(,)d Ft(GNUTLS_KEY_DATA_ENCIPHERME)o(NT)p FB(,)390
24855
 
2042 y Ft(GNUTLS_KEY_KEY_AGREEMENT)o FB(,)38 b Ft
 
24863
4847 y Ft(GNUTLS_KEY_KEY_AGREEMENT)o FB(,)38 b Ft
24856
24864
(GNUTLS_KEY_KEY_CERT_SIGN)o FB(,)g Ft(GNUTLS_KEY_CRL_SIGN)p
24857
 
FB(,)390 2151 y Ft(GNUTLS_KEY_ENCIPHER_ONLY)o FB(,)25
24858
 
b Ft(GNUTLS_KEY_DECIPHER_ONLY)o FB(.)390 2293 y Fn(Returns:)56
 
24865
FB(,)390 4956 y Ft(GNUTLS_KEY_ENCIPHER_ONLY)o FB(,)25
 
24866
b Ft(GNUTLS_KEY_DECIPHER_ONLY)o FB(.)390 5112 y Fn(Returns:)56
24859
24867
b FB(the)39 b(certi\014cate)h(k)m(ey)f(usage,)j(or)c(a)h(negativ)m(e)h
24860
24868
(v)-5 b(alue)39 b(in)f(case)i(of)e(parsing)g(error.)64
24861
 
b(If)390 2402 y(the)30 b(certi\014cate)h(do)s(es)e(not)h(con)m(tain)h
 
24869
b(If)390 5222 y(the)30 b(certi\014cate)h(do)s(es)e(not)h(con)m(tain)h
24862
24870
(the)f(k)m(eyUsage)h(extension)g Ft(GNUTLS_E_REQUESTED_DATA)o(_)390
24863
 
2512 y(NOT_AVAILABLE)c FB(will)j(b)s(e)g(returned.)150
24864
 
2718 y Fv(gn)m(utls)p 483 2718 37 5 v 55 w(x509)p 786
24865
 
2718 V 54 w(crt)p 993 2718 V 54 w(get)p 1212 2718 V 54
24866
 
w(pk)p 1399 2718 V 54 w(algorithm)3350 2922 y FB([F)-8
24867
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_p)q(k_al)q(gor)q
24868
 
(ith)q(m)e Fg(\()p Ff(gn)m(utls)p 2359 2922 28 4 v 41
24869
 
w(x509)p 2583 2922 V 41 w(crt)p 2735 2922 V 41 w(t)31
24870
 
b Fe(cert)12 b Ff(,)565 3031 y(unsigned)29 b(in)m(t)i(*)g
24871
 
Fe(bits)12 b Fg(\))390 3141 y Ff(cert)r FB(:)41 b(should)30
24872
 
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
24873
 
3282 y Ff(bits)t FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h
24874
 
(will)g(hold)f(the)h(size)g(of)f(the)h(parameters')g(in)f(bits)390
24875
 
3424 y(This)g(function)g(will)g(return)g(the)g(public)g(k)m(ey)h
24876
 
(algorithm)g(of)g(an)f(X.509)i(certi\014cate.)390 3565
24877
 
y(If)d(bits)g(is)g(non)g(n)m(ull,)g(it)h(should)e(ha)m(v)m(e)i(enough)f
24878
 
(size)h(to)g(hold)f(the)h(parameters)f(size)h(in)f(bits.)40
24879
 
b(F)-8 b(or)390 3675 y(RSA)33 b(the)h(bits)f(returned)f(is)i(the)f(mo)s
24880
 
(dulus.)49 b(F)-8 b(or)34 b(DSA)f(the)h(bits)f(returned)f(are)i(of)g
24881
 
(the)g(public)390 3784 y(exp)s(onen)m(t.)390 3926 y Fn(Returns:)61
24882
 
b FB(a)40 b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
24883
 
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 4036
24884
 
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 4242
24885
 
y Fv(gn)m(utls)p 483 4242 37 5 v 55 w(x509)p 786 4242
24886
 
V 54 w(crt)p 993 4242 V 54 w(get)p 1212 4242 V 54 w(pk)p
24887
 
1399 4242 V 54 w(dsa)p 1629 4242 V 54 w(ra)m(w)3350 4445
24888
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_p)q(k_ds)
24889
 
q(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2255 4445 28 4 v
24890
 
41 w(x509)p 2479 4445 V 41 w(crt)p 2631 4445 V 40 w(t)31
24891
 
b Fe(crt)12 b Ff(,)565 4555 y(gn)m(utls)p 811 4555 V
24892
 
41 w(datum)p 1110 4555 V 39 w(t)31 b(*)g Fe(p)12 b Ff(,)30
24893
 
b(gn)m(utls)p 1650 4555 V 40 w(datum)p 1948 4555 V 40
24894
 
w(t)h(*)f Fe(q)12 b Ff(,)31 b(gn)m(utls)p 2489 4555 V
24895
 
40 w(datum)p 2787 4555 V 40 w(t)f(*)h Fe(g)12 b Ff(,)30
24896
 
b(gn)m(utls)p 3327 4555 V 41 w(datum)p 3626 4555 V 39
24897
 
w(t)565 4665 y(*)h Fe(y)12 b Fg(\))390 4774 y Ff(crt)r
24898
 
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 4916 y Ff(p)s
24899
 
FB(:)40 b(will)31 b(hold)f(the)g(p)390 5057 y Ff(q)r
24900
 
FB(:)41 b(will)30 b(hold)g(the)h(q)390 5199 y Ff(g)8
24901
 
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 5340 y Ff(y)8
24902
 
b FB(:)40 b(will)31 b(hold)f(the)h(y)p eop end
 
24871
5331 y(NOT_AVAILABLE)c FB(will)j(b)s(e)g(returned.)p
 
24872
eop end
24903
24873
%%Page: 210 216
24904
24874
TeXDict begin 210 215 bop 150 -116 a FB(Chapter)30 b(9:)41
24905
 
b(F)-8 b(unction)31 b(Reference)2237 b(210)390 299 y(This)37
 
24875
b(F)-8 b(unction)31 b(Reference)2237 b(210)150 299 y
 
24876
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
24877
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(pk)p 1399
 
24878
299 V 54 w(algorithm)3350 489 y FB([F)-8 b(unction])-3599
 
24879
b Fh(int)53 b(gnutls_x509_crt_get_p)q(k_al)q(gor)q(ith)q(m)e
 
24880
Fg(\()p Ff(gn)m(utls)p 2359 489 28 4 v 41 w(x509)p 2583
 
24881
489 V 41 w(crt)p 2735 489 V 41 w(t)31 b Fe(cert)12 b
 
24882
Ff(,)565 599 y(unsigned)29 b(in)m(t)i(*)g Fe(bits)12
 
24883
b Fg(\))390 708 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24884
Ft(gnutls_x509_crt_t)26 b FB(structure)390 840 y Ff(bits)t
 
24885
FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h(will)g(hold)f(the)h
 
24886
(size)g(of)f(the)h(parameters')g(in)f(bits)390 971 y(This)g(function)g
 
24887
(will)g(return)g(the)g(public)g(k)m(ey)h(algorithm)g(of)g(an)f(X.509)i
 
24888
(certi\014cate.)390 1102 y(If)d(bits)g(is)g(non)g(n)m(ull,)g(it)h
 
24889
(should)e(ha)m(v)m(e)i(enough)f(size)h(to)g(hold)f(the)h(parameters)f
 
24890
(size)h(in)f(bits.)40 b(F)-8 b(or)390 1212 y(RSA)33 b(the)h(bits)f
 
24891
(returned)f(is)i(the)f(mo)s(dulus.)49 b(F)-8 b(or)34
 
24892
b(DSA)f(the)h(bits)f(returned)f(are)i(of)g(the)g(public)390
 
24893
1321 y(exp)s(onen)m(t.)390 1453 y Fn(Returns:)61 b FB(a)40
 
24894
b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
 
24895
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 1562
 
24896
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 1755
 
24897
y Fv(gn)m(utls)p 483 1755 37 5 v 55 w(x509)p 786 1755
 
24898
V 54 w(crt)p 993 1755 V 54 w(get)p 1212 1755 V 54 w(pk)p
 
24899
1399 1755 V 54 w(dsa)p 1629 1755 V 54 w(ra)m(w)3350 1946
 
24900
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_p)q(k_ds)
 
24901
q(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2255 1946 28 4 v
 
24902
41 w(x509)p 2479 1946 V 41 w(crt)p 2631 1946 V 40 w(t)31
 
24903
b Fe(crt)12 b Ff(,)565 2055 y(gn)m(utls)p 811 2055 V
 
24904
41 w(datum)p 1110 2055 V 39 w(t)31 b(*)g Fe(p)12 b Ff(,)30
 
24905
b(gn)m(utls)p 1650 2055 V 40 w(datum)p 1948 2055 V 40
 
24906
w(t)h(*)f Fe(q)12 b Ff(,)31 b(gn)m(utls)p 2489 2055 V
 
24907
40 w(datum)p 2787 2055 V 40 w(t)f(*)h Fe(g)12 b Ff(,)30
 
24908
b(gn)m(utls)p 3327 2055 V 41 w(datum)p 3626 2055 V 39
 
24909
w(t)565 2165 y(*)h Fe(y)12 b Fg(\))390 2274 y Ff(crt)r
 
24910
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 2406 y Ff(p)s
 
24911
FB(:)40 b(will)31 b(hold)f(the)g(p)390 2537 y Ff(q)r
 
24912
FB(:)41 b(will)30 b(hold)g(the)h(q)390 2668 y Ff(g)8
 
24913
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 2800 y Ff(y)8
 
24914
b FB(:)40 b(will)31 b(hold)f(the)h(y)390 2931 y(This)37
24906
24915
b(function)g(will)g(exp)s(ort)h(the)f(DSA)h(public)e(k)m(ey's)i
24907
24916
(parameters)g(found)e(in)h(the)h(giv)m(en)g(cer-)390
24908
 
408 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f(allo)
24909
 
s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36 b(will)g(b)s(e)390
24910
 
518 y(stored)30 b(in)h(the)f(appropriate)h(datum.)390
24911
 
666 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
24912
 
b(success,)f(otherwise)h(an)f(error.)150 879 y Fv(gn)m(utls)p
24913
 
483 879 37 5 v 55 w(x509)p 786 879 V 54 w(crt)p 993 879
24914
 
V 54 w(get)p 1212 879 V 54 w(pk)p 1399 879 V 54 w(rsa)p
24915
 
1611 879 V 54 w(ra)m(w)3350 1090 y FB([F)-8 b(unction])-3599
24916
 
b Fh(int)53 b(gnutls_x509_crt_get_p)q(k_rs)q(a_r)q(aw)f
24917
 
Fg(\()p Ff(gn)m(utls)p 2255 1090 28 4 v 41 w(x509)p 2479
24918
 
1090 V 41 w(crt)p 2631 1090 V 40 w(t)31 b Fe(crt)12 b
24919
 
Ff(,)565 1200 y(gn)m(utls)p 811 1200 V 41 w(datum)p 1110
24920
 
1200 V 39 w(t)31 b(*)g Fe(m)12 b Ff(,)30 b(gn)m(utls)p
24921
 
1650 1200 V 40 w(datum)p 1948 1200 V 40 w(t)h(*)f Fe(e)12
24922
 
b Fg(\))390 1309 y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)
24923
 
390 1458 y Ff(m)p FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390
24924
 
1606 y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m
24925
 
(t)390 1754 y(This)h(function)g(will)g(exp)s(ort)g(the)h(RSA)f(public)f
24926
 
(k)m(ey's)i(parameters)g(found)e(in)h(the)h(giv)m(en)g(struc-)390
24927
 
1864 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
 
24917
3040 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f
 
24918
(allo)s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36
 
24919
b(will)g(b)s(e)390 3150 y(stored)30 b(in)h(the)f(appropriate)h(datum.)
 
24920
390 3281 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b
 
24921
FB(on)31 b(success,)f(otherwise)h(an)f(error.)150 3474
 
24922
y Fv(gn)m(utls)p 483 3474 37 5 v 55 w(x509)p 786 3474
 
24923
V 54 w(crt)p 993 3474 V 54 w(get)p 1212 3474 V 54 w(pk)p
 
24924
1399 3474 V 54 w(rsa)p 1611 3474 V 54 w(ra)m(w)3350 3664
 
24925
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_p)q(k_rs)
 
24926
q(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2255 3664 28 4 v
 
24927
41 w(x509)p 2479 3664 V 41 w(crt)p 2631 3664 V 40 w(t)31
 
24928
b Fe(crt)12 b Ff(,)565 3774 y(gn)m(utls)p 811 3774 V
 
24929
41 w(datum)p 1110 3774 V 39 w(t)31 b(*)g Fe(m)12 b Ff(,)30
 
24930
b(gn)m(utls)p 1650 3774 V 40 w(datum)p 1948 3774 V 40
 
24931
w(t)h(*)f Fe(e)12 b Fg(\))390 3884 y Ff(crt)r FB(:)41
 
24932
b(Holds)31 b(the)f(certi\014cate)390 4015 y Ff(m)p FB(:)40
 
24933
b(will)31 b(hold)f(the)h(mo)s(dulus)390 4146 y Ff(e)5
 
24934
b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m(t)390
 
24935
4278 y(This)h(function)g(will)g(exp)s(ort)g(the)h(RSA)f(public)f(k)m
 
24936
(ey's)i(parameters)g(found)e(in)h(the)h(giv)m(en)g(struc-)390
 
24937
4387 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
24928
24938
(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g(stored)
24929
 
390 1973 y(in)30 b(the)h(appropriate)f(datum.)390 2122
 
24939
390 4497 y(in)30 b(the)h(appropriate)f(datum.)390 4628
24930
24940
y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
24931
 
b(success,)f(otherwise)h(an)f(error.)150 2335 y Fv(gn)m(utls)p
24932
 
483 2335 37 5 v 55 w(x509)p 786 2335 V 54 w(crt)p 993
24933
 
2335 V 54 w(get)p 1212 2335 V 54 w(pro)m(xy)3350 2545
 
24941
b(success,)f(otherwise)h(an)f(error.)150 4821 y Fv(gn)m(utls)p
 
24942
483 4821 37 5 v 55 w(x509)p 786 4821 V 54 w(crt)p 993
 
24943
4821 V 54 w(get)p 1212 4821 V 54 w(pro)m(xy)3350 5011
24934
24944
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_p)q(roxy)
24935
 
f Fg(\()p Ff(gn)m(utls)p 1993 2545 28 4 v 41 w(x509)p
24936
 
2217 2545 V 41 w(crt)p 2369 2545 V 41 w(t)30 b Fe(cert)12
24937
 
b Ff(,)32 b(unsigned)565 2655 y(in)m(t)f(*)g Fe(critical)12
 
24945
f Fg(\()p Ff(gn)m(utls)p 1993 5011 28 4 v 41 w(x509)p
 
24946
2217 5011 V 41 w(crt)p 2369 5011 V 41 w(t)30 b Fe(cert)12
 
24947
b Ff(,)32 b(unsigned)565 5121 y(in)m(t)f(*)g Fe(critical)12
24938
24948
b Ff(,)32 b(in)m(t)f(*)g Fe(pathlen)12 b Ff(,)32 b(c)m(har)f(**)g
24939
24949
Fe(policyLanguage)12 b Ff(,)34 b(c)m(har)d(**)g Fe(policy)12
24940
 
b Ff(,)565 2765 y(size)p 712 2765 V 41 w(t)31 b(*)f Fe(sizeof_policy)12
24941
 
b Fg(\))390 2874 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24942
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 3022 y Ff(critical)t
24943
 
FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f
24944
 
(mark)m(ed)g(as)h(critical)390 3171 y Ff(pathlen)p FB(:)72
24945
 
b(p)s(oin)m(ter)45 b(to)i(output)e(in)m(teger)i(indicating)g(path)f
24946
 
(length)g(\(ma)m(y)h(b)s(e)e(NULL\),)h(non-)390 3280
24947
 
y(negativ)m(e)38 b(v)-5 b(alues)36 b(indicate)h(a)f(presen)m(t)g(pCP)m
24948
 
(athLenConstrain)m(t)g(\014eld)g(and)f(the)h(actual)h(v)-5
24949
 
b(alue,)390 3390 y(-1)31 b(indicate)g(that)g(the)g(\014eld)f(is)g
24950
 
(absen)m(t.)390 3538 y(This)i(function)h(will)h(read)f(the)h
24951
 
(certi\014cate's)h(basic)f(constrain)m(ts,)h(and)d(return)h(the)g
24952
 
(certi\014cates)390 3648 y(CA)d(status.)41 b(It)31 b(reads)f(the)g
24953
 
(basicConstrain)m(ts)h(X.509)i(extension)e(\(2.5.29.19\).)390
24954
 
3796 y Fn(Return)40 b(v)-5 b(alue:)61 b FB(If)40 b(the)h(certi\014cate)
24955
 
h(is)f(a)g(CA)f(a)h(p)s(ositiv)m(e)g(v)-5 b(alue)41 b(will)g(b)s(e)f
24956
 
(returned,)i(or)e(zero)390 3906 y(if)f(the)h(certi\014cate)h(do)s(es)f
24957
 
(not)f(ha)m(v)m(e)i(CA)e(\015ag)h(set.)68 b(A)40 b(negativ)m(e)h(v)-5
24958
 
b(alue)40 b(ma)m(y)g(b)s(e)f(returned)f(in)390 4015 y(case)47
24959
 
b(of)f(errors.)87 b(If)45 b(the)h(certi\014cate)i(do)s(es)d(not)h(con)m
24960
 
(tain)i(the)e(basicConstrain)m(ts)g(extension)390 4125
24961
 
y(GNUTLS)p 777 4125 V 40 w(E)p 879 4125 V 40 w(REQUESTED)p
24962
 
1497 4125 V 39 w(D)m(A)-8 b(T)g(A)p 1788 4125 V 41 w(NOT)p
24963
 
2034 4125 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)150
24964
 
4338 y Fv(gn)m(utls)p 483 4338 37 5 v 55 w(x509)p 786
24965
 
4338 V 54 w(crt)p 993 4338 V 54 w(get)p 1212 4338 V 54
24966
 
w(ra)m(w)p 1462 4338 V 53 w(dn)3350 4549 y FB([F)-8 b(unction])-3599
 
24950
b Ff(,)565 5230 y(size)p 712 5230 V 41 w(t)31 b(*)f Fe(sizeof_policy)12
 
24951
b Fg(\))390 5340 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
24952
Ft(gnutls_x509_crt_t)26 b FB(structure)p eop end
 
24953
%%Page: 211 217
 
24954
TeXDict begin 211 216 bop 150 -116 a FB(Chapter)30 b(9:)41
 
24955
b(F)-8 b(unction)31 b(Reference)2237 b(211)390 299 y
 
24956
Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h
 
24957
(extension)g(is)f(mark)m(ed)g(as)h(critical)390 439 y
 
24958
Ff(pathlen)p FB(:)72 b(p)s(oin)m(ter)45 b(to)i(output)e(in)m(teger)i
 
24959
(indicating)g(path)f(length)g(\(ma)m(y)h(b)s(e)e(NULL\),)h(non-)390
 
24960
549 y(negativ)m(e)38 b(v)-5 b(alues)36 b(indicate)h(a)f(presen)m(t)g
 
24961
(pCP)m(athLenConstrain)m(t)g(\014eld)g(and)f(the)h(actual)h(v)-5
 
24962
b(alue,)390 659 y(-1)31 b(indicate)g(that)g(the)g(\014eld)f(is)g(absen)
 
24963
m(t.)390 799 y(This)i(function)h(will)h(read)f(the)h(certi\014cate's)h
 
24964
(basic)f(constrain)m(ts,)h(and)d(return)h(the)g(certi\014cates)390
 
24965
909 y(CA)d(status.)41 b(It)31 b(reads)f(the)g(basicConstrain)m(ts)h
 
24966
(X.509)i(extension)e(\(2.5.29.19\).)390 1049 y Fn(Return)40
 
24967
b(v)-5 b(alue:)61 b FB(If)40 b(the)h(certi\014cate)h(is)f(a)g(CA)f(a)h
 
24968
(p)s(ositiv)m(e)g(v)-5 b(alue)41 b(will)g(b)s(e)f(returned,)i(or)e
 
24969
(zero)390 1159 y(if)f(the)h(certi\014cate)h(do)s(es)f(not)f(ha)m(v)m(e)
 
24970
i(CA)e(\015ag)h(set.)68 b(A)40 b(negativ)m(e)h(v)-5 b(alue)40
 
24971
b(ma)m(y)g(b)s(e)f(returned)f(in)390 1268 y(case)47 b(of)f(errors.)87
 
24972
b(If)45 b(the)h(certi\014cate)i(do)s(es)d(not)h(con)m(tain)i(the)e
 
24973
(basicConstrain)m(ts)g(extension)390 1378 y(GNUTLS)p
 
24974
777 1378 28 4 v 40 w(E)p 879 1378 V 40 w(REQUESTED)p
 
24975
1497 1378 V 39 w(D)m(A)-8 b(T)g(A)p 1788 1378 V 41 w(NOT)p
 
24976
2034 1378 V 40 w(A)e(V)g(AILABLE)30 b(will)h(b)s(e)f(returned.)150
 
24977
1583 y Fv(gn)m(utls)p 483 1583 37 5 v 55 w(x509)p 786
 
24978
1583 V 54 w(crt)p 993 1583 V 54 w(get)p 1212 1583 V 54
 
24979
w(ra)m(w)p 1462 1583 V 53 w(dn)3350 1786 y FB([F)-8 b(unction])-3599
24967
24980
b Fh(int)53 b(gnutls_x509_crt_get_r)q(aw_d)q(n)f Fg(\()p
24968
 
Ff(gn)m(utls)p 2046 4549 28 4 v 40 w(x509)p 2269 4549
24969
 
V 42 w(crt)p 2422 4549 V 40 w(t)31 b Fe(cert)12 b Ff(,)565
24970
 
4658 y(gn)m(utls)p 811 4658 V 41 w(datum)p 1110 4658
24971
 
V 39 w(t)31 b(*)g Fe(start)12 b Fg(\))390 4768 y Ff(cert)r
 
24981
Ff(gn)m(utls)p 2046 1786 28 4 v 40 w(x509)p 2269 1786
 
24982
V 42 w(crt)p 2422 1786 V 40 w(t)31 b Fe(cert)12 b Ff(,)565
 
24983
1896 y(gn)m(utls)p 811 1896 V 41 w(datum)p 1110 1896
 
24984
V 39 w(t)31 b(*)g Fe(start)12 b Fg(\))390 2005 y Ff(cert)r
24972
24985
FB(:)41 b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
24973
 
b FB(structure)390 4916 y Ff(start)r FB(:)41 b(will)31
 
24986
b FB(structure)390 2146 y Ff(start)r FB(:)41 b(will)31
24974
24987
b(hold)f(the)h(starting)g(p)s(oin)m(t)f(of)h(the)f(DN)390
24975
 
5064 y(This)c(function)g(will)h(return)e(a)i(p)s(oin)m(ter)g(to)g(the)g
 
24988
2286 y(This)c(function)g(will)h(return)e(a)i(p)s(oin)m(ter)g(to)g(the)g
24976
24989
(DER)f(enco)s(ded)h(DN)g(structure)f(and)g(the)g(length.)390
24977
 
5213 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
24990
2427 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
24978
24991
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
24979
 
b(alue.)390 5322 y(or)30 b(a)h(negativ)m(e)i(v)-5 b(alue)31
24980
 
b(on)f(error.)p eop end
24981
 
%%Page: 211 217
24982
 
TeXDict begin 211 216 bop 150 -116 a FB(Chapter)30 b(9:)41
24983
 
b(F)-8 b(unction)31 b(Reference)2237 b(211)150 299 y
24984
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
24985
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(ra)m(w)p
24986
 
1462 299 V 53 w(issuer)p 1819 299 V 55 w(dn)3350 508
24987
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_r)q(aw_i)
24988
 
q(ssu)q(er_)q(dn)f Fg(\()p Ff(gn)m(utls)p 2412 508 28
24989
 
4 v 40 w(x509)p 2635 508 V 42 w(crt)p 2788 508 V 40 w(t)31
24990
 
b Fe(cert)12 b Ff(,)565 618 y(gn)m(utls)p 811 618 V 41
24991
 
w(datum)p 1110 618 V 39 w(t)31 b(*)g Fe(start)12 b Fg(\))390
24992
 
727 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
24993
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 874 y Ff(start)r
 
24992
b(alue.)390 2536 y(or)30 b(a)h(negativ)m(e)i(v)-5 b(alue)31
 
24993
b(on)f(error.)150 2742 y Fv(gn)m(utls)p 483 2742 37 5
 
24994
v 55 w(x509)p 786 2742 V 54 w(crt)p 993 2742 V 54 w(get)p
 
24995
1212 2742 V 54 w(ra)m(w)p 1462 2742 V 53 w(issuer)p 1819
 
24996
2742 V 55 w(dn)3350 2944 y FB([F)-8 b(unction])-3599
 
24997
b Fh(int)53 b(gnutls_x509_crt_get_r)q(aw_i)q(ssu)q(er_)q(dn)f
 
24998
Fg(\()p Ff(gn)m(utls)p 2412 2944 28 4 v 40 w(x509)p 2635
 
24999
2944 V 42 w(crt)p 2788 2944 V 40 w(t)31 b Fe(cert)12
 
25000
b Ff(,)565 3054 y(gn)m(utls)p 811 3054 V 41 w(datum)p
 
25001
1110 3054 V 39 w(t)31 b(*)g Fe(start)12 b Fg(\))390 3164
 
25002
y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g Ft
 
25003
(gnutls_x509_crt_t)26 b FB(structure)390 3304 y Ff(start)r
24994
25004
FB(:)41 b(will)31 b(hold)f(the)h(starting)g(p)s(oin)m(t)f(of)h(the)f
24995
 
(DN)390 1021 y(This)c(function)g(will)h(return)e(a)i(p)s(oin)m(ter)g
 
25005
(DN)390 3445 y(This)c(function)g(will)h(return)e(a)i(p)s(oin)m(ter)g
24996
25006
(to)g(the)g(DER)f(enco)s(ded)h(DN)g(structure)f(and)g(the)g(length.)390
24997
 
1168 y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
 
25007
3585 y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
24998
25008
b FB(is)47 b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
24999
 
1277 y(v)-5 b(alue.or)31 b(a)g(negativ)m(e)i(v)-5 b(alue)30
25000
 
b(on)h(error.)150 1489 y Fv(gn)m(utls)p 483 1489 37 5
25001
 
v 55 w(x509)p 786 1489 V 54 w(crt)p 993 1489 V 54 w(get)p
25002
 
1212 1489 V 54 w(serial)3350 1698 y FB([F)-8 b(unction])-3599
 
25009
3695 y(v)-5 b(alue.or)31 b(a)g(negativ)m(e)i(v)-5 b(alue)30
 
25010
b(on)h(error.)150 3900 y Fv(gn)m(utls)p 483 3900 37 5
 
25011
v 55 w(x509)p 786 3900 V 54 w(crt)p 993 3900 V 54 w(get)p
 
25012
1212 3900 V 54 w(serial)3350 4103 y FB([F)-8 b(unction])-3599
25003
25013
b Fh(int)53 b(gnutls_x509_crt_get_s)q(eria)q(l)f Fg(\()p
25004
 
Ff(gn)m(utls)p 2046 1698 28 4 v 40 w(x509)p 2269 1698
25005
 
V 42 w(crt)p 2422 1698 V 40 w(t)31 b Fe(cert)12 b Ff(,)31
25006
 
b(v)m(oid)g(*)565 1807 y Fe(result)12 b Ff(,)32 b(size)p
25007
 
1093 1807 V 41 w(t)f(*)f Fe(result_size)12 b Fg(\))390
25008
 
1917 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
25009
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 2064 y Ff(result)r
 
25014
Ff(gn)m(utls)p 2046 4103 28 4 v 40 w(x509)p 2269 4103
 
25015
V 42 w(crt)p 2422 4103 V 40 w(t)31 b Fe(cert)12 b Ff(,)31
 
25016
b(v)m(oid)g(*)565 4212 y Fe(result)12 b Ff(,)32 b(size)p
 
25017
1093 4212 V 41 w(t)f(*)f Fe(result_size)12 b Fg(\))390
 
25018
4322 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
25019
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4462 y Ff(result)r
25010
25020
FB(:)41 b(The)29 b(place)j(where)e(the)g(serial)h(n)m(um)m(b)s(er)e
25011
 
(will)i(b)s(e)f(copied)390 2211 y Ff(result)p 619 2211
 
25021
(will)i(b)s(e)f(copied)390 4603 y Ff(result)p 619 4603
25012
25022
V 40 w(size)5 b FB(:)42 b(Holds)30 b(the)h(size)g(of)g(the)f(result)g
25013
 
(\014eld.)390 2357 y(This)35 b(function)g(will)i(return)d(the)i(X.509)i
 
25023
(\014eld.)390 4743 y(This)35 b(function)g(will)i(return)d(the)i(X.509)i
25014
25024
(certi\014cate's)g(serial)e(n)m(um)m(b)s(er.)56 b(This)35
25015
 
b(is)h(obtained)g(b)m(y)390 2467 y(the)f(X509)i(Certi\014cate)f
 
25025
b(is)h(obtained)g(b)m(y)390 4853 y(the)f(X509)i(Certi\014cate)f
25016
25026
(serialNum)m(b)s(er)f(\014eld.)54 b(Serial)35 b(is)g(not)g(alw)m(a)m
25017
 
(ys)i(a)e(32)h(or)f(64bit)h(n)m(um)m(b)s(er.)390 2577
 
25027
(ys)i(a)e(32)h(or)f(64bit)h(n)m(um)m(b)s(er.)390 4963
25018
25028
y(Some)g(CAs)g(use)g(large)h(serial)g(n)m(um)m(b)s(ers,)f(th)m(us)g(it)
25019
25029
h(ma)m(y)f(b)s(e)g(wise)g(to)h(handle)e(it)i(as)f(something)390
25020
 
2686 y(opaque.)390 2833 y Fn(Returns:)73 b FB(On)47 b(success,)k
 
25030
5072 y(opaque.)390 5213 y Fn(Returns:)73 b FB(On)47 b(success,)k
25021
25031
Ft(GNUTLS_E_SUCCESS)42 b FB(is)47 b(returned,)k(otherwise)c(a)g
25022
 
(negativ)m(e)i(error)390 2943 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j
25023
 
(v)-5 b(alue)31 b(in)f(case)h(of)g(an)f(error.)150 3154
25024
 
y Fv(gn)m(utls)p 483 3154 37 5 v 55 w(x509)p 786 3154
25025
 
V 54 w(crt)p 993 3154 V 54 w(get)p 1212 3154 V 54 w(signature)p
25026
 
1759 3154 V 55 w(algorithm)3350 3363 y FB([F)-8 b(unction])-3599
25027
 
b Fh(int)53 b(gnutls_x509_crt_get_s)q(igna)q(tur)q(e_a)q(lgo)q(rith)q
25028
 
(m)e Fg(\()p Ff(gn)m(utls)p 2725 3363 28 4 v 41 w(x509)p
25029
 
2949 3363 V 42 w(crt)p 3102 3363 V 40 w(t)565 3473 y
25030
 
Fe(cert)12 b Fg(\))390 3582 y Ff(cert)r FB(:)41 b(should)30
25031
 
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
25032
 
3729 y(This)f(function)h(will)h(return)e(a)h(v)-5 b(alue)27
25033
 
b(of)f(the)h Ft(gnutls_sign_algorithm_t)20 b FB(en)m(umeration)26
25034
 
b(that)390 3839 y(is)k(the)h(signature)g(algorithm.)390
25035
 
3986 y Fn(Returns:)40 b FB(a)31 b Ft(gnutls_sign_algorithm_t)24
25036
 
b FB(v)-5 b(alue,)31 b(or)g(a)f(negativ)m(e)j(v)-5 b(alue)31
25037
 
b(on)f(error.)150 4197 y Fv(gn)m(utls)p 483 4197 37 5
25038
 
v 55 w(x509)p 786 4197 V 54 w(crt)p 993 4197 V 54 w(get)p
25039
 
1212 4197 V 54 w(signature)3350 4406 y FB([F)-8 b(unction])-3599
25040
 
b Fh(int)53 b(gnutls_x509_crt_get_s)q(igna)q(tur)q(e)e
25041
 
Fg(\()p Ff(gn)m(utls)p 2202 4406 28 4 v 41 w(x509)p 2426
25042
 
4406 V 42 w(crt)p 2579 4406 V 40 w(t)31 b Fe(cert)12
25043
 
b Ff(,)31 b(c)m(har)g(*)565 4516 y Fe(sig)12 b Ff(,)31
25044
 
b(size)p 936 4516 V 41 w(t)g(*)f Fe(sizeof_sig)12 b Fg(\))390
25045
 
4625 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
25046
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4772 y Ff(sig)8
25047
 
b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(where)g(the)h(signature)f(part)h
25048
 
(will)f(b)s(e)g(copied)h(\(ma)m(y)g(b)s(e)f(n)m(ull\).)390
25049
 
4919 y Ff(sizeof)p 610 4919 V 41 w(sig)8 b FB(:)41 b(initially)32
25050
 
b(holds)e(the)g(size)i(of)e Ft(sig)390 5066 y FB(This)g(function)g
25051
 
(will)g(extract)i(the)f(signature)f(\014eld)g(of)h(a)g(certi\014cate.)
25052
 
390 5213 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
25053
 
16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25054
 
b(alue.)390 5322 y(and)30 b(a)h(negativ)m(e)h(v)-5 b(alue)31
25055
 
b(on)f(error.)p eop end
 
25032
(negativ)m(e)i(error)390 5322 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j
 
25033
(v)-5 b(alue)31 b(in)f(case)h(of)g(an)f(error.)p eop
 
25034
end
25056
25035
%%Page: 212 218
25057
25036
TeXDict begin 212 217 bop 150 -116 a FB(Chapter)30 b(9:)41
25058
25037
b(F)-8 b(unction)31 b(Reference)2237 b(212)150 299 y
25059
25038
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25060
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(sub)7 b(ject)p
25061
 
1653 299 V 54 w(alt)p 1849 299 V 54 w(name2)3350 485
25062
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_s)q(ubje)
25063
 
q(ct_)q(alt)q(_na)q(me2)f Fg(\()p Ff(gn)m(utls)p 2621
25064
 
485 28 4 v 41 w(x509)p 2845 485 V 41 w(crt)p 2997 485
25065
 
V 40 w(t)565 595 y Fe(cert)12 b Ff(,)31 b(unsigned)f(in)m(t)h
25066
 
Fe(seq)12 b Ff(,)31 b(v)m(oid)g(*)f Fe(ret)12 b Ff(,)31
25067
 
b(size)p 2227 595 V 41 w(t)g(*)g Fe(ret_size)12 b Ff(,)32
25068
 
b(unsigned)d(in)m(t)i(*)565 704 y Fe(ret_type)12 b Ff(,)33
25069
 
b(unsigned)c(in)m(t)i(*)g Fe(critical)12 b Fg(\))390
25070
 
814 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
25071
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 943 y Ff(seq)r
25072
 
FB(:)38 b(sp)s(eci\014es)23 b(the)h(sequence)g(n)m(um)m(b)s(er)f(of)g
25073
 
(the)h(alt)h(name)f(\(0)g(for)g(the)g(\014rst)f(one,)i(1)f(for)g(the)g
25074
 
(second)390 1053 y(etc.\))390 1182 y Ff(ret)r FB(:)41
25075
 
b(is)30 b(the)h(place)g(where)f(the)h(alternativ)m(e)i(name)d(will)h(b)
25076
 
s(e)e(copied)i(to)390 1311 y Ff(ret)p 507 1311 V 40 w(size)5
25077
 
b FB(:)42 b(holds)30 b(the)g(size)i(of)e(ret.)390 1441
25078
 
y Ff(ret)p 507 1441 V 40 w(t)m(yp)s(e)5 b FB(:)36 b(holds)20
25079
 
b(the)h(t)m(yp)s(e)f(of)g(the)h(alternativ)m(e)i(name)d(\(one)h(of)f
25080
 
(gn)m(utls)p 2798 1441 V 41 w(x509)p 3022 1441 V 41 w(sub)5
25081
 
b(ject)p 3349 1441 V 40 w(alt)p 3494 1441 V 41 w(name)p
25082
 
3747 1441 V 40 w(t\).)390 1570 y Ff(critical)t FB(:)42
25083
 
b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f(mark)m(ed)
25084
 
g(as)h(critical)h(\(ma)m(y)g(b)s(e)d(n)m(ull\))390 1699
25085
 
y(This)g(function)h(will)h(return)e(the)h(alternativ)m(e)i(names,)f
25086
 
(con)m(tained)g(in)f(the)g(giv)m(en)h(certi\014cate.)43
25087
 
b(It)390 1809 y(is)31 b(the)f(same)h(as)g Ft(gnutls_x509_crt_get_subje)
 
25039
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(signature)p
 
25040
1759 299 V 55 w(algorithm)3350 489 y FB([F)-8 b(unction])-3599
 
25041
b Fh(int)53 b(gnutls_x509_crt_get_s)q(igna)q(tur)q(e_a)q(lgo)q(rith)q
 
25042
(m)e Fg(\()p Ff(gn)m(utls)p 2725 489 28 4 v 41 w(x509)p
 
25043
2949 489 V 42 w(crt)p 3102 489 V 40 w(t)565 599 y Fe(cert)12
 
25044
b Fg(\))390 708 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
25045
Ft(gnutls_x509_crt_t)26 b FB(structure)390 840 y(This)f(function)h
 
25046
(will)h(return)e(a)h(v)-5 b(alue)27 b(of)f(the)h Ft
 
25047
(gnutls_sign_algorithm_t)20 b FB(en)m(umeration)26 b(that)390
 
25048
949 y(is)k(the)h(signature)g(algorithm.)390 1081 y Fn(Returns:)40
 
25049
b FB(a)31 b Ft(gnutls_sign_algorithm_t)24 b FB(v)-5 b(alue,)31
 
25050
b(or)g(a)f(negativ)m(e)j(v)-5 b(alue)31 b(on)f(error.)150
 
25051
1273 y Fv(gn)m(utls)p 483 1273 37 5 v 55 w(x509)p 786
 
25052
1273 V 54 w(crt)p 993 1273 V 54 w(get)p 1212 1273 V 54
 
25053
w(signature)3350 1464 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
25054
b(gnutls_x509_crt_get_s)q(igna)q(tur)q(e)e Fg(\()p Ff(gn)m(utls)p
 
25055
2202 1464 28 4 v 41 w(x509)p 2426 1464 V 42 w(crt)p 2579
 
25056
1464 V 40 w(t)31 b Fe(cert)12 b Ff(,)31 b(c)m(har)g(*)565
 
25057
1573 y Fe(sig)12 b Ff(,)31 b(size)p 936 1573 V 41 w(t)g(*)f
 
25058
Fe(sizeof_sig)12 b Fg(\))390 1683 y Ff(cert)r FB(:)41
 
25059
b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
 
25060
b FB(structure)390 1814 y Ff(sig)8 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f
 
25061
(where)g(the)h(signature)f(part)h(will)f(b)s(e)g(copied)h(\(ma)m(y)g(b)
 
25062
s(e)f(n)m(ull\).)390 1946 y Ff(sizeof)p 610 1946 V 41
 
25063
w(sig)8 b FB(:)41 b(initially)32 b(holds)e(the)g(size)i(of)e
 
25064
Ft(sig)390 2077 y FB(This)g(function)g(will)g(extract)i(the)f
 
25065
(signature)f(\014eld)g(of)h(a)g(certi\014cate.)390 2208
 
25066
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25067
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25068
b(alue.)390 2318 y(and)30 b(a)h(negativ)m(e)h(v)-5 b(alue)31
 
25069
b(on)f(error.)150 2511 y Fv(gn)m(utls)p 483 2511 37 5
 
25070
v 55 w(x509)p 786 2511 V 54 w(crt)p 993 2511 V 54 w(get)p
 
25071
1212 2511 V 54 w(sub)7 b(ject)p 1653 2511 V 54 w(alt)p
 
25072
1849 2511 V 54 w(name2)3350 2701 y FB([F)-8 b(unction])-3599
 
25073
b Fh(int)53 b(gnutls_x509_crt_get_s)q(ubje)q(ct_)q(alt)q(_na)q(me2)f
 
25074
Fg(\()p Ff(gn)m(utls)p 2621 2701 28 4 v 41 w(x509)p 2845
 
25075
2701 V 41 w(crt)p 2997 2701 V 40 w(t)565 2811 y Fe(cert)12
 
25076
b Ff(,)31 b(unsigned)f(in)m(t)h Fe(seq)12 b Ff(,)31 b(v)m(oid)g(*)f
 
25077
Fe(ret)12 b Ff(,)31 b(size)p 2227 2811 V 41 w(t)g(*)g
 
25078
Fe(ret_size)12 b Ff(,)32 b(unsigned)d(in)m(t)i(*)565
 
25079
2920 y Fe(ret_type)12 b Ff(,)33 b(unsigned)c(in)m(t)i(*)g
 
25080
Fe(critical)12 b Fg(\))390 3030 y Ff(cert)r FB(:)41 b(should)30
 
25081
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
 
25082
3161 y Ff(seq)r FB(:)38 b(sp)s(eci\014es)23 b(the)h(sequence)g(n)m(um)m
 
25083
(b)s(er)f(of)g(the)h(alt)h(name)f(\(0)g(for)g(the)g(\014rst)f(one,)i(1)
 
25084
f(for)g(the)g(second)390 3271 y(etc.\))390 3402 y Ff(ret)r
 
25085
FB(:)41 b(is)30 b(the)h(place)g(where)f(the)h(alternativ)m(e)i(name)d
 
25086
(will)h(b)s(e)e(copied)i(to)390 3533 y Ff(ret)p 507 3533
 
25087
V 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)i(of)e(ret.)390
 
25088
3664 y Ff(ret)p 507 3664 V 40 w(t)m(yp)s(e)5 b FB(:)36
 
25089
b(holds)20 b(the)h(t)m(yp)s(e)f(of)g(the)h(alternativ)m(e)i(name)d
 
25090
(\(one)h(of)f(gn)m(utls)p 2798 3664 V 41 w(x509)p 3022
 
25091
3664 V 41 w(sub)5 b(ject)p 3349 3664 V 40 w(alt)p 3494
 
25092
3664 V 41 w(name)p 3747 3664 V 40 w(t\).)390 3796 y Ff(critical)t
 
25093
FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f
 
25094
(mark)m(ed)g(as)h(critical)h(\(ma)m(y)g(b)s(e)d(n)m(ull\))390
 
25095
3927 y(This)g(function)h(will)h(return)e(the)h(alternativ)m(e)i(names,)
 
25096
f(con)m(tained)g(in)f(the)g(giv)m(en)h(certi\014cate.)43
 
25097
b(It)390 4037 y(is)31 b(the)f(same)h(as)g Ft(gnutls_x509_crt_get_subje)
25088
25098
o(ct_)o(alt_)o(name)o(\(\))24 b FB(except)32 b(for)e(the)h(fact)g(that)
25089
 
390 1918 y(it)h(will)g(return)f(the)h(t)m(yp)s(e)g(of)f(the)h
 
25099
390 4146 y(it)h(will)g(return)f(the)h(t)m(yp)s(e)g(of)f(the)h
25090
25100
(alternativ)m(e)j(name)c(in)h Ft(ret_type)d FB(ev)m(en)j(if)g(the)g
25091
 
(function)f(fails)390 2028 y(for)f(some)h(reason)g(\(i.e.)41
 
25101
(function)f(fails)390 4256 y(for)f(some)h(reason)g(\(i.e.)41
25092
25102
b(the)31 b(bu\013er)e(pro)m(vided)h(is)h(not)f(enough\).)390
25093
 
2157 y(The)21 b(return)g(v)-5 b(alues)22 b(are)g(the)g(same)g(as)g
 
25103
4387 y(The)21 b(return)g(v)-5 b(alues)22 b(are)g(the)g(same)g(as)g
25094
25104
(with)f Ft(gnutls_x509_crt_get_subje)o(ct_)o(alt_)o(name)o(\(\))p
25095
 
FB(.)150 2346 y Fv(gn)m(utls)p 483 2346 37 5 v 55 w(x509)p
25096
 
786 2346 V 54 w(crt)p 993 2346 V 54 w(get)p 1212 2346
25097
 
V 54 w(sub)7 b(ject)p 1653 2346 V 54 w(alt)p 1849 2346
25098
 
V 54 w(name)3350 2533 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
25105
FB(.)150 4580 y Fv(gn)m(utls)p 483 4580 37 5 v 55 w(x509)p
 
25106
786 4580 V 54 w(crt)p 993 4580 V 54 w(get)p 1212 4580
 
25107
V 54 w(sub)7 b(ject)p 1653 4580 V 54 w(alt)p 1849 4580
 
25108
V 54 w(name)3350 4770 y FB([F)-8 b(unction])-3599 b Fh(int)53
25099
25109
b(gnutls_x509_crt_get_s)q(ubje)q(ct_)q(alt)q(_na)q(me)f
25100
 
Fg(\()p Ff(gn)m(utls)p 2569 2533 28 4 v 40 w(x509)p 2792
25101
 
2533 V 42 w(crt)p 2945 2533 V 40 w(t)565 2642 y Fe(cert)12
 
25110
Fg(\()p Ff(gn)m(utls)p 2569 4770 28 4 v 40 w(x509)p 2792
 
25111
4770 V 42 w(crt)p 2945 4770 V 40 w(t)565 4880 y Fe(cert)12
25102
25112
b Ff(,)31 b(unsigned)f(in)m(t)h Fe(seq)12 b Ff(,)31 b(v)m(oid)g(*)f
25103
 
Fe(ret)12 b Ff(,)31 b(size)p 2227 2642 V 41 w(t)g(*)g
 
25113
Fe(ret)12 b Ff(,)31 b(size)p 2227 4880 V 41 w(t)g(*)g
25104
25114
Fe(ret_size)12 b Ff(,)32 b(unsigned)d(in)m(t)i(*)565
25105
 
2752 y Fe(critical)12 b Fg(\))390 2861 y Ff(cert)r FB(:)41
 
25115
4990 y Fe(critical)12 b Fg(\))390 5099 y Ff(cert)r FB(:)41
25106
25116
b(should)30 b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26
25107
 
b FB(structure)390 2991 y Ff(seq)r FB(:)38 b(sp)s(eci\014es)23
 
25117
b FB(structure)390 5230 y Ff(seq)r FB(:)38 b(sp)s(eci\014es)23
25108
25118
b(the)h(sequence)g(n)m(um)m(b)s(er)f(of)g(the)h(alt)h(name)f(\(0)g(for)
25109
 
g(the)g(\014rst)f(one,)i(1)f(for)g(the)g(second)390 3100
25110
 
y(etc.\))390 3229 y Ff(ret)r FB(:)41 b(is)30 b(the)h(place)g(where)f
25111
 
(the)h(alternativ)m(e)i(name)d(will)h(b)s(e)e(copied)i(to)390
25112
 
3359 y Ff(ret)p 507 3359 V 40 w(size)5 b FB(:)42 b(holds)30
25113
 
b(the)g(size)i(of)e(ret.)390 3488 y Ff(critical)t FB(:)42
25114
 
b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)h(extension)g(is)f(mark)m(ed)
25115
 
g(as)h(critical)h(\(ma)m(y)g(b)s(e)d(n)m(ull\))390 3617
25116
 
y(This)h(function)g(will)g(return)g(the)g(alternativ)m(e)j(names,)e
25117
 
(con)m(tained)g(in)f(the)h(giv)m(en)g(certi\014cate.)390
25118
 
3747 y(This)c(is)h(sp)s(eci\014ed)f(in)g(X509v3)i(Certi\014cate)g
25119
 
(Extensions.)40 b(GNUTLS)28 b(will)g(return)e(the)i(Alterna-)390
25120
 
3856 y(tiv)m(e)k(name)e(\(2.5.29.17\),)35 b(or)30 b(a)h(negativ)m(e)i
25121
 
(error)d(co)s(de.)390 3986 y(When)g(the)h(SAN)f(t)m(yp)s(e)g(is)h
25122
 
(otherName,)g(it)g(will)g(extract)h(the)e(data)h(in)f(the)h
25123
 
(otherName's)g(v)-5 b(alue)390 4095 y(\014eld,)29 b(and)e
25124
 
Ft(GNUTLS_SAN_OTHERNAME)c FB(is)28 b(returned.)39 b(Y)-8
25125
 
b(ou)29 b(ma)m(y)g(use)e Ft(gnutls_x509_crt_get_)390
25126
 
4205 y(subject_alt_othername_oi)o(d\(\))15 b FB(to)23
25127
 
b(get)g(the)f(corresp)s(onding)f(OID)g(and)h(the)g Ft(")p
25128
 
FB(virtual)p Ft(")f FB(SAN)390 4314 y(t)m(yp)s(es)30
 
25119
g(the)g(\014rst)f(one,)i(1)f(for)g(the)g(second)390 5340
 
25120
y(etc.\))p eop end
 
25121
%%Page: 213 219
 
25122
TeXDict begin 213 218 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25123
b(F)-8 b(unction)31 b(Reference)2237 b(213)390 299 y
 
25124
Ff(ret)r FB(:)41 b(is)30 b(the)h(place)g(where)f(the)h(alternativ)m(e)i
 
25125
(name)d(will)h(b)s(e)e(copied)i(to)390 458 y Ff(ret)p
 
25126
507 458 28 4 v 40 w(size)5 b FB(:)42 b(holds)30 b(the)g(size)i(of)e
 
25127
(ret.)390 616 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j
 
25128
(if)e(the)h(extension)g(is)f(mark)m(ed)g(as)h(critical)h(\(ma)m(y)g(b)s
 
25129
(e)d(n)m(ull\))390 775 y(This)h(function)g(will)g(return)g(the)g
 
25130
(alternativ)m(e)j(names,)e(con)m(tained)g(in)f(the)h(giv)m(en)g
 
25131
(certi\014cate.)390 934 y(This)c(is)h(sp)s(eci\014ed)f(in)g(X509v3)i
 
25132
(Certi\014cate)g(Extensions.)40 b(GNUTLS)28 b(will)g(return)e(the)i
 
25133
(Alterna-)390 1043 y(tiv)m(e)k(name)e(\(2.5.29.17\),)35
 
25134
b(or)30 b(a)h(negativ)m(e)i(error)d(co)s(de.)390 1202
 
25135
y(When)g(the)h(SAN)f(t)m(yp)s(e)g(is)h(otherName,)g(it)g(will)g
 
25136
(extract)h(the)e(data)h(in)f(the)h(otherName's)g(v)-5
 
25137
b(alue)390 1312 y(\014eld,)29 b(and)e Ft(GNUTLS_SAN_OTHERNAME)c
 
25138
FB(is)28 b(returned.)39 b(Y)-8 b(ou)29 b(ma)m(y)g(use)e
 
25139
Ft(gnutls_x509_crt_get_)390 1421 y(subject_alt_othername_oi)o(d\(\))15
 
25140
b FB(to)23 b(get)g(the)f(corresp)s(onding)f(OID)g(and)h(the)g
 
25141
Ft(")p FB(virtual)p Ft(")f FB(SAN)390 1531 y(t)m(yp)s(es)30
25129
25142
b(\(e.g.,)j Ft(GNUTLS_SAN_OTHERNAME_XM)o(PP)p FB(\).)390
25130
 
4444 y(If)j(an)h(otherName)h(OID)e(is)h(kno)m(wn,)h(the)f(data)g(will)g
 
25143
1690 y(If)j(an)h(otherName)h(OID)e(is)h(kno)m(wn,)h(the)f(data)g(will)g
25131
25144
(b)s(e)f(deco)s(ded.)60 b(Otherwise)36 b(the)h(returned)390
25132
 
4553 y(data)d(will)f(b)s(e)g(DER)g(enco)s(ded,)h(and)f(y)m(ou)g(will)h
 
25145
1799 y(data)d(will)f(b)s(e)g(DER)g(enco)s(ded,)h(and)f(y)m(ou)g(will)h
25133
25146
(ha)m(v)m(e)g(to)g(deco)s(de)g(it)f(y)m(ourself.)50 b(Curren)m(tly)-8
25134
 
b(,)34 b(only)390 4663 y(the)d(RF)m(C)f(3920)i(id-on-xmppAddr)d(SAN)h
25135
 
(is)g(recognized.)390 4792 y Fn(Returns:)81 b FB(the)50
 
25147
b(,)34 b(only)390 1909 y(the)d(RF)m(C)f(3920)i(id-on-xmppAddr)d(SAN)h
 
25148
(is)g(recognized.)390 2067 y Fn(Returns:)81 b FB(the)50
25136
25149
b(alternativ)m(e)j(sub)5 b(ject)51 b(name)f(t)m(yp)s(e)h(on)f(success,)
25137
 
56 b(one)51 b(of)g(the)g(en)m(umerated)390 4902 y Ft
 
25150
56 b(one)51 b(of)g(the)g(en)m(umerated)390 2177 y Ft
25138
25151
(gnutls_x509_subject_alt_)o(name)o(_t)p FB(.)32 b(It)24
25139
25152
b(will)g(return)f Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)390
25140
 
5011 y FB(if)30 b Ft(ret_size)e FB(is)i(not)g(large)h(enough)f(to)h
 
25153
2287 y FB(if)30 b Ft(ret_size)e FB(is)i(not)g(large)h(enough)f(to)h
25141
25154
(hold)e(the)h(v)-5 b(alue.)41 b(In)30 b(that)g(case)h
25142
 
Ft(ret_size)d FB(will)i(b)s(e)g(up-)390 5121 y(dated)24
 
25155
Ft(ret_size)d FB(will)i(b)s(e)g(up-)390 2396 y(dated)24
25143
25156
b(with)g(the)g(required)f(size.)39 b(If)24 b(the)g(certi\014cate)i(do)s
25144
25157
(es)d(not)h(ha)m(v)m(e)h(an)f(Alternativ)m(e)i(name)e(with)390
25145
 
5230 y(the)41 b(sp)s(eci\014ed)g(sequence)g(n)m(um)m(b)s(er)f(then)h
 
25158
2506 y(the)41 b(sp)s(eci\014ed)g(sequence)g(n)m(um)m(b)s(er)f(then)h
25146
25159
Ft(GNUTLS_E_REQUESTED_DATA_)o(NOT_)o(AVA)o(ILAB)o(LE)35
25147
 
b FB(is)390 5340 y(returned.)p eop end
25148
 
%%Page: 213 219
25149
 
TeXDict begin 213 218 bop 150 -116 a FB(Chapter)30 b(9:)41
25150
 
b(F)-8 b(unction)31 b(Reference)2237 b(213)150 299 y
25151
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25152
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(sub)7 b(ject)p
25153
 
1653 299 V 54 w(alt)p 1849 299 V 54 w(othername)p 2472
25154
 
299 V 54 w(oid)3350 482 y FB([F)-8 b(unction])-3599 b
25155
 
Fh(int)53 b(gnutls_x509_crt_get_s)q(ubje)q(ct_)q(alt)q(_ot)q(hern)q
25156
 
(ame)q(_oi)q(d)565 591 y Fg(\()p Ff(gn)m(utls)p 846 591
25157
 
28 4 v 41 w(x509)p 1070 591 V 41 w(crt)p 1222 591 V 41
25158
 
w(t)30 b Fe(cert)12 b Ff(,)32 b(unsigned)d(in)m(t)i Fe(seq)12
 
25160
b FB(is)390 2615 y(returned.)150 2839 y Fv(gn)m(utls)p
 
25161
483 2839 37 5 v 55 w(x509)p 786 2839 V 54 w(crt)p 993
 
25162
2839 V 54 w(get)p 1212 2839 V 54 w(sub)7 b(ject)p 1653
 
25163
2839 V 54 w(alt)p 1849 2839 V 54 w(othername)p 2472 2839
 
25164
V 54 w(oid)3350 3060 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
25165
b(gnutls_x509_crt_get_s)q(ubje)q(ct_)q(alt)q(_ot)q(hern)q(ame)q(_oi)q
 
25166
(d)565 3170 y Fg(\()p Ff(gn)m(utls)p 846 3170 28 4 v
 
25167
41 w(x509)p 1070 3170 V 41 w(crt)p 1222 3170 V 41 w(t)30
 
25168
b Fe(cert)12 b Ff(,)32 b(unsigned)d(in)m(t)i Fe(seq)12
25159
25169
b Ff(,)31 b(v)m(oid)g(*)f Fe(ret)12 b Ff(,)31 b(size)p
25160
 
2984 591 V 41 w(t)g(*)g Fe(ret_size)12 b Fg(\))390 701
 
25170
2984 3170 V 41 w(t)g(*)g Fe(ret_size)12 b Fg(\))390 3279
25161
25171
y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g Ft
25162
 
(gnutls_x509_crt_t)26 b FB(structure)390 828 y Ff(seq)r
 
25172
(gnutls_x509_crt_t)26 b FB(structure)390 3438 y Ff(seq)r
25163
25173
FB(:)38 b(sp)s(eci\014es)23 b(the)h(sequence)g(n)m(um)m(b)s(er)f(of)g
25164
25174
(the)h(alt)h(name)f(\(0)g(for)g(the)g(\014rst)f(one,)i(1)f(for)g(the)g
25165
 
(second)390 938 y(etc.\))390 1065 y Ff(ret)r FB(:)41
 
25175
(second)390 3547 y(etc.\))390 3706 y Ff(ret)r FB(:)41
25166
25176
b(is)30 b(the)h(place)g(where)f(the)h(otherName)g(OID)f(will)h(b)s(e)f
25167
 
(copied)h(to)390 1193 y Ff(ret)p 507 1193 V 40 w(size)5
25168
 
b FB(:)42 b(holds)30 b(the)g(size)i(of)e(ret.)390 1320
 
25177
(copied)h(to)390 3865 y Ff(ret)p 507 3865 V 40 w(size)5
 
25178
b FB(:)42 b(holds)30 b(the)g(size)i(of)e(ret.)390 4024
25169
25179
y(This)f(function)g(will)h(extract)g(the)g(t)m(yp)s(e)g(OID)f(of)h(an)f
25170
25180
(otherName)h(Sub)5 b(ject)29 b(Alternativ)m(e)j(Name,)390
25171
 
1430 y(con)m(tained)g(in)e(the)g(giv)m(en)i(certi\014cate,)g(and)e
 
25181
4133 y(con)m(tained)g(in)e(the)g(giv)m(en)i(certi\014cate,)g(and)e
25172
25182
(return)f(the)i(t)m(yp)s(e)f(as)h(an)f(en)m(umerated)h(elemen)m(t.)390
25173
 
1558 y(This)c(function)g(is)g(only)g(useful)g(if)g Ft
 
25183
4292 y(This)c(function)g(is)g(only)g(useful)g(if)g Ft
25174
25184
(gnutls_x509_crt_get_subje)o(ct_a)o(lt_)o(name)o(\(\))21
25175
 
b FB(returned)390 1667 y Ft(GNUTLS_SAN_OTHERNAME)p FB(.)390
25176
 
1795 y Fn(Returns:)81 b FB(the)50 b(alternativ)m(e)j(sub)5
 
25185
b FB(returned)390 4401 y Ft(GNUTLS_SAN_OTHERNAME)p FB(.)390
 
25186
4560 y Fn(Returns:)81 b FB(the)50 b(alternativ)m(e)j(sub)5
25177
25187
b(ject)51 b(name)f(t)m(yp)s(e)h(on)f(success,)56 b(one)51
25178
 
b(of)g(the)g(en)m(umerated)390 1904 y(gn)m(utls)p 636
25179
 
1904 V 40 w(x509)p 859 1904 V 42 w(sub)5 b(ject)p 1187
25180
 
1904 V 40 w(alt)p 1332 1904 V 41 w(name)p 1585 1904 V
 
25188
b(of)g(the)g(en)m(umerated)390 4670 y(gn)m(utls)p 636
 
25189
4670 V 40 w(x509)p 859 4670 V 42 w(sub)5 b(ject)p 1187
 
25190
4670 V 40 w(alt)p 1332 4670 V 41 w(name)p 1585 4670 V
25181
25191
40 w(t.)39 b(F)-8 b(or)24 b(supp)s(orted)f(OIDs,)i(it)g(will)f(return)f
25182
 
(one)h(of)g(the)h(virtual)390 2014 y(\(GNUTLS)p 812 2014
25183
 
V 40 w(SAN)p 1039 2014 V 40 w(OTHERNAME)p 1694 2014 V
 
25192
(one)h(of)g(the)h(virtual)390 4779 y(\(GNUTLS)p 812 4779
 
25193
V 40 w(SAN)p 1039 4779 V 40 w(OTHERNAME)p 1694 4779 V
25184
25194
40 w(*\))79 b(t)m(yp)s(es,)90 b(e.g.)185 b Ft(GNUTLS_SAN_OTHERNAME_XM)o
25185
 
(PP)p FB(,)390 2123 y(and)43 b Ft(GNUTLS_SAN_OTHERNAME)38
 
25195
(PP)p FB(,)390 4889 y(and)43 b Ft(GNUTLS_SAN_OTHERNAME)38
25186
25196
b FB(for)43 b(unkno)m(wn)f(OIDs.)80 b(It)44 b(will)g(return)e
25187
 
Ft(GNUTLS_E_SHORT_)390 2233 y(MEMORY_BUFFER)f FB(if)j
 
25197
Ft(GNUTLS_E_SHORT_)390 4999 y(MEMORY_BUFFER)f FB(if)j
25188
25198
Ft(ret_size)f FB(is)h(not)h(large)h(enough)e(to)h(hold)f(the)h(v)-5
25189
 
b(alue.)84 b(In)44 b(that)h(case)390 2343 y Ft(ret_size)30
 
25199
b(alue.)84 b(In)44 b(that)h(case)390 5108 y Ft(ret_size)30
25190
25200
b FB(will)j(b)s(e)e(up)s(dated)g(with)h(the)g(required)g(size.)47
25191
25201
b(If)32 b(the)g(certi\014cate)i(do)s(es)e(not)h(ha)m(v)m(e)g(an)390
25192
 
2452 y(Alternativ)m(e)h(name)f(with)e(the)i(sp)s(eci\014ed)e(sequence)i
 
25202
5218 y(Alternativ)m(e)h(name)f(with)e(the)i(sp)s(eci\014ed)e(sequence)i
25193
25203
(n)m(um)m(b)s(er)e(and)g(with)h(the)h(otherName)g(t)m(yp)s(e)390
25194
 
2562 y(then)d Ft(GNUTLS_E_REQUESTED_DATA_N)o(OT_)o(AVAI)o(LABL)o(E)24
25195
 
b FB(is)31 b(returned.)150 2747 y Fv(gn)m(utls)p 483
25196
 
2747 37 5 v 55 w(x509)p 786 2747 V 54 w(crt)p 993 2747
25197
 
V 54 w(get)p 1212 2747 V 54 w(sub)7 b(ject)p 1653 2747
25198
 
V 54 w(k)m(ey)p 1890 2747 V 53 w(id)3350 2930 y FB([F)-8
25199
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_s)q(ubje)q(ct_)q
25200
 
(key)q(_id)f Fg(\()p Ff(gn)m(utls)p 2464 2930 28 4 v
25201
 
41 w(x509)p 2688 2930 V 41 w(crt)p 2840 2930 V 40 w(t)31
25202
 
b Fe(cert)12 b Ff(,)565 3039 y(v)m(oid)31 b(*)g Fe(ret)12
25203
 
b Ff(,)31 b(size)p 1209 3039 V 41 w(t)f(*)h Fe(ret_size)12
 
25204
5327 y(then)d Ft(GNUTLS_E_REQUESTED_DATA_N)o(OT_)o(AVAI)o(LABL)o(E)24
 
25205
b FB(is)31 b(returned.)p eop end
 
25206
%%Page: 214 220
 
25207
TeXDict begin 214 219 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25208
b(F)-8 b(unction)31 b(Reference)2237 b(214)150 299 y
 
25209
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
25210
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(sub)7 b(ject)p
 
25211
1653 299 V 54 w(k)m(ey)p 1890 299 V 53 w(id)3350 498
 
25212
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_s)q(ubje)
 
25213
q(ct_)q(key)q(_id)f Fg(\()p Ff(gn)m(utls)p 2464 498 28
 
25214
4 v 41 w(x509)p 2688 498 V 41 w(crt)p 2840 498 V 40 w(t)31
 
25215
b Fe(cert)12 b Ff(,)565 608 y(v)m(oid)31 b(*)g Fe(ret)12
 
25216
b Ff(,)31 b(size)p 1209 608 V 41 w(t)f(*)h Fe(ret_size)12
25204
25217
b Ff(,)33 b(unsigned)c(in)m(t)i(*)g Fe(critical)12 b
25205
 
Fg(\))390 3149 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
25206
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 3277 y Ff(ret)r
 
25218
Fg(\))390 718 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
25219
Ft(gnutls_x509_crt_t)26 b FB(structure)390 855 y Ff(ret)r
25207
25220
FB(:)41 b(The)30 b(place)h(where)f(the)h(iden)m(ti\014er)f(will)h(b)s
25208
 
(e)f(copied)390 3404 y Ff(ret)p 507 3404 V 40 w(size)5
 
25221
(e)f(copied)390 992 y Ff(ret)p 507 992 V 40 w(size)5
25209
25222
b FB(:)42 b(Holds)31 b(the)f(size)h(of)g(the)f(result)h(\014eld.)390
25210
 
3532 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)
 
25223
1129 y Ff(critical)t FB(:)42 b(will)31 b(b)s(e)f(non)f(zero)j(if)e(the)
25211
25224
h(extension)g(is)f(mark)m(ed)g(as)h(critical)h(\(ma)m(y)g(b)s(e)d(n)m
25212
 
(ull\))390 3659 y(This)44 b(function)h(will)g(return)f(the)h(X.509v3)i
 
25225
(ull\))390 1266 y(This)44 b(function)h(will)g(return)f(the)h(X.509v3)i
25213
25226
(certi\014cate's)g(sub)5 b(ject)45 b(k)m(ey)h(iden)m(ti\014er.)85
25214
 
b(This)44 b(is)390 3769 y(obtained)31 b(b)m(y)f(the)h(X.509)h(Sub)5
 
25227
b(This)44 b(is)390 1376 y(obtained)31 b(b)m(y)f(the)h(X.509)h(Sub)5
25215
25228
b(ject)29 b(Key)i(iden)m(ti\014er)f(extension)h(\014eld)f
25216
 
(\(2.5.29.14\).)390 3896 y Fn(Returns:)73 b FB(On)47
 
25229
(\(2.5.29.14\).)390 1513 y Fn(Returns:)73 b FB(On)47
25217
25230
b(success,)k Ft(GNUTLS_E_SUCCESS)42 b FB(is)47 b(returned,)k(otherwise)
25218
 
c(a)g(negativ)m(e)i(error)390 4006 y(v)-5 b(alue.and)31
 
25231
c(a)g(negativ)m(e)i(error)390 1623 y(v)-5 b(alue.and)31
25219
25232
b(a)f(negativ)m(e)j(v)-5 b(alue)31 b(in)f(case)h(of)g(an)f(error.)150
25220
 
4191 y Fv(gn)m(utls)p 483 4191 37 5 v 55 w(x509)p 786
25221
 
4191 V 54 w(crt)p 993 4191 V 54 w(get)p 1212 4191 V 54
25222
 
w(sub)7 b(ject)3350 4374 y FB([F)-8 b(unction])-3599
 
25233
1825 y Fv(gn)m(utls)p 483 1825 37 5 v 55 w(x509)p 786
 
25234
1825 V 54 w(crt)p 993 1825 V 54 w(get)p 1212 1825 V 54
 
25235
w(sub)7 b(ject)3350 2024 y FB([F)-8 b(unction])-3599
25223
25236
b Fh(int)53 b(gnutls_x509_crt_get_s)q(ubje)q(ct)f Fg(\()p
25224
 
Ff(gn)m(utls)p 2098 4374 28 4 v 41 w(x509)p 2322 4374
25225
 
V 41 w(crt)p 2474 4374 V 40 w(t)31 b Fe(cert)12 b Ff(,)565
25226
 
4483 y(gn)m(utls)p 811 4483 V 41 w(x509)p 1035 4483 V
25227
 
41 w(dn)p 1178 4483 V 39 w(t)31 b(*)f Fe(dn)12 b Fg(\))390
25228
 
4593 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
25229
 
Ft(gnutls_x509_crt_t)26 b FB(structure)390 4721 y Ff(dn)p
 
25237
Ff(gn)m(utls)p 2098 2024 28 4 v 41 w(x509)p 2322 2024
 
25238
V 41 w(crt)p 2474 2024 V 40 w(t)31 b Fe(cert)12 b Ff(,)565
 
25239
2134 y(gn)m(utls)p 811 2134 V 41 w(x509)p 1035 2134 V
 
25240
41 w(dn)p 1178 2134 V 39 w(t)31 b(*)f Fe(dn)12 b Fg(\))390
 
25241
2243 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
25242
Ft(gnutls_x509_crt_t)26 b FB(structure)390 2380 y Ff(dn)p
25230
25243
FB(:)40 b(output)30 b(v)-5 b(ariable)31 b(with)f(p)s(oin)m(ter)g(to)h
25231
 
(opaque)g(DN.)390 4848 y(Return)g(the)h(Certi\014cate's)h(Sub)5
 
25244
(opaque)g(DN.)390 2518 y(Return)g(the)h(Certi\014cate's)h(Sub)5
25232
25245
b(ject)31 b(DN)h(as)g(an)f(opaque)h(data)h(t)m(yp)s(e.)44
25233
 
b(Y)-8 b(ou)32 b(ma)m(y)h(use)e Ft(gnutls_)390 4958 y
 
25246
b(Y)-8 b(ou)32 b(ma)m(y)h(use)e Ft(gnutls_)390 2627 y
25234
25247
(x509_dn_get_rdn_ava\(\))25 b FB(to)31 b(deco)s(de)f(the)h(DN.)390
25235
 
5085 y(Note)d(that)g Ft(dn)e FB(should)g(b)s(e)g(treated)i(as)f
 
25248
2764 y(Note)d(that)g Ft(dn)e FB(should)g(b)s(e)g(treated)i(as)f
25236
25249
(constan)m(t.)41 b(Because)28 b(p)s(oin)m(ts)e(in)m(to)i(the)f
25237
 
Ft(cert)f FB(ob)5 b(ject,)29 b(y)m(ou)390 5195 y(ma)m(y)i(not)g(deallo)
 
25250
Ft(cert)f FB(ob)5 b(ject,)29 b(y)m(ou)390 2874 y(ma)m(y)i(not)g(deallo)
25238
25251
s(cate)h Ft(cert)e FB(and)f(con)m(tin)m(ue)j(to)f(access)h
25239
 
Ft(dn)p FB(.)390 5322 y Fn(Returns:)40 b FB(Returns)30
25240
 
b(0)h(on)f(success,)h(or)f(an)g(error)g(co)s(de.)p eop
25241
 
end
25242
 
%%Page: 214 220
25243
 
TeXDict begin 214 219 bop 150 -116 a FB(Chapter)30 b(9:)41
25244
 
b(F)-8 b(unction)31 b(Reference)2237 b(214)150 299 y
 
25252
Ft(dn)p FB(.)390 3011 y Fn(Returns:)40 b FB(Returns)30
 
25253
b(0)h(on)f(success,)h(or)f(an)g(error)g(co)s(de.)150
 
25254
3213 y Fv(gn)m(utls)p 483 3213 37 5 v 55 w(x509)p 786
 
25255
3213 V 54 w(crt)p 993 3213 V 54 w(get)p 1212 3213 V 54
 
25256
w(v)m(ersion)3350 3413 y FB([F)-8 b(unction])-3599 b
 
25257
Fh(int)53 b(gnutls_x509_crt_get_v)q(ersi)q(on)f Fg(\()p
 
25258
Ff(gn)m(utls)p 2098 3413 28 4 v 41 w(x509)p 2322 3413
 
25259
V 41 w(crt)p 2474 3413 V 40 w(t)31 b Fe(cert)12 b Fg(\))390
 
25260
3522 y Ff(cert)r FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
25261
Ft(gnutls_x509_crt_t)26 b FB(structure)390 3659 y(This)k(function)g
 
25262
(will)g(return)g(the)g(v)m(ersion)h(of)g(the)f(sp)s(eci\014ed)g
 
25263
(Certi\014cate.)390 3797 y Fn(Returns:)40 b FB(v)m(ersion)31
 
25264
b(of)g(certi\014cate,)h(or)f(a)g(negativ)m(e)h(v)-5 b(alue)31
 
25265
b(on)f(error.)150 3999 y Fv(gn)m(utls)p 483 3999 37 5
 
25266
v 55 w(x509)p 786 3999 V 54 w(crt)p 993 3999 V 54 w(imp)s(ort)3350
 
25267
4198 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_impor)q
 
25268
(t)e Fg(\()p Ff(gn)m(utls)p 1836 4198 28 4 v 41 w(x509)p
 
25269
2060 4198 V 41 w(crt)p 2212 4198 V 41 w(t)30 b Fe(cert)12
 
25270
b Ff(,)32 b(const)565 4308 y(gn)m(utls)p 811 4308 V 41
 
25271
w(datum)p 1110 4308 V 39 w(t)f(*)g Fe(data)12 b Ff(,)31
 
25272
b(gn)m(utls)p 1807 4308 V 40 w(x509)p 2030 4308 V 42
 
25273
w(crt)p 2183 4308 V 40 w(fm)m(t)p 2359 4308 V 40 w(t)g
 
25274
Fe(format)12 b Fg(\))390 4417 y Ff(cert)r FB(:)41 b(The)30
 
25275
b(structure)g(to)h(store)g(the)g(parsed)e(certi\014cate.)390
 
25276
4554 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s(ded)f
 
25277
(certi\014cate.)390 4692 y Ff(format)r FB(:)41 b(One)30
 
25278
b(of)g(DER)h(or)f(PEM)390 4829 y(This)i(function)g(will)h(con)m(v)m
 
25279
(ert)h(the)e(giv)m(en)i(DER)e(or)h(PEM)f(enco)s(ded)g(Certi\014cate)i
 
25280
(to)f(the)g(nativ)m(e)390 4938 y(gn)m(utls)p 636 4938
 
25281
V 40 w(x509)p 859 4938 V 42 w(crt)p 1012 4938 V 40 w(t)e(format.)41
 
25282
b(The)30 b(output)g(will)g(b)s(e)g(stored)h(in)f Ft(cert)p
 
25283
FB(.)390 5076 y(If)25 b(the)h(Certi\014cate)h(is)f(PEM)g(enco)s(ded)f
 
25284
(it)h(should)f(ha)m(v)m(e)i(a)f(header)g(of)g Ft(")p
 
25285
FB(X509)h(CER)-8 b(TIFICA)g(TE)p Ft(")p FB(,)390 5185
 
25286
y(or)30 b Ft(")p FB(CER)-8 b(TIFICA)g(TE)p Ft(")p FB(.)390
 
25287
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25288
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25289
b(alue.)p eop end
 
25290
%%Page: 215 221
 
25291
TeXDict begin 215 220 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25292
b(F)-8 b(unction)31 b(Reference)2237 b(215)150 299 y
25245
25293
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25246
 
w(crt)p 993 299 V 54 w(get)p 1212 299 V 54 w(v)m(ersion)3350
25247
 
498 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_get_v)q
25248
 
(ersi)q(on)f Fg(\()p Ff(gn)m(utls)p 2098 498 28 4 v 41
25249
 
w(x509)p 2322 498 V 41 w(crt)p 2474 498 V 40 w(t)31 b
25250
 
Fe(cert)12 b Fg(\))390 608 y Ff(cert)r FB(:)41 b(should)30
25251
 
b(con)m(tain)h(a)g Ft(gnutls_x509_crt_t)26 b FB(structure)390
25252
 
745 y(This)k(function)g(will)g(return)g(the)g(v)m(ersion)h(of)g(the)f
25253
 
(sp)s(eci\014ed)g(Certi\014cate.)390 882 y Fn(Returns:)40
25254
 
b FB(v)m(ersion)31 b(of)g(certi\014cate,)h(or)f(a)g(negativ)m(e)h(v)-5
25255
 
b(alue)31 b(on)f(error.)150 1084 y Fv(gn)m(utls)p 483
25256
 
1084 37 5 v 55 w(x509)p 786 1084 V 54 w(crt)p 993 1084
25257
 
V 54 w(imp)s(ort)3350 1284 y FB([F)-8 b(unction])-3599
25258
 
b Fh(int)53 b(gnutls_x509_crt_impor)q(t)e Fg(\()p Ff(gn)m(utls)p
25259
 
1836 1284 28 4 v 41 w(x509)p 2060 1284 V 41 w(crt)p 2212
25260
 
1284 V 41 w(t)30 b Fe(cert)12 b Ff(,)32 b(const)565 1393
25261
 
y(gn)m(utls)p 811 1393 V 41 w(datum)p 1110 1393 V 39
25262
 
w(t)f(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1807 1393
25263
 
V 40 w(x509)p 2030 1393 V 42 w(crt)p 2183 1393 V 40 w(fm)m(t)p
25264
 
2359 1393 V 40 w(t)g Fe(format)12 b Fg(\))390 1503 y
25265
 
Ff(cert)r FB(:)41 b(The)30 b(structure)g(to)h(store)g(the)g(parsed)e
25266
 
(certi\014cate.)390 1640 y Ff(data)p FB(:)41 b(The)30
25267
 
b(DER)h(or)f(PEM)h(enco)s(ded)f(certi\014cate.)390 1777
25268
 
y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM)390
25269
 
1914 y(This)i(function)g(will)h(con)m(v)m(ert)h(the)e(giv)m(en)i(DER)e
25270
 
(or)h(PEM)f(enco)s(ded)g(Certi\014cate)i(to)f(the)g(nativ)m(e)390
25271
 
2024 y(gn)m(utls)p 636 2024 V 40 w(x509)p 859 2024 V
25272
 
42 w(crt)p 1012 2024 V 40 w(t)e(format.)41 b(The)30 b(output)g(will)g
25273
 
(b)s(e)g(stored)h(in)f Ft(cert)p FB(.)390 2161 y(If)25
25274
 
b(the)h(Certi\014cate)h(is)f(PEM)g(enco)s(ded)f(it)h(should)f(ha)m(v)m
25275
 
(e)i(a)f(header)g(of)g Ft(")p FB(X509)h(CER)-8 b(TIFICA)g(TE)p
25276
 
Ft(")p FB(,)390 2271 y(or)30 b Ft(")p FB(CER)-8 b(TIFICA)g(TE)p
25277
 
Ft(")p FB(.)390 2408 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
25294
w(crt)p 993 299 V 54 w(init)3350 501 y FB([F)-8 b(unction])-3599
 
25295
b Fh(int)53 b(gnutls_x509_crt_init)f Fg(\()p Ff(gn)m(utls)p
 
25296
1732 501 28 4 v 40 w(x509)p 1955 501 V 42 w(crt)p 2108
 
25297
501 V 40 w(t)31 b(*)g Fe(cert)12 b Fg(\))390 611 y Ff(cert)r
 
25298
FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390
 
25299
751 y(This)g(function)g(will)g(initialize)j(an)d(X.509)i(certi\014cate)
 
25300
h(structure.)390 891 y Fn(Returns:)j FB(On)20 b(success,)j
25278
25301
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25279
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2610 y Fv(gn)m(utls)p
25280
 
483 2610 37 5 v 55 w(x509)p 786 2610 V 54 w(crt)p 993
25281
 
2610 V 54 w(init)3350 2809 y FB([F)d(unction])-3599 b
25282
 
Fh(int)53 b(gnutls_x509_crt_init)f Fg(\()p Ff(gn)m(utls)p
25283
 
1732 2809 28 4 v 40 w(x509)p 1955 2809 V 42 w(crt)p 2108
25284
 
2809 V 40 w(t)31 b(*)g Fe(cert)12 b Fg(\))390 2919 y
25285
 
Ff(cert)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390
25286
 
3056 y(This)g(function)g(will)g(initialize)j(an)d(X.509)i
25287
 
(certi\014cate)h(structure.)390 3193 y Fn(Returns:)j
25288
 
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25289
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25290
 
b(alue.)150 3395 y Fv(gn)m(utls)p 483 3395 37 5 v 55
25291
 
w(x509)p 786 3395 V 54 w(crt)p 993 3395 V 54 w(list)p
25292
 
1211 3395 V 54 w(imp)s(ort)3350 3595 y FB([F)d(unction])-3599
25293
 
b Fh(int)53 b(gnutls_x509_crt_list_)q(impo)q(rt)f Fg(\()p
25294
 
Ff(gn)m(utls)p 2098 3595 28 4 v 41 w(x509)p 2322 3595
25295
 
V 41 w(crt)p 2474 3595 V 40 w(t)31 b(*)g Fe(certs)12
25296
 
b Ff(,)565 3704 y(unsigned)29 b(in)m(t)i(*)g Fe(cert_max)12
25297
 
b Ff(,)33 b(const)d(gn)m(utls)p 2128 3704 V 41 w(datum)p
25298
 
2427 3704 V 39 w(t)h(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p
25299
 
3124 3704 V 41 w(x509)p 3348 3704 V 41 w(crt)p 3500 3704
25300
 
V 40 w(fm)m(t)p 3676 3704 V 41 w(t)565 3814 y Fe(format)12
 
25302
(negativ)m(e)h(error)d(v)-5 b(alue.)150 1096 y Fv(gn)m(utls)p
 
25303
483 1096 37 5 v 55 w(x509)p 786 1096 V 54 w(crt)p 993
 
25304
1096 V 54 w(list)p 1211 1096 V 54 w(imp)s(ort)3350 1298
 
25305
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_list_)q(impo)q
 
25306
(rt)f Fg(\()p Ff(gn)m(utls)p 2098 1298 28 4 v 41 w(x509)p
 
25307
2322 1298 V 41 w(crt)p 2474 1298 V 40 w(t)31 b(*)g Fe(certs)12
 
25308
b Ff(,)565 1408 y(unsigned)29 b(in)m(t)i(*)g Fe(cert_max)12
 
25309
b Ff(,)33 b(const)d(gn)m(utls)p 2128 1408 V 41 w(datum)p
 
25310
2427 1408 V 39 w(t)h(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p
 
25311
3124 1408 V 41 w(x509)p 3348 1408 V 41 w(crt)p 3500 1408
 
25312
V 40 w(fm)m(t)p 3676 1408 V 41 w(t)565 1517 y Fe(format)12
25301
25313
b Ff(,)32 b(unsigned)d(in)m(t)i Fe(flags)12 b Fg(\))390
25302
 
3924 y Ff(certs)t FB(:)41 b(The)30 b(structures)g(to)h(store)g(the)f
 
25314
1627 y Ff(certs)t FB(:)41 b(The)30 b(structures)g(to)h(store)g(the)f
25303
25315
(parsed)g(certi\014cate.)43 b(Must)30 b(not)h(b)s(e)e(initialized.)390
25304
 
4061 y Ff(cert)p 547 4061 V 41 w(max)6 b FB(:)39 b(Initially)28
 
25316
1767 y Ff(cert)p 547 1767 V 41 w(max)6 b FB(:)39 b(Initially)28
25305
25317
b(m)m(ust)f(hold)g(the)g(maxim)m(um)g(n)m(um)m(b)s(er)f(of)h(certs.)40
25306
 
b(It)28 b(will)f(b)s(e)f(up)s(dated)g(with)390 4170 y(the)31
 
25318
b(It)28 b(will)f(b)s(e)f(up)s(dated)g(with)390 1876 y(the)31
25307
25319
b(n)m(um)m(b)s(er)e(of)h(certs)h(a)m(v)-5 b(ailable.)390
25308
 
4308 y Ff(data)p FB(:)41 b(The)30 b(PEM)h(enco)s(ded)f(certi\014cate.)
25309
 
390 4445 y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM.)390
25310
 
4582 y Ff(\015ags)t FB(:)41 b(m)m(ust)30 b(b)s(e)g(zero)h(or)f(an)g
25311
 
(OR'd)g(sequence)h(of)f(gn)m(utls)p 2385 4582 V 41 w(certi\014cate)p
25312
 
2813 4582 V 42 w(imp)s(ort)p 3126 4582 V 39 w(\015ags.)390
25313
 
4719 y(This)50 b(function)g(will)g(con)m(v)m(ert)i(the)f(giv)m(en)g
 
25320
2016 y Ff(data)p FB(:)41 b(The)30 b(PEM)h(enco)s(ded)f(certi\014cate.)
 
25321
390 2156 y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM.)390
 
25322
2297 y Ff(\015ags)t FB(:)41 b(m)m(ust)30 b(b)s(e)g(zero)h(or)f(an)g
 
25323
(OR'd)g(sequence)h(of)f(gn)m(utls)p 2385 2297 V 41 w(certi\014cate)p
 
25324
2813 2297 V 42 w(imp)s(ort)p 3126 2297 V 39 w(\015ags.)390
 
25325
2437 y(This)50 b(function)g(will)g(con)m(v)m(ert)i(the)f(giv)m(en)g
25314
25326
(PEM)f(enco)s(ded)g(certi\014cate)j(list)e(to)g(the)g(nativ)m(e)390
25315
 
4829 y(gn)m(utls)p 636 4829 V 40 w(x509)p 859 4829 V
25316
 
42 w(crt)p 1012 4829 V 40 w(t)j(format.)109 b(The)53
 
25327
2546 y(gn)m(utls)p 636 2546 V 40 w(x509)p 859 2546 V
 
25328
42 w(crt)p 1012 2546 V 40 w(t)j(format.)109 b(The)53
25317
25329
b(output)g(will)g(b)s(e)g(stored)g(in)g Ft(certs)p FB(.)108
25318
 
b(They)53 b(will)h(b)s(e)390 4938 y(automatically)33
25319
 
b(initialized.)390 5076 y(If)25 b(the)h(Certi\014cate)h(is)f(PEM)g
 
25330
b(They)53 b(will)h(b)s(e)390 2656 y(automatically)33
 
25331
b(initialized.)390 2796 y(If)25 b(the)h(Certi\014cate)h(is)f(PEM)g
25320
25332
(enco)s(ded)f(it)h(should)f(ha)m(v)m(e)i(a)f(header)g(of)g
25321
25333
Ft(")p FB(X509)h(CER)-8 b(TIFICA)g(TE)p Ft(")p FB(,)390
25322
 
5185 y(or)30 b Ft(")p FB(CER)-8 b(TIFICA)g(TE)p Ft(")p
25323
 
FB(.)390 5322 y Fn(Returns:)40 b FB(the)31 b(n)m(um)m(b)s(er)e(of)i
 
25334
2905 y(or)30 b Ft(")p FB(CER)-8 b(TIFICA)g(TE)p Ft(")p
 
25335
FB(.)390 3045 y Fn(Returns:)40 b FB(the)31 b(n)m(um)m(b)s(er)e(of)i
25324
25336
(certi\014cates)h(read)e(or)g(a)h(negativ)m(e)i(error)d(v)-5
25325
 
b(alue.)p eop end
25326
 
%%Page: 215 221
25327
 
TeXDict begin 215 220 bop 150 -116 a FB(Chapter)30 b(9:)41
25328
 
b(F)-8 b(unction)31 b(Reference)2237 b(215)150 299 y
25329
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25330
 
w(crt)p 993 299 V 54 w(list)p 1211 299 V 54 w(v)m(erify)3350
25331
 
486 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_list_)q
25332
 
(veri)q(fy)f Fg(\()p Ff(const)31 b(gn)m(utls)p 2336 486
25333
 
28 4 v 40 w(x509)p 2559 486 V 42 w(crt)p 2712 486 V 40
25334
 
w(t)g(*)565 596 y Fe(cert_list)12 b Ff(,)33 b(in)m(t)e
25335
 
Fe(cert_list_length)12 b Ff(,)35 b(const)c(gn)m(utls)p
25336
 
2630 596 V 40 w(x509)p 2853 596 V 41 w(crt)p 3005 596
25337
 
V 41 w(t)f(*)h Fe(CA_list)12 b Ff(,)32 b(in)m(t)565 705
25338
 
y Fe(CA_list_length)12 b Ff(,)34 b(const)d(gn)m(utls)p
25339
 
1848 705 V 41 w(x509)p 2072 705 V 41 w(crl)p 2214 705
25340
 
V 40 w(t)g(*)g Fe(CRL_list)12 b Ff(,)32 b(in)m(t)565
25341
 
815 y Fe(CRL_list_length)12 b Ff(,)35 b(unsigned)29 b(in)m(t)i
25342
 
Fe(flags)12 b Ff(,)32 b(unsigned)d(in)m(t)i(*)f Fe(verify)12
25343
 
b Fg(\))390 925 y Ff(cert)p 547 925 V 41 w(list)r FB(:)41
25344
 
b(is)31 b(the)f(certi\014cate)j(list)e(to)g(b)s(e)e(v)m(eri\014ed)390
25345
 
1054 y Ff(cert)p 547 1054 V 41 w(list)p 709 1054 V 40
 
25337
b(alue.)150 3250 y Fv(gn)m(utls)p 483 3250 37 5 v 55
 
25338
w(x509)p 786 3250 V 54 w(crt)p 993 3250 V 54 w(list)p
 
25339
1211 3250 V 54 w(v)m(erify)3350 3453 y FB([F)d(unction])-3599
 
25340
b Fh(int)53 b(gnutls_x509_crt_list_)q(veri)q(fy)f Fg(\()p
 
25341
Ff(const)31 b(gn)m(utls)p 2336 3453 28 4 v 40 w(x509)p
 
25342
2559 3453 V 42 w(crt)p 2712 3453 V 40 w(t)g(*)565 3562
 
25343
y Fe(cert_list)12 b Ff(,)33 b(in)m(t)e Fe(cert_list_length)12
 
25344
b Ff(,)35 b(const)c(gn)m(utls)p 2630 3562 V 40 w(x509)p
 
25345
2853 3562 V 41 w(crt)p 3005 3562 V 41 w(t)f(*)h Fe(CA_list)12
 
25346
b Ff(,)32 b(in)m(t)565 3672 y Fe(CA_list_length)12 b
 
25347
Ff(,)34 b(const)d(gn)m(utls)p 1848 3672 V 41 w(x509)p
 
25348
2072 3672 V 41 w(crl)p 2214 3672 V 40 w(t)g(*)g Fe(CRL_list)12
 
25349
b Ff(,)32 b(in)m(t)565 3781 y Fe(CRL_list_length)12 b
 
25350
Ff(,)35 b(unsigned)29 b(in)m(t)i Fe(flags)12 b Ff(,)32
 
25351
b(unsigned)d(in)m(t)i(*)f Fe(verify)12 b Fg(\))390 3891
 
25352
y Ff(cert)p 547 3891 V 41 w(list)r FB(:)41 b(is)31 b(the)f
 
25353
(certi\014cate)j(list)e(to)g(b)s(e)e(v)m(eri\014ed)390
 
25354
4031 y Ff(cert)p 547 4031 V 41 w(list)p 709 4031 V 40
25346
25355
w(length)p FB(:)42 b(holds)29 b(the)i(n)m(um)m(b)s(er)e(of)i
25347
 
(certi\014cate)h(in)e(cert)p 2568 1054 V 41 w(list)390
25348
 
1184 y Ff(CA)p 530 1184 V 40 w(list)r FB(:)41 b(is)31
 
25356
(certi\014cate)h(in)e(cert)p 2568 4031 V 41 w(list)390
 
25357
4171 y Ff(CA)p 530 4171 V 40 w(list)r FB(:)41 b(is)31
25349
25358
b(the)f(CA)g(list)h(whic)m(h)f(will)h(b)s(e)f(used)f(in)i(v)m
25350
 
(eri\014cation)390 1314 y Ff(CA)p 530 1314 V 40 w(list)p
25351
 
691 1314 V 41 w(length)p FB(:)41 b(holds)30 b(the)g(n)m(um)m(b)s(er)f
25352
 
(of)i(CA)f(certi\014cate)i(in)e(CA)p 2697 1314 V 40 w(list)390
25353
 
1444 y Ff(CRL)p 586 1444 V 39 w(list)r FB(:)42 b(holds)30
25354
 
b(a)g(list)h(of)g(CRLs.)390 1574 y Ff(CRL)p 586 1574
25355
 
V 39 w(list)p 746 1574 V 41 w(length)p FB(:)41 b(the)31
25356
 
b(length)g(of)f(CRL)g(list.)390 1703 y Ff(\015ags)t FB(:)51
 
25359
(eri\014cation)390 4311 y Ff(CA)p 530 4311 V 40 w(list)p
 
25360
691 4311 V 41 w(length)p FB(:)41 b(holds)30 b(the)g(n)m(um)m(b)s(er)f
 
25361
(of)i(CA)f(certi\014cate)i(in)e(CA)p 2697 4311 V 40 w(list)390
 
25362
4451 y Ff(CRL)p 586 4451 V 39 w(list)r FB(:)42 b(holds)30
 
25363
b(a)g(list)h(of)g(CRLs.)390 4591 y Ff(CRL)p 586 4591
 
25364
V 39 w(list)p 746 4591 V 41 w(length)p FB(:)41 b(the)31
 
25365
b(length)g(of)f(CRL)g(list.)390 4731 y Ff(\015ags)t FB(:)51
25357
25366
b(Flags)37 b(that)f(ma)m(y)g(b)s(e)e(used)h(to)h(c)m(hange)h(the)e(v)m
25358
25367
(eri\014cation)i(algorithm.)57 b(Use)36 b(OR)f(of)h(the)390
25359
 
1813 y(gn)m(utls)p 636 1813 V 40 w(certi\014cate)p 1063
25360
 
1813 V 43 w(v)m(erify)p 1328 1813 V 40 w(\015ags)31 b(en)m(umerations.)
25361
 
390 1943 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g
25362
 
(certi\014cate)j(v)m(eri\014cation)f(output.)390 2073
25363
 
y(This)i(function)g(will)i(try)e(to)i(v)m(erify)f(the)g(giv)m(en)h
25364
 
(certi\014cate)h(list)e(and)f(return)g(its)h(status.)55
25365
 
b(Note)390 2182 y(that)42 b(expiration)g(and)e(activ)-5
25366
 
b(ation)44 b(dates)e(are)f(not)h(c)m(hec)m(k)m(ed)h(b)m(y)e(this)g
25367
 
(function,)j(y)m(ou)e(should)390 2292 y(c)m(hec)m(k)32
25368
 
b(them)e(using)g(the)h(appropriate)f(functions.)390 2421
25369
 
y(If)40 b(no)g(\015ags)g(are)h(sp)s(eci\014ed)f(\(0\),)k(this)c
25370
 
(function)g(will)g(use)g(the)h(basicConstrain)m(ts)g(\(2.5.29.19\))390
25371
 
2531 y(PKIX)d(extension.)66 b(This)38 b(means)g(that)i(only)e(a)h
25372
 
(certi\014cate)i(authorit)m(y)f(is)e(allo)m(w)m(ed)j(to)e(sign)g(a)390
25373
 
2641 y(certi\014cate.)390 2770 y(Y)-8 b(ou)23 b(m)m(ust)g(also)h(c)m
25374
 
(hec)m(k)g(the)f(p)s(eer's)g(name)g(in)f(order)g(to)i(c)m(hec)m(k)g(if)
25375
 
f(the)g(v)m(eri\014ed)g(certi\014cate)i(b)s(elongs)390
25376
 
2880 y(to)31 b(the)g(actual)g(p)s(eer.)390 3010 y(The)i(certi\014cate)j
25377
 
(v)m(eri\014cation)f(output)f(will)g(b)s(e)f(put)g(in)g
25378
 
Ft(verify)f FB(and)h(will)h(b)s(e)f(one)h(or)g(more)g(of)390
25379
 
3119 y(the)28 b(gn)m(utls)p 790 3119 V 40 w(certi\014cate)p
25380
 
1217 3119 V 42 w(status)p 1497 3119 V 41 w(t)g(en)m(umerated)g(elemen)m
 
25368
4841 y(gn)m(utls)p 636 4841 V 40 w(certi\014cate)p 1063
 
25369
4841 V 43 w(v)m(erify)p 1328 4841 V 40 w(\015ags)31 b(en)m(umerations.)
 
25370
390 4981 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g
 
25371
(certi\014cate)j(v)m(eri\014cation)f(output.)390 5121
 
25372
y(This)i(function)g(will)h(try)g(to)g(v)m(erify)g(the)g(giv)m(en)h
 
25373
(certi\014cate)h(list)e(and)f(return)g(its)h(status.)54
 
25374
b(If)34 b(no)390 5230 y(\015ags)j(are)h(sp)s(eci\014ed)e(\(0\),)k(this)
 
25375
d(function)f(will)i(use)e(the)i(basicConstrain)m(ts)f(\(2.5.29.19\))k
 
25376
(PKIX)390 5340 y(extension.)f(This)25 b(means)g(that)i(only)f(a)g
 
25377
(certi\014cate)h(authorit)m(y)g(is)f(allo)m(w)m(ed)h(to)g(sign)f(a)g
 
25378
(certi\014cate.)p eop end
 
25379
%%Page: 216 222
 
25380
TeXDict begin 216 221 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25381
b(F)-8 b(unction)31 b(Reference)2237 b(216)390 299 y(Y)-8
 
25382
b(ou)23 b(m)m(ust)g(also)h(c)m(hec)m(k)g(the)f(p)s(eer's)g(name)g(in)f
 
25383
(order)g(to)i(c)m(hec)m(k)g(if)f(the)g(v)m(eri\014ed)g(certi\014cate)i
 
25384
(b)s(elongs)390 408 y(to)31 b(the)g(actual)g(p)s(eer.)390
 
25385
548 y(The)i(certi\014cate)j(v)m(eri\014cation)f(output)f(will)g(b)s(e)f
 
25386
(put)g(in)g Ft(verify)f FB(and)h(will)h(b)s(e)f(one)h(or)g(more)g(of)
 
25387
390 658 y(the)28 b(gn)m(utls)p 790 658 28 4 v 40 w(certi\014cate)p
 
25388
1217 658 V 42 w(status)p 1497 658 V 41 w(t)g(en)m(umerated)g(elemen)m
25381
25389
(ts)h(bit)m(wise)f(or'd.)40 b(F)-8 b(or)28 b(a)g(more)g(detailed)390
25382
 
3229 y(v)m(eri\014cation)k(status)f(use)f Ft(gnutls_x509_crt_verify\()o
25383
 
(\))24 b FB(p)s(er)30 b(list)h(elemen)m(t.)390 3359 y
25384
 
Fn(GNUTLS)p 777 3359 28 5 v 40 w(CER)-8 b(T)p 1067 3359
 
25390
768 y(v)m(eri\014cation)k(status)f(use)f Ft(gnutls_x509_crt_verify\()o
 
25391
(\))24 b FB(p)s(er)30 b(list)h(elemen)m(t.)390 907 y
 
25392
Fn(GNUTLS)p 777 907 28 5 v 40 w(CER)-8 b(T)p 1067 907
25385
25393
V 40 w(INV)e(ALID:)29 b FB(the)i(certi\014cate)h(c)m(hain)f(is)g(not)f
25386
 
(v)-5 b(alid.)390 3489 y Fn(GNUTLS)p 777 3489 V 40 w(CER)d(T)p
25387
 
1067 3489 V 40 w(REV)m(OKED:)30 b FB(a)h(certi\014cate)h(in)e(the)h(c)m
25388
 
(hain)f(has)h(b)s(een)e(rev)m(ok)m(ed.)390 3618 y Fn(Returns:)73
 
25394
(v)-5 b(alid.)390 1047 y Fn(GNUTLS)p 777 1047 V 40 w(CER)d(T)p
 
25395
1067 1047 V 40 w(REV)m(OKED:)30 b FB(a)h(certi\014cate)h(in)e(the)h(c)m
 
25396
(hain)f(has)h(b)s(een)e(rev)m(ok)m(ed.)390 1187 y Fn(Returns:)73
25389
25397
b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42 b FB(is)47
25390
25398
b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
25391
 
3728 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
25392
 
b(in)f(case)h(of)g(an)f(error.)150 3918 y Fv(gn)m(utls)p
25393
 
483 3918 37 5 v 55 w(x509)p 786 3918 V 54 w(crt)p 993
25394
 
3918 V 54 w(prin)m(t)3350 4105 y FB([F)-8 b(unction])-3599
 
25399
1297 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
 
25400
b(in)f(case)h(of)g(an)f(error.)150 1501 y Fv(gn)m(utls)p
 
25401
483 1501 37 5 v 55 w(x509)p 786 1501 V 54 w(crt)p 993
 
25402
1501 V 54 w(prin)m(t)3350 1704 y FB([F)-8 b(unction])-3599
25395
25403
b Fh(int)53 b(gnutls_x509_crt_print)f Fg(\()p Ff(gn)m(utls)p
25396
 
1784 4105 28 4 v 41 w(x509)p 2008 4105 V 41 w(crt)p 2160
25397
 
4105 V 41 w(t)30 b Fe(cert)12 b Ff(,)565 4215 y(gn)m(utls)p
25398
 
811 4215 V 41 w(certi\014cate)p 1239 4215 V 42 w(prin)m(t)p
25399
 
1476 4215 V 39 w(formats)p 1816 4215 V 41 w(t)30 b Fe(format)12
25400
 
b Ff(,)32 b(gn)m(utls)p 2543 4215 V 41 w(datum)p 2842
25401
 
4215 V 39 w(t)f(*)g Fe(out)12 b Fg(\))390 4324 y Ff(cert)r
 
25404
1784 1704 28 4 v 41 w(x509)p 2008 1704 V 41 w(crt)p 2160
 
25405
1704 V 41 w(t)30 b Fe(cert)12 b Ff(,)565 1813 y(gn)m(utls)p
 
25406
811 1813 V 41 w(certi\014cate)p 1239 1813 V 42 w(prin)m(t)p
 
25407
1476 1813 V 39 w(formats)p 1816 1813 V 41 w(t)30 b Fe(format)12
 
25408
b Ff(,)32 b(gn)m(utls)p 2543 1813 V 41 w(datum)p 2842
 
25409
1813 V 39 w(t)f(*)g Fe(out)12 b Fg(\))390 1923 y Ff(cert)r
25402
25410
FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(prin)m(ted)390
25403
 
4454 y Ff(format)r FB(:)41 b(Indicate)31 b(the)g(format)f(to)h(use)390
25404
 
4584 y Ff(out)r FB(:)41 b(Newly)31 b(allo)s(cated)h(datum)e(with)g
25405
 
(zero)h(terminated)g(string.)390 4714 y(This)f(function)g(will)g(prett)
 
25411
2063 y Ff(format)r FB(:)41 b(Indicate)31 b(the)g(format)f(to)h(use)390
 
25412
2203 y Ff(out)r FB(:)41 b(Newly)31 b(allo)s(cated)h(datum)e(with)g
 
25413
(zero)h(terminated)g(string.)390 2343 y(This)f(function)g(will)g(prett)
25406
25414
m(y)h(prin)m(t)f(a)h(X.509)h(certi\014cate,)h(suitable)e(for)f(displa)m
25407
 
(y)h(to)g(a)f(h)m(uman.)390 4844 y(If)45 b(the)h(format)g(is)f
 
25415
(y)h(to)g(a)f(h)m(uman.)390 2482 y(If)45 b(the)h(format)g(is)f
25408
25416
Ft(GNUTLS_CRT_PRINT_FULL)40 b FB(then)45 b(all)i(\014elds)e(of)g(the)h
25409
 
(certi\014cate)i(will)e(b)s(e)390 4953 y(output,)i(on)d(m)m(ultiple)g
 
25417
(certi\014cate)i(will)e(b)s(e)390 2592 y(output,)i(on)d(m)m(ultiple)g
25410
25418
(lines.)85 b(The)44 b Ft(GNUTLS_CRT_PRINT_ONELINE)38
25411
 
b FB(format)45 b(will)g(generate)390 5063 y(one)31 b(line)f(with)g
 
25419
b FB(format)45 b(will)g(generate)390 2702 y(one)31 b(line)f(with)g
25412
25420
(some)h(selected)h(\014elds,)e(whic)m(h)g(is)h(useful)e(for)h(logging)j
25413
 
(purp)s(oses.)390 5193 y(The)d(output)g Ft(out)f FB(needs)h(to)h(b)s(e)
 
25421
(purp)s(oses.)390 2842 y(The)d(output)g Ft(out)f FB(needs)h(to)h(b)s(e)
25414
25422
f(deallo)s(cate)j(using)d Ft(gnutls_free\(\))p FB(.)390
25415
 
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25416
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25423
2981 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25424
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25425
b(alue.)150 3186 y Fv(gn)m(utls)p 483 3186 37 5 v 55
 
25426
w(x509)p 786 3186 V 54 w(crt)p 993 3186 V 54 w(set)p
 
25427
1199 3186 V 54 w(activ)e(ation)p 1779 3186 V 53 w(time)3350
 
25428
3388 y FB([F)f(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_a)q
 
25429
(ctiv)q(ati)q(on_)q(tim)q(e)e Fg(\()p Ff(gn)m(utls)p
 
25430
2516 3388 28 4 v 41 w(x509)p 2740 3388 V 41 w(crt)p 2892
 
25431
3388 V 41 w(t)565 3498 y Fe(cert)12 b Ff(,)31 b(time)p
 
25432
1023 3498 V 41 w(t)g Fe(act_time)12 b Fg(\))390 3607
 
25433
y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m(yp)s(e)h
 
25434
Ft(gnutls_x509_crt_t)390 3747 y Ff(act)p 516 3747 V 41
 
25435
w(time)5 b FB(:)42 b(The)30 b(actual)h(time)390 3887
 
25436
y(This)f(function)g(will)g(set)h(the)g(time)g(this)f(Certi\014cate)i(w)
 
25437
m(as)f(or)f(will)h(b)s(e)e(activ)-5 b(ated.)390 4027
 
25438
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25439
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25440
b(alue.)150 4232 y Fv(gn)m(utls)p 483 4232 37 5 v 55
 
25441
w(x509)p 786 4232 V 54 w(crt)p 993 4232 V 54 w(set)p
 
25442
1199 4232 V 54 w(authorit)m(y)p 1752 4232 V 53 w(k)m(ey)p
 
25443
1988 4232 V 54 w(id)3350 4434 y FB([F)d(unction])-3599
 
25444
b Fh(int)53 b(gnutls_x509_crt_set_a)q(utho)q(rit)q(y_k)q(ey_)q(id)f
 
25445
Fg(\()p Ff(gn)m(utls)p 2569 4434 28 4 v 40 w(x509)p 2792
 
25446
4434 V 42 w(crt)p 2945 4434 V 40 w(t)565 4544 y Fe(cert)12
 
25447
b Ff(,)31 b(const)g(v)m(oid)g(*)g Fe(id)12 b Ff(,)31
 
25448
b(size)p 1671 4544 V 41 w(t)f Fe(id_size)12 b Fg(\))390
 
25449
4653 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m(yp)s(e)h
 
25450
Ft(gnutls_x509_crt_t)390 4793 y Ff(id)t FB(:)40 b(The)30
 
25451
b(k)m(ey)h(ID)390 4933 y Ff(id)p 472 4933 V 40 w(size)5
 
25452
b FB(:)41 b(Holds)31 b(the)g(size)g(of)f(the)h(serial)g(\014eld.)390
 
25453
5073 y(This)37 b(function)g(will)h(set)g(the)g(X.509)h(certi\014cate's)
 
25454
h(authorit)m(y)f(k)m(ey)f(ID)g(extension.)63 b(Only)37
 
25455
b(the)390 5182 y(k)m(eyIden)m(ti\014er)31 b(\014eld)f(can)h(b)s(e)e
 
25456
(set)i(with)f(this)h(function.)390 5322 y Fn(Returns:)36
 
25457
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
25458
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25417
25459
b(alue.)p eop end
25418
 
%%Page: 216 222
25419
 
TeXDict begin 216 221 bop 150 -116 a FB(Chapter)30 b(9:)41
25420
 
b(F)-8 b(unction)31 b(Reference)2237 b(216)150 299 y
 
25460
%%Page: 217 223
 
25461
TeXDict begin 217 222 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25462
b(F)-8 b(unction)31 b(Reference)2237 b(217)150 299 y
25421
25463
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25422
 
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(activ)-7
25423
 
b(ation)p 1779 299 V 53 w(time)3350 517 y FB([F)f(unction])-3599
25424
 
b Fh(int)53 b(gnutls_x509_crt_set_a)q(ctiv)q(ati)q(on_)q(tim)q(e)e
25425
 
Fg(\()p Ff(gn)m(utls)p 2516 517 28 4 v 41 w(x509)p 2740
25426
 
517 V 41 w(crt)p 2892 517 V 41 w(t)565 626 y Fe(cert)12
25427
 
b Ff(,)31 b(time)p 1023 626 V 41 w(t)g Fe(act_time)12
25428
 
b Fg(\))390 736 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
25429
 
(yp)s(e)h Ft(gnutls_x509_crt_t)390 891 y Ff(act)p 516
25430
 
891 V 41 w(time)5 b FB(:)42 b(The)30 b(actual)h(time)390
25431
 
1047 y(This)f(function)g(will)g(set)h(the)g(time)g(this)f
25432
 
(Certi\014cate)i(w)m(as)f(or)f(will)h(b)s(e)e(activ)-5
25433
 
b(ated.)390 1202 y Fn(Returns:)36 b FB(On)20 b(success,)j
25434
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25435
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 1422 y Fv(gn)m(utls)p
25436
 
483 1422 37 5 v 55 w(x509)p 786 1422 V 54 w(crt)p 993
25437
 
1422 V 54 w(set)p 1199 1422 V 54 w(authorit)m(y)p 1752
25438
 
1422 V 53 w(k)m(ey)p 1988 1422 V 54 w(id)3350 1640 y
25439
 
FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_a)q(utho)q
25440
 
(rit)q(y_k)q(ey_)q(id)f Fg(\()p Ff(gn)m(utls)p 2569 1640
25441
 
28 4 v 40 w(x509)p 2792 1640 V 42 w(crt)p 2945 1640 V
25442
 
40 w(t)565 1750 y Fe(cert)12 b Ff(,)31 b(const)g(v)m(oid)g(*)g
25443
 
Fe(id)12 b Ff(,)31 b(size)p 1671 1750 V 41 w(t)f Fe(id_size)12
25444
 
b Fg(\))390 1859 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
25445
 
(yp)s(e)h Ft(gnutls_x509_crt_t)390 2015 y Ff(id)t FB(:)40
25446
 
b(The)30 b(k)m(ey)h(ID)390 2170 y Ff(id)p 472 2170 V
25447
 
40 w(size)5 b FB(:)41 b(Holds)31 b(the)g(size)g(of)f(the)h(serial)g
25448
 
(\014eld.)390 2326 y(This)37 b(function)g(will)h(set)g(the)g(X.509)h
25449
 
(certi\014cate's)h(authorit)m(y)f(k)m(ey)f(ID)g(extension.)63
25450
 
b(Only)37 b(the)390 2435 y(k)m(eyIden)m(ti\014er)31 b(\014eld)f(can)h
25451
 
(b)s(e)e(set)i(with)f(this)h(function.)390 2591 y Fn(Returns:)36
25452
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25453
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25454
 
b(alue.)150 2811 y Fv(gn)m(utls)p 483 2811 37 5 v 55
25455
 
w(x509)p 786 2811 V 54 w(crt)p 993 2811 V 54 w(set)p
25456
 
1199 2811 V 54 w(basic)p 1518 2811 V 54 w(constrain)m(ts)3350
25457
 
3029 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_b)q
25458
 
(asic)q(_co)q(nst)q(rai)q(nts)f Fg(\()p Ff(gn)m(utls)p
25459
 
2621 3029 28 4 v 41 w(x509)p 2845 3029 V 41 w(crt)p 2997
25460
 
3029 V 40 w(t)565 3138 y Fe(crt)12 b Ff(,)31 b(unsigned)e(in)m(t)i
25461
 
Fe(ca)12 b Ff(,)31 b(in)m(t)g Fe(pathLenConstraint)12
25462
 
b Fg(\))390 3248 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
25463
 
(yp)s(e)f Ft(gnutls_x509_crt_t)390 3404 y Ff(ca)p FB(:)42
25464
 
b(true\(1\))31 b(or)f(false\(0\).)43 b(Dep)s(ending)30
25465
 
b(on)g(the)g(Certi\014cate)i(authorit)m(y)f(status.)390
25466
 
3559 y Ff(pathLenConstrain)m(t)r FB(:)42 b(non-negativ)m(e)32
 
25464
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(basic)p
 
25465
1518 299 V 54 w(constrain)m(ts)3350 492 y FB([F)-8 b(unction])-3599
 
25466
b Fh(int)53 b(gnutls_x509_crt_set_b)q(asic)q(_co)q(nst)q(rai)q(nts)f
 
25467
Fg(\()p Ff(gn)m(utls)p 2621 492 28 4 v 41 w(x509)p 2845
 
25468
492 V 41 w(crt)p 2997 492 V 40 w(t)565 602 y Fe(crt)12
 
25469
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(ca)12 b Ff(,)31 b(in)m(t)g
 
25470
Fe(pathLenConstraint)12 b Fg(\))390 711 y Ff(crt)r FB(:)41
 
25471
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390
 
25472
844 y Ff(ca)p FB(:)42 b(true\(1\))31 b(or)f(false\(0\).)43
 
25473
b(Dep)s(ending)30 b(on)g(the)g(Certi\014cate)i(authorit)m(y)f(status.)
 
25474
390 977 y Ff(pathLenConstrain)m(t)r FB(:)42 b(non-negativ)m(e)32
25467
25475
b(v)-5 b(alues)31 b(indicate)h(maxim)m(um)f(length)g(of)g(path,)g(and)f
25468
 
(neg-)390 3669 y(ativ)m(e)i(v)-5 b(alues)31 b(indicate)g(that)g(the)g
 
25476
(neg-)390 1086 y(ativ)m(e)i(v)-5 b(alues)31 b(indicate)g(that)g(the)g
25469
25477
(pathLenConstrain)m(ts)f(\014eld)g(should)f(not)i(b)s(e)f(presen)m(t.)
25470
 
390 3824 y(This)g(function)g(will)g(set)h(the)g(basicConstrain)m(ts)g
25471
 
(certi\014cate)h(extension.)390 3980 y Fn(Returns:)k
 
25478
390 1219 y(This)g(function)g(will)g(set)h(the)g(basicConstrain)m(ts)g
 
25479
(certi\014cate)h(extension.)390 1352 y Fn(Returns:)k
25472
25480
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25473
25481
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25474
 
b(alue.)150 4200 y Fv(gn)m(utls)p 483 4200 37 5 v 55
25475
 
w(x509)p 786 4200 V 54 w(crt)p 993 4200 V 54 w(set)p
25476
 
1199 4200 V 54 w(ca)p 1368 4200 V 53 w(status)3350 4418
 
25482
b(alue.)150 1548 y Fv(gn)m(utls)p 483 1548 37 5 v 55
 
25483
w(x509)p 786 1548 V 54 w(crt)p 993 1548 V 54 w(set)p
 
25484
1199 1548 V 54 w(ca)p 1368 1548 V 53 w(status)3350 1741
25477
25485
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_c)q(a_st)q
25478
 
(atu)q(s)e Fg(\()p Ff(gn)m(utls)p 2202 4418 28 4 v 41
25479
 
w(x509)p 2426 4418 V 42 w(crt)p 2579 4418 V 40 w(t)31
25480
 
b Fe(crt)12 b Ff(,)565 4527 y(unsigned)29 b(in)m(t)i
25481
 
Fe(ca)12 b Fg(\))390 4637 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h
25482
 
(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390 4792 y Ff(ca)p
 
25486
(atu)q(s)e Fg(\()p Ff(gn)m(utls)p 2202 1741 28 4 v 41
 
25487
w(x509)p 2426 1741 V 42 w(crt)p 2579 1741 V 40 w(t)31
 
25488
b Fe(crt)12 b Ff(,)565 1850 y(unsigned)29 b(in)m(t)i
 
25489
Fe(ca)12 b Fg(\))390 1960 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h
 
25490
(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390 2093 y Ff(ca)p
25483
25491
FB(:)42 b(true\(1\))31 b(or)f(false\(0\).)43 b(Dep)s(ending)30
25484
25492
b(on)g(the)g(Certi\014cate)i(authorit)m(y)f(status.)390
25485
 
4948 y(This)i(function)g(will)h(set)g(the)g(basicConstrain)m(ts)g
 
25493
2225 y(This)i(function)g(will)h(set)g(the)g(basicConstrain)m(ts)g
25486
25494
(certi\014cate)i(extension.)51 b(Use)34 b Ft(gnutls_x509_)390
25487
 
5057 y(crt_set_basic_constraint)o(s\(\))29 b FB(if)36
 
25495
2335 y(crt_set_basic_constraint)o(s\(\))29 b FB(if)36
25488
25496
b(y)m(ou)f(w)m(an)m(t)i(to)f(con)m(trol)h(the)f(pathLenConstrain)m(t)f
25489
 
(\014eld)390 5167 y(to)s(o.)390 5322 y Fn(Returns:)h
 
25497
(\014eld)390 2445 y(to)s(o.)390 2577 y Fn(Returns:)h
25490
25498
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25491
25499
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25492
 
b(alue.)p eop end
25493
 
%%Page: 217 223
25494
 
TeXDict begin 217 222 bop 150 -116 a FB(Chapter)30 b(9:)41
25495
 
b(F)-8 b(unction)31 b(Reference)2237 b(217)150 299 y
25496
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25497
 
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(crl)p 1392
25498
 
299 V 54 w(dist)p 1644 299 V 54 w(p)s(oin)m(ts2)3350
25499
 
498 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_c)q
25500
 
(rl_d)q(ist)q(_po)q(int)q(s2)f Fg(\()p Ff(gn)m(utls)p
25501
 
2569 498 28 4 v 40 w(x509)p 2792 498 V 42 w(crt)p 2945
25502
 
498 V 40 w(t)565 608 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p
25503
 
1035 608 V 41 w(x509)p 1259 608 V 41 w(sub)5 b(ject)p
25504
 
1586 608 V 40 w(alt)p 1731 608 V 41 w(name)p 1984 608
25505
 
V 40 w(t)31 b Fe(type)12 b Ff(,)31 b(const)g(v)m(oid)g(*)f
25506
 
Fe(data)12 b Ff(,)32 b(unsigned)d(in)m(t)565 717 y Fe(data_size)12
25507
 
b Ff(,)33 b(unsigned)c(in)m(t)i Fe(reason_flags)12 b
25508
 
Fg(\))390 827 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s
25509
 
(e)f Ft(gnutls_x509_crt_t)390 963 y Ff(t)m(yp)s(e)5 b
25510
 
FB(:)41 b(is)30 b(one)h(of)g(the)f(gn)m(utls)p 1399 963
25511
 
V 41 w(x509)p 1623 963 V 41 w(sub)5 b(ject)p 1950 963
25512
 
V 40 w(alt)p 2095 963 V 41 w(name)p 2348 963 V 40 w(t)31
25513
 
b(en)m(umerations)390 1100 y Ff(data)p FB(:)41 b(The)30
25514
 
b(data)h(to)g(b)s(e)f(set)390 1237 y Ff(data)p 572 1237
25515
 
V 41 w(size)5 b FB(:)41 b(The)30 b(data)h(size)390 1374
25516
 
y Ff(reason)p 649 1374 V 40 w(\015ags)t FB(:)41 b(rev)m(o)s(cation)32
25517
 
b(reasons)390 1511 y(This)e(function)g(will)g(set)h(the)g(CRL)f
 
25500
b(alue.)150 2773 y Fv(gn)m(utls)p 483 2773 37 5 v 55
 
25501
w(x509)p 786 2773 V 54 w(crt)p 993 2773 V 54 w(set)p
 
25502
1199 2773 V 54 w(crl)p 1392 2773 V 54 w(dist)p 1644 2773
 
25503
V 54 w(p)s(oin)m(ts2)3350 2966 y FB([F)d(unction])-3599
 
25504
b Fh(int)53 b(gnutls_x509_crt_set_c)q(rl_d)q(ist)q(_po)q(int)q(s2)f
 
25505
Fg(\()p Ff(gn)m(utls)p 2569 2966 28 4 v 40 w(x509)p 2792
 
25506
2966 V 42 w(crt)p 2945 2966 V 40 w(t)565 3076 y Fe(crt)12
 
25507
b Ff(,)31 b(gn)m(utls)p 1035 3076 V 41 w(x509)p 1259
 
25508
3076 V 41 w(sub)5 b(ject)p 1586 3076 V 40 w(alt)p 1731
 
25509
3076 V 41 w(name)p 1984 3076 V 40 w(t)31 b Fe(type)12
 
25510
b Ff(,)31 b(const)g(v)m(oid)g(*)f Fe(data)12 b Ff(,)32
 
25511
b(unsigned)d(in)m(t)565 3185 y Fe(data_size)12 b Ff(,)33
 
25512
b(unsigned)c(in)m(t)i Fe(reason_flags)12 b Fg(\))390
 
25513
3295 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
 
25514
Ft(gnutls_x509_crt_t)390 3428 y Ff(t)m(yp)s(e)5 b FB(:)41
 
25515
b(is)30 b(one)h(of)g(the)f(gn)m(utls)p 1399 3428 V 41
 
25516
w(x509)p 1623 3428 V 41 w(sub)5 b(ject)p 1950 3428 V
 
25517
40 w(alt)p 2095 3428 V 41 w(name)p 2348 3428 V 40 w(t)31
 
25518
b(en)m(umerations)390 3560 y Ff(data)p FB(:)41 b(The)30
 
25519
b(data)h(to)g(b)s(e)f(set)390 3693 y Ff(data)p 572 3693
 
25520
V 41 w(size)5 b FB(:)41 b(The)30 b(data)h(size)390 3826
 
25521
y Ff(reason)p 649 3826 V 40 w(\015ags)t FB(:)41 b(rev)m(o)s(cation)32
 
25522
b(reasons)390 3959 y(This)e(function)g(will)g(set)h(the)g(CRL)f
25518
25523
(distribution)f(p)s(oin)m(ts)h(certi\014cate)j(extension.)390
25519
 
1647 y Fn(Returns:)j FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25524
4091 y Fn(Returns:)j FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25520
25525
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25521
 
b(alue.)390 1784 y Fn(Since:)41 b FB(2.6.0)150 1986 y
25522
 
Fv(gn)m(utls)p 483 1986 37 5 v 55 w(x509)p 786 1986 V
25523
 
54 w(crt)p 993 1986 V 54 w(set)p 1199 1986 V 54 w(crl)p
25524
 
1392 1986 V 54 w(dist)p 1644 1986 V 54 w(p)s(oin)m(ts)3350
25525
 
2185 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_c)q
 
25526
b(alue.)390 4224 y Fn(Since:)41 b FB(2.6.0)150 4420 y
 
25527
Fv(gn)m(utls)p 483 4420 37 5 v 55 w(x509)p 786 4420 V
 
25528
54 w(crt)p 993 4420 V 54 w(set)p 1199 4420 V 54 w(crl)p
 
25529
1392 4420 V 54 w(dist)p 1644 4420 V 54 w(p)s(oin)m(ts)3350
 
25530
4613 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_c)q
25526
25531
(rl_d)q(ist)q(_po)q(int)q(s)e Fg(\()p Ff(gn)m(utls)p
25527
 
2516 2185 28 4 v 41 w(x509)p 2740 2185 V 41 w(crt)p 2892
25528
 
2185 V 41 w(t)30 b Fe(crt)12 b Ff(,)565 2294 y(gn)m(utls)p
25529
 
811 2294 V 41 w(x509)p 1035 2294 V 41 w(sub)5 b(ject)p
25530
 
1362 2294 V 40 w(alt)p 1507 2294 V 41 w(name)p 1760 2294
 
25532
2516 4613 28 4 v 41 w(x509)p 2740 4613 V 41 w(crt)p 2892
 
25533
4613 V 41 w(t)30 b Fe(crt)12 b Ff(,)565 4723 y(gn)m(utls)p
 
25534
811 4723 V 41 w(x509)p 1035 4723 V 41 w(sub)5 b(ject)p
 
25535
1362 4723 V 40 w(alt)p 1507 4723 V 41 w(name)p 1760 4723
25531
25536
V 40 w(t)31 b Fe(type)12 b Ff(,)31 b(const)g(v)m(oid)g(*)f
25532
 
Fe(data_string)12 b Ff(,)34 b(unsigned)565 2404 y(in)m(t)d
25533
 
Fe(reason_flags)12 b Fg(\))390 2513 y Ff(crt)r FB(:)41
25534
 
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390
25535
 
2650 y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30 b(one)h(of)g(the)f(gn)m(utls)p
25536
 
1399 2650 V 41 w(x509)p 1623 2650 V 41 w(sub)5 b(ject)p
25537
 
1950 2650 V 40 w(alt)p 2095 2650 V 41 w(name)p 2348 2650
25538
 
V 40 w(t)31 b(en)m(umerations)390 2787 y Ff(data)p 572
25539
 
2787 V 41 w(string)8 b FB(:)40 b(The)30 b(data)h(to)g(b)s(e)f(set)390
25540
 
2924 y Ff(reason)p 649 2924 V 40 w(\015ags)t FB(:)41
25541
 
b(rev)m(o)s(cation)32 b(reasons)390 3061 y(This)e(function)g(will)g
25542
 
(set)h(the)g(CRL)f(distribution)f(p)s(oin)m(ts)h(certi\014cate)j
25543
 
(extension.)390 3197 y Fn(Returns:)j FB(On)20 b(success,)j
25544
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25545
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3399 y Fv(gn)m(utls)p
25546
 
483 3399 37 5 v 55 w(x509)p 786 3399 V 54 w(crt)p 993
25547
 
3399 V 54 w(set)p 1199 3399 V 54 w(crq)3350 3598 y FB([F)d(unction])
25548
 
-3599 b Fh(int)53 b(gnutls_x509_crt_set_c)q(rq)f Fg(\()p
25549
 
Ff(gn)m(utls)p 1889 3598 28 4 v 40 w(x509)p 2112 3598
25550
 
V 42 w(crt)p 2265 3598 V 40 w(t)31 b Fe(crt)12 b Ff(,)565
25551
 
3708 y(gn)m(utls)p 811 3708 V 41 w(x509)p 1035 3708 V
25552
 
41 w(crq)p 1200 3708 V 40 w(t)31 b Fe(crq)12 b Fg(\))390
25553
 
3817 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
25554
 
Ft(gnutls_x509_crt_t)390 3954 y Ff(crq)r FB(:)41 b(holds)30
25555
 
b(a)g(certi\014cate)j(request)390 4091 y(This)43 b(function)h(will)h
25556
 
(set)f(the)h(name)f(and)g(public)f(parameters)i(from)e(the)i(giv)m(en)g
25557
 
(certi\014cate)390 4200 y(request)30 b(to)i(the)e(certi\014cate.)43
25558
 
b(Only)30 b(RSA)g(k)m(eys)h(are)f(curren)m(tly)h(supp)s(orted.)390
25559
 
4337 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25537
Fe(data_string)12 b Ff(,)34 b(unsigned)565 4832 y(in)m(t)d
 
25538
Fe(reason_flags)12 b Fg(\))390 4942 y Ff(crt)r FB(:)41
 
25539
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390
 
25540
5075 y Ff(t)m(yp)s(e)5 b FB(:)41 b(is)30 b(one)h(of)g(the)f(gn)m(utls)p
 
25541
1399 5075 V 41 w(x509)p 1623 5075 V 41 w(sub)5 b(ject)p
 
25542
1950 5075 V 40 w(alt)p 2095 5075 V 41 w(name)p 2348 5075
 
25543
V 40 w(t)31 b(en)m(umerations)390 5207 y Ff(data)p 572
 
25544
5207 V 41 w(string)8 b FB(:)40 b(The)30 b(data)h(to)g(b)s(e)f(set)390
 
25545
5340 y Ff(reason)p 649 5340 V 40 w(\015ags)t FB(:)41
 
25546
b(rev)m(o)s(cation)32 b(reasons)p eop end
 
25547
%%Page: 218 224
 
25548
TeXDict begin 218 223 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25549
b(F)-8 b(unction)31 b(Reference)2237 b(218)390 299 y(This)30
 
25550
b(function)g(will)g(set)h(the)g(CRL)f(distribution)f(p)s(oin)m(ts)h
 
25551
(certi\014cate)j(extension.)390 431 y Fn(Returns:)j FB(On)20
 
25552
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
 
25553
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 626 y Fv(gn)m(utls)p
 
25554
483 626 37 5 v 55 w(x509)p 786 626 V 54 w(crt)p 993 626
 
25555
V 54 w(set)p 1199 626 V 54 w(crq)3350 818 y FB([F)d(unction])-3599
 
25556
b Fh(int)53 b(gnutls_x509_crt_set_c)q(rq)f Fg(\()p Ff(gn)m(utls)p
 
25557
1889 818 28 4 v 40 w(x509)p 2112 818 V 42 w(crt)p 2265
 
25558
818 V 40 w(t)31 b Fe(crt)12 b Ff(,)565 927 y(gn)m(utls)p
 
25559
811 927 V 41 w(x509)p 1035 927 V 41 w(crq)p 1200 927
 
25560
V 40 w(t)31 b Fe(crq)12 b Fg(\))390 1037 y Ff(crt)r FB(:)41
 
25561
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390
 
25562
1169 y Ff(crq)r FB(:)41 b(holds)30 b(a)g(certi\014cate)j(request)390
 
25563
1301 y(This)43 b(function)h(will)h(set)f(the)h(name)f(and)g(public)f
 
25564
(parameters)i(from)e(the)i(giv)m(en)g(certi\014cate)390
 
25565
1411 y(request)30 b(to)i(the)e(certi\014cate.)43 b(Only)30
 
25566
b(RSA)g(k)m(eys)h(are)f(curren)m(tly)h(supp)s(orted.)390
 
25567
1543 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25560
25568
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25561
 
b(alue.)150 4539 y Fv(gn)m(utls)p 483 4539 37 5 v 55
25562
 
w(x509)p 786 4539 V 54 w(crt)p 993 4539 V 54 w(set)p
25563
 
1199 4539 V 54 w(dn)p 1389 4539 V 54 w(b)m(y)p 1573 4539
25564
 
V 54 w(oid)3350 4738 y FB([F)d(unction])-3599 b Fh(int)53
 
25569
b(alue.)150 1738 y Fv(gn)m(utls)p 483 1738 37 5 v 55
 
25570
w(x509)p 786 1738 V 54 w(crt)p 993 1738 V 54 w(set)p
 
25571
1199 1738 V 54 w(dn)p 1389 1738 V 54 w(b)m(y)p 1573 1738
 
25572
V 54 w(oid)3350 1930 y FB([F)d(unction])-3599 b Fh(int)53
25565
25573
b(gnutls_x509_crt_set_d)q(n_by)q(_oi)q(d)e Fg(\()p Ff(gn)m(utls)p
25566
 
2202 4738 28 4 v 41 w(x509)p 2426 4738 V 42 w(crt)p 2579
25567
 
4738 V 40 w(t)31 b Fe(crt)12 b Ff(,)31 b(const)565 4847
 
25574
2202 1930 28 4 v 41 w(x509)p 2426 1930 V 42 w(crt)p 2579
 
25575
1930 V 40 w(t)31 b Fe(crt)12 b Ff(,)31 b(const)565 2039
25568
25576
y(c)m(har)g(*)g Fe(oid)12 b Ff(,)31 b(unsigned)e(in)m(t)i
25569
25577
Fe(raw_flag)12 b Ff(,)32 b(const)f(v)m(oid)g(*)g Fe(name)12
25570
 
b Ff(,)31 b(unsigned)f(in)m(t)565 4957 y Fe(sizeof_name)12
25571
 
b Fg(\))390 5066 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
25572
 
(yp)s(e)f Ft(gnutls_x509_crt_t)390 5203 y Ff(oid)t FB(:)40
 
25578
b Ff(,)31 b(unsigned)f(in)m(t)565 2149 y Fe(sizeof_name)12
 
25579
b Fg(\))390 2259 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
 
25580
(yp)s(e)f Ft(gnutls_x509_crt_t)390 2391 y Ff(oid)t FB(:)40
25573
25581
b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014er)g(in)g(a)h(n)m(ull)f
25574
 
(terminated)h(string)390 5340 y Ff(ra)m(w)p 540 5340
 
25582
(terminated)h(string)390 2523 y Ff(ra)m(w)p 540 2523
25575
25583
V 40 w(\015ag)8 b FB(:)41 b(m)m(ust)30 b(b)s(e)g(0,)h(or)f(1)h(if)g
25576
 
(the)f(data)h(are)g(DER)f(enco)s(ded)p eop end
25577
 
%%Page: 218 224
25578
 
TeXDict begin 218 223 bop 150 -116 a FB(Chapter)30 b(9:)41
25579
 
b(F)-8 b(unction)31 b(Reference)2237 b(218)390 299 y
25580
 
Ff(name)5 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(the)g(name)390
25581
 
435 y Ff(sizeof)p 610 435 28 4 v 41 w(name)5 b FB(:)41
25582
 
b(holds)30 b(the)g(size)i(of)e Ft(name)390 571 y FB(This)d(function)g
25583
 
(will)h(set)h(the)f(part)f(of)h(the)g(name)g(of)g(the)g(Certi\014cate)h
25584
 
(sub)5 b(ject,)28 b(sp)s(eci\014ed)f(b)m(y)h(the)390
25585
 
680 y(giv)m(en)j(OID.)g(The)f(input)f(string)i(should)e(b)s(e)h(ASCI)s
25586
 
(I)e(or)j(UTF-8)g(enco)s(ded.)390 816 y(Some)42 b(help)s(er)f(macros)i
25587
 
(with)f(p)s(opular)f(OIDs)h(can)g(b)s(e)g(found)f(in)g(gn)m
25588
 
(utls/x509.h)j(With)f(this)390 926 y(function)g(y)m(ou)g(can)g(only)g
25589
 
(set)h(the)f(kno)m(wn)f(OIDs.)78 b(Y)-8 b(ou)44 b(can)f(test)h(for)e
25590
 
(kno)m(wn)h(OIDs)f(using)390 1035 y Ft(gnutls_x509_dn_oid_known)o(\(\))
25591
 
p FB(.)33 b(F)-8 b(or)26 b(OIDs)g(that)g(are)g(not)g(kno)m(wn)f(\(b)m
25592
 
(y)h(gn)m(utls\))g(y)m(ou)g(should)390 1145 y(prop)s(erly)j(DER)i(enco)
25593
 
s(de)f(y)m(our)h(data,)g(and)f(call)h(this)g(function)f(with)g
25594
 
Ft(raw_flag)e FB(set.)390 1281 y Fn(Returns:)36 b FB(On)20
25595
 
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
25596
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 1482 y Fv(gn)m(utls)p
25597
 
483 1482 37 5 v 55 w(x509)p 786 1482 V 54 w(crt)p 993
25598
 
1482 V 54 w(set)p 1199 1482 V 54 w(expiration)p 1797
25599
 
1482 V 54 w(time)3350 1680 y FB([F)d(unction])-3599 b
 
25584
(the)f(data)h(are)g(DER)f(enco)s(ded)390 2655 y Ff(name)5
 
25585
b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(the)g(name)390
 
25586
2787 y Ff(sizeof)p 610 2787 V 41 w(name)5 b FB(:)41 b(holds)30
 
25587
b(the)g(size)i(of)e Ft(name)390 2919 y FB(This)d(function)g(will)h(set)
 
25588
h(the)f(part)f(of)h(the)g(name)g(of)g(the)g(Certi\014cate)h(sub)5
 
25589
b(ject,)28 b(sp)s(eci\014ed)f(b)m(y)h(the)390 3029 y(giv)m(en)j(OID.)g
 
25590
(The)f(input)f(string)i(should)e(b)s(e)h(ASCI)s(I)e(or)j(UTF-8)g(enco)s
 
25591
(ded.)390 3161 y(Some)42 b(help)s(er)f(macros)i(with)f(p)s(opular)f
 
25592
(OIDs)h(can)g(b)s(e)g(found)f(in)g(gn)m(utls/x509.h)j(With)f(this)390
 
25593
3271 y(function)g(y)m(ou)g(can)g(only)g(set)h(the)f(kno)m(wn)f(OIDs.)78
 
25594
b(Y)-8 b(ou)44 b(can)f(test)h(for)e(kno)m(wn)h(OIDs)f(using)390
 
25595
3380 y Ft(gnutls_x509_dn_oid_known)o(\(\))p FB(.)33 b(F)-8
 
25596
b(or)26 b(OIDs)g(that)g(are)g(not)g(kno)m(wn)f(\(b)m(y)h(gn)m(utls\))g
 
25597
(y)m(ou)g(should)390 3490 y(prop)s(erly)j(DER)i(enco)s(de)f(y)m(our)h
 
25598
(data,)g(and)f(call)h(this)g(function)f(with)g Ft(raw_flag)e
 
25599
FB(set.)390 3622 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
25600
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
25601
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3817 y Fv(gn)m(utls)p
 
25602
483 3817 37 5 v 55 w(x509)p 786 3817 V 54 w(crt)p 993
 
25603
3817 V 54 w(set)p 1199 3817 V 54 w(expiration)p 1797
 
25604
3817 V 54 w(time)3350 4009 y FB([F)d(unction])-3599 b
25600
25605
Fh(int)53 b(gnutls_x509_crt_set_e)q(xpir)q(ati)q(on_)q(tim)q(e)e
25601
 
Fg(\()p Ff(gn)m(utls)p 2516 1680 28 4 v 41 w(x509)p 2740
25602
 
1680 V 41 w(crt)p 2892 1680 V 41 w(t)565 1789 y Fe(cert)12
25603
 
b Ff(,)31 b(time)p 1023 1789 V 41 w(t)g Fe(exp_time)12
25604
 
b Fg(\))390 1899 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
25605
 
(yp)s(e)h Ft(gnutls_x509_crt_t)390 2035 y Ff(exp)p 535
25606
 
2035 V 40 w(time)5 b FB(:)41 b(The)30 b(actual)i(time)390
25607
 
2171 y(This)e(function)g(will)g(set)h(the)g(time)g(this)f
25608
 
(Certi\014cate)i(will)f(expire.)390 2307 y Fn(Returns:)36
 
25606
Fg(\()p Ff(gn)m(utls)p 2516 4009 28 4 v 41 w(x509)p 2740
 
25607
4009 V 41 w(crt)p 2892 4009 V 41 w(t)565 4118 y Fe(cert)12
 
25608
b Ff(,)31 b(time)p 1023 4118 V 41 w(t)g Fe(exp_time)12
 
25609
b Fg(\))390 4228 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
 
25610
(yp)s(e)h Ft(gnutls_x509_crt_t)390 4360 y Ff(exp)p 535
 
25611
4360 V 40 w(time)5 b FB(:)41 b(The)30 b(actual)i(time)390
 
25612
4492 y(This)e(function)g(will)g(set)h(the)g(time)g(this)f
 
25613
(Certi\014cate)i(will)f(expire.)390 4624 y Fn(Returns:)36
25609
25614
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25610
25615
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25611
 
b(alue.)150 2507 y Fv(gn)m(utls)p 483 2507 37 5 v 55
25612
 
w(x509)p 786 2507 V 54 w(crt)p 993 2507 V 54 w(set)p
25613
 
1199 2507 V 54 w(extension)p 1757 2507 V 55 w(b)m(y)p
25614
 
1942 2507 V 53 w(oid)3350 2705 y FB([F)d(unction])-3599
 
25616
b(alue.)150 4819 y Fv(gn)m(utls)p 483 4819 37 5 v 55
 
25617
w(x509)p 786 4819 V 54 w(crt)p 993 4819 V 54 w(set)p
 
25618
1199 4819 V 54 w(extension)p 1757 4819 V 55 w(b)m(y)p
 
25619
1942 4819 V 53 w(oid)3350 5011 y FB([F)d(unction])-3599
25615
25620
b Fh(int)53 b(gnutls_x509_crt_set_e)q(xten)q(sio)q(n_b)q(y_o)q(id)f
25616
 
Fg(\()p Ff(gn)m(utls)p 2569 2705 28 4 v 40 w(x509)p 2792
25617
 
2705 V 42 w(crt)p 2945 2705 V 40 w(t)565 2815 y Fe(crt)12
 
25621
Fg(\()p Ff(gn)m(utls)p 2569 5011 28 4 v 40 w(x509)p 2792
 
25622
5011 V 42 w(crt)p 2945 5011 V 40 w(t)565 5121 y Fe(crt)12
25618
25623
b Ff(,)31 b(const)g(c)m(har)g(*)f Fe(oid)12 b Ff(,)31
25619
25624
b(const)g(v)m(oid)g(*)g Fe(buf)12 b Ff(,)31 b(size)p
25620
 
2408 2815 V 41 w(t)g Fe(sizeof_buf)12 b Ff(,)33 b(unsigned)c(in)m(t)565
25621
 
2925 y Fe(critical)12 b Fg(\))390 3034 y Ff(crt)r FB(:)41
25622
 
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390
25623
 
3170 y Ff(oid)t FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30
25624
 
b(Iden)m(ti\014ed)g(in)g(n)m(ull)g(terminated)h(string)390
25625
 
3306 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(DER)g
25626
 
(enco)s(ded)f(data)390 3442 y Ff(sizeof)p 610 3442 V
25627
 
41 w(buf)17 b FB(:)40 b(holds)30 b(the)h(size)g(of)f
25628
 
Ft(buf)390 3578 y Ff(critical)t FB(:)42 b(should)30 b(b)s(e)f(non)h
25629
 
(zero)h(if)g(the)f(extension)h(is)g(to)g(b)s(e)e(mark)m(ed)i(as)g
25630
 
(critical)390 3714 y(This)g(function)g(will)h(set)g(an)g(the)g
25631
 
(extension,)h(b)m(y)e(the)h(sp)s(eci\014ed)f(OID,)h(in)f(the)h
25632
 
(certi\014cate.)46 b(The)390 3823 y(extension)31 b(data)g(should)e(b)s
25633
 
(e)h(binary)g(data)h(DER)f(enco)s(ded.)390 3959 y Fn(Returns:)73
25634
 
b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42 b FB(is)47
25635
 
b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
25636
 
4069 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
25637
 
b(in)f(case)h(of)g(an)f(error.)150 4269 y Fv(gn)m(utls)p
25638
 
483 4269 37 5 v 55 w(x509)p 786 4269 V 54 w(crt)p 993
25639
 
4269 V 54 w(set)p 1199 4269 V 54 w(issuer)p 1557 4269
25640
 
V 55 w(dn)p 1748 4269 V 55 w(b)m(y)p 1933 4269 V 53 w(oid)3350
25641
 
4468 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_i)q
 
25625
2408 5121 V 41 w(t)g Fe(sizeof_buf)12 b Ff(,)33 b(unsigned)c(in)m(t)565
 
25626
5230 y Fe(critical)12 b Fg(\))390 5340 y Ff(crt)r FB(:)41
 
25627
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)p
 
25628
eop end
 
25629
%%Page: 219 225
 
25630
TeXDict begin 219 224 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25631
b(F)-8 b(unction)31 b(Reference)2237 b(219)390 299 y
 
25632
Ff(oid)t FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014ed)g
 
25633
(in)g(n)m(ull)g(terminated)h(string)390 447 y Ff(buf)16
 
25634
b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(DER)g(enco)s(ded)f(data)390
 
25635
595 y Ff(sizeof)p 610 595 28 4 v 41 w(buf)17 b FB(:)40
 
25636
b(holds)30 b(the)h(size)g(of)f Ft(buf)390 742 y Ff(critical)t
 
25637
FB(:)42 b(should)30 b(b)s(e)f(non)h(zero)h(if)g(the)f(extension)h(is)g
 
25638
(to)g(b)s(e)e(mark)m(ed)i(as)g(critical)390 890 y(This)g(function)g
 
25639
(will)h(set)g(an)g(the)g(extension,)h(b)m(y)e(the)h(sp)s(eci\014ed)f
 
25640
(OID,)h(in)f(the)h(certi\014cate.)46 b(The)390 1000 y(extension)31
 
25641
b(data)g(should)e(b)s(e)h(binary)g(data)h(DER)f(enco)s(ded.)390
 
25642
1148 y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
 
25643
b FB(is)47 b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
 
25644
1257 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
 
25645
b(in)f(case)h(of)g(an)f(error.)150 1470 y Fv(gn)m(utls)p
 
25646
483 1470 37 5 v 55 w(x509)p 786 1470 V 54 w(crt)p 993
 
25647
1470 V 54 w(set)p 1199 1470 V 54 w(issuer)p 1557 1470
 
25648
V 55 w(dn)p 1748 1470 V 55 w(b)m(y)p 1933 1470 V 53 w(oid)3350
 
25649
1680 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_i)q
25642
25650
(ssue)q(r_d)q(n_b)q(y_o)q(id)f Fg(\()p Ff(gn)m(utls)p
25643
 
2569 4468 28 4 v 40 w(x509)p 2792 4468 V 42 w(crt)p 2945
25644
 
4468 V 40 w(t)565 4577 y Fe(crt)12 b Ff(,)31 b(const)g(c)m(har)g(*)f
 
25651
2569 1680 28 4 v 40 w(x509)p 2792 1680 V 42 w(crt)p 2945
 
25652
1680 V 40 w(t)565 1790 y Fe(crt)12 b Ff(,)31 b(const)g(c)m(har)g(*)f
25645
25653
Fe(oid)12 b Ff(,)31 b(unsigned)f(in)m(t)h Fe(raw_flag)12
25646
25654
b Ff(,)32 b(const)f(v)m(oid)g(*)g Fe(name)12 b Ff(,)31
25647
 
b(unsigned)565 4687 y(in)m(t)g Fe(sizeof_name)12 b Fg(\))390
25648
 
4796 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
25649
 
Ft(gnutls_x509_crt_t)390 4932 y Ff(oid)t FB(:)40 b(holds)30
 
25655
b(unsigned)565 1899 y(in)m(t)g Fe(sizeof_name)12 b Fg(\))390
 
25656
2009 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
 
25657
Ft(gnutls_x509_crt_t)390 2157 y Ff(oid)t FB(:)40 b(holds)30
25650
25658
b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014er)g(in)g(a)h(n)m(ull)f
25651
 
(terminated)h(string)390 5068 y Ff(ra)m(w)p 540 5068
 
25659
(terminated)h(string)390 2305 y Ff(ra)m(w)p 540 2305
25652
25660
V 40 w(\015ag)8 b FB(:)41 b(m)m(ust)30 b(b)s(e)g(0,)h(or)f(1)h(if)g
25653
 
(the)f(data)h(are)g(DER)f(enco)s(ded)390 5204 y Ff(name)5
 
25661
(the)f(data)h(are)g(DER)f(enco)s(ded)390 2452 y Ff(name)5
25654
25662
b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(the)g(name)390
25655
 
5340 y Ff(sizeof)p 610 5340 V 41 w(name)5 b FB(:)41 b(holds)30
25656
 
b(the)g(size)i(of)e Ft(name)p eop end
25657
 
%%Page: 219 225
25658
 
TeXDict begin 219 224 bop 150 -116 a FB(Chapter)30 b(9:)41
25659
 
b(F)-8 b(unction)31 b(Reference)2237 b(219)390 299 y(This)31
25660
 
b(function)h(will)g(set)g(the)h(part)e(of)h(the)g(name)g(of)g(the)h
25661
 
(Certi\014cate)g(issuer,)f(sp)s(eci\014ed)f(b)m(y)h(the)390
25662
 
408 y(giv)m(en)f(OID.)g(The)f(input)f(string)i(should)e(b)s(e)h(ASCI)s
25663
 
(I)e(or)j(UTF-8)g(enco)s(ded.)390 564 y(Some)42 b(help)s(er)f(macros)i
25664
 
(with)f(p)s(opular)f(OIDs)h(can)g(b)s(e)g(found)f(in)g(gn)m
25665
 
(utls/x509.h)j(With)f(this)390 673 y(function)g(y)m(ou)g(can)g(only)g
25666
 
(set)h(the)f(kno)m(wn)f(OIDs.)78 b(Y)-8 b(ou)44 b(can)f(test)h(for)e
25667
 
(kno)m(wn)h(OIDs)f(using)390 783 y Ft(gnutls_x509_dn_oid_known)o(\(\))p
25668
 
FB(.)33 b(F)-8 b(or)26 b(OIDs)g(that)g(are)g(not)g(kno)m(wn)f(\(b)m(y)h
25669
 
(gn)m(utls\))g(y)m(ou)g(should)390 893 y(prop)s(erly)j(DER)i(enco)s(de)
25670
 
f(y)m(our)h(data,)g(and)f(call)h(this)g(function)f(with)g
25671
 
Ft(raw_flag)e FB(set.)390 1048 y(Normally)k(y)m(ou)f(do)f(not)h(need)g
25672
 
(to)g(call)h(this)f(function,)f(since)h(the)g(signing)g(op)s(eration)g
25673
 
(will)g(cop)m(y)390 1158 y(the)g(signer's)f(name)g(as)h(the)g(issuer)e
25674
 
(of)i(the)g(certi\014cate.)390 1313 y Fn(Returns:)36
25675
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25676
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25677
 
b(alue.)150 1533 y Fv(gn)m(utls)p 483 1533 37 5 v 55
25678
 
w(x509)p 786 1533 V 54 w(crt)p 993 1533 V 54 w(set)p
25679
 
1199 1533 V 54 w(k)m(ey)p 1436 1533 V 53 w(purp)s(ose)p
25680
 
1911 1533 V 56 w(oid)3350 1751 y FB([F)d(unction])-3599
25681
 
b Fh(int)53 b(gnutls_x509_crt_set_k)q(ey_p)q(urp)q(ose)q(_oi)q(d)e
25682
 
Fg(\()p Ff(gn)m(utls)p 2516 1751 28 4 v 41 w(x509)p 2740
25683
 
1751 V 41 w(crt)p 2892 1751 V 41 w(t)565 1860 y Fe(cert)12
25684
 
b Ff(,)31 b(const)g(v)m(oid)g(*)g Fe(oid)12 b Ff(,)31
25685
 
b(unsigned)e(in)m(t)i Fe(critical)12 b Fg(\))390 1970
25686
 
y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m(yp)s(e)h
25687
 
Ft(gnutls_x509_crt_t)390 2125 y Ff(oid)t FB(:)40 b(a)31
25688
 
b(p)s(oin)m(ter)g(to)g(a)f(n)m(ull)h(terminated)g(string)f(that)h
25689
 
(holds)f(the)g(OID)390 2281 y Ff(critical)t FB(:)42 b(Whether)31
25690
 
b(this)f(extension)h(will)g(b)s(e)e(critical)k(or)d(not)390
25691
 
2436 y(This)k(function)h(will)h(set)f(the)h(k)m(ey)g(purp)s(ose)d(OIDs)
25692
 
i(of)h(the)f(Certi\014cate.)56 b(These)35 b(are)h(stored)f(in)390
25693
 
2546 y(the)26 b(Extended)f(Key)h(Usage)h(extension)f(\(2.5.29.37\))k
25694
 
(See)c(the)g(GNUTLS)p 2929 2546 V 39 w(KP)p 3101 2546
25695
 
V 40 w(*)g(de\014nitions)f(for)390 2655 y(h)m(uman)30
25696
 
b(readable)g(names.)390 2811 y(Subsequen)m(t)f(calls)j(to)f(this)f
 
25663
2600 y Ff(sizeof)p 610 2600 V 41 w(name)5 b FB(:)41 b(holds)30
 
25664
b(the)g(size)i(of)e Ft(name)390 2748 y FB(This)h(function)h(will)g(set)
 
25665
g(the)h(part)e(of)h(the)g(name)g(of)g(the)h(Certi\014cate)g(issuer,)f
 
25666
(sp)s(eci\014ed)f(b)m(y)h(the)390 2858 y(giv)m(en)f(OID.)g(The)f(input)
 
25667
f(string)i(should)e(b)s(e)h(ASCI)s(I)e(or)j(UTF-8)g(enco)s(ded.)390
 
25668
3006 y(Some)42 b(help)s(er)f(macros)i(with)f(p)s(opular)f(OIDs)h(can)g
 
25669
(b)s(e)g(found)f(in)g(gn)m(utls/x509.h)j(With)f(this)390
 
25670
3115 y(function)g(y)m(ou)g(can)g(only)g(set)h(the)f(kno)m(wn)f(OIDs.)78
 
25671
b(Y)-8 b(ou)44 b(can)f(test)h(for)e(kno)m(wn)h(OIDs)f(using)390
 
25672
3225 y Ft(gnutls_x509_dn_oid_known)o(\(\))p FB(.)33 b(F)-8
 
25673
b(or)26 b(OIDs)g(that)g(are)g(not)g(kno)m(wn)f(\(b)m(y)h(gn)m(utls\))g
 
25674
(y)m(ou)g(should)390 3334 y(prop)s(erly)j(DER)i(enco)s(de)f(y)m(our)h
 
25675
(data,)g(and)f(call)h(this)g(function)f(with)g Ft(raw_flag)e
 
25676
FB(set.)390 3482 y(Normally)k(y)m(ou)f(do)f(not)h(need)g(to)g(call)h
 
25677
(this)f(function,)f(since)h(the)g(signing)g(op)s(eration)g(will)g(cop)m
 
25678
(y)390 3592 y(the)g(signer's)f(name)g(as)h(the)g(issuer)e(of)i(the)g
 
25679
(certi\014cate.)390 3740 y Fn(Returns:)36 b FB(On)20
 
25680
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
 
25681
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 3952 y Fv(gn)m(utls)p
 
25682
483 3952 37 5 v 55 w(x509)p 786 3952 V 54 w(crt)p 993
 
25683
3952 V 54 w(set)p 1199 3952 V 54 w(k)m(ey)p 1436 3952
 
25684
V 53 w(purp)s(ose)p 1911 3952 V 56 w(oid)3350 4162 y
 
25685
FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_k)q(ey_p)q
 
25686
(urp)q(ose)q(_oi)q(d)e Fg(\()p Ff(gn)m(utls)p 2516 4162
 
25687
28 4 v 41 w(x509)p 2740 4162 V 41 w(crt)p 2892 4162 V
 
25688
41 w(t)565 4272 y Fe(cert)12 b Ff(,)31 b(const)g(v)m(oid)g(*)g
 
25689
Fe(oid)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(critical)12
 
25690
b Fg(\))390 4382 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
 
25691
(yp)s(e)h Ft(gnutls_x509_crt_t)390 4529 y Ff(oid)t FB(:)40
 
25692
b(a)31 b(p)s(oin)m(ter)g(to)g(a)f(n)m(ull)h(terminated)g(string)f(that)
 
25693
h(holds)f(the)g(OID)390 4677 y Ff(critical)t FB(:)42
 
25694
b(Whether)31 b(this)f(extension)h(will)g(b)s(e)e(critical)k(or)d(not)
 
25695
390 4825 y(This)k(function)h(will)h(set)f(the)h(k)m(ey)g(purp)s(ose)d
 
25696
(OIDs)i(of)h(the)f(Certi\014cate.)56 b(These)35 b(are)h(stored)f(in)390
 
25697
4935 y(the)26 b(Extended)f(Key)h(Usage)h(extension)f(\(2.5.29.37\))k
 
25698
(See)c(the)g(GNUTLS)p 2929 4935 V 39 w(KP)p 3101 4935
 
25699
V 40 w(*)g(de\014nitions)f(for)390 5044 y(h)m(uman)30
 
25700
b(readable)g(names.)390 5192 y(Subsequen)m(t)f(calls)j(to)f(this)f
25697
25701
(function)g(will)h(app)s(end)e(OIDs)h(to)h(the)g(OID)f(list.)390
25698
 
2966 y(On)g(success)g(0)h(is)f(returned.)150 3186 y Fv(gn)m(utls)p
25699
 
483 3186 37 5 v 55 w(x509)p 786 3186 V 54 w(crt)p 993
25700
 
3186 V 54 w(set)p 1199 3186 V 54 w(k)m(ey)p 1436 3186
25701
 
V 53 w(usage)3350 3404 y FB([F)-8 b(unction])-3599 b
25702
 
Fh(int)53 b(gnutls_x509_crt_set_k)q(ey_u)q(sag)q(e)e
25703
 
Fg(\()p Ff(gn)m(utls)p 2202 3404 28 4 v 41 w(x509)p 2426
25704
 
3404 V 42 w(crt)p 2579 3404 V 40 w(t)31 b Fe(crt)12 b
25705
 
Ff(,)565 3514 y(unsigned)29 b(in)m(t)i Fe(usage)12 b
25706
 
Fg(\))390 3623 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)
25707
 
s(e)f Ft(gnutls_x509_crt_t)390 3779 y Ff(usage)5 b FB(:)41
25708
 
b(an)31 b(ORed)f(sequence)g(of)h(the)f(GNUTLS)p 2087
25709
 
3779 V 40 w(KEY)p 2328 3779 V 40 w(*)h(elemen)m(ts.)390
25710
 
3934 y(This)f(function)g(will)g(set)h(the)g(k)m(eyUsage)h
25711
 
(certi\014cate)h(extension.)390 4089 y Fn(Returns:)j
25712
 
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
25713
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25714
 
b(alue.)150 4310 y Fv(gn)m(utls)p 483 4310 37 5 v 55
25715
 
w(x509)p 786 4310 V 54 w(crt)p 993 4310 V 54 w(set)p
25716
 
1199 4310 V 54 w(k)m(ey)3350 4527 y FB([F)d(unction])-3599
 
25702
5340 y(On)g(success)g(0)h(is)f(returned.)p eop end
 
25703
%%Page: 220 226
 
25704
TeXDict begin 220 225 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25705
b(F)-8 b(unction)31 b(Reference)2237 b(220)150 299 y
 
25706
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
25707
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(k)m(ey)p
 
25708
1436 299 V 53 w(usage)3350 495 y FB([F)-8 b(unction])-3599
 
25709
b Fh(int)53 b(gnutls_x509_crt_set_k)q(ey_u)q(sag)q(e)e
 
25710
Fg(\()p Ff(gn)m(utls)p 2202 495 28 4 v 41 w(x509)p 2426
 
25711
495 V 42 w(crt)p 2579 495 V 40 w(t)31 b Fe(crt)12 b Ff(,)565
 
25712
605 y(unsigned)29 b(in)m(t)i Fe(usage)12 b Fg(\))390
 
25713
714 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
 
25714
Ft(gnutls_x509_crt_t)390 849 y Ff(usage)5 b FB(:)41 b(an)31
 
25715
b(ORed)f(sequence)g(of)h(the)f(GNUTLS)p 2087 849 V 40
 
25716
w(KEY)p 2328 849 V 40 w(*)h(elemen)m(ts.)390 983 y(This)f(function)g
 
25717
(will)g(set)h(the)g(k)m(eyUsage)h(certi\014cate)h(extension.)390
 
25718
1117 y Fn(Returns:)j FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25719
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25720
b(alue.)150 1316 y Fv(gn)m(utls)p 483 1316 37 5 v 55
 
25721
w(x509)p 786 1316 V 54 w(crt)p 993 1316 V 54 w(set)p
 
25722
1199 1316 V 54 w(k)m(ey)3350 1513 y FB([F)d(unction])-3599
25717
25723
b Fh(int)53 b(gnutls_x509_crt_set_k)q(ey)f Fg(\()p Ff(gn)m(utls)p
25718
 
1889 4527 28 4 v 40 w(x509)p 2112 4527 V 42 w(crt)p 2265
25719
 
4527 V 40 w(t)31 b Fe(crt)12 b Ff(,)565 4637 y(gn)m(utls)p
25720
 
811 4637 V 41 w(x509)p 1035 4637 V 41 w(privk)m(ey)p
25721
 
1369 4637 V 40 w(t)31 b Fe(key)12 b Fg(\))390 4746 y
 
25724
1889 1513 28 4 v 40 w(x509)p 2112 1513 V 42 w(crt)p 2265
 
25725
1513 V 40 w(t)31 b Fe(crt)12 b Ff(,)565 1622 y(gn)m(utls)p
 
25726
811 1622 V 41 w(x509)p 1035 1622 V 41 w(privk)m(ey)p
 
25727
1369 1622 V 40 w(t)31 b Fe(key)12 b Fg(\))390 1732 y
25722
25728
Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
25723
 
Ft(gnutls_x509_crt_t)390 4902 y Ff(k)m(ey)8 b FB(:)41
25724
 
b(holds)30 b(a)h(priv)-5 b(ate)31 b(k)m(ey)390 5057 y(This)d(function)h
 
25729
Ft(gnutls_x509_crt_t)390 1866 y Ff(k)m(ey)8 b FB(:)41
 
25730
b(holds)30 b(a)h(priv)-5 b(ate)31 b(k)m(ey)390 2001 y(This)d(function)h
25725
25731
(will)g(set)g(the)g(public)f(parameters)h(from)g(the)g(giv)m(en)h(priv)
25726
 
-5 b(ate)29 b(k)m(ey)h(to)f(the)g(certi\014-)390 5167
 
25732
-5 b(ate)29 b(k)m(ey)h(to)f(the)g(certi\014-)390 2110
25727
25733
y(cate.)42 b(Only)30 b(RSA)g(k)m(eys)h(are)g(curren)m(tly)f(supp)s
25728
 
(orted.)390 5322 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
25734
(orted.)390 2245 y Fn(Returns:)36 b FB(On)20 b(success,)j
25729
25735
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25730
 
(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
25731
 
%%Page: 220 226
25732
 
TeXDict begin 220 225 bop 150 -116 a FB(Chapter)30 b(9:)41
25733
 
b(F)-8 b(unction)31 b(Reference)2237 b(220)150 299 y
25734
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25735
 
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(pro)m(xy)p
25736
 
1559 299 V 54 w(dn)3350 512 y FB([F)-8 b(unction])-3599
25737
 
b Fh(int)53 b(gnutls_x509_crt_set_p)q(roxy)q(_dn)f Fg(\()p
25738
 
Ff(gn)m(utls)p 2150 512 28 4 v 41 w(x509)p 2374 512 V
25739
 
41 w(crt)p 2526 512 V 41 w(t)30 b Fe(crt)12 b Ff(,)565
25740
 
622 y(gn)m(utls)p 811 622 V 41 w(x509)p 1035 622 V 41
25741
 
w(crt)p 1187 622 V 40 w(t)30 b Fe(eecrt)12 b Ff(,)31
25742
 
b(unsigned)e(in)m(t)h Fe(raw_flag)12 b Ff(,)32 b(const)f(v)m(oid)f(*)g
25743
 
Fe(name)12 b Ff(,)31 b(unsigned)565 731 y(in)m(t)g Fe(sizeof_name)12
25744
 
b Fg(\))390 841 y Ff(crt)r FB(:)41 b(a)31 b(gn)m(utls)p
25745
 
891 841 V 40 w(x509)p 1114 841 V 42 w(crt)p 1267 841
 
25736
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2443 y Fv(gn)m(utls)p
 
25737
483 2443 37 5 v 55 w(x509)p 786 2443 V 54 w(crt)p 993
 
25738
2443 V 54 w(set)p 1199 2443 V 54 w(pro)m(xy)p 1559 2443
 
25739
V 54 w(dn)3350 2640 y FB([F)d(unction])-3599 b Fh(int)53
 
25740
b(gnutls_x509_crt_set_p)q(roxy)q(_dn)f Fg(\()p Ff(gn)m(utls)p
 
25741
2150 2640 28 4 v 41 w(x509)p 2374 2640 V 41 w(crt)p 2526
 
25742
2640 V 41 w(t)30 b Fe(crt)12 b Ff(,)565 2749 y(gn)m(utls)p
 
25743
811 2749 V 41 w(x509)p 1035 2749 V 41 w(crt)p 1187 2749
 
25744
V 40 w(t)30 b Fe(eecrt)12 b Ff(,)31 b(unsigned)e(in)m(t)h
 
25745
Fe(raw_flag)12 b Ff(,)32 b(const)f(v)m(oid)f(*)g Fe(name)12
 
25746
b Ff(,)31 b(unsigned)565 2859 y(in)m(t)g Fe(sizeof_name)12
 
25747
b Fg(\))390 2969 y Ff(crt)r FB(:)41 b(a)31 b(gn)m(utls)p
 
25748
891 2969 V 40 w(x509)p 1114 2969 V 42 w(crt)p 1267 2969
25746
25749
V 40 w(t)g(structure)e(with)h(the)h(new)f(pro)m(xy)g(cert)390
25747
 
992 y Ff(eecrt)r FB(:)42 b(the)30 b(end)g(en)m(tit)m(y)i(certi\014cate)
25748
 
h(that)e(will)f(b)s(e)g(issuing)g(the)h(pro)m(xy)390
25749
 
1143 y Ff(ra)m(w)p 540 1143 V 40 w(\015ag)8 b FB(:)41
 
25750
3103 y Ff(eecrt)r FB(:)42 b(the)30 b(end)g(en)m(tit)m(y)i
 
25751
(certi\014cate)h(that)e(will)f(b)s(e)g(issuing)g(the)h(pro)m(xy)390
 
25752
3237 y Ff(ra)m(w)p 540 3237 V 40 w(\015ag)8 b FB(:)41
25750
25753
b(m)m(ust)30 b(b)s(e)g(0,)h(or)f(1)h(if)g(the)f(CN)g(is)h(DER)f(enco)s
25751
 
(ded)390 1294 y Ff(name)5 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(the)g
 
25754
(ded)390 3372 y Ff(name)5 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(the)g
25752
25755
(CN)f(name,)h(ma)m(y)f(b)s(e)g(NULL)h(\(but)f(MUST)g(then)g(b)s(e)f
25753
 
(added)h(later\))390 1445 y Ff(sizeof)p 610 1445 V 41
 
25756
(added)h(later\))390 3506 y Ff(sizeof)p 610 3506 V 41
25754
25757
w(name)5 b FB(:)41 b(holds)30 b(the)g(size)i(of)e Ft(name)390
25755
 
1596 y FB(This)e(function)g(will)g(set)h(the)g(sub)5
 
25758
3640 y FB(This)e(function)g(will)g(set)h(the)g(sub)5
25756
25759
b(ject)28 b(in)g Ft(crt)g FB(to)h(the)f(end)g(en)m(tit)m(y's)i
25757
 
Ft(eecrt)d FB(sub)5 b(ject)28 b(name,)i(and)390 1706
 
25760
Ft(eecrt)d FB(sub)5 b(ject)28 b(name,)i(and)390 3750
25758
25761
y(add)e(a)g(single)h(Common)f(Name)g(comp)s(onen)m(t)h
25759
25762
Ft(name)e FB(of)h(size)h Ft(sizeof_name)p FB(.)37 b(This)27
25760
 
b(corresp)s(onds)390 1816 y(to)j(the)g(required)f(pro)m(xy)h
 
25763
b(corresp)s(onds)390 3859 y(to)j(the)g(required)f(pro)m(xy)h
25761
25764
(certi\014cate)i(naming)d(st)m(yle.)42 b(Note)31 b(that)f(if)g
25762
25765
Ft(name)f FB(is)g Ft(NULL)p FB(,)g(y)m(ou)h(MUST)390
25763
 
1925 y(set)h(it)g(later)g(b)m(y)f(using)g Ft
 
25766
3969 y(set)h(it)g(later)g(b)m(y)f(using)g Ft
25764
25767
(gnutls_x509_crt_set_dn_by_)o(oid)o(\(\))24 b FB(or)31
25765
 
b(similar.)390 2076 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
25768
b(similar.)390 4103 y Fn(Returns:)36 b FB(On)20 b(success,)j
25766
25769
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25767
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2292 y Fv(gn)m(utls)p
25768
 
483 2292 37 5 v 55 w(x509)p 786 2292 V 54 w(crt)p 993
25769
 
2292 V 54 w(set)p 1199 2292 V 54 w(pro)m(xy)3350 2506
 
25770
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4302 y Fv(gn)m(utls)p
 
25771
483 4302 37 5 v 55 w(x509)p 786 4302 V 54 w(crt)p 993
 
25772
4302 V 54 w(set)p 1199 4302 V 54 w(pro)m(xy)3350 4499
25770
25773
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_p)q(roxy)f
25771
 
Fg(\()p Ff(gn)m(utls)p 1993 2506 28 4 v 41 w(x509)p 2217
25772
 
2506 V 41 w(crt)p 2369 2506 V 41 w(t)30 b Fe(crt)12 b
25773
 
Ff(,)31 b(in)m(t)565 2615 y Fe(pathLenConstraint)12 b
 
25774
Fg(\()p Ff(gn)m(utls)p 1993 4499 28 4 v 41 w(x509)p 2217
 
25775
4499 V 41 w(crt)p 2369 4499 V 41 w(t)30 b Fe(crt)12 b
 
25776
Ff(,)31 b(in)m(t)565 4608 y Fe(pathLenConstraint)12 b
25774
25777
Ff(,)35 b(const)c(c)m(har)g(*)g Fe(policyLanguage)12
25775
25778
b Ff(,)34 b(const)d(c)m(har)g(*)f Fe(policy)12 b Ff(,)565
25776
 
2725 y(size)p 712 2725 V 41 w(t)31 b Fe(sizeof_policy)12
25777
 
b Fg(\))390 2834 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
25778
 
(yp)s(e)f Ft(gnutls_x509_crt_t)390 2985 y Ff(pathLenConstrain)m(t)r
 
25779
4718 y(size)p 712 4718 V 41 w(t)31 b Fe(sizeof_policy)12
 
25780
b Fg(\))390 4827 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
 
25781
(yp)s(e)f Ft(gnutls_x509_crt_t)390 4962 y Ff(pathLenConstrain)m(t)r
25779
25782
FB(:)42 b(non-negativ)m(e)32 b(v)-5 b(alues)31 b(indicate)h(maxim)m(um)
25780
 
f(length)g(of)g(path,)g(and)f(neg-)390 3095 y(ativ)m(e)i(v)-5
 
25783
f(length)g(of)g(path,)g(and)f(neg-)390 5071 y(ativ)m(e)i(v)-5
25781
25784
b(alues)31 b(indicate)g(that)g(the)g(pathLenConstrain)m(ts)f(\014eld)g
25782
 
(should)f(not)i(b)s(e)f(presen)m(t.)390 3246 y Ff(p)s(olicyLanguage)5
 
25785
(should)f(not)i(b)s(e)f(presen)m(t.)390 5206 y Ff(p)s(olicyLanguage)5
25783
25786
b FB(:)42 b(OID)30 b(describing)h(the)f(language)i(of)e
25784
 
Ft(policy)p FB(.)390 3397 y Ff(p)s(olicy)8 b FB(:)41
 
25787
Ft(policy)p FB(.)390 5340 y Ff(p)s(olicy)8 b FB(:)41
25785
25788
b(opaque)30 b(b)m(yte)h(arra)m(y)g(with)f(p)s(olicy)h(language,)h(can)f
25786
 
(b)s(e)f Ft(NULL)390 3548 y Ff(sizeof)p 610 3548 V 41
25787
 
w(p)s(olicy)8 b FB(:)41 b(size)31 b(of)g Ft(policy)p
25788
 
FB(.)390 3699 y(This)f(function)g(will)g(set)h(the)g(pro)m(xyCertInfo)f
25789
 
(extension.)390 3850 y Fn(Returns:)36 b FB(On)20 b(success,)j
25790
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25791
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4066 y Fv(gn)m(utls)p
25792
 
483 4066 37 5 v 55 w(x509)p 786 4066 V 54 w(crt)p 993
25793
 
4066 V 54 w(set)p 1199 4066 V 54 w(serial)3350 4280 y
25794
 
FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_s)q(eria)q(l)f
25795
 
Fg(\()p Ff(gn)m(utls)p 2046 4280 28 4 v 40 w(x509)p 2269
25796
 
4280 V 42 w(crt)p 2422 4280 V 40 w(t)30 b Fe(cert)12
25797
 
b Ff(,)31 b(const)f(v)m(oid)565 4389 y(*)h Fe(serial)12
25798
 
b Ff(,)32 b(size)p 1169 4389 V 41 w(t)e Fe(serial_size)12
25799
 
b Fg(\))390 4499 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
25800
 
(yp)s(e)h Ft(gnutls_x509_crt_t)390 4650 y Ff(serial)t
25801
 
FB(:)41 b(The)30 b(serial)h(n)m(um)m(b)s(er)390 4801
25802
 
y Ff(serial)p 603 4801 V 41 w(size)5 b FB(:)41 b(Holds)31
25803
 
b(the)g(size)g(of)f(the)h(serial)g(\014eld.)390 4952
25804
 
y(This)g(function)g(will)h(set)g(the)f(X.509)j(certi\014cate's)f
25805
 
(serial)f(n)m(um)m(b)s(er.)43 b(Serial)32 b(is)g(not)f(alw)m(a)m(ys)i
25806
 
(a)f(32)390 5062 y(or)f(64bit)h(n)m(um)m(b)s(er.)42 b(Some)32
25807
 
b(CAs)f(use)f(large)j(serial)f(n)m(um)m(b)s(ers,)e(th)m(us)h(it)h(ma)m
25808
 
(y)f(b)s(e)g(wise)g(to)h(handle)390 5171 y(it)f(as)g(something)f
25809
 
(opaque.)390 5322 y Fn(Returns:)36 b FB(On)20 b(success,)j
25810
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
25811
 
(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
 
25789
(b)s(e)f Ft(NULL)p eop end
25812
25790
%%Page: 221 227
25813
25791
TeXDict begin 221 226 bop 150 -116 a FB(Chapter)30 b(9:)41
25814
 
b(F)-8 b(unction)31 b(Reference)2237 b(221)150 299 y
25815
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25816
 
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(sub)7 b(ject)p
25817
 
1640 299 V 54 w(alt)p 1836 299 V 54 w(name)3350 489 y
25818
 
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_s)q(ubje)q
25819
 
(ct_)q(alt)q(_na)q(me)f Fg(\()p Ff(gn)m(utls)p 2569 489
25820
 
28 4 v 40 w(x509)p 2792 489 V 42 w(crt)p 2945 489 V 40
25821
 
w(t)565 598 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p 1035
25822
 
598 V 41 w(x509)p 1259 598 V 41 w(sub)5 b(ject)p 1586
25823
 
598 V 40 w(alt)p 1731 598 V 41 w(name)p 1984 598 V 40
25824
 
w(t)31 b Fe(type)12 b Ff(,)31 b(const)g(v)m(oid)g(*)f
25825
 
Fe(data)12 b Ff(,)32 b(unsigned)d(in)m(t)565 708 y Fe(data_size)12
25826
 
b Ff(,)33 b(unsigned)c(in)m(t)i Fe(flags)12 b Fg(\))390
25827
 
818 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
25828
 
Ft(gnutls_x509_crt_t)390 949 y Ff(t)m(yp)s(e)5 b FB(:)41
25829
 
b(is)30 b(one)h(of)g(the)f(gn)m(utls)p 1399 949 V 41
25830
 
w(x509)p 1623 949 V 41 w(sub)5 b(ject)p 1950 949 V 40
25831
 
w(alt)p 2095 949 V 41 w(name)p 2348 949 V 40 w(t)31 b(en)m(umerations)
25832
 
390 1080 y Ff(data)p FB(:)41 b(The)30 b(data)h(to)g(b)s(e)f(set)390
25833
 
1211 y Ff(data)p 572 1211 V 41 w(size)5 b FB(:)41 b(The)30
25834
 
b(size)i(of)e(data)h(to)g(b)s(e)f(set)390 1342 y Ff(\015ags)t
25835
 
FB(:)39 b(GNUTLS)p 1022 1342 V 40 w(FSAN)p 1308 1342
25836
 
V 40 w(SET)27 b(to)h(clear)h(previous)e(data)i(or)e(GNUTLS)p
25837
 
2930 1342 V 40 w(FSAN)p 3216 1342 V 40 w(APPEND)h(to)390
25838
 
1452 y(app)s(end.)390 1583 y(This)35 b(function)h(will)g(set)h(the)f
25839
 
(sub)5 b(ject)36 b(alternativ)m(e)i(name)e(certi\014cate)j(extension.)
25840
 
58 b(It)36 b(can)g(set)390 1692 y(the)31 b(follo)m(wing)g(t)m(yp)s(es:)
25841
 
390 1824 y(&GNUTLS)p 848 1824 V 39 w(SAN)p 1074 1824
25842
 
V 40 w(DNSNAME:)h(as)e(a)h(text)g(string)390 1955 y(&GNUTLS)p
25843
 
848 1955 V 39 w(SAN)p 1074 1955 V 40 w(RF)m(C822NAME:)i(as)e(a)g(text)g
25844
 
(string)390 2086 y(&GNUTLS)p 848 2086 V 39 w(SAN)p 1074
25845
 
2086 V 40 w(URI:)g(as)f(a)h(text)h(string)390 2217 y(&GNUTLS)p
25846
 
848 2217 V 39 w(SAN)p 1074 2217 V 40 w(IP)-8 b(ADDRESS:)31
 
25792
b(F)-8 b(unction)31 b(Reference)2237 b(221)390 299 y
 
25793
Ff(sizeof)p 610 299 28 4 v 41 w(p)s(olicy)8 b FB(:)41
 
25794
b(size)31 b(of)g Ft(policy)p FB(.)390 433 y(This)f(function)g(will)g
 
25795
(set)h(the)g(pro)m(xyCertInfo)f(extension.)390 567 y
 
25796
Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25797
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25798
b(alue.)150 765 y Fv(gn)m(utls)p 483 765 37 5 v 55 w(x509)p
 
25799
786 765 V 54 w(crt)p 993 765 V 54 w(set)p 1199 765 V
 
25800
54 w(serial)3350 961 y FB([F)d(unction])-3599 b Fh(int)53
 
25801
b(gnutls_x509_crt_set_s)q(eria)q(l)f Fg(\()p Ff(gn)m(utls)p
 
25802
2046 961 28 4 v 40 w(x509)p 2269 961 V 42 w(crt)p 2422
 
25803
961 V 40 w(t)30 b Fe(cert)12 b Ff(,)31 b(const)f(v)m(oid)565
 
25804
1070 y(*)h Fe(serial)12 b Ff(,)32 b(size)p 1169 1070
 
25805
V 41 w(t)e Fe(serial_size)12 b Fg(\))390 1180 y Ff(cert)r
 
25806
FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m(yp)s(e)h Ft
 
25807
(gnutls_x509_crt_t)390 1314 y Ff(serial)t FB(:)41 b(The)30
 
25808
b(serial)h(n)m(um)m(b)s(er)390 1448 y Ff(serial)p 603
 
25809
1448 V 41 w(size)5 b FB(:)41 b(Holds)31 b(the)g(size)g(of)f(the)h
 
25810
(serial)g(\014eld.)390 1581 y(This)g(function)g(will)h(set)g(the)f
 
25811
(X.509)j(certi\014cate's)f(serial)f(n)m(um)m(b)s(er.)43
 
25812
b(Serial)32 b(is)g(not)f(alw)m(a)m(ys)i(a)f(32)390 1691
 
25813
y(or)f(64bit)h(n)m(um)m(b)s(er.)42 b(Some)32 b(CAs)f(use)f(large)j
 
25814
(serial)f(n)m(um)m(b)s(ers,)e(th)m(us)h(it)h(ma)m(y)f(b)s(e)g(wise)g
 
25815
(to)h(handle)390 1801 y(it)f(as)g(something)f(opaque.)390
 
25816
1935 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25817
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25818
b(alue.)150 2133 y Fv(gn)m(utls)p 483 2133 37 5 v 55
 
25819
w(x509)p 786 2133 V 54 w(crt)p 993 2133 V 54 w(set)p
 
25820
1199 2133 V 54 w(sub)7 b(ject)p 1640 2133 V 54 w(alt)p
 
25821
1836 2133 V 54 w(name)3350 2328 y FB([F)-8 b(unction])-3599
 
25822
b Fh(int)53 b(gnutls_x509_crt_set_s)q(ubje)q(ct_)q(alt)q(_na)q(me)f
 
25823
Fg(\()p Ff(gn)m(utls)p 2569 2328 28 4 v 40 w(x509)p 2792
 
25824
2328 V 42 w(crt)p 2945 2328 V 40 w(t)565 2438 y Fe(crt)12
 
25825
b Ff(,)31 b(gn)m(utls)p 1035 2438 V 41 w(x509)p 1259
 
25826
2438 V 41 w(sub)5 b(ject)p 1586 2438 V 40 w(alt)p 1731
 
25827
2438 V 41 w(name)p 1984 2438 V 40 w(t)31 b Fe(type)12
 
25828
b Ff(,)31 b(const)g(v)m(oid)g(*)f Fe(data)12 b Ff(,)32
 
25829
b(unsigned)d(in)m(t)565 2548 y Fe(data_size)12 b Ff(,)33
 
25830
b(unsigned)c(in)m(t)i Fe(flags)12 b Fg(\))390 2657 y
 
25831
Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
 
25832
Ft(gnutls_x509_crt_t)390 2791 y Ff(t)m(yp)s(e)5 b FB(:)41
 
25833
b(is)30 b(one)h(of)g(the)f(gn)m(utls)p 1399 2791 V 41
 
25834
w(x509)p 1623 2791 V 41 w(sub)5 b(ject)p 1950 2791 V
 
25835
40 w(alt)p 2095 2791 V 41 w(name)p 2348 2791 V 40 w(t)31
 
25836
b(en)m(umerations)390 2925 y Ff(data)p FB(:)41 b(The)30
 
25837
b(data)h(to)g(b)s(e)f(set)390 3059 y Ff(data)p 572 3059
 
25838
V 41 w(size)5 b FB(:)41 b(The)30 b(size)i(of)e(data)h(to)g(b)s(e)f(set)
 
25839
390 3193 y Ff(\015ags)t FB(:)39 b(GNUTLS)p 1022 3193
 
25840
V 40 w(FSAN)p 1308 3193 V 40 w(SET)27 b(to)h(clear)h(previous)e(data)i
 
25841
(or)e(GNUTLS)p 2930 3193 V 40 w(FSAN)p 3216 3193 V 40
 
25842
w(APPEND)h(to)390 3302 y(app)s(end.)390 3436 y(This)35
 
25843
b(function)h(will)g(set)h(the)f(sub)5 b(ject)36 b(alternativ)m(e)i
 
25844
(name)e(certi\014cate)j(extension.)58 b(It)36 b(can)g(set)390
 
25845
3546 y(the)31 b(follo)m(wing)g(t)m(yp)s(es:)390 3680
 
25846
y(&GNUTLS)p 848 3680 V 39 w(SAN)p 1074 3680 V 40 w(DNSNAME:)h(as)e(a)h
 
25847
(text)g(string)390 3814 y(&GNUTLS)p 848 3814 V 39 w(SAN)p
 
25848
1074 3814 V 40 w(RF)m(C822NAME:)i(as)e(a)g(text)g(string)390
 
25849
3948 y(&GNUTLS)p 848 3948 V 39 w(SAN)p 1074 3948 V 40
 
25850
w(URI:)g(as)f(a)h(text)h(string)390 4082 y(&GNUTLS)p
 
25851
848 4082 V 39 w(SAN)p 1074 4082 V 40 w(IP)-8 b(ADDRESS:)31
25847
25852
b(as)f(a)h(binary)f(IP)g(address)f(\(4)i(or)g(16)g(b)m(ytes\))390
25848
 
2348 y(Other)f(v)-5 b(alues)31 b(can)f(b)s(e)g(set)h(as)g(binary)e(v)-5
 
25853
4216 y(Other)f(v)-5 b(alues)31 b(can)f(b)s(e)g(set)h(as)g(binary)e(v)-5
25849
25854
b(alues)31 b(with)f(the)g(prop)s(er)f(DER)i(enco)s(ding.)390
25850
 
2479 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25855
4350 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25851
25856
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25852
 
b(alue.)390 2610 y Fn(Since:)41 b FB(2.6.0)150 2803 y
25853
 
Fv(gn)m(utls)p 483 2803 37 5 v 55 w(x509)p 786 2803 V
25854
 
54 w(crt)p 993 2803 V 54 w(set)p 1199 2803 V 54 w(sub)7
25855
 
b(ject)p 1640 2803 V 54 w(alternativ)m(e)p 2270 2803
25856
 
V 53 w(name)3350 2993 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
25857
b(alue.)390 4484 y Fn(Since:)41 b FB(2.6.0)150 4682 y
 
25858
Fv(gn)m(utls)p 483 4682 37 5 v 55 w(x509)p 786 4682 V
 
25859
54 w(crt)p 993 4682 V 54 w(set)p 1199 4682 V 54 w(sub)7
 
25860
b(ject)p 1640 4682 V 54 w(alternativ)m(e)p 2270 4682
 
25861
V 53 w(name)3350 4877 y FB([F)-8 b(unction])-3599 b Fh(int)53
25857
25862
b(gnutls_x509_crt_set_s)q(ubje)q(ct_)q(alt)q(ern)q(ativ)q(e_n)q(ame)565
25858
 
3102 y Fg(\()p Ff(gn)m(utls)p 846 3102 28 4 v 41 w(x509)p
25859
 
1070 3102 V 41 w(crt)p 1222 3102 V 41 w(t)30 b Fe(crt)12
25860
 
b Ff(,)31 b(gn)m(utls)p 1792 3102 V 41 w(x509)p 2016
25861
 
3102 V 41 w(sub)5 b(ject)p 2343 3102 V 40 w(alt)p 2488
25862
 
3102 V 41 w(name)p 2741 3102 V 40 w(t)31 b Fe(type)12
25863
 
b Ff(,)31 b(const)g(c)m(har)g(*)565 3212 y Fe(data_string)12
25864
 
b Fg(\))390 3321 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
25865
 
(yp)s(e)f Ft(gnutls_x509_crt_t)390 3453 y Ff(t)m(yp)s(e)5
 
25863
4987 y Fg(\()p Ff(gn)m(utls)p 846 4987 28 4 v 41 w(x509)p
 
25864
1070 4987 V 41 w(crt)p 1222 4987 V 41 w(t)30 b Fe(crt)12
 
25865
b Ff(,)31 b(gn)m(utls)p 1792 4987 V 41 w(x509)p 2016
 
25866
4987 V 41 w(sub)5 b(ject)p 2343 4987 V 40 w(alt)p 2488
 
25867
4987 V 41 w(name)p 2741 4987 V 40 w(t)31 b Fe(type)12
 
25868
b Ff(,)31 b(const)g(c)m(har)g(*)565 5096 y Fe(data_string)12
 
25869
b Fg(\))390 5206 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
 
25870
(yp)s(e)f Ft(gnutls_x509_crt_t)390 5340 y Ff(t)m(yp)s(e)5
25866
25871
b FB(:)41 b(is)30 b(one)h(of)g(the)f(gn)m(utls)p 1399
25867
 
3453 V 41 w(x509)p 1623 3453 V 41 w(sub)5 b(ject)p 1950
25868
 
3453 V 40 w(alt)p 2095 3453 V 41 w(name)p 2348 3453 V
25869
 
40 w(t)31 b(en)m(umerations)390 3584 y Ff(data)p 572
25870
 
3584 V 41 w(string)8 b FB(:)40 b(The)30 b(data)h(to)g(b)s(e)f(set,)h(a)
25871
 
g(zero)g(terminated)g(string)390 3715 y(This)22 b(function)h(will)g
25872
 
(set)g(the)g(sub)5 b(ject)23 b(alternativ)m(e)i(name)e(certi\014cate)i
25873
 
(extension.)39 b(This)22 b(function)390 3824 y(assumes)30
25874
 
b(that)h(data)g(can)g(b)s(e)e(expressed)h(as)h(a)g(n)m(ull)f
25875
 
(terminated)h(string.)390 3955 y(The)38 b(name)g(of)g(the)g(function)g
25876
 
(is)g(unfortunate)g(since)g(it)h(is)f(incosisten)m(t)h(with)f
25877
 
Ft(gnutls_x509_)390 4065 y(crt_get_subject_alt_name)o(\(\))p
25878
 
FB(.)390 4196 y Fn(Returns:)e FB(On)20 b(success,)j Ft
25879
 
(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m
25880
 
(e)h(error)d(v)-5 b(alue.)150 4389 y Fv(gn)m(utls)p 483
25881
 
4389 37 5 v 55 w(x509)p 786 4389 V 54 w(crt)p 993 4389
25882
 
V 54 w(set)p 1199 4389 V 54 w(sub)7 b(ject)p 1640 4389
25883
 
V 54 w(k)m(ey)p 1877 4389 V 53 w(id)3350 4579 y FB([F)-8
25884
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_s)q(ubje)q(ct_)q
25885
 
(key)q(_id)f Fg(\()p Ff(gn)m(utls)p 2464 4579 28 4 v
25886
 
41 w(x509)p 2688 4579 V 41 w(crt)p 2840 4579 V 40 w(t)31
25887
 
b Fe(cert)12 b Ff(,)565 4688 y(const)31 b(v)m(oid)g(*)g
25888
 
Fe(id)12 b Ff(,)30 b(size)p 1394 4688 V 41 w(t)h Fe(id_size)12
25889
 
b Fg(\))390 4798 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
25890
 
(yp)s(e)h Ft(gnutls_x509_crt_t)390 4929 y Ff(id)t FB(:)40
25891
 
b(The)30 b(k)m(ey)h(ID)390 5060 y Ff(id)p 472 5060 V
25892
 
40 w(size)5 b FB(:)41 b(Holds)31 b(the)g(size)g(of)f(the)h(serial)g
25893
 
(\014eld.)390 5191 y(This)f(function)g(will)g(set)h(the)g(X.509)h
25894
 
(certi\014cate's)g(sub)5 b(ject)31 b(k)m(ey)g(ID)f(extension.)390
25895
 
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25896
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25897
 
b(alue.)p eop end
 
25872
5340 V 41 w(x509)p 1623 5340 V 41 w(sub)5 b(ject)p 1950
 
25873
5340 V 40 w(alt)p 2095 5340 V 41 w(name)p 2348 5340 V
 
25874
40 w(t)31 b(en)m(umerations)p eop end
25898
25875
%%Page: 222 228
25899
25876
TeXDict begin 222 227 bop 150 -116 a FB(Chapter)30 b(9:)41
25900
 
b(F)-8 b(unction)31 b(Reference)2237 b(222)150 299 y
25901
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
25902
 
w(crt)p 993 299 V 54 w(set)p 1199 299 V 54 w(v)m(ersion)3350
25903
 
495 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_set_v)q
25904
 
(ersi)q(on)f Fg(\()p Ff(gn)m(utls)p 2098 495 28 4 v 41
25905
 
w(x509)p 2322 495 V 41 w(crt)p 2474 495 V 40 w(t)31 b
25906
 
Fe(crt)12 b Ff(,)31 b(unsigned)565 605 y(in)m(t)g Fe(version)12
25907
 
b Fg(\))390 714 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
25908
 
(yp)s(e)f Ft(gnutls_x509_crt_t)390 849 y Ff(v)m(ersion)p
25909
 
FB(:)41 b(holds)30 b(the)h(v)m(ersion)f(n)m(um)m(b)s(er.)40
25910
 
b(F)-8 b(or)31 b(X.509v1)i(certi\014cates)f(m)m(ust)e(b)s(e)g(1.)390
25911
 
983 y(This)23 b(function)g(will)h(set)g(the)f(v)m(ersion)h(of)g(the)g
 
25877
b(F)-8 b(unction)31 b(Reference)2237 b(222)390 299 y
 
25878
Ff(data)p 572 299 28 4 v 41 w(string)8 b FB(:)40 b(The)30
 
25879
b(data)h(to)g(b)s(e)f(set,)h(a)g(zero)g(terminated)g(string)390
 
25880
429 y(This)22 b(function)h(will)g(set)g(the)g(sub)5 b(ject)23
 
25881
b(alternativ)m(e)i(name)e(certi\014cate)i(extension.)39
 
25882
b(This)22 b(function)390 539 y(assumes)30 b(that)h(data)g(can)g(b)s(e)e
 
25883
(expressed)h(as)h(a)g(n)m(ull)f(terminated)h(string.)390
 
25884
669 y(The)38 b(name)g(of)g(the)g(function)g(is)g(unfortunate)g(since)g
 
25885
(it)h(is)f(incosisten)m(t)h(with)f Ft(gnutls_x509_)390
 
25886
779 y(crt_get_subject_alt_name)o(\(\))p FB(.)390 910
 
25887
y Fn(Returns:)e FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25888
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25889
b(alue.)150 1101 y Fv(gn)m(utls)p 483 1101 37 5 v 55
 
25890
w(x509)p 786 1101 V 54 w(crt)p 993 1101 V 54 w(set)p
 
25891
1199 1101 V 54 w(sub)7 b(ject)p 1640 1101 V 54 w(k)m(ey)p
 
25892
1877 1101 V 53 w(id)3350 1290 y FB([F)-8 b(unction])-3599
 
25893
b Fh(int)53 b(gnutls_x509_crt_set_s)q(ubje)q(ct_)q(key)q(_id)f
 
25894
Fg(\()p Ff(gn)m(utls)p 2464 1290 28 4 v 41 w(x509)p 2688
 
25895
1290 V 41 w(crt)p 2840 1290 V 40 w(t)31 b Fe(cert)12
 
25896
b Ff(,)565 1399 y(const)31 b(v)m(oid)g(*)g Fe(id)12 b
 
25897
Ff(,)30 b(size)p 1394 1399 V 41 w(t)h Fe(id_size)12 b
 
25898
Fg(\))390 1509 y Ff(cert)r FB(:)41 b(a)31 b(certi\014cate)i(of)d(t)m
 
25899
(yp)s(e)h Ft(gnutls_x509_crt_t)390 1639 y Ff(id)t FB(:)40
 
25900
b(The)30 b(k)m(ey)h(ID)390 1770 y Ff(id)p 472 1770 V
 
25901
40 w(size)5 b FB(:)41 b(Holds)31 b(the)g(size)g(of)f(the)h(serial)g
 
25902
(\014eld.)390 1900 y(This)f(function)g(will)g(set)h(the)g(X.509)h
 
25903
(certi\014cate's)g(sub)5 b(ject)31 b(k)m(ey)g(ID)f(extension.)390
 
25904
2031 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25905
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25906
b(alue.)150 2222 y Fv(gn)m(utls)p 483 2222 37 5 v 55
 
25907
w(x509)p 786 2222 V 54 w(crt)p 993 2222 V 54 w(set)p
 
25908
1199 2222 V 54 w(v)m(ersion)3350 2411 y FB([F)d(unction])-3599
 
25909
b Fh(int)53 b(gnutls_x509_crt_set_v)q(ersi)q(on)f Fg(\()p
 
25910
Ff(gn)m(utls)p 2098 2411 28 4 v 41 w(x509)p 2322 2411
 
25911
V 41 w(crt)p 2474 2411 V 40 w(t)31 b Fe(crt)12 b Ff(,)31
 
25912
b(unsigned)565 2520 y(in)m(t)g Fe(version)12 b Fg(\))390
 
25913
2630 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f
 
25914
Ft(gnutls_x509_crt_t)390 2761 y Ff(v)m(ersion)p FB(:)41
 
25915
b(holds)30 b(the)h(v)m(ersion)f(n)m(um)m(b)s(er.)40 b(F)-8
 
25916
b(or)31 b(X.509v1)i(certi\014cates)f(m)m(ust)e(b)s(e)g(1.)390
 
25917
2891 y(This)23 b(function)g(will)h(set)g(the)f(v)m(ersion)h(of)g(the)g
25912
25918
(certi\014cate.)40 b(This)23 b(m)m(ust)g(b)s(e)g(one)h(for)f(X.509)i(v)
25913
 
m(ersion)390 1093 y(1,)31 b(and)f(so)g(on.)41 b(Plain)31
 
25919
m(ersion)390 3001 y(1,)31 b(and)f(so)g(on.)41 b(Plain)31
25914
25920
b(certi\014cates)h(without)e(extensions)h(m)m(ust)f(ha)m(v)m(e)i(v)m
25915
 
(ersion)f(set)g(to)g(one.)390 1227 y(T)-8 b(o)36 b(create)g(w)m
 
25921
(ersion)f(set)g(to)g(one.)390 3131 y(T)-8 b(o)36 b(create)g(w)m
25916
25922
(ell-formed)g(certi\014cates,)j(y)m(ou)c(m)m(ust)g(sp)s(ecify)g(v)m
25917
25923
(ersion)h(3)f(if)g(y)m(ou)h(use)f(an)m(y)g(certi\014-)390
25918
 
1337 y(cate)29 b(extensions.)40 b(Extensions)28 b(are)g(created)g(b)m
 
25924
3241 y(cate)29 b(extensions.)40 b(Extensions)28 b(are)g(created)g(b)m
25919
25925
(y)g(functions)f(suc)m(h)g(as)g Ft(gnutls_x509_crt_set_)390
25920
 
1446 y(subject_alt_name\(\))e FB(or)31 b Ft(gnutls_x509_crt_set_key)o
25921
 
(_usa)o(ge\(\))o FB(.)390 1581 y Fn(Returns:)36 b FB(On)20
 
25926
3350 y(subject_alt_name\(\))e FB(or)31 b Ft(gnutls_x509_crt_set_key)o
 
25927
(_usa)o(ge\(\))o FB(.)390 3481 y Fn(Returns:)36 b FB(On)20
25922
25928
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
25923
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 1779 y Fv(gn)m(utls)p
25924
 
483 1779 37 5 v 55 w(x509)p 786 1779 V 54 w(crt)p 993
25925
 
1779 V 54 w(sign2)3350 1976 y FB([F)d(unction])-3599
 
25929
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 3672 y Fv(gn)m(utls)p
 
25930
483 3672 37 5 v 55 w(x509)p 786 3672 V 54 w(crt)p 993
 
25931
3672 V 54 w(sign2)3350 3861 y FB([F)d(unction])-3599
25926
25932
b Fh(int)53 b(gnutls_x509_crt_sign2)f Fg(\()p Ff(gn)m(utls)p
25927
 
1784 1976 28 4 v 41 w(x509)p 2008 1976 V 41 w(crt)p 2160
25928
 
1976 V 41 w(t)30 b Fe(crt)12 b Ff(,)31 b(gn)m(utls)p
25929
 
2730 1976 V 41 w(x509)p 2954 1976 V 41 w(crt)p 3106 1976
25930
 
V 40 w(t)565 2085 y Fe(issuer)12 b Ff(,)32 b(gn)m(utls)p
25931
 
1192 2085 V 40 w(x509)p 1415 2085 V 42 w(privk)m(ey)p
25932
 
1750 2085 V 40 w(t)f Fe(issuer_key)12 b Ff(,)33 b(gn)m(utls)p
25933
 
2686 2085 V 40 w(digest)p 2958 2085 V 41 w(algorithm)p
25934
 
3382 2085 V 41 w(t)e Fe(dig)12 b Ff(,)565 2195 y(unsigned)29
25935
 
b(in)m(t)i Fe(flags)12 b Fg(\))390 2305 y Ff(crt)r FB(:)41
 
25933
1784 3861 28 4 v 41 w(x509)p 2008 3861 V 41 w(crt)p 2160
 
25934
3861 V 41 w(t)30 b Fe(crt)12 b Ff(,)31 b(gn)m(utls)p
 
25935
2730 3861 V 41 w(x509)p 2954 3861 V 41 w(crt)p 3106 3861
 
25936
V 40 w(t)565 3970 y Fe(issuer)12 b Ff(,)32 b(gn)m(utls)p
 
25937
1192 3970 V 40 w(x509)p 1415 3970 V 42 w(privk)m(ey)p
 
25938
1750 3970 V 40 w(t)f Fe(issuer_key)12 b Ff(,)33 b(gn)m(utls)p
 
25939
2686 3970 V 40 w(digest)p 2958 3970 V 41 w(algorithm)p
 
25940
3382 3970 V 41 w(t)e Fe(dig)12 b Ff(,)565 4080 y(unsigned)29
 
25941
b(in)m(t)i Fe(flags)12 b Fg(\))390 4190 y Ff(crt)r FB(:)41
25936
25942
b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft(gnutls_x509_crt_t)390
25937
 
2439 y Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(the)f
25938
 
(certi\014cate)j(issuer)390 2573 y Ff(issuer)p 620 2573
 
25943
4320 y Ff(issuer)7 b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(the)f
 
25944
(certi\014cate)j(issuer)390 4451 y Ff(issuer)p 620 4451
25939
25945
V 39 w(k)m(ey)8 b FB(:)42 b(holds)30 b(the)g(issuer's)g(priv)-5
25940
 
b(ate)31 b(k)m(ey)390 2708 y Ff(dig)8 b FB(:)41 b(The)30
 
25946
b(ate)31 b(k)m(ey)390 4581 y Ff(dig)8 b FB(:)41 b(The)30
25941
25947
b(message)h(digest)g(to)g(use,)g Ft(GNUTLS_DIG_SHA1)26
25942
 
b FB(is)k(a)h(safe)g(c)m(hoice)390 2842 y Ff(\015ags)t
25943
 
FB(:)41 b(m)m(ust)30 b(b)s(e)g(0)390 2976 y(This)g(function)h(will)g
 
25948
b FB(is)k(a)h(safe)g(c)m(hoice)390 4712 y Ff(\015ags)t
 
25949
FB(:)41 b(m)m(ust)30 b(b)s(e)g(0)390 4842 y(This)g(function)h(will)g
25944
25950
(sign)g(the)g(certi\014cate)i(with)e(the)g(issuer's)f(priv)-5
25945
25951
b(ate)32 b(k)m(ey)-8 b(,)32 b(and)f(will)g(cop)m(y)h(the)390
25946
 
3086 y(issuer's)e(information)h(in)m(to)g(the)f(certi\014cate.)390
25947
 
3220 y(This)43 b(m)m(ust)g(b)s(e)g(the)h(last)g(step)g(in)f(a)h
 
25952
4952 y(issuer's)e(information)h(in)m(to)g(the)f(certi\014cate.)390
 
25953
5082 y(This)43 b(m)m(ust)g(b)s(e)g(the)h(last)g(step)g(in)f(a)h
25948
25954
(certi\014cate)h(generation)g(since)f(all)g(the)g(previously)f(set)390
25949
 
3330 y(parameters)31 b(are)f(no)m(w)h(signed.)390 3464
25950
 
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25951
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25952
 
b(alue.)150 3663 y Fv(gn)m(utls)p 483 3663 37 5 v 55
25953
 
w(x509)p 786 3663 V 54 w(crt)p 993 3663 V 54 w(sign)3350
25954
 
3859 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_sign)f
25955
 
Fg(\()p Ff(gn)m(utls)p 1732 3859 28 4 v 40 w(x509)p 1955
25956
 
3859 V 42 w(crt)p 2108 3859 V 40 w(t)31 b Fe(crt)12 b
25957
 
Ff(,)31 b(gn)m(utls)p 2678 3859 V 40 w(x509)p 2901 3859
25958
 
V 42 w(crt)p 3054 3859 V 40 w(t)565 3969 y Fe(issuer)12
25959
 
b Ff(,)32 b(gn)m(utls)p 1192 3969 V 40 w(x509)p 1415
25960
 
3969 V 42 w(privk)m(ey)p 1750 3969 V 40 w(t)f Fe(issuer_key)12
25961
 
b Fg(\))390 4079 y Ff(crt)r FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m
25962
 
(yp)s(e)f Ft(gnutls_x509_crt_t)390 4213 y Ff(issuer)7
25963
 
b FB(:)40 b(is)30 b(the)h(certi\014cate)h(of)f(the)f(certi\014cate)j
25964
 
(issuer)390 4347 y Ff(issuer)p 620 4347 V 39 w(k)m(ey)8
25965
 
b FB(:)42 b(holds)30 b(the)g(issuer's)g(priv)-5 b(ate)31
25966
 
b(k)m(ey)390 4482 y(This)h(function)h(is)f(the)h(same)h(a)f
25967
 
Ft(gnutls_x509_crt_sign2\(\))26 b FB(with)33 b(no)g(\015ags,)g(and)g
25968
 
(SHA1)g(as)390 4591 y(the)e(hash)e(algorithm.)390 4725
25969
 
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
25970
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
25971
 
b(alue.)150 4924 y Fv(gn)m(utls)p 483 4924 37 5 v 55
25972
 
w(x509)p 786 4924 V 54 w(crt)p 993 4924 V 54 w(v)m(erify)p
25973
 
1351 4924 V 54 w(data)3350 5121 y FB([F)d(unction])-3599
 
25955
5192 y(parameters)31 b(are)f(no)m(w)h(signed.)390 5322
 
25956
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
25957
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25958
b(alue.)p eop end
 
25959
%%Page: 223 229
 
25960
TeXDict begin 223 228 bop 150 -116 a FB(Chapter)30 b(9:)41
 
25961
b(F)-8 b(unction)31 b(Reference)2237 b(223)150 299 y
 
25962
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
25963
w(crt)p 993 299 V 54 w(sign)3350 492 y FB([F)-8 b(unction])-3599
 
25964
b Fh(int)53 b(gnutls_x509_crt_sign)f Fg(\()p Ff(gn)m(utls)p
 
25965
1732 492 28 4 v 40 w(x509)p 1955 492 V 42 w(crt)p 2108
 
25966
492 V 40 w(t)31 b Fe(crt)12 b Ff(,)31 b(gn)m(utls)p 2678
 
25967
492 V 40 w(x509)p 2901 492 V 42 w(crt)p 3054 492 V 40
 
25968
w(t)565 602 y Fe(issuer)12 b Ff(,)32 b(gn)m(utls)p 1192
 
25969
602 V 40 w(x509)p 1415 602 V 42 w(privk)m(ey)p 1750 602
 
25970
V 40 w(t)f Fe(issuer_key)12 b Fg(\))390 711 y Ff(crt)r
 
25971
FB(:)41 b(a)31 b(certi\014cate)h(of)f(t)m(yp)s(e)f Ft
 
25972
(gnutls_x509_crt_t)390 844 y Ff(issuer)7 b FB(:)40 b(is)30
 
25973
b(the)h(certi\014cate)h(of)f(the)f(certi\014cate)j(issuer)390
 
25974
977 y Ff(issuer)p 620 977 V 39 w(k)m(ey)8 b FB(:)42 b(holds)30
 
25975
b(the)g(issuer's)g(priv)-5 b(ate)31 b(k)m(ey)390 1109
 
25976
y(This)h(function)h(is)f(the)h(same)h(a)f Ft(gnutls_x509_crt_sign2\(\))
 
25977
26 b FB(with)33 b(no)g(\015ags,)g(and)g(SHA1)g(as)390
 
25978
1219 y(the)e(hash)e(algorithm.)390 1352 y Fn(Returns:)36
 
25979
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
25980
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
25981
b(alue.)150 1548 y Fv(gn)m(utls)p 483 1548 37 5 v 55
 
25982
w(x509)p 786 1548 V 54 w(crt)p 993 1548 V 54 w(v)m(erify)p
 
25983
1351 1548 V 54 w(data)3350 1741 y FB([F)d(unction])-3599
25974
25984
b Fh(int)53 b(gnutls_x509_crt_verif)q(y_da)q(ta)f Fg(\()p
25975
 
Ff(gn)m(utls)p 2098 5121 28 4 v 41 w(x509)p 2322 5121
25976
 
V 41 w(crt)p 2474 5121 V 40 w(t)31 b Fe(crt)12 b Ff(,)31
25977
 
b(unsigned)565 5230 y(in)m(t)g Fe(flags)12 b Ff(,)32
25978
 
b(const)e(gn)m(utls)p 1516 5230 V 41 w(datum)p 1815 5230
 
25985
Ff(gn)m(utls)p 2098 1741 28 4 v 41 w(x509)p 2322 1741
 
25986
V 41 w(crt)p 2474 1741 V 40 w(t)31 b Fe(crt)12 b Ff(,)31
 
25987
b(unsigned)565 1850 y(in)m(t)g Fe(flags)12 b Ff(,)32
 
25988
b(const)e(gn)m(utls)p 1516 1850 V 41 w(datum)p 1815 1850
25979
25989
V 39 w(t)h(*)g Fe(data)12 b Ff(,)31 b(const)g(gn)m(utls)p
25980
 
2750 5230 V 40 w(datum)p 3048 5230 V 40 w(t)g(*)f Fe(signature)12
25981
 
b Fg(\))390 5340 y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)p
25982
 
eop end
25983
 
%%Page: 223 229
25984
 
TeXDict begin 223 228 bop 150 -116 a FB(Chapter)30 b(9:)41
25985
 
b(F)-8 b(unction)31 b(Reference)2237 b(223)390 299 y
25986
 
Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390
25987
 
429 y Ff(data)p FB(:)41 b(holds)30 b(the)h(data)g(to)g(b)s(e)f(signed)
25988
 
390 559 y Ff(signature)5 b FB(:)41 b(con)m(tains)32 b(the)e(signature)
25989
 
390 688 y(This)d(function)h(will)h(v)m(erify)g(the)f(giv)m(en)h(signed)
25990
 
g(data,)g(using)f(the)g(parameters)h(from)f(the)g(certi\014-)390
25991
 
798 y(cate.)390 928 y Fn(Returns:)40 b FB(In)30 b(case)h(of)g(a)g(v)m
25992
 
(eri\014cation)h(failure)e(0)h(is)f(returned,)g(and)g(1)g(on)h
25993
 
(success.)150 1118 y Fv(gn)m(utls)p 483 1118 37 5 v 55
25994
 
w(x509)p 786 1118 V 54 w(crt)p 993 1118 V 54 w(v)m(erify)3350
25995
 
1305 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_crt_verif)q
25996
 
(y)e Fg(\()p Ff(gn)m(utls)p 1836 1305 28 4 v 41 w(x509)p
25997
 
2060 1305 V 41 w(crt)p 2212 1305 V 41 w(t)30 b Fe(cert)12
25998
 
b Ff(,)32 b(const)565 1415 y(gn)m(utls)p 811 1415 V 41
25999
 
w(x509)p 1035 1415 V 41 w(crt)p 1187 1415 V 40 w(t)f(*)g
26000
 
Fe(CA_list)12 b Ff(,)32 b(in)m(t)f Fe(CA_list_length)12
26001
 
b Ff(,)34 b(unsigned)29 b(in)m(t)i Fe(flags)12 b Ff(,)565
26002
 
1524 y(unsigned)29 b(in)m(t)i(*)g Fe(verify)12 b Fg(\))390
26003
 
1634 y Ff(cert)r FB(:)41 b(is)31 b(the)f(certi\014cate)j(to)e(b)s(e)f
26004
 
(v)m(eri\014ed)390 1764 y Ff(CA)p 530 1764 V 40 w(list)r
26005
 
FB(:)41 b(is)31 b(one)f(certi\014cate)j(that)e(is)f(considered)g(to)h
26006
 
(b)s(e)f(trusted)g(one)390 1894 y Ff(CA)p 530 1894 V
26007
 
40 w(list)p 691 1894 V 41 w(length)p FB(:)41 b(holds)30
26008
 
b(the)g(n)m(um)m(b)s(er)f(of)i(CA)f(certi\014cate)i(in)e(CA)p
26009
 
2697 1894 V 40 w(list)390 2023 y Ff(\015ags)t FB(:)51
26010
 
b(Flags)37 b(that)f(ma)m(y)g(b)s(e)e(used)h(to)h(c)m(hange)h(the)e(v)m
26011
 
(eri\014cation)i(algorithm.)57 b(Use)36 b(OR)f(of)h(the)390
26012
 
2133 y(gn)m(utls)p 636 2133 V 40 w(certi\014cate)p 1063
26013
 
2133 V 43 w(v)m(erify)p 1328 2133 V 40 w(\015ags)31 b(en)m(umerations.)
26014
 
390 2263 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g
26015
 
(certi\014cate)j(v)m(eri\014cation)f(output.)390 2393
26016
 
y(This)d(function)h(will)h(try)f(to)h(v)m(erify)g(the)f(giv)m(en)h
26017
 
(certi\014cate)h(and)e(return)f(its)i(status.)41 b(The)29
26018
 
b(v)m(eri\014-)390 2502 y(cation)j(output)e(in)g(this)g(functions)g
26019
 
(cannot)h(b)s(e)f(GNUTLS)p 2445 2502 V 39 w(CER)-8 b(T)p
26020
 
2737 2502 V 40 w(NOT)p 2982 2502 V 39 w(V)e(ALID.)390
26021
 
2632 y Fn(Returns:)73 b FB(On)47 b(success,)k Ft(GNUTLS_E_SUCCESS)42
26022
 
b FB(is)47 b(returned,)k(otherwise)c(a)g(negativ)m(e)i(error)390
26023
 
2742 y(v)-5 b(alue.and)31 b(a)f(negativ)m(e)j(v)-5 b(alue)31
26024
 
b(in)f(case)h(of)g(an)f(error.)150 2932 y Fv(gn)m(utls)p
26025
 
483 2932 37 5 v 55 w(x509)p 786 2932 V 54 w(dn)p 976
26026
 
2932 V 55 w(deinit)3350 3119 y FB([F)-8 b(unction])-3599
26027
 
b Fh(void)54 b(gnutls_x509_dn_deinit)d Fg(\()p Ff(gn)m(utls)p
26028
 
1836 3119 28 4 v 41 w(x509)p 2060 3119 V 41 w(dn)p 2203
26029
 
3119 V 39 w(t)31 b Fe(idn)12 b Fg(\))390 3229 y Ff(idn)p
26030
 
FB(:)40 b(a)31 b(DN)g(opaque)f(ob)5 b(ject)31 b(p)s(oin)m(ter.)390
26031
 
3358 y(This)f(function)g(deallo)s(cates)i(the)f(DN)g(ob)5
26032
 
b(ject)31 b(as)g(returned)e(b)m(y)h Ft(gnutls_x509_dn_import\(\))p
26033
 
FB(.)390 3488 y Fn(Since:)41 b FB(2.4.0)150 3678 y Fv(gn)m(utls)p
26034
 
483 3678 37 5 v 55 w(x509)p 786 3678 V 54 w(dn)p 976
26035
 
3678 V 55 w(exp)s(ort)3350 3866 y FB([F)-8 b(unction])-3599
 
25990
2750 1850 V 40 w(datum)p 3048 1850 V 40 w(t)g(*)f Fe(signature)12
 
25991
b Fg(\))390 1960 y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)
 
25992
390 2093 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)
 
25993
390 2225 y Ff(data)p FB(:)41 b(holds)30 b(the)h(data)g(to)g(b)s(e)f
 
25994
(signed)390 2358 y Ff(signature)5 b FB(:)41 b(con)m(tains)32
 
25995
b(the)e(signature)390 2491 y(This)d(function)h(will)h(v)m(erify)g(the)f
 
25996
(giv)m(en)h(signed)g(data,)g(using)f(the)g(parameters)h(from)f(the)g
 
25997
(certi\014-)390 2600 y(cate.)390 2733 y Fn(Returns:)40
 
25998
b FB(In)30 b(case)h(of)g(a)g(v)m(eri\014cation)h(failure)e(0)h(is)f
 
25999
(returned,)g(and)g(1)g(on)h(success.)150 2929 y Fv(gn)m(utls)p
 
26000
483 2929 37 5 v 55 w(x509)p 786 2929 V 54 w(crt)p 993
 
26001
2929 V 54 w(v)m(erify)3350 3122 y FB([F)-8 b(unction])-3599
 
26002
b Fh(int)53 b(gnutls_x509_crt_verif)q(y)e Fg(\()p Ff(gn)m(utls)p
 
26003
1836 3122 28 4 v 41 w(x509)p 2060 3122 V 41 w(crt)p 2212
 
26004
3122 V 41 w(t)30 b Fe(cert)12 b Ff(,)32 b(const)565 3232
 
26005
y(gn)m(utls)p 811 3232 V 41 w(x509)p 1035 3232 V 41 w(crt)p
 
26006
1187 3232 V 40 w(t)f(*)g Fe(CA_list)12 b Ff(,)32 b(in)m(t)f
 
26007
Fe(CA_list_length)12 b Ff(,)34 b(unsigned)29 b(in)m(t)i
 
26008
Fe(flags)12 b Ff(,)565 3341 y(unsigned)29 b(in)m(t)i(*)g
 
26009
Fe(verify)12 b Fg(\))390 3451 y Ff(cert)r FB(:)41 b(is)31
 
26010
b(the)f(certi\014cate)j(to)e(b)s(e)f(v)m(eri\014ed)390
 
26011
3584 y Ff(CA)p 530 3584 V 40 w(list)r FB(:)41 b(is)31
 
26012
b(one)f(certi\014cate)j(that)e(is)f(considered)g(to)h(b)s(e)f(trusted)g
 
26013
(one)390 3716 y Ff(CA)p 530 3716 V 40 w(list)p 691 3716
 
26014
V 41 w(length)p FB(:)41 b(holds)30 b(the)g(n)m(um)m(b)s(er)f(of)i(CA)f
 
26015
(certi\014cate)i(in)e(CA)p 2697 3716 V 40 w(list)390
 
26016
3849 y Ff(\015ags)t FB(:)51 b(Flags)37 b(that)f(ma)m(y)g(b)s(e)e(used)h
 
26017
(to)h(c)m(hange)h(the)e(v)m(eri\014cation)i(algorithm.)57
 
26018
b(Use)36 b(OR)f(of)h(the)390 3959 y(gn)m(utls)p 636 3959
 
26019
V 40 w(certi\014cate)p 1063 3959 V 43 w(v)m(erify)p 1328
 
26020
3959 V 40 w(\015ags)31 b(en)m(umerations.)390 4091 y
 
26021
Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g(certi\014cate)j(v)m
 
26022
(eri\014cation)f(output.)390 4224 y(This)d(function)h(will)h(try)f(to)h
 
26023
(v)m(erify)g(the)f(giv)m(en)h(certi\014cate)h(and)e(return)f(its)i
 
26024
(status.)41 b(The)29 b(v)m(eri\014-)390 4334 y(cation)j(output)e(in)g
 
26025
(this)g(functions)g(cannot)h(b)s(e)f(GNUTLS)p 2445 4334
 
26026
V 39 w(CER)-8 b(T)p 2737 4334 V 40 w(NOT)p 2982 4334
 
26027
V 39 w(V)e(ALID.)390 4466 y Fn(Returns:)73 b FB(On)47
 
26028
b(success,)k Ft(GNUTLS_E_SUCCESS)42 b FB(is)47 b(returned,)k(otherwise)
 
26029
c(a)g(negativ)m(e)i(error)390 4576 y(v)-5 b(alue.and)31
 
26030
b(a)f(negativ)m(e)j(v)-5 b(alue)31 b(in)f(case)h(of)g(an)f(error.)150
 
26031
4772 y Fv(gn)m(utls)p 483 4772 37 5 v 55 w(x509)p 786
 
26032
4772 V 54 w(dn)p 976 4772 V 55 w(deinit)3350 4965 y FB([F)-8
 
26033
b(unction])-3599 b Fh(void)54 b(gnutls_x509_dn_deinit)d
 
26034
Fg(\()p Ff(gn)m(utls)p 1836 4965 28 4 v 41 w(x509)p 2060
 
26035
4965 V 41 w(dn)p 2203 4965 V 39 w(t)31 b Fe(idn)12 b
 
26036
Fg(\))390 5075 y Ff(idn)p FB(:)40 b(a)31 b(DN)g(opaque)f(ob)5
 
26037
b(ject)31 b(p)s(oin)m(ter.)390 5207 y(This)f(function)g(deallo)s(cates)
 
26038
i(the)f(DN)g(ob)5 b(ject)31 b(as)g(returned)e(b)m(y)h
 
26039
Ft(gnutls_x509_dn_import\(\))p FB(.)390 5340 y Fn(Since:)41
 
26040
b FB(2.4.0)p eop end
 
26041
%%Page: 224 230
 
26042
TeXDict begin 224 229 bop 150 -116 a FB(Chapter)30 b(9:)41
 
26043
b(F)-8 b(unction)31 b(Reference)2237 b(224)150 299 y
 
26044
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
26045
w(dn)p 976 299 V 55 w(exp)s(ort)3350 488 y FB([F)-8 b(unction])-3599
26036
26046
b Fh(int)53 b(gnutls_x509_dn_export)f Fg(\()p Ff(gn)m(utls)p
26037
 
1784 3866 28 4 v 41 w(x509)p 2008 3866 V 41 w(dn)p 2151
26038
 
3866 V 39 w(t)31 b Fe(dn)12 b Ff(,)565 3975 y(gn)m(utls)p
26039
 
811 3975 V 41 w(x509)p 1035 3975 V 41 w(crt)p 1187 3975
26040
 
V 40 w(fm)m(t)p 1363 3975 V 41 w(t)30 b Fe(format)12
26041
 
b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33
26042
 
b(size)p 2906 3975 V 41 w(t)e(*)565 4085 y Fe(output_data_size)12
26043
 
b Fg(\))390 4194 y Ff(dn)p FB(:)40 b(Holds)30 b(the)h(opaque)f(DN)h(ob)
26044
 
5 b(ject)390 4324 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h
26045
 
(output)f(params.)40 b(One)30 b(of)h(PEM)f(or)g(DER.)390
26046
 
4454 y Ff(output)p 664 4454 V 40 w(data)p FB(:)41 b(will)31
 
26047
1784 488 28 4 v 41 w(x509)p 2008 488 V 41 w(dn)p 2151
 
26048
488 V 39 w(t)31 b Fe(dn)12 b Ff(,)565 598 y(gn)m(utls)p
 
26049
811 598 V 41 w(x509)p 1035 598 V 41 w(crt)p 1187 598
 
26050
V 40 w(fm)m(t)p 1363 598 V 41 w(t)30 b Fe(format)12 b
 
26051
Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33 b(size)p
 
26052
2906 598 V 41 w(t)e(*)565 708 y Fe(output_data_size)12
 
26053
b Fg(\))390 817 y Ff(dn)p FB(:)40 b(Holds)30 b(the)h(opaque)f(DN)h(ob)5
 
26054
b(ject)390 948 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f
 
26055
(params.)40 b(One)30 b(of)h(PEM)f(or)g(DER.)390 1079
 
26056
y Ff(output)p 664 1079 V 40 w(data)p FB(:)41 b(will)31
26047
26057
b(con)m(tain)h(a)e(DN)h(PEM)g(or)f(DER)g(enco)s(ded)390
26048
 
4584 y Ff(output)p 664 4584 V 40 w(data)p 880 4584 V
 
26058
1210 y Ff(output)p 664 1210 V 40 w(data)p 880 1210 V
26049
26059
40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
26050
 
2093 4584 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
26051
 
(actual)390 4693 y(size)c(of)g(parameters\))390 4823
 
26060
2093 1210 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
26061
(actual)390 1319 y(size)c(of)g(parameters\))390 1450
26052
26062
y(This)f(function)g(will)g(exp)s(ort)g(the)h(DN)g(to)g(DER)g(or)f(PEM)g
26053
 
(format.)390 4953 y(If)23 b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h
 
26063
(format.)390 1581 y(If)23 b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h
26054
26064
(long)f(enough)g(to)h(hold)f(the)g(output,)h(then)f(*)p
26055
 
Ft(output_data_size)390 5063 y FB(is)30 b(up)s(dated)f(and)h
 
26065
Ft(output_data_size)390 1691 y FB(is)30 b(up)s(dated)f(and)h
26056
26066
Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24 b FB(will)31 b(b)s(e)e(returned.)
26057
 
390 5192 y(If)h(the)g(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g
 
26067
390 1822 y(If)h(the)g(structure)g(is)h(PEM)f(enco)s(ded,)g(it)h(will)g
26058
26068
(ha)m(v)m(e)h(a)e(header)h(of)f Ft(")p FB(BEGIN)h(NAME)p
26059
 
Ft(")p FB(.)390 5322 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26069
Ft(")p FB(.)390 1953 y Fn(Returns:)36 b FB(On)20 b(success,)j
26060
26070
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26061
 
(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
26062
 
%%Page: 224 230
26063
 
TeXDict begin 224 229 bop 150 -116 a FB(Chapter)30 b(9:)41
26064
 
b(F)-8 b(unction)31 b(Reference)2237 b(224)150 299 y
26065
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
26066
 
w(dn)p 976 299 V 55 w(get)p 1196 299 V 54 w(rdn)p 1436
26067
 
299 V 54 w(a)m(v)-7 b(a)3350 495 y FB([F)f(unction])-3599
26068
 
b Fh(int)53 b(gnutls_x509_dn_get_rd)q(n_av)q(a)f Fg(\()p
26069
 
Ff(gn)m(utls)p 2046 495 28 4 v 40 w(x509)p 2269 495 V
26070
 
42 w(dn)p 2413 495 V 39 w(t)30 b Fe(dn)12 b Ff(,)31 b(in)m(t)g
26071
 
Fe(irdn)12 b Ff(,)565 605 y(in)m(t)31 b Fe(iava)12 b
26072
 
Ff(,)31 b(gn)m(utls)p 1226 605 V 41 w(x509)p 1450 605
26073
 
V 41 w(a)m(v)-5 b(a)p 1621 605 V 41 w(st)31 b(*)g Fe(ava)12
26074
 
b Fg(\))390 714 y Ff(dn)p FB(:)40 b(input)29 b(v)-5 b(ariable)31
26075
 
b(with)f(opaque)h(DN)g(p)s(oin)m(ter)390 849 y Ff(irdn)p
26076
 
FB(:)40 b(index)29 b(of)i(RDN)390 983 y Ff(ia)m(v)-5
26077
 
b(a)p FB(:)42 b(index)30 b(of)h(A)-10 b(V)g(A.)390 1117
26078
 
y Ff(a)m(v)-5 b(a)p FB(:)42 b(P)m(oin)m(ter)32 b(to)f(structure)f(whic)
26079
 
m(h)g(will)g(hold)h(output)e(information.)390 1252 y(Get)i(p)s(oin)m
26080
 
(ters)g(to)g(data)g(within)f(the)g(DN.)390 1386 y(Note)k(that)g
26081
 
Ft(ava)e FB(will)h(con)m(tain)i(p)s(oin)m(ters)e(in)m(to)h(the)f
26082
 
Ft(dn)f FB(structure,)i(so)f(y)m(ou)g(should)f(not)i(mo)s(dify)390
26083
 
1496 y(an)m(y)41 b(data)g(or)g(deallo)s(cate)i(it.)71
26084
 
b(Note)42 b(also)g(that)f(the)f(DN)i(in)e(turn)f(p)s(oin)m(ts)i(in)m
26085
 
(to)g(the)g(original)390 1605 y(certi\014cate)32 b(structure,)e(and)f
26086
 
(th)m(us)h(y)m(ou)g(ma)m(y)g(not)g(deallo)s(cate)j(the)d(certi\014cate)
26087
 
i(and)d(con)m(tin)m(ue)i(to)390 1715 y(access)h Ft(dn)p
26088
 
FB(.)390 1849 y Fn(Returns:)40 b FB(Returns)30 b(0)h(on)f(success,)h
26089
 
(or)f(an)g(error)g(co)s(de.)150 2048 y Fv(gn)m(utls)p
26090
 
483 2048 37 5 v 55 w(x509)p 786 2048 V 54 w(dn)p 976
26091
 
2048 V 55 w(imp)s(ort)3350 2245 y FB([F)-8 b(unction])-3599
26092
 
b Fh(int)53 b(gnutls_x509_dn_import)f Fg(\()p Ff(gn)m(utls)p
26093
 
1784 2245 28 4 v 41 w(x509)p 2008 2245 V 41 w(dn)p 2151
26094
 
2245 V 39 w(t)31 b Fe(odn)12 b Ff(,)31 b(const)565 2354
26095
 
y(gn)m(utls)p 811 2354 V 41 w(datum)p 1110 2354 V 39
26096
 
w(t)g(*)g Fe(data)12 b Fg(\))390 2464 y Ff(o)s(dn)p FB(:)40
26097
 
b(the)30 b(structure)g(that)h(will)g(hold)f(the)g(imp)s(orted)g(DN)390
26098
 
2598 y Ff(data)p FB(:)41 b(should)30 b(con)m(tain)i(a)e(DER)h(enco)s
26099
 
(ded)f(RDN)h(sequence)390 2732 y(This)e(function)g(parses)g(an)g(RDN)h
26100
 
(sequence)g(and)f(stores)g(the)h(result)f(to)i(a)e Ft(gnutls_x509_dn_t)
26101
 
390 2842 y FB(structure.)57 b(The)35 b(structure)g(m)m(ust)h(ha)m(v)m
26102
 
(e)h(b)s(een)e(initialized)j(with)d Ft(gnutls_x509_dn_init\(\))p
26103
 
FB(.)390 2952 y(Y)-8 b(ou)48 b(ma)m(y)h(use)e Ft
 
26071
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2145 y Fv(gn)m(utls)p
 
26072
483 2145 37 5 v 55 w(x509)p 786 2145 V 54 w(dn)p 976
 
26073
2145 V 55 w(get)p 1196 2145 V 54 w(rdn)p 1436 2145 V
 
26074
54 w(a)m(v)e(a)3350 2334 y FB([F)f(unction])-3599 b Fh(int)53
 
26075
b(gnutls_x509_dn_get_rd)q(n_av)q(a)f Fg(\()p Ff(gn)m(utls)p
 
26076
2046 2334 28 4 v 40 w(x509)p 2269 2334 V 42 w(dn)p 2413
 
26077
2334 V 39 w(t)30 b Fe(dn)12 b Ff(,)31 b(in)m(t)g Fe(irdn)12
 
26078
b Ff(,)565 2444 y(in)m(t)31 b Fe(iava)12 b Ff(,)31 b(gn)m(utls)p
 
26079
1226 2444 V 41 w(x509)p 1450 2444 V 41 w(a)m(v)-5 b(a)p
 
26080
1621 2444 V 41 w(st)31 b(*)g Fe(ava)12 b Fg(\))390 2553
 
26081
y Ff(dn)p FB(:)40 b(input)29 b(v)-5 b(ariable)31 b(with)f(opaque)h(DN)g
 
26082
(p)s(oin)m(ter)390 2684 y Ff(irdn)p FB(:)40 b(index)29
 
26083
b(of)i(RDN)390 2815 y Ff(ia)m(v)-5 b(a)p FB(:)42 b(index)30
 
26084
b(of)h(A)-10 b(V)g(A.)390 2946 y Ff(a)m(v)-5 b(a)p FB(:)42
 
26085
b(P)m(oin)m(ter)32 b(to)f(structure)f(whic)m(h)g(will)g(hold)h(output)e
 
26086
(information.)390 3077 y(Get)i(p)s(oin)m(ters)g(to)g(data)g(within)f
 
26087
(the)g(DN.)390 3208 y(Note)k(that)g Ft(ava)e FB(will)h(con)m(tain)i(p)s
 
26088
(oin)m(ters)e(in)m(to)h(the)f Ft(dn)f FB(structure,)i(so)f(y)m(ou)g
 
26089
(should)f(not)i(mo)s(dify)390 3318 y(an)m(y)41 b(data)g(or)g(deallo)s
 
26090
(cate)i(it.)71 b(Note)42 b(also)g(that)f(the)f(DN)i(in)e(turn)f(p)s
 
26091
(oin)m(ts)i(in)m(to)g(the)g(original)390 3427 y(certi\014cate)32
 
26092
b(structure,)e(and)f(th)m(us)h(y)m(ou)g(ma)m(y)g(not)g(deallo)s(cate)j
 
26093
(the)d(certi\014cate)i(and)d(con)m(tin)m(ue)i(to)390
 
26094
3537 y(access)h Ft(dn)p FB(.)390 3668 y Fn(Returns:)40
 
26095
b FB(Returns)30 b(0)h(on)f(success,)h(or)f(an)g(error)g(co)s(de.)150
 
26096
3860 y Fv(gn)m(utls)p 483 3860 37 5 v 55 w(x509)p 786
 
26097
3860 V 54 w(dn)p 976 3860 V 55 w(imp)s(ort)3350 4049
 
26098
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_dn_import)f
 
26099
Fg(\()p Ff(gn)m(utls)p 1784 4049 28 4 v 41 w(x509)p 2008
 
26100
4049 V 41 w(dn)p 2151 4049 V 39 w(t)31 b Fe(odn)12 b
 
26101
Ff(,)31 b(const)565 4159 y(gn)m(utls)p 811 4159 V 41
 
26102
w(datum)p 1110 4159 V 39 w(t)g(*)g Fe(data)12 b Fg(\))390
 
26103
4268 y Ff(o)s(dn)p FB(:)40 b(the)30 b(structure)g(that)h(will)g(hold)f
 
26104
(the)g(imp)s(orted)g(DN)390 4399 y Ff(data)p FB(:)41
 
26105
b(should)30 b(con)m(tain)i(a)e(DER)h(enco)s(ded)f(RDN)h(sequence)390
 
26106
4530 y(This)e(function)g(parses)g(an)g(RDN)h(sequence)g(and)f(stores)g
 
26107
(the)h(result)f(to)i(a)e Ft(gnutls_x509_dn_t)390 4640
 
26108
y FB(structure.)57 b(The)35 b(structure)g(m)m(ust)h(ha)m(v)m(e)h(b)s
 
26109
(een)e(initialized)j(with)d Ft(gnutls_x509_dn_init\(\))p
 
26110
FB(.)390 4749 y(Y)-8 b(ou)48 b(ma)m(y)h(use)e Ft
26104
26111
(gnutls_x509_dn_get_rdn_ava)o(\(\))42 b FB(to)48 b(deco)s(de)g(the)g
26105
 
(DN.)h(This)e(function)390 3061 y(parses)42 b(an)h(RDN)g(sequence)h
 
26112
(DN.)h(This)e(function)390 4859 y(parses)42 b(an)h(RDN)g(sequence)h
26106
26113
(and)e(stores)h(the)g(result)g(to)h(a)f Ft(gnutls_x509_dn_t)38
26107
 
b FB(structure.)390 3171 y(The)g(structure)f(m)m(ust)h(ha)m(v)m(e)i(b)s
 
26114
b FB(structure.)390 4969 y(The)g(structure)f(m)m(ust)h(ha)m(v)m(e)i(b)s
26108
26115
(een)d(initialized)j(with)e Ft(gnutls_x509_dn_init\(\))p
26109
 
FB(.)59 b(Y)-8 b(ou)38 b(ma)m(y)390 3280 y(use)30 b Ft
 
26116
FB(.)59 b(Y)-8 b(ou)38 b(ma)m(y)390 5078 y(use)30 b Ft
26110
26117
(gnutls_x509_dn_get_rdn_av)o(a\(\))24 b FB(to)31 b(deco)s(de)f(the)h
26111
 
(DN.)390 3415 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26118
(DN.)390 5209 y Fn(Returns:)36 b FB(On)20 b(success,)j
26112
26119
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26113
 
(negativ)m(e)h(error)d(v)-5 b(alue.)390 3549 y Fn(Since:)41
26114
 
b FB(2.4.0)150 3748 y Fv(gn)m(utls)p 483 3748 37 5 v
26115
 
55 w(x509)p 786 3748 V 54 w(dn)p 976 3748 V 55 w(init)3350
26116
 
3944 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_dn_init)e
26117
 
Fg(\()p Ff(gn)m(utls)p 1679 3944 28 4 v 41 w(x509)p 1903
26118
 
3944 V 42 w(dn)p 2047 3944 V 39 w(t)30 b(*)h Fe(odn)12
26119
 
b Fg(\))390 4054 y Ff(o)s(dn)p FB(:)40 b(the)30 b(ob)5
26120
 
b(ject)31 b(to)h(b)s(e)d(initialized)390 4188 y(This)h(function)g
26121
 
(initializes)i(a)f Ft(gnutls_x509_dn_t)26 b FB(structure.)390
26122
 
4322 y(The)k(ob)5 b(ject)31 b(returned)e(m)m(ust)i(b)s(e)e(deallo)s
26123
 
(cated)k(using)c Ft(gnutls_x509_dn_deinit\(\))p FB(.)390
26124
 
4457 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
26125
 
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26126
 
b(alue.)390 4591 y Fn(Since:)41 b FB(2.4.0)150 4790 y
26127
 
Fv(gn)m(utls)p 483 4790 37 5 v 55 w(x509)p 786 4790 V
26128
 
54 w(dn)p 976 4790 V 55 w(oid)p 1194 4790 V 54 w(kno)m(wn)3350
26129
 
4986 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_dn_oid_kn)q
26130
 
(own)f Fg(\()p Ff(const)31 b(c)m(har)g(*)g Fe(oid)12
26131
 
b Fg(\))390 5096 y Ff(oid)t FB(:)40 b(holds)30 b(an)h(Ob)5
26132
 
b(ject)30 b(Iden)m(ti\014er)g(in)g(a)h(n)m(ull)f(terminated)h(string)
26133
 
390 5230 y(This)h(function)g(will)h(inform)f(ab)s(out)g(kno)m(wn)g(DN)h
26134
 
(OIDs.)47 b(This)32 b(is)h(useful)f(since)h(functions)f(lik)m(e)390
26135
 
5340 y Ft(gnutls_x509_crt_set_dn_b)o(y_oi)o(d\(\))17
26136
 
b FB(use)23 b(the)h(information)g(on)f(kno)m(wn)h(OIDs)f(to)h(prop)s
26137
 
(erly)p eop end
 
26120
(negativ)m(e)h(error)d(v)-5 b(alue.)390 5340 y Fn(Since:)41
 
26121
b FB(2.4.0)p eop end
26138
26122
%%Page: 225 231
26139
26123
TeXDict begin 225 230 bop 150 -116 a FB(Chapter)30 b(9:)41
26140
 
b(F)-8 b(unction)31 b(Reference)2237 b(225)390 299 y(enco)s(de)34
26141
 
b(their)f(input.)49 b(Ob)5 b(ject)34 b(Iden)m(ti\014ers)f(that)h(are)g
26142
 
(not)g(kno)m(wn)f(are)h(not)g(enco)s(ded)f(b)m(y)g(these)390
26143
 
408 y(functions,)c(and)f(their)h(input)f(is)h(stored)g(directly)g(in)m
26144
 
(to)h(the)f(ASN.1)h(structure.)39 b(In)28 b(that)i(case)g(of)390
26145
 
518 y(unkno)m(wn)f(OIDs,)h(y)m(ou)h(ha)m(v)m(e)h(the)e(resp)s
26146
 
(onsibilit)m(y)h(of)f(DER)h(enco)s(ding)f(y)m(our)g(data.)390
26147
 
653 y Fn(Returns:)40 b FB(1)31 b(on)f(kno)m(wn)g(OIDs)g(and)g(0)h
26148
 
(otherwise.)150 853 y Fv(gn)m(utls)p 483 853 37 5 v 55
26149
 
w(x509)p 786 853 V 54 w(privk)m(ey)p 1240 853 V 54 w(cp)m(y)3350
26150
 
1051 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_c)q
26151
 
(py)f Fg(\()p Ff(gn)m(utls)p 1889 1051 28 4 v 40 w(x509)p
26152
 
2112 1051 V 42 w(privk)m(ey)p 2447 1051 V 40 w(t)31 b
26153
 
Fe(dst)12 b Ff(,)565 1160 y(gn)m(utls)p 811 1160 V 41
26154
 
w(x509)p 1035 1160 V 41 w(privk)m(ey)p 1369 1160 V 40
26155
 
w(t)31 b Fe(src)12 b Fg(\))390 1270 y Ff(dst)r FB(:)40
26156
 
b(The)30 b(destination)h(k)m(ey)-8 b(,)32 b(whic)m(h)e(should)g(b)s(e)f
26157
 
(initialized.)390 1405 y Ff(src)6 b FB(:)40 b(The)30
26158
 
b(source)g(k)m(ey)390 1540 y(This)g(function)g(will)g(cop)m(y)h(a)g
26159
 
(priv)-5 b(ate)31 b(k)m(ey)g(from)f(source)h(to)g(destination)g(k)m(ey)
26160
 
-8 b(.)390 1675 y Fn(Returns:)36 b FB(On)20 b(success,)j
26161
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26162
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 1875 y Fv(gn)m(utls)p
26163
 
483 1875 37 5 v 55 w(x509)p 786 1875 V 54 w(privk)m(ey)p
26164
 
1240 1875 V 54 w(deinit)3350 2072 y FB([F)d(unction])-3599
 
26124
b(F)-8 b(unction)31 b(Reference)2237 b(225)150 299 y
 
26125
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
26126
w(dn)p 976 299 V 55 w(init)3350 498 y FB([F)-8 b(unction])-3599
 
26127
b Fh(int)53 b(gnutls_x509_dn_init)e Fg(\()p Ff(gn)m(utls)p
 
26128
1679 498 28 4 v 41 w(x509)p 1903 498 V 42 w(dn)p 2047
 
26129
498 V 39 w(t)30 b(*)h Fe(odn)12 b Fg(\))390 608 y Ff(o)s(dn)p
 
26130
FB(:)40 b(the)30 b(ob)5 b(ject)31 b(to)h(b)s(e)d(initialized)390
 
26131
745 y(This)h(function)g(initializes)i(a)f Ft(gnutls_x509_dn_t)26
 
26132
b FB(structure.)390 882 y(The)k(ob)5 b(ject)31 b(returned)e(m)m(ust)i
 
26133
(b)s(e)e(deallo)s(cated)k(using)c Ft(gnutls_x509_dn_deinit\(\))p
 
26134
FB(.)390 1020 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26135
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
26136
(negativ)m(e)h(error)d(v)-5 b(alue.)390 1157 y Fn(Since:)41
 
26137
b FB(2.4.0)150 1359 y Fv(gn)m(utls)p 483 1359 37 5 v
 
26138
55 w(x509)p 786 1359 V 54 w(dn)p 976 1359 V 55 w(oid)p
 
26139
1194 1359 V 54 w(kno)m(wn)3350 1558 y FB([F)-8 b(unction])-3599
 
26140
b Fh(int)53 b(gnutls_x509_dn_oid_kn)q(own)f Fg(\()p Ff(const)31
 
26141
b(c)m(har)g(*)g Fe(oid)12 b Fg(\))390 1668 y Ff(oid)t
 
26142
FB(:)40 b(holds)30 b(an)h(Ob)5 b(ject)30 b(Iden)m(ti\014er)g(in)g(a)h
 
26143
(n)m(ull)f(terminated)h(string)390 1805 y(This)h(function)g(will)h
 
26144
(inform)f(ab)s(out)g(kno)m(wn)g(DN)h(OIDs.)47 b(This)32
 
26145
b(is)h(useful)f(since)h(functions)f(lik)m(e)390 1915
 
26146
y Ft(gnutls_x509_crt_set_dn_b)o(y_oi)o(d\(\))17 b FB(use)23
 
26147
b(the)h(information)g(on)f(kno)m(wn)h(OIDs)f(to)h(prop)s(erly)390
 
26148
2024 y(enco)s(de)34 b(their)f(input.)49 b(Ob)5 b(ject)34
 
26149
b(Iden)m(ti\014ers)f(that)h(are)g(not)g(kno)m(wn)f(are)h(not)g(enco)s
 
26150
(ded)f(b)m(y)g(these)390 2134 y(functions,)c(and)f(their)h(input)f(is)h
 
26151
(stored)g(directly)g(in)m(to)h(the)f(ASN.1)h(structure.)39
 
26152
b(In)28 b(that)i(case)g(of)390 2243 y(unkno)m(wn)f(OIDs,)h(y)m(ou)h(ha)
 
26153
m(v)m(e)h(the)e(resp)s(onsibilit)m(y)h(of)f(DER)h(enco)s(ding)f(y)m
 
26154
(our)g(data.)390 2381 y Fn(Returns:)40 b FB(1)31 b(on)f(kno)m(wn)g
 
26155
(OIDs)g(and)g(0)h(otherwise.)150 2582 y Fv(gn)m(utls)p
 
26156
483 2582 V 55 w(x509)p 786 2582 V 54 w(privk)m(ey)p 1240
 
26157
2582 V 54 w(cp)m(y)3350 2782 y FB([F)-8 b(unction])-3599
 
26158
b Fh(int)53 b(gnutls_x509_privkey_c)q(py)f Fg(\()p Ff(gn)m(utls)p
 
26159
1889 2782 28 4 v 40 w(x509)p 2112 2782 V 42 w(privk)m(ey)p
 
26160
2447 2782 V 40 w(t)31 b Fe(dst)12 b Ff(,)565 2892 y(gn)m(utls)p
 
26161
811 2892 V 41 w(x509)p 1035 2892 V 41 w(privk)m(ey)p
 
26162
1369 2892 V 40 w(t)31 b Fe(src)12 b Fg(\))390 3001 y
 
26163
Ff(dst)r FB(:)40 b(The)30 b(destination)h(k)m(ey)-8 b(,)32
 
26164
b(whic)m(h)e(should)g(b)s(e)f(initialized.)390 3138 y
 
26165
Ff(src)6 b FB(:)40 b(The)30 b(source)g(k)m(ey)390 3276
 
26166
y(This)g(function)g(will)g(cop)m(y)h(a)g(priv)-5 b(ate)31
 
26167
b(k)m(ey)g(from)f(source)h(to)g(destination)g(k)m(ey)-8
 
26168
b(.)390 3413 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26169
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
26170
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3615 y Fv(gn)m(utls)p
 
26171
483 3615 37 5 v 55 w(x509)p 786 3615 V 54 w(privk)m(ey)p
 
26172
1240 3615 V 54 w(deinit)3350 3814 y FB([F)d(unction])-3599
26165
26173
b Fh(void)54 b(gnutls_x509_privkey_dein)q(it)e Fg(\()p
26166
 
Ff(gn)m(utls)p 2098 2072 28 4 v 41 w(x509)p 2322 2072
26167
 
V 41 w(privk)m(ey)p 2656 2072 V 40 w(t)31 b Fe(key)12
26168
 
b Fg(\))390 2182 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s
26169
 
(e)f(initialized)390 2317 y(This)g(function)g(will)g(deinitialize)j(a)e
26170
 
(priv)-5 b(ate)31 b(k)m(ey)g(structure.)150 2517 y Fv(gn)m(utls)p
26171
 
483 2517 37 5 v 55 w(x509)p 786 2517 V 54 w(privk)m(ey)p
26172
 
1240 2517 V 54 w(exp)s(ort)p 1645 2517 V 54 w(dsa)p 1875
26173
 
2517 V 55 w(ra)m(w)3350 2714 y FB([F)-8 b(unction])-3599
 
26174
Ff(gn)m(utls)p 2098 3814 28 4 v 41 w(x509)p 2322 3814
 
26175
V 41 w(privk)m(ey)p 2656 3814 V 40 w(t)31 b Fe(key)12
 
26176
b Fg(\))390 3924 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s
 
26177
(e)f(initialized)390 4061 y(This)g(function)g(will)g(deinitialize)j(a)e
 
26178
(priv)-5 b(ate)31 b(k)m(ey)g(structure.)150 4263 y Fv(gn)m(utls)p
 
26179
483 4263 37 5 v 55 w(x509)p 786 4263 V 54 w(privk)m(ey)p
 
26180
1240 4263 V 54 w(exp)s(ort)p 1645 4263 V 54 w(dsa)p 1875
 
26181
4263 V 55 w(ra)m(w)3350 4462 y FB([F)-8 b(unction])-3599
26174
26182
b Fh(int)53 b(gnutls_x509_privkey_e)q(xpor)q(t_d)q(sa_)q(raw)f
26175
 
Fg(\()p Ff(gn)m(utls)p 2464 2714 28 4 v 41 w(x509)p 2688
26176
 
2714 V 41 w(privk)m(ey)p 3022 2714 V 40 w(t)565 2824
26177
 
y Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1035 2824 V 41 w(datum)p
26178
 
1334 2824 V 39 w(t)g(*)g Fe(p)12 b Ff(,)30 b(gn)m(utls)p
26179
 
1874 2824 V 40 w(datum)p 2172 2824 V 40 w(t)h(*)f Fe(q)12
26180
 
b Ff(,)31 b(gn)m(utls)p 2713 2824 V 40 w(datum)p 3011
26181
 
2824 V 40 w(t)f(*)h Fe(g)12 b Ff(,)565 2934 y(gn)m(utls)p
26182
 
811 2934 V 41 w(datum)p 1110 2934 V 39 w(t)31 b(*)g Fe(y)12
26183
 
b Ff(,)30 b(gn)m(utls)p 1650 2934 V 40 w(datum)p 1948
26184
 
2934 V 40 w(t)h(*)f Fe(x)12 b Fg(\))390 3043 y Ff(p)s
26185
 
FB(:)40 b(will)31 b(hold)f(the)g(p)390 3178 y Ff(q)r
26186
 
FB(:)41 b(will)30 b(hold)g(the)h(q)390 3314 y Ff(g)8
26187
 
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 3449 y Ff(y)8
26188
 
b FB(:)40 b(will)31 b(hold)f(the)h(y)390 3584 y Ff(x)6
26189
 
b FB(:)41 b(will)31 b(hold)f(the)g(x)390 3719 y(This)e(function)g(will)
26190
 
h(exp)s(ort)f(the)h(DSA)g(priv)-5 b(ate)29 b(k)m(ey's)g(parameters)g
26191
 
(found)e(in)i(the)f(giv)m(en)i(struc-)390 3829 y(ture.)38
26192
 
b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s(cated)i(using)d
26193
 
Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g(stored)390
26194
 
3938 y(in)30 b(the)h(appropriate)f(datum.)390 4073 y
26195
 
Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
26183
Fg(\()p Ff(gn)m(utls)p 2464 4462 28 4 v 41 w(x509)p 2688
 
26184
4462 V 41 w(privk)m(ey)p 3022 4462 V 40 w(t)565 4572
 
26185
y Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1035 4572 V 41 w(datum)p
 
26186
1334 4572 V 39 w(t)g(*)g Fe(p)12 b Ff(,)30 b(gn)m(utls)p
 
26187
1874 4572 V 40 w(datum)p 2172 4572 V 40 w(t)h(*)f Fe(q)12
 
26188
b Ff(,)31 b(gn)m(utls)p 2713 4572 V 40 w(datum)p 3011
 
26189
4572 V 40 w(t)f(*)h Fe(g)12 b Ff(,)565 4682 y(gn)m(utls)p
 
26190
811 4682 V 41 w(datum)p 1110 4682 V 39 w(t)31 b(*)g Fe(y)12
 
26191
b Ff(,)30 b(gn)m(utls)p 1650 4682 V 40 w(datum)p 1948
 
26192
4682 V 40 w(t)h(*)f Fe(x)12 b Fg(\))390 4791 y Ff(p)s
 
26193
FB(:)40 b(will)31 b(hold)f(the)g(p)390 4928 y Ff(q)r
 
26194
FB(:)41 b(will)30 b(hold)g(the)h(q)390 5066 y Ff(g)8
 
26195
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 5203 y Ff(y)8
 
26196
b FB(:)40 b(will)31 b(hold)f(the)h(y)390 5340 y Ff(x)6
 
26197
b FB(:)41 b(will)31 b(hold)f(the)g(x)p eop end
 
26198
%%Page: 226 232
 
26199
TeXDict begin 226 231 bop 150 -116 a FB(Chapter)30 b(9:)41
 
26200
b(F)-8 b(unction)31 b(Reference)2237 b(226)390 299 y(This)28
 
26201
b(function)g(will)h(exp)s(ort)f(the)h(DSA)g(priv)-5 b(ate)29
 
26202
b(k)m(ey's)g(parameters)g(found)e(in)i(the)f(giv)m(en)i(struc-)390
 
26203
408 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
 
26204
(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g(stored)
 
26205
390 518 y(in)30 b(the)h(appropriate)f(datum.)390 650
 
26206
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
26196
26207
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26197
 
b(alue.)150 4273 y Fv(gn)m(utls)p 483 4273 37 5 v 55
26198
 
w(x509)p 786 4273 V 54 w(privk)m(ey)p 1240 4273 V 54
26199
 
w(exp)s(ort)p 1645 4273 V 54 w(pk)m(cs8)3350 4471 y FB([F)d(unction])
26200
 
-3599 b Fh(int)53 b(gnutls_x509_privkey_e)q(xpor)q(t_p)q(kcs)q(8)e
26201
 
Fg(\()p Ff(gn)m(utls)p 2359 4471 28 4 v 41 w(x509)p 2583
26202
 
4471 V 41 w(privk)m(ey)p 2917 4471 V 41 w(t)565 4580
26203
 
y Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1035 4580 V 41 w(x509)p
26204
 
1259 4580 V 41 w(crt)p 1411 4580 V 40 w(fm)m(t)p 1587
26205
 
4580 V 41 w(t)f Fe(format)12 b Ff(,)32 b(const)f(c)m(har)g(*)g
26206
 
Fe(password)12 b Ff(,)32 b(unsigned)d(in)m(t)565 4690
 
26208
b(alue.)150 843 y Fv(gn)m(utls)p 483 843 37 5 v 55 w(x509)p
 
26209
786 843 V 54 w(privk)m(ey)p 1240 843 V 54 w(exp)s(ort)p
 
26210
1645 843 V 54 w(pk)m(cs8)3350 1034 y FB([F)d(unction])-3599
 
26211
b Fh(int)53 b(gnutls_x509_privkey_e)q(xpor)q(t_p)q(kcs)q(8)e
 
26212
Fg(\()p Ff(gn)m(utls)p 2359 1034 28 4 v 41 w(x509)p 2583
 
26213
1034 V 41 w(privk)m(ey)p 2917 1034 V 41 w(t)565 1144
 
26214
y Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1035 1144 V 41 w(x509)p
 
26215
1259 1144 V 41 w(crt)p 1411 1144 V 40 w(fm)m(t)p 1587
 
26216
1144 V 41 w(t)f Fe(format)12 b Ff(,)32 b(const)f(c)m(har)g(*)g
 
26217
Fe(password)12 b Ff(,)32 b(unsigned)d(in)m(t)565 1253
26207
26218
y Fe(flags)12 b Ff(,)32 b(v)m(oid)f(*)f Fe(output_data)12
26208
 
b Ff(,)34 b(size)p 1956 4690 V 41 w(t)c(*)h Fe(output_data_size)12
26209
 
b Fg(\))390 4799 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
26210
 
4935 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
26211
 
b(One)30 b(of)h(PEM)f(or)g(DER.)390 5070 y Ff(passw)m(ord)t
 
26219
b Ff(,)34 b(size)p 1956 1253 V 41 w(t)c(*)h Fe(output_data_size)12
 
26220
b Fg(\))390 1363 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
 
26221
1495 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
 
26222
b(One)30 b(of)h(PEM)f(or)g(DER.)390 1626 y Ff(passw)m(ord)t
26212
26223
FB(:)40 b(the)30 b(passw)m(ord)g(that)h(will)g(b)s(e)e(used)h(to)h
26213
 
(encrypt)f(the)h(k)m(ey)-8 b(.)390 5205 y Ff(\015ags)t
 
26224
(encrypt)f(the)h(k)m(ey)-8 b(.)390 1758 y Ff(\015ags)t
26214
26225
FB(:)41 b(an)30 b(ORed)g(sequence)h(of)f(gn)m(utls)p
26215
 
1748 5205 V 40 w(pk)m(cs)p 1960 5205 V 41 w(encrypt)p
26216
 
2302 5205 V 39 w(\015ags)p 2518 5205 V 41 w(t)390 5340
26217
 
y Ff(output)p 664 5340 V 40 w(data)p FB(:)41 b(will)31
 
26226
1748 1758 V 40 w(pk)m(cs)p 1960 1758 V 41 w(encrypt)p
 
26227
2302 1758 V 39 w(\015ags)p 2518 1758 V 41 w(t)390 1890
 
26228
y Ff(output)p 664 1890 V 40 w(data)p FB(:)41 b(will)31
26218
26229
b(con)m(tain)h(a)e(priv)-5 b(ate)31 b(k)m(ey)g(PEM)g(or)f(DER)h(enco)s
26219
 
(ded)p eop end
26220
 
%%Page: 226 232
26221
 
TeXDict begin 226 231 bop 150 -116 a FB(Chapter)30 b(9:)41
26222
 
b(F)-8 b(unction)31 b(Reference)2237 b(226)390 299 y
26223
 
Ff(output)p 664 299 28 4 v 40 w(data)p 880 299 V 40 w(size)5
26224
 
b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p 2093
26225
 
299 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
26226
 
(actual)390 408 y(size)c(of)g(parameters\))390 548 y(This)c(function)h
26227
 
(will)g(exp)s(ort)g(the)g(priv)-5 b(ate)29 b(k)m(ey)g(to)g(a)f(PK)m
26228
 
(CS8)g(structure.)39 b(Both)29 b(RSA)e(and)h(DSA)390
26229
 
657 y(k)m(eys)i(can)h(b)s(e)e(exp)s(orted.)40 b(F)-8
26230
 
b(or)31 b(DSA)f(k)m(eys)g(w)m(e)g(use)g(PK)m(CS)f Ft(11)g
26231
 
FB(de\014nitions.)40 b(If)30 b(the)g(\015ags)g(do)g(not)390
26232
 
767 y(sp)s(ecify)g(the)h(encryption)f(cipher,)g(then)g(the)h(default)f
26233
 
(3DES)h(\(PBES2\))g(will)g(b)s(e)e(used.)390 906 y(The)48
 
26230
(ded)390 2021 y Ff(output)p 664 2021 V 40 w(data)p 880
 
26231
2021 V 40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
 
26232
2093 2021 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
26233
(actual)390 2131 y(size)c(of)g(parameters\))390 2262
 
26234
y(This)c(function)h(will)g(exp)s(ort)g(the)g(priv)-5
 
26235
b(ate)29 b(k)m(ey)g(to)g(a)f(PK)m(CS8)g(structure.)39
 
26236
b(Both)29 b(RSA)e(and)h(DSA)390 2372 y(k)m(eys)i(can)h(b)s(e)e(exp)s
 
26237
(orted.)40 b(F)-8 b(or)31 b(DSA)f(k)m(eys)g(w)m(e)g(use)g(PK)m(CS)f
 
26238
Ft(11)g FB(de\014nitions.)40 b(If)30 b(the)g(\015ags)g(do)g(not)390
 
26239
2482 y(sp)s(ecify)g(the)h(encryption)f(cipher,)g(then)g(the)h(default)f
 
26240
(3DES)h(\(PBES2\))g(will)g(b)s(e)e(used.)390 2613 y(The)48
26234
26241
b Ft(password)e FB(can)i(b)s(e)g(either)h(ASCI)s(I)d(or)j(UTF-8)g(in)f
26235
 
(the)g(default)h(PBES2)f(encryption)390 1016 y(sc)m(hemas,)31
 
26242
(the)g(default)h(PBES2)f(encryption)390 2723 y(sc)m(hemas,)31
26236
26243
b(or)g(ASCI)s(I)d(for)j(the)f(PK)m(CS12)h(sc)m(hemas.)390
26237
 
1155 y(If)f(the)h(bu\013er)f(pro)m(vided)g(is)g(not)h(long)h(enough)e
26238
 
(to)h(hold)g(the)f(output,)h(then)f(*output)p 3357 1155
26239
 
V 40 w(data)p 3573 1155 V 41 w(size)390 1265 y(is)g(up)s(dated)f(and)h
26240
 
(GNUTLS)p 1401 1265 V 40 w(E)p 1503 1265 V 40 w(SHOR)-8
26241
 
b(T)p 1858 1265 V 39 w(MEMOR)g(Y)p 2323 1265 V 41 w(BUFFER)31
26242
 
b(will)g(b)s(e)f(returned.)390 1404 y(If)39 b(the)g(structure)f(is)h
 
26244
2854 y(If)f(the)h(bu\013er)f(pro)m(vided)g(is)g(not)h(long)h(enough)e
 
26245
(to)h(hold)g(the)f(output,)h(then)f(*output)p 3357 2854
 
26246
V 40 w(data)p 3573 2854 V 41 w(size)390 2964 y(is)g(up)s(dated)f(and)h
 
26247
(GNUTLS)p 1401 2964 V 40 w(E)p 1503 2964 V 40 w(SHOR)-8
 
26248
b(T)p 1858 2964 V 39 w(MEMOR)g(Y)p 2323 2964 V 41 w(BUFFER)31
 
26249
b(will)g(b)s(e)f(returned.)390 3096 y(If)39 b(the)g(structure)f(is)h
26243
26250
(PEM)g(enco)s(ded,)i(it)f(will)f(ha)m(v)m(e)h(a)g(header)f(of)g
26244
 
Ft(")p FB(BEGIN)g(ENCR)-8 b(YPTED)390 1513 y(PRIV)e(A)i(TE)30
 
26251
Ft(")p FB(BEGIN)g(ENCR)-8 b(YPTED)390 3205 y(PRIV)e(A)i(TE)30
26245
26252
b(KEY)p Ft(")g FB(or)g Ft(")p FB(BEGIN)h(PRIV)-10 b(A)i(TE)30
26246
26253
b(KEY)p Ft(")g FB(if)g(encryption)g(is)h(not)f(used.)390
26247
 
1653 y Fn(Return)g(v)-5 b(alue:)41 b FB(In)30 b(case)h(of)g(failure)f
 
26254
3337 y Fn(Return)g(v)-5 b(alue:)41 b FB(In)30 b(case)h(of)g(failure)f
26248
26255
(a)h(negativ)m(e)i(v)-5 b(alue)30 b(will)h(b)s(e)f(returned,)f(and)h(0)
26249
 
h(on)f(success.)150 1857 y Fv(gn)m(utls)p 483 1857 37
26250
 
5 v 55 w(x509)p 786 1857 V 54 w(privk)m(ey)p 1240 1857
26251
 
V 54 w(exp)s(ort)p 1645 1857 V 54 w(rsa)p 1857 1857 V
26252
 
54 w(ra)m(w)3350 2058 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
26256
h(on)f(success.)150 3530 y Fv(gn)m(utls)p 483 3530 37
 
26257
5 v 55 w(x509)p 786 3530 V 54 w(privk)m(ey)p 1240 3530
 
26258
V 54 w(exp)s(ort)p 1645 3530 V 54 w(rsa)p 1857 3530 V
 
26259
54 w(ra)m(w)3350 3721 y FB([F)-8 b(unction])-3599 b Fh(int)53
26253
26260
b(gnutls_x509_privkey_e)q(xpor)q(t_r)q(sa_)q(raw)f Fg(\()p
26254
 
Ff(gn)m(utls)p 2464 2058 28 4 v 41 w(x509)p 2688 2058
26255
 
V 41 w(privk)m(ey)p 3022 2058 V 40 w(t)565 2168 y Fe(key)12
26256
 
b Ff(,)31 b(gn)m(utls)p 1035 2168 V 41 w(datum)p 1334
26257
 
2168 V 39 w(t)g(*)g Fe(m)12 b Ff(,)30 b(gn)m(utls)p 1874
26258
 
2168 V 40 w(datum)p 2172 2168 V 40 w(t)h(*)f Fe(e)12
26259
 
b Ff(,)31 b(gn)m(utls)p 2713 2168 V 40 w(datum)p 3011
26260
 
2168 V 40 w(t)f(*)h Fe(d)12 b Ff(,)565 2277 y(gn)m(utls)p
26261
 
811 2277 V 41 w(datum)p 1110 2277 V 39 w(t)31 b(*)g Fe(p)12
26262
 
b Ff(,)30 b(gn)m(utls)p 1650 2277 V 40 w(datum)p 1948
26263
 
2277 V 40 w(t)h(*)f Fe(q)12 b Ff(,)31 b(gn)m(utls)p 2489
26264
 
2277 V 40 w(datum)p 2787 2277 V 40 w(t)f(*)h Fe(u)12
26265
 
b Fg(\))390 2387 y Ff(k)m(ey)c FB(:)41 b(a)31 b(structure)f(that)h
26266
 
(holds)f(the)g(rsa)h(parameters)390 2526 y Ff(m)p FB(:)40
26267
 
b(will)31 b(hold)f(the)h(mo)s(dulus)390 2665 y Ff(e)5
 
26261
Ff(gn)m(utls)p 2464 3721 28 4 v 41 w(x509)p 2688 3721
 
26262
V 41 w(privk)m(ey)p 3022 3721 V 40 w(t)565 3831 y Fe(key)12
 
26263
b Ff(,)31 b(gn)m(utls)p 1035 3831 V 41 w(datum)p 1334
 
26264
3831 V 39 w(t)g(*)g Fe(m)12 b Ff(,)30 b(gn)m(utls)p 1874
 
26265
3831 V 40 w(datum)p 2172 3831 V 40 w(t)h(*)f Fe(e)12
 
26266
b Ff(,)31 b(gn)m(utls)p 2713 3831 V 40 w(datum)p 3011
 
26267
3831 V 40 w(t)f(*)h Fe(d)12 b Ff(,)565 3941 y(gn)m(utls)p
 
26268
811 3941 V 41 w(datum)p 1110 3941 V 39 w(t)31 b(*)g Fe(p)12
 
26269
b Ff(,)30 b(gn)m(utls)p 1650 3941 V 40 w(datum)p 1948
 
26270
3941 V 40 w(t)h(*)f Fe(q)12 b Ff(,)31 b(gn)m(utls)p 2489
 
26271
3941 V 40 w(datum)p 2787 3941 V 40 w(t)f(*)h Fe(u)12
 
26272
b Fg(\))390 4050 y Ff(k)m(ey)c FB(:)41 b(a)31 b(structure)f(that)h
 
26273
(holds)f(the)g(rsa)h(parameters)390 4182 y Ff(m)p FB(:)40
 
26274
b(will)31 b(hold)f(the)h(mo)s(dulus)390 4313 y Ff(e)5
26268
26275
b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m(t)390
26269
 
2805 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
26270
 
b(ate)31 b(exp)s(onen)m(t)390 2944 y Ff(p)s FB(:)40 b(will)31
26271
 
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 3083 y Ff(q)r
 
26276
4445 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
 
26277
b(ate)31 b(exp)s(onen)m(t)390 4577 y Ff(p)s FB(:)40 b(will)31
 
26278
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 4708 y Ff(q)r
26272
26279
FB(:)41 b(will)30 b(hold)g(the)h(second)f(prime)g(\(q\))390
26273
 
3222 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
26274
 
3362 y(This)e(function)g(will)i(exp)s(ort)e(the)h(RSA)f(priv)-5
 
26280
4840 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
 
26281
4971 y(This)e(function)g(will)i(exp)s(ort)e(the)h(RSA)f(priv)-5
26275
26282
b(ate)30 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h
26276
 
(struc-)390 3471 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)
 
26283
(struc-)390 5081 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)
26277
26284
g(allo)s(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g
26278
 
(stored)390 3581 y(in)30 b(the)h(appropriate)f(datum.)390
26279
 
3720 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
26285
(stored)390 5191 y(in)30 b(the)h(appropriate)f(datum.)390
 
26286
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
26280
26287
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26281
 
b(alue.)150 3924 y Fv(gn)m(utls)p 483 3924 37 5 v 55
26282
 
w(x509)p 786 3924 V 54 w(privk)m(ey)p 1240 3924 V 54
26283
 
w(exp)s(ort)3350 4125 y FB([F)d(unction])-3599 b Fh(int)53
26284
 
b(gnutls_x509_privkey_e)q(xpor)q(t)f Fg(\()p Ff(gn)m(utls)p
26285
 
2046 4125 28 4 v 40 w(x509)p 2269 4125 V 42 w(privk)m(ey)p
26286
 
2604 4125 V 40 w(t)31 b Fe(key)12 b Ff(,)565 4235 y(gn)m(utls)p
26287
 
811 4235 V 41 w(x509)p 1035 4235 V 41 w(crt)p 1187 4235
26288
 
V 40 w(fm)m(t)p 1363 4235 V 41 w(t)30 b Fe(format)12
26289
 
b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12 b Ff(,)33
26290
 
b(size)p 2906 4235 V 41 w(t)e(*)565 4345 y Fe(output_data_size)12
26291
 
b Fg(\))390 4454 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
26292
 
4593 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
26293
 
b(One)30 b(of)h(PEM)f(or)g(DER.)390 4733 y Ff(output)p
26294
 
664 4733 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e(priv)-5
26295
 
b(ate)31 b(k)m(ey)g(PEM)g(or)f(DER)h(enco)s(ded)390 4872
26296
 
y Ff(output)p 664 4872 V 40 w(data)p 880 4872 V 40 w(size)5
 
26288
b(alue.)p eop end
 
26289
%%Page: 227 233
 
26290
TeXDict begin 227 232 bop 150 -116 a FB(Chapter)30 b(9:)41
 
26291
b(F)-8 b(unction)31 b(Reference)2237 b(227)150 299 y
 
26292
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
26293
w(privk)m(ey)p 1240 299 V 54 w(exp)s(ort)3350 497 y FB([F)-8
 
26294
b(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_e)q(xpor)q(t)f
 
26295
Fg(\()p Ff(gn)m(utls)p 2046 497 28 4 v 40 w(x509)p 2269
 
26296
497 V 42 w(privk)m(ey)p 2604 497 V 40 w(t)31 b Fe(key)12
 
26297
b Ff(,)565 606 y(gn)m(utls)p 811 606 V 41 w(x509)p 1035
 
26298
606 V 41 w(crt)p 1187 606 V 40 w(fm)m(t)p 1363 606 V
 
26299
41 w(t)30 b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(output_data)12
 
26300
b Ff(,)33 b(size)p 2906 606 V 41 w(t)e(*)565 716 y Fe(output_data_size)
 
26301
12 b Fg(\))390 825 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
 
26302
961 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(output)f(params.)40
 
26303
b(One)30 b(of)h(PEM)f(or)g(DER.)390 1096 y Ff(output)p
 
26304
664 1096 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(a)e(priv)-5
 
26305
b(ate)31 b(k)m(ey)g(PEM)g(or)f(DER)h(enco)s(ded)390 1232
 
26306
y Ff(output)p 664 1232 V 40 w(data)p 880 1232 V 40 w(size)5
26297
26307
b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p 2093
26298
 
4872 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
26299
 
(actual)390 4982 y(size)c(of)g(parameters\))390 5121
 
26308
1232 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
26309
(actual)390 1341 y(size)c(of)g(parameters\))390 1477
26300
26310
y(This)40 b(function)h(will)g(exp)s(ort)g(the)g(priv)-5
26301
26311
b(ate)41 b(k)m(ey)h(to)f(a)h(PK)m(CS1)e(structure)g(for)h(RSA)g(k)m
26302
 
(eys,)j(or)390 5230 y(an)35 b(in)m(teger)i(sequence)f(for)f(DSA)h(k)m
 
26312
(eys,)j(or)390 1586 y(an)35 b(in)m(teger)i(sequence)f(for)f(DSA)h(k)m
26303
26313
(eys.)57 b(The)35 b(DSA)g(k)m(eys)h(are)g(in)f(the)h(same)g(format)g
26304
 
(with)f(the)390 5340 y(parameters)c(used)e(b)m(y)i(op)s(enssl.)p
26305
 
eop end
26306
 
%%Page: 227 233
26307
 
TeXDict begin 227 232 bop 150 -116 a FB(Chapter)30 b(9:)41
26308
 
b(F)-8 b(unction)31 b(Reference)2237 b(227)390 299 y(If)23
26309
 
b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h(long)f(enough)g(to)h(hold)f
26310
 
(the)g(output,)h(then)f(*)p Ft(output_data_size)390 408
26311
 
y FB(is)30 b(up)s(dated)f(and)h Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24
26312
 
b FB(will)31 b(b)s(e)e(returned.)390 556 y(If)35 b(the)h(structure)f
26313
 
(is)g(PEM)h(enco)s(ded,)g(it)g(will)g(ha)m(v)m(e)h(a)f(header)f(of)g
26314
 
Ft(")p FB(BEGIN)h(RSA)f(PRIV)-10 b(A)i(TE)390 666 y(KEY)p
26315
 
Ft(")p FB(.)390 814 y Fn(Returns:)36 b FB(On)20 b(success,)j
26316
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26317
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 1027 y Fv(gn)m(utls)p
26318
 
483 1027 37 5 v 55 w(x509)p 786 1027 V 54 w(privk)m(ey)p
26319
 
1240 1027 V 54 w(\014x)3350 1237 y FB([F)d(unction])-3599
26320
 
b Fh(int)53 b(gnutls_x509_privkey_f)q(ix)f Fg(\()p Ff(gn)m(utls)p
26321
 
1889 1237 28 4 v 40 w(x509)p 2112 1237 V 42 w(privk)m(ey)p
26322
 
2447 1237 V 40 w(t)31 b Fe(key)12 b Fg(\))390 1347 y
26323
 
Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390 1495
 
26314
(with)f(the)390 1696 y(parameters)c(used)e(b)m(y)i(op)s(enssl.)390
 
26315
1831 y(If)23 b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h(long)f(enough)
 
26316
g(to)h(hold)f(the)g(output,)h(then)f(*)p Ft(output_data_size)390
 
26317
1941 y FB(is)30 b(up)s(dated)f(and)h Ft(GNUTLS_E_SHORT_MEMORY_BUF)o
 
26318
(FER)24 b FB(will)31 b(b)s(e)e(returned.)390 2076 y(If)35
 
26319
b(the)h(structure)f(is)g(PEM)h(enco)s(ded,)g(it)g(will)g(ha)m(v)m(e)h
 
26320
(a)f(header)f(of)g Ft(")p FB(BEGIN)h(RSA)f(PRIV)-10 b(A)i(TE)390
 
26321
2186 y(KEY)p Ft(")p FB(.)390 2321 y Fn(Returns:)36 b
 
26322
FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
26323
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
26324
b(alue.)150 2522 y Fv(gn)m(utls)p 483 2522 37 5 v 55
 
26325
w(x509)p 786 2522 V 54 w(privk)m(ey)p 1240 2522 V 54
 
26326
w(\014x)3350 2719 y FB([F)d(unction])-3599 b Fh(int)53
 
26327
b(gnutls_x509_privkey_f)q(ix)f Fg(\()p Ff(gn)m(utls)p
 
26328
1889 2719 28 4 v 40 w(x509)p 2112 2719 V 42 w(privk)m(ey)p
 
26329
2447 2719 V 40 w(t)31 b Fe(key)12 b Fg(\))390 2829 y
 
26330
Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390 2964
26324
26331
y(This)i(function)h(will)h(recalculate)i(the)d(secondary)h(parameters)f
26325
26332
(in)g(a)h(k)m(ey)-8 b(.)51 b(In)32 b(RSA)h(k)m(eys,)i(this)390
26326
 
1604 y(can)c(b)s(e)e(the)i(co)s(e\016cien)m(t)h(and)e(exp)s(onen)m
26327
 
(t1,2.)390 1752 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26333
3074 y(can)c(b)s(e)e(the)i(co)s(e\016cien)m(t)h(and)e(exp)s(onen)m
 
26334
(t1,2.)390 3209 y Fn(Returns:)36 b FB(On)20 b(success,)j
26328
26335
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26329
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 1965 y Fv(gn)m(utls)p
26330
 
483 1965 37 5 v 55 w(x509)p 786 1965 V 54 w(privk)m(ey)p
26331
 
1240 1965 V 54 w(generate)3350 2175 y FB([F)d(unction])-3599
 
26336
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3410 y Fv(gn)m(utls)p
 
26337
483 3410 37 5 v 55 w(x509)p 786 3410 V 54 w(privk)m(ey)p
 
26338
1240 3410 V 54 w(generate)3350 3607 y FB([F)d(unction])-3599
26332
26339
b Fh(int)53 b(gnutls_x509_privkey_g)q(ener)q(ate)f Fg(\()p
26333
 
Ff(gn)m(utls)p 2150 2175 28 4 v 41 w(x509)p 2374 2175
26334
 
V 41 w(privk)m(ey)p 2708 2175 V 40 w(t)31 b Fe(key)12
26335
 
b Ff(,)565 2285 y(gn)m(utls)p 811 2285 V 41 w(pk)p 951
26336
 
2285 V 39 w(algorithm)p 1373 2285 V 41 w(t)31 b Fe(algo)12
 
26340
Ff(gn)m(utls)p 2150 3607 28 4 v 41 w(x509)p 2374 3607
 
26341
V 41 w(privk)m(ey)p 2708 3607 V 40 w(t)31 b Fe(key)12
 
26342
b Ff(,)565 3717 y(gn)m(utls)p 811 3717 V 41 w(pk)p 951
 
26343
3717 V 39 w(algorithm)p 1373 3717 V 41 w(t)31 b Fe(algo)12
26337
26344
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(bits)12 b Ff(,)32
26338
 
b(unsigned)d(in)m(t)i Fe(flags)12 b Fg(\))390 2394 y
 
26345
b(unsigned)d(in)m(t)i Fe(flags)12 b Fg(\))390 3826 y
26339
26346
Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(a)g Ft
26340
 
(gnutls_x509_privkey_t)25 b FB(structure)390 2543 y Ff(algo)5
26341
 
b FB(:)42 b(is)30 b(one)h(of)f(RSA)g(or)h(DSA.)390 2691
 
26347
(gnutls_x509_privkey_t)25 b FB(structure)390 3962 y Ff(algo)5
 
26348
b FB(:)42 b(is)30 b(one)h(of)f(RSA)g(or)h(DSA.)390 4097
26342
26349
y Ff(bits)t FB(:)40 b(the)31 b(size)g(of)g(the)f(mo)s(dulus)390
26343
 
2839 y Ff(\015ags)t FB(:)41 b(un)m(used)29 b(for)h(no)m(w.)41
26344
 
b(Must)30 b(b)s(e)g(0.)390 2987 y(This)35 b(function)h(will)g(generate)
 
26350
4233 y Ff(\015ags)t FB(:)41 b(un)m(used)29 b(for)h(no)m(w.)41
 
26351
b(Must)30 b(b)s(e)g(0.)390 4368 y(This)35 b(function)h(will)g(generate)
26345
26352
i(a)e(random)g(priv)-5 b(ate)36 b(k)m(ey)-8 b(.)59 b(Note)37
26346
 
b(that)g(this)f(function)g(m)m(ust)g(b)s(e)390 3096 y(called)c(on)e(an)
26347
 
g(empt)m(y)h(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 3244
 
26353
b(that)g(this)f(function)g(m)m(ust)g(b)s(e)390 4478 y(called)c(on)e(an)
 
26354
g(empt)m(y)h(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 4613
26348
26355
y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
26349
26356
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26350
 
b(alue.)150 3457 y Fv(gn)m(utls)p 483 3457 37 5 v 55
26351
 
w(x509)p 786 3457 V 54 w(privk)m(ey)p 1240 3457 V 54
26352
 
w(get)p 1459 3457 V 54 w(k)m(ey)p 1696 3457 V 53 w(id)3350
26353
 
3667 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_g)q
26354
 
(et_k)q(ey_)q(id)f Fg(\()p Ff(gn)m(utls)p 2255 3667 28
26355
 
4 v 41 w(x509)p 2479 3667 V 41 w(privk)m(ey)p 2813 3667
26356
 
V 40 w(t)31 b Fe(key)12 b Ff(,)565 3777 y(unsigned)29
 
26357
b(alue.)150 4813 y Fv(gn)m(utls)p 483 4813 37 5 v 55
 
26358
w(x509)p 786 4813 V 54 w(privk)m(ey)p 1240 4813 V 54
 
26359
w(get)p 1459 4813 V 54 w(k)m(ey)p 1696 4813 V 53 w(id)3350
 
26360
5011 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_g)q
 
26361
(et_k)q(ey_)q(id)f Fg(\()p Ff(gn)m(utls)p 2255 5011 28
 
26362
4 v 41 w(x509)p 2479 5011 V 41 w(privk)m(ey)p 2813 5011
 
26363
V 40 w(t)31 b Fe(key)12 b Ff(,)565 5121 y(unsigned)29
26357
26364
b(in)m(t)i Fe(flags)12 b Ff(,)32 b(unsigned)d(c)m(har)i(*)g
26358
 
Fe(output_data)12 b Ff(,)33 b(size)p 2856 3777 V 41 w(t)e(*)565
26359
 
3886 y Fe(output_data_size)12 b Fg(\))390 3996 y Ff(k)m(ey)c
26360
 
FB(:)41 b(Holds)31 b(the)f(k)m(ey)390 4144 y Ff(\015ags)t
26361
 
FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390 4292
26362
 
y Ff(output)p 664 4292 V 40 w(data)p FB(:)41 b(will)31
26363
 
b(con)m(tain)h(the)e(k)m(ey)h(ID)390 4440 y Ff(output)p
26364
 
664 4440 V 40 w(data)p 880 4440 V 40 w(size)5 b FB(:)49
26365
 
b(holds)34 b(the)g(size)h(of)f(output)p 2093 4440 V 39
26366
 
w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i(actual)390
26367
 
4550 y(size)c(of)g(parameters\))390 4698 y(This)24 b(function)h(will)h
26368
 
(return)e(a)i(unique)e(ID)h(the)h(dep)s(ends)d(on)i(the)h(public)e(k)m
26369
 
(ey)i(parameters.)40 b(This)390 4807 y(ID)31 b(can)f(b)s(e)g(used)g(in)
26370
 
g(c)m(hec)m(king)i(whether)e(a)g(certi\014cate)j(corresp)s(onds)c(to)i
26371
 
(the)f(giv)m(en)i(k)m(ey)-8 b(.)390 4955 y(If)23 b(the)g(bu\013er)f
26372
 
(pro)m(vided)g(is)h(not)h(long)f(enough)g(to)h(hold)f(the)g(output,)h
26373
 
(then)f(*)p Ft(output_data_size)390 5065 y FB(is)34 b(up)s(dated)f(and)
26374
 
h Ft(GNUTLS_E_SHORT_MEMORY_BU)o(FFER)27 b FB(will)35
26375
 
b(b)s(e)f(returned.)51 b(The)34 b(output)g(will)390 5174
26376
 
y(normally)d(b)s(e)e(a)i(SHA-1)g(hash)f(output,)g(whic)m(h)g(is)g(20)i
26377
 
(b)m(ytes.)390 5322 y Fn(Returns:)k FB(On)20 b(success,)j
26378
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26379
 
(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
 
26365
Fe(output_data)12 b Ff(,)33 b(size)p 2856 5121 V 41 w(t)e(*)565
 
26366
5230 y Fe(output_data_size)12 b Fg(\))390 5340 y Ff(k)m(ey)c
 
26367
FB(:)41 b(Holds)31 b(the)f(k)m(ey)p eop end
26380
26368
%%Page: 228 234
26381
26369
TeXDict begin 228 233 bop 150 -116 a FB(Chapter)30 b(9:)41
26382
 
b(F)-8 b(unction)31 b(Reference)2237 b(228)150 299 y
26383
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
26384
 
w(privk)m(ey)p 1240 299 V 54 w(get)p 1459 299 V 54 w(pk)p
26385
 
1646 299 V 54 w(algorithm)3350 495 y FB([F)-8 b(unction])-3599
26386
 
b Fh(int)53 b(gnutls_x509_privkey_g)q(et_p)q(k_a)q(lgo)q(rit)q(hm)f
26387
 
Fg(\()p Ff(gn)m(utls)p 2569 495 28 4 v 40 w(x509)p 2792
26388
 
495 V 42 w(privk)m(ey)p 3127 495 V 40 w(t)565 605 y Fe(key)12
26389
 
b Fg(\))390 714 y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(a)g
26390
 
Ft(gnutls_x509_privkey_t)25 b FB(structure)390 849 y(This)30
 
26370
b(F)-8 b(unction)31 b(Reference)2237 b(228)390 299 y
 
26371
Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390
 
26372
435 y Ff(output)p 664 435 28 4 v 40 w(data)p FB(:)41
 
26373
b(will)31 b(con)m(tain)h(the)e(k)m(ey)h(ID)390 571 y
 
26374
Ff(output)p 664 571 V 40 w(data)p 880 571 V 40 w(size)5
 
26375
b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p 2093
 
26376
571 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
26377
(actual)390 680 y(size)c(of)g(parameters\))390 816 y(This)24
 
26378
b(function)h(will)h(return)e(a)i(unique)e(ID)h(the)h(dep)s(ends)d(on)i
 
26379
(the)h(public)e(k)m(ey)i(parameters.)40 b(This)390 926
 
26380
y(ID)31 b(can)f(b)s(e)g(used)g(in)g(c)m(hec)m(king)i(whether)e(a)g
 
26381
(certi\014cate)j(corresp)s(onds)c(to)i(the)f(giv)m(en)i(k)m(ey)-8
 
26382
b(.)390 1062 y(If)23 b(the)g(bu\013er)f(pro)m(vided)g(is)h(not)h(long)f
 
26383
(enough)g(to)h(hold)f(the)g(output,)h(then)f(*)p Ft(output_data_size)
 
26384
390 1171 y FB(is)34 b(up)s(dated)f(and)h Ft(GNUTLS_E_SHORT_MEMORY_BU)o
 
26385
(FFER)27 b FB(will)35 b(b)s(e)f(returned.)51 b(The)34
 
26386
b(output)g(will)390 1281 y(normally)d(b)s(e)e(a)i(SHA-1)g(hash)f
 
26387
(output,)g(whic)m(h)g(is)g(20)i(b)m(ytes.)390 1417 y
 
26388
Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
26389
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
26390
b(alue.)150 1617 y Fv(gn)m(utls)p 483 1617 37 5 v 55
 
26391
w(x509)p 786 1617 V 54 w(privk)m(ey)p 1240 1617 V 54
 
26392
w(get)p 1459 1617 V 54 w(pk)p 1646 1617 V 54 w(algorithm)3350
 
26393
1816 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_g)q
 
26394
(et_p)q(k_a)q(lgo)q(rit)q(hm)f Fg(\()p Ff(gn)m(utls)p
 
26395
2569 1816 28 4 v 40 w(x509)p 2792 1816 V 42 w(privk)m(ey)p
 
26396
3127 1816 V 40 w(t)565 1925 y Fe(key)12 b Fg(\))390 2035
 
26397
y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
26398
Ft(gnutls_x509_privkey_t)25 b FB(structure)390 2171 y(This)30
26391
26399
b(function)g(will)g(return)g(the)g(public)g(k)m(ey)h(algorithm)g(of)g
26392
 
(a)g(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 983 y Fn(Returns:)61
 
26400
(a)g(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 2307 y Fn(Returns:)61
26393
26401
b FB(a)40 b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
26394
 
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 1093
26395
 
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 1291
26396
 
y Fv(gn)m(utls)p 483 1291 37 5 v 55 w(x509)p 786 1291
26397
 
V 54 w(privk)m(ey)p 1240 1291 V 54 w(imp)s(ort)p 1660
26398
 
1291 V 55 w(dsa)p 1891 1291 V 54 w(ra)m(w)3350 1488 y
 
26402
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 2416
 
26403
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 2617
 
26404
y Fv(gn)m(utls)p 483 2617 37 5 v 55 w(x509)p 786 2617
 
26405
V 54 w(privk)m(ey)p 1240 2617 V 54 w(imp)s(ort)p 1660
 
26406
2617 V 55 w(dsa)p 1891 2617 V 54 w(ra)m(w)3350 2815 y
26399
26407
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_i)q(mpor)q
26400
 
(t_d)q(sa_)q(raw)f Fg(\()p Ff(gn)m(utls)p 2464 1488 28
26401
 
4 v 41 w(x509)p 2688 1488 V 41 w(privk)m(ey)p 3022 1488
26402
 
V 40 w(t)565 1597 y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p
26403
 
1273 1597 V 40 w(datum)p 1571 1597 V 40 w(t)g(*)f Fe(p)12
26404
 
b Ff(,)31 b(const)g(gn)m(utls)p 2350 1597 V 40 w(datum)p
26405
 
2648 1597 V 40 w(t)f(*)h Fe(q)12 b Ff(,)30 b(const)565
26406
 
1707 y(gn)m(utls)p 811 1707 V 41 w(datum)p 1110 1707
 
26408
(t_d)q(sa_)q(raw)f Fg(\()p Ff(gn)m(utls)p 2464 2815 28
 
26409
4 v 41 w(x509)p 2688 2815 V 41 w(privk)m(ey)p 3022 2815
 
26410
V 40 w(t)565 2925 y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p
 
26411
1273 2925 V 40 w(datum)p 1571 2925 V 40 w(t)g(*)f Fe(p)12
 
26412
b Ff(,)31 b(const)g(gn)m(utls)p 2350 2925 V 40 w(datum)p
 
26413
2648 2925 V 40 w(t)f(*)h Fe(q)12 b Ff(,)30 b(const)565
 
26414
3034 y(gn)m(utls)p 811 3034 V 41 w(datum)p 1110 3034
26407
26415
V 39 w(t)h(*)g Fe(g)12 b Ff(,)30 b(const)h(gn)m(utls)p
26408
 
1888 1707 V 40 w(datum)p 2186 1707 V 40 w(t)f(*)h Fe(y)12
26409
 
b Ff(,)31 b(const)f(gn)m(utls)p 2964 1707 V 41 w(datum)p
26410
 
3263 1707 V 39 w(t)h(*)g Fe(x)12 b Fg(\))390 1817 y Ff(k)m(ey)c
 
26416
1888 3034 V 40 w(datum)p 2186 3034 V 40 w(t)f(*)h Fe(y)12
 
26417
b Ff(,)31 b(const)f(gn)m(utls)p 2964 3034 V 41 w(datum)p
 
26418
3263 3034 V 39 w(t)h(*)g Fe(x)12 b Fg(\))390 3144 y Ff(k)m(ey)c
26411
26419
FB(:)41 b(The)30 b(structure)g(to)h(store)g(the)g(parsed)e(k)m(ey)390
26412
 
1951 y Ff(p)s FB(:)40 b(holds)30 b(the)g(p)390 2085 y
26413
 
Ff(q)r FB(:)41 b(holds)30 b(the)g(q)390 2220 y Ff(g)8
26414
 
b FB(:)41 b(holds)30 b(the)g(g)390 2354 y Ff(y)8 b FB(:)40
26415
 
b(holds)30 b(the)h(y)390 2488 y Ff(x)6 b FB(:)41 b(holds)30
26416
 
b(the)g(x)390 2622 y(This)24 b(function)g(will)i(con)m(v)m(ert)g(the)f
 
26420
3280 y Ff(p)s FB(:)40 b(holds)30 b(the)g(p)390 3416 y
 
26421
Ff(q)r FB(:)41 b(holds)30 b(the)g(q)390 3551 y Ff(g)8
 
26422
b FB(:)41 b(holds)30 b(the)g(g)390 3687 y Ff(y)8 b FB(:)40
 
26423
b(holds)30 b(the)h(y)390 3823 y Ff(x)6 b FB(:)41 b(holds)30
 
26424
b(the)g(x)390 3959 y(This)24 b(function)g(will)i(con)m(v)m(ert)g(the)f
26417
26425
(giv)m(en)h(DSA)f(ra)m(w)g(parameters)g(to)g(the)g(nativ)m(e)h
26418
 
Ft(gnutls_x509_)390 2732 y(privkey_t)i FB(format.)41
 
26426
Ft(gnutls_x509_)390 4069 y(privkey_t)i FB(format.)41
26419
26427
b(The)30 b(output)g(will)g(b)s(e)g(stored)h(in)f Ft(key)p
26420
 
FB(.)390 2866 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26428
FB(.)390 4205 y Fn(Returns:)36 b FB(On)20 b(success,)j
26421
26429
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26422
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3065 y Fv(gn)m(utls)p
26423
 
483 3065 37 5 v 55 w(x509)p 786 3065 V 54 w(privk)m(ey)p
26424
 
1240 3065 V 54 w(imp)s(ort)p 1660 3065 V 55 w(pk)m(cs8)3350
26425
 
3262 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_i)q
26426
 
(mpor)q(t_p)q(kcs)q(8)e Fg(\()p Ff(gn)m(utls)p 2359 3262
26427
 
28 4 v 41 w(x509)p 2583 3262 V 41 w(privk)m(ey)p 2917
26428
 
3262 V 41 w(t)565 3371 y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p
26429
 
1273 3371 V 40 w(datum)p 1571 3371 V 40 w(t)g(*)f Fe(data)12
26430
 
b Ff(,)32 b(gn)m(utls)p 2269 3371 V 40 w(x509)p 2492
26431
 
3371 V 41 w(crt)p 2644 3371 V 41 w(fm)m(t)p 2821 3371
 
26430
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4405 y Fv(gn)m(utls)p
 
26431
483 4405 37 5 v 55 w(x509)p 786 4405 V 54 w(privk)m(ey)p
 
26432
1240 4405 V 54 w(imp)s(ort)p 1660 4405 V 55 w(pk)m(cs8)3350
 
26433
4603 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_i)q
 
26434
(mpor)q(t_p)q(kcs)q(8)e Fg(\()p Ff(gn)m(utls)p 2359 4603
 
26435
28 4 v 41 w(x509)p 2583 4603 V 41 w(privk)m(ey)p 2917
 
26436
4603 V 41 w(t)565 4713 y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p
 
26437
1273 4713 V 40 w(datum)p 1571 4713 V 40 w(t)g(*)f Fe(data)12
 
26438
b Ff(,)32 b(gn)m(utls)p 2269 4713 V 40 w(x509)p 2492
 
26439
4713 V 41 w(crt)p 2644 4713 V 41 w(fm)m(t)p 2821 4713
26432
26440
V 40 w(t)f Fe(format)12 b Ff(,)32 b(const)f(c)m(har)565
26433
 
3481 y(*)g Fe(password)12 b Ff(,)32 b(unsigned)e(in)m(t)h
26434
 
Fe(flags)12 b Fg(\))390 3590 y Ff(k)m(ey)c FB(:)41 b(The)30
 
26441
4823 y(*)g Fe(password)12 b Ff(,)32 b(unsigned)e(in)m(t)h
 
26442
Fe(flags)12 b Fg(\))390 4932 y Ff(k)m(ey)c FB(:)41 b(The)30
26435
26443
b(structure)g(to)h(store)g(the)g(parsed)e(k)m(ey)390
26436
 
3725 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s(ded)f(k)m
26437
 
(ey)-8 b(.)390 3859 y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f
26438
 
(PEM)390 3993 y Ff(passw)m(ord)t FB(:)40 b(the)30 b(passw)m(ord)g(to)h
26439
 
(decrypt)f(the)h(k)m(ey)g(\(if)f(it)h(is)g(encrypted\).)390
26440
 
4128 y Ff(\015ags)t FB(:)41 b(0)30 b(if)h(encrypted)f(or)g(GNUTLS)p
26441
 
1716 4128 V 40 w(PK)m(CS)p 2003 4128 V 39 w(PLAIN)g(if)h(not)f
26442
 
(encrypted.)390 4262 y(This)40 b(function)g(will)h(con)m(v)m(ert)h(the)
26443
 
e(giv)m(en)i(DER)f(or)f(PEM)h(enco)s(ded)f(PK)m(CS8)g(2.0)h(encrypted)
26444
 
390 4371 y(k)m(ey)d(to)f(the)h(nativ)m(e)g(gn)m(utls)p
26445
 
1367 4371 V 40 w(x509)p 1590 4371 V 42 w(privk)m(ey)p
26446
 
1925 4371 V 40 w(t)f(format.)61 b(The)37 b(output)f(will)h(b)s(e)g
26447
 
(stored)g(in)g Ft(key)p FB(.)390 4481 y(Both)30 b(RSA)f(and)f(DSA)i(k)m
26448
 
(eys)g(can)f(b)s(e)g(imp)s(orted,)g(and)g(\015ags)g(can)h(only)f(b)s(e)
26449
 
g(used)g(to)h(indicate)g(an)390 4591 y(unencrypted)f(k)m(ey)-8
26450
 
b(.)390 4725 y(The)48 b Ft(password)e FB(can)i(b)s(e)g(either)h(ASCI)s
 
26444
5068 y Ff(data)p FB(:)41 b(The)30 b(DER)h(or)f(PEM)h(enco)s(ded)f(k)m
 
26445
(ey)-8 b(.)390 5204 y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f
 
26446
(PEM)390 5340 y Ff(passw)m(ord)t FB(:)40 b(the)30 b(passw)m(ord)g(to)h
 
26447
(decrypt)f(the)h(k)m(ey)g(\(if)f(it)h(is)g(encrypted\).)p
 
26448
eop end
 
26449
%%Page: 229 235
 
26450
TeXDict begin 229 234 bop 150 -116 a FB(Chapter)30 b(9:)41
 
26451
b(F)-8 b(unction)31 b(Reference)2237 b(229)390 299 y
 
26452
Ff(\015ags)t FB(:)41 b(0)30 b(if)h(encrypted)f(or)g(GNUTLS)p
 
26453
1716 299 28 4 v 40 w(PK)m(CS)p 2003 299 V 39 w(PLAIN)g(if)h(not)f
 
26454
(encrypted.)390 448 y(This)40 b(function)g(will)h(con)m(v)m(ert)h(the)e
 
26455
(giv)m(en)i(DER)f(or)f(PEM)h(enco)s(ded)f(PK)m(CS8)g(2.0)h(encrypted)
 
26456
390 557 y(k)m(ey)d(to)f(the)h(nativ)m(e)g(gn)m(utls)p
 
26457
1367 557 V 40 w(x509)p 1590 557 V 42 w(privk)m(ey)p 1925
 
26458
557 V 40 w(t)f(format.)61 b(The)37 b(output)f(will)h(b)s(e)g(stored)g
 
26459
(in)g Ft(key)p FB(.)390 667 y(Both)30 b(RSA)f(and)f(DSA)i(k)m(eys)g
 
26460
(can)f(b)s(e)g(imp)s(orted,)g(and)g(\015ags)g(can)h(only)f(b)s(e)g
 
26461
(used)g(to)h(indicate)g(an)390 776 y(unencrypted)f(k)m(ey)-8
 
26462
b(.)390 925 y(The)48 b Ft(password)e FB(can)i(b)s(e)g(either)h(ASCI)s
26451
26463
(I)d(or)j(UTF-8)g(in)f(the)g(default)h(PBES2)f(encryption)390
26452
 
4835 y(sc)m(hemas,)31 b(or)g(ASCI)s(I)d(for)j(the)f(PK)m(CS12)h(sc)m
26453
 
(hemas.)390 4969 y(If)36 b(the)g(Certi\014cate)h(is)g(PEM)f(enco)s(ded)
 
26464
1035 y(sc)m(hemas,)31 b(or)g(ASCI)s(I)d(for)j(the)f(PK)m(CS12)h(sc)m
 
26465
(hemas.)390 1184 y(If)36 b(the)g(Certi\014cate)h(is)g(PEM)f(enco)s(ded)
26454
26466
f(it)i(should)e(ha)m(v)m(e)j(a)e(header)g(of)g Ft(")p
26455
 
FB(ENCR)-8 b(YPTED)36 b(PRI-)390 5078 y(V)-10 b(A)i(TE)32
 
26467
FB(ENCR)-8 b(YPTED)36 b(PRI-)390 1293 y(V)-10 b(A)i(TE)32
26456
26468
b(KEY)p Ft(")p FB(,)g(or)g Ft(")p FB(PRIV)-10 b(A)i(TE)32
26457
26469
b(KEY)p Ft(")p FB(.)45 b(Y)-8 b(ou)32 b(only)g(need)g(to)h(sp)s(ecify)f
26458
 
(the)g(\015ags)g(if)g(the)g(k)m(ey)h(is)390 5188 y(DER)e(enco)s(ded,)f
 
26470
(the)g(\015ags)g(if)g(the)g(k)m(ey)h(is)390 1403 y(DER)e(enco)s(ded,)f
26459
26471
(since)h(in)f(that)h(case)g(the)g(encryption)f(status)h(cannot)f(b)s(e)
26460
 
g(auto-detected.)390 5322 y Fn(Returns:)36 b FB(On)20
 
26472
g(auto-detected.)390 1552 y Fn(Returns:)36 b FB(On)20
26461
26473
b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)
26462
 
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)p eop end
26463
 
%%Page: 229 235
26464
 
TeXDict begin 229 234 bop 150 -116 a FB(Chapter)30 b(9:)41
26465
 
b(F)-8 b(unction)31 b(Reference)2237 b(229)150 299 y
26466
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
26467
 
w(privk)m(ey)p 1240 299 V 54 w(imp)s(ort)p 1660 299 V
26468
 
55 w(rsa)p 1873 299 V 54 w(ra)m(w)3350 492 y FB([F)-8
26469
 
b(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_i)q(mpor)q(t_r)q
26470
 
(sa_)q(raw)f Fg(\()p Ff(gn)m(utls)p 2464 492 28 4 v 41
26471
 
w(x509)p 2688 492 V 41 w(privk)m(ey)p 3022 492 V 40 w(t)565
26472
 
602 y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p 1273
26473
 
602 V 40 w(datum)p 1571 602 V 40 w(t)g(*)f Fe(m)12 b
26474
 
Ff(,)31 b(const)g(gn)m(utls)p 2350 602 V 40 w(datum)p
26475
 
2648 602 V 40 w(t)f(*)h Fe(e)12 b Ff(,)30 b(const)565
26476
 
711 y(gn)m(utls)p 811 711 V 41 w(datum)p 1110 711 V 39
26477
 
w(t)f(*)h Fe(d)12 b Ff(,)29 b(const)g(gn)m(utls)p 1882
26478
 
711 V 41 w(datum)p 2181 711 V 39 w(t)h(*)f Fe(p)12 b
26479
 
Ff(,)29 b(const)h(gn)m(utls)p 2954 711 V 40 w(datum)p
26480
 
3252 711 V 40 w(t)f(*)g Fe(q)12 b Ff(,)29 b(const)565
26481
 
821 y(gn)m(utls)p 811 821 V 41 w(datum)p 1110 821 V 39
26482
 
w(t)i(*)g Fe(u)12 b Fg(\))390 930 y Ff(k)m(ey)c FB(:)41
26483
 
b(The)30 b(structure)g(to)h(store)g(the)g(parsed)e(k)m(ey)390
26484
 
1063 y Ff(m)p FB(:)40 b(holds)30 b(the)h(mo)s(dulus)390
26485
 
1196 y Ff(e)5 b FB(:)41 b(holds)30 b(the)h(public)e(exp)s(onen)m(t)390
26486
 
1329 y Ff(d)t FB(:)40 b(holds)30 b(the)g(priv)-5 b(ate)31
26487
 
b(exp)s(onen)m(t)390 1461 y Ff(p)s FB(:)40 b(holds)30
26488
 
b(the)g(\014rst)g(prime)g(\(p\))390 1594 y Ff(q)r FB(:)41
26489
 
b(holds)30 b(the)g(second)h(prime)e(\(q\))390 1727 y
26490
 
Ff(u)p FB(:)40 b(holds)30 b(the)h(co)s(e\016cien)m(t)390
26491
 
1860 y(This)24 b(function)h(will)g(con)m(v)m(ert)i(the)e(giv)m(en)h
 
26474
f(a)h(negativ)m(e)h(error)d(v)-5 b(alue.)150 1765 y Fv(gn)m(utls)p
 
26475
483 1765 37 5 v 55 w(x509)p 786 1765 V 54 w(privk)m(ey)p
 
26476
1240 1765 V 54 w(imp)s(ort)p 1660 1765 V 55 w(rsa)p 1873
 
26477
1765 V 54 w(ra)m(w)3350 1976 y FB([F)d(unction])-3599
 
26478
b Fh(int)53 b(gnutls_x509_privkey_i)q(mpor)q(t_r)q(sa_)q(raw)f
 
26479
Fg(\()p Ff(gn)m(utls)p 2464 1976 28 4 v 41 w(x509)p 2688
 
26480
1976 V 41 w(privk)m(ey)p 3022 1976 V 40 w(t)565 2086
 
26481
y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p 1273 2086
 
26482
V 40 w(datum)p 1571 2086 V 40 w(t)g(*)f Fe(m)12 b Ff(,)31
 
26483
b(const)g(gn)m(utls)p 2350 2086 V 40 w(datum)p 2648 2086
 
26484
V 40 w(t)f(*)h Fe(e)12 b Ff(,)30 b(const)565 2196 y(gn)m(utls)p
 
26485
811 2196 V 41 w(datum)p 1110 2196 V 39 w(t)f(*)h Fe(d)12
 
26486
b Ff(,)29 b(const)g(gn)m(utls)p 1882 2196 V 41 w(datum)p
 
26487
2181 2196 V 39 w(t)h(*)f Fe(p)12 b Ff(,)29 b(const)h(gn)m(utls)p
 
26488
2954 2196 V 40 w(datum)p 3252 2196 V 40 w(t)f(*)g Fe(q)12
 
26489
b Ff(,)29 b(const)565 2305 y(gn)m(utls)p 811 2305 V 41
 
26490
w(datum)p 1110 2305 V 39 w(t)i(*)g Fe(u)12 b Fg(\))390
 
26491
2415 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(store)g(the)g
 
26492
(parsed)e(k)m(ey)390 2564 y Ff(m)p FB(:)40 b(holds)30
 
26493
b(the)h(mo)s(dulus)390 2712 y Ff(e)5 b FB(:)41 b(holds)30
 
26494
b(the)h(public)e(exp)s(onen)m(t)390 2861 y Ff(d)t FB(:)40
 
26495
b(holds)30 b(the)g(priv)-5 b(ate)31 b(exp)s(onen)m(t)390
 
26496
3010 y Ff(p)s FB(:)40 b(holds)30 b(the)g(\014rst)g(prime)g(\(p\))390
 
26497
3159 y Ff(q)r FB(:)41 b(holds)30 b(the)g(second)h(prime)e(\(q\))390
 
26498
3308 y Ff(u)p FB(:)40 b(holds)30 b(the)h(co)s(e\016cien)m(t)390
 
26499
3457 y(This)24 b(function)h(will)g(con)m(v)m(ert)i(the)e(giv)m(en)h
26492
26500
(RSA)f(ra)m(w)g(parameters)g(to)h(the)f(nativ)m(e)h Ft(gnutls_x509_)390
26493
 
1969 y(privkey_t)i FB(format.)41 b(The)30 b(output)g(will)g(b)s(e)g
26494
 
(stored)h(in)f Ft(key)p FB(.)390 2102 y Fn(Returns:)36
 
26501
3566 y(privkey_t)i FB(format.)41 b(The)30 b(output)g(will)g(b)s(e)g
 
26502
(stored)h(in)f Ft(key)p FB(.)390 3715 y Fn(Returns:)36
26495
26503
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
26496
26504
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26497
 
b(alue.)150 2298 y Fv(gn)m(utls)p 483 2298 37 5 v 55
26498
 
w(x509)p 786 2298 V 54 w(privk)m(ey)p 1240 2298 V 54
26499
 
w(imp)s(ort)3350 2491 y FB([F)d(unction])-3599 b Fh(int)53
 
26505
b(alue.)150 3929 y Fv(gn)m(utls)p 483 3929 37 5 v 55
 
26506
w(x509)p 786 3929 V 54 w(privk)m(ey)p 1240 3929 V 54
 
26507
w(imp)s(ort)3350 4140 y FB([F)d(unction])-3599 b Fh(int)53
26500
26508
b(gnutls_x509_privkey_i)q(mpor)q(t)f Fg(\()p Ff(gn)m(utls)p
26501
 
2046 2491 28 4 v 40 w(x509)p 2269 2491 V 42 w(privk)m(ey)p
26502
 
2604 2491 V 40 w(t)31 b Fe(key)12 b Ff(,)30 b(const)565
26503
 
2600 y(gn)m(utls)p 811 2600 V 41 w(datum)p 1110 2600
 
26509
2046 4140 28 4 v 40 w(x509)p 2269 4140 V 42 w(privk)m(ey)p
 
26510
2604 4140 V 40 w(t)31 b Fe(key)12 b Ff(,)30 b(const)565
 
26511
4249 y(gn)m(utls)p 811 4249 V 41 w(datum)p 1110 4249
26504
26512
V 39 w(t)h(*)g Fe(data)12 b Ff(,)31 b(gn)m(utls)p 1807
26505
 
2600 V 40 w(x509)p 2030 2600 V 42 w(crt)p 2183 2600 V
26506
 
40 w(fm)m(t)p 2359 2600 V 40 w(t)g Fe(format)12 b Fg(\))390
26507
 
2710 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(store)g(the)g
26508
 
(parsed)e(k)m(ey)390 2843 y Ff(data)p FB(:)41 b(The)30
26509
 
b(DER)h(or)f(PEM)h(enco)s(ded)f(certi\014cate.)390 2975
 
26513
4249 V 40 w(x509)p 2030 4249 V 42 w(crt)p 2183 4249 V
 
26514
40 w(fm)m(t)p 2359 4249 V 40 w(t)g Fe(format)12 b Fg(\))390
 
26515
4359 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(store)g(the)g
 
26516
(parsed)e(k)m(ey)390 4508 y Ff(data)p FB(:)41 b(The)30
 
26517
b(DER)h(or)f(PEM)h(enco)s(ded)f(certi\014cate.)390 4657
26510
26518
y Ff(format)r FB(:)41 b(One)30 b(of)g(DER)h(or)f(PEM)390
26511
 
3108 y(This)25 b(function)h(will)h(con)m(v)m(ert)h(the)e(giv)m(en)i
 
26519
4805 y(This)25 b(function)h(will)h(con)m(v)m(ert)h(the)e(giv)m(en)i
26512
26520
(DER)e(or)g(PEM)h(enco)s(ded)f(k)m(ey)h(to)g(the)f(nativ)m(e)i
26513
 
Ft(gnutls_)390 3218 y(x509_privkey_t)e FB(format.)42
 
26521
Ft(gnutls_)390 4915 y(x509_privkey_t)e FB(format.)42
26514
26522
b(The)29 b(output)h(will)h(b)s(e)f(stored)g(in)g Ft(key)g
26515
 
FB(.)390 3351 y(If)38 b(the)g(k)m(ey)h(is)g(PEM)f(enco)s(ded)g(it)h
 
26523
FB(.)390 5064 y(If)38 b(the)g(k)m(ey)h(is)g(PEM)f(enco)s(ded)g(it)h
26516
26524
(should)e(ha)m(v)m(e)i(a)g(header)f(of)g Ft(")p FB(RSA)g(PRIV)-10
26517
 
b(A)i(TE)38 b(KEY)p Ft(")p FB(,)i(or)390 3460 y Ft(")p
 
26525
b(A)i(TE)38 b(KEY)p Ft(")p FB(,)i(or)390 5173 y Ft(")p
26518
26526
FB(DSA)30 b(PRIV)-10 b(A)i(TE)30 b(KEY)p Ft(")p FB(.)390
26519
 
3593 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
26527
5322 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
26520
26528
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26521
 
b(alue.)150 3789 y Fv(gn)m(utls)p 483 3789 37 5 v 55
26522
 
w(x509)p 786 3789 V 54 w(privk)m(ey)p 1240 3789 V 54
26523
 
w(init)3350 3982 y FB([F)d(unction])-3599 b Fh(int)53
26524
 
b(gnutls_x509_privkey_i)q(nit)f Fg(\()p Ff(gn)m(utls)p
26525
 
1941 3982 28 4 v 41 w(x509)p 2165 3982 V 41 w(privk)m(ey)p
26526
 
2499 3982 V 40 w(t)31 b(*)g Fe(key)12 b Fg(\))390 4091
26527
 
y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)
26528
 
390 4224 y(This)g(function)g(will)g(initialize)j(an)d(priv)-5
26529
 
b(ate)31 b(k)m(ey)g(structure.)390 4357 y Fn(Returns:)36
 
26529
b(alue.)p eop end
 
26530
%%Page: 230 236
 
26531
TeXDict begin 230 235 bop 150 -116 a FB(Chapter)30 b(9:)41
 
26532
b(F)-8 b(unction)31 b(Reference)2237 b(230)150 299 y
 
26533
Fv(gn)m(utls)p 483 299 37 5 v 55 w(x509)p 786 299 V 54
 
26534
w(privk)m(ey)p 1240 299 V 54 w(init)3350 492 y FB([F)-8
 
26535
b(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_i)q(nit)f
 
26536
Fg(\()p Ff(gn)m(utls)p 1941 492 28 4 v 41 w(x509)p 2165
 
26537
492 V 41 w(privk)m(ey)p 2499 492 V 40 w(t)31 b(*)g Fe(key)12
 
26538
b Fg(\))390 602 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s
 
26539
(e)f(initialized)390 734 y(This)g(function)g(will)g(initialize)j(an)d
 
26540
(priv)-5 b(ate)31 b(k)m(ey)g(structure.)390 867 y Fn(Returns:)36
26530
26541
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
26531
26542
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26532
 
b(alue.)150 4553 y Fv(gn)m(utls)p 483 4553 37 5 v 55
26533
 
w(x509)p 786 4553 V 54 w(privk)m(ey)p 1240 4553 V 54
26534
 
w(sign)p 1505 4553 V 55 w(data)3350 4746 y FB([F)d(unction])-3599
 
26543
b(alue.)150 1063 y Fv(gn)m(utls)p 483 1063 37 5 v 55
 
26544
w(x509)p 786 1063 V 54 w(privk)m(ey)p 1240 1063 V 54
 
26545
w(sign)p 1505 1063 V 55 w(data)3350 1256 y FB([F)d(unction])-3599
26535
26546
b Fh(int)53 b(gnutls_x509_privkey_s)q(ign_)q(dat)q(a)e
26536
 
Fg(\()p Ff(gn)m(utls)p 2202 4746 28 4 v 41 w(x509)p 2426
26537
 
4746 V 42 w(privk)m(ey)p 2761 4746 V 40 w(t)30 b Fe(key)12
26538
 
b Ff(,)565 4855 y(gn)m(utls)p 811 4855 V 41 w(digest)p
26539
 
1084 4855 V 40 w(algorithm)p 1507 4855 V 41 w(t)31 b
 
26547
Fg(\()p Ff(gn)m(utls)p 2202 1256 28 4 v 41 w(x509)p 2426
 
26548
1256 V 42 w(privk)m(ey)p 2761 1256 V 40 w(t)30 b Fe(key)12
 
26549
b Ff(,)565 1366 y(gn)m(utls)p 811 1366 V 41 w(digest)p
 
26550
1084 1366 V 40 w(algorithm)p 1507 1366 V 41 w(t)31 b
26540
26551
Fe(digest)12 b Ff(,)32 b(unsigned)d(in)m(t)i Fe(flags)12
26541
 
b Ff(,)32 b(const)f(gn)m(utls)p 3320 4855 V 40 w(datum)p
26542
 
3618 4855 V 40 w(t)565 4965 y(*)g Fe(data)12 b Ff(,)31
 
26552
b Ff(,)32 b(const)f(gn)m(utls)p 3320 1366 V 40 w(datum)p
 
26553
3618 1366 V 40 w(t)565 1475 y(*)g Fe(data)12 b Ff(,)31
26543
26554
b(v)m(oid)g(*)g Fe(signature)12 b Ff(,)33 b(size)p 1875
26544
 
4965 V 41 w(t)d(*)h Fe(signature_size)12 b Fg(\))390
26545
 
5075 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
26546
 
5207 y Ff(digest)r FB(:)41 b(should)30 b(b)s(e)g(MD5)h(or)f(SHA1)390
26547
 
5340 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)p
26548
 
eop end
26549
 
%%Page: 230 236
26550
 
TeXDict begin 230 235 bop 150 -116 a FB(Chapter)30 b(9:)41
26551
 
b(F)-8 b(unction)31 b(Reference)2237 b(230)390 299 y
26552
 
Ff(data)p FB(:)41 b(holds)30 b(the)h(data)g(to)g(b)s(e)f(signed)390
26553
 
435 y Ff(signature)5 b FB(:)41 b(will)31 b(con)m(tain)h(the)e
26554
 
(signature)390 571 y Ff(signature)p 760 571 28 4 v 40
26555
 
w(size)5 b FB(:)42 b(holds)30 b(the)h(size)g(of)f(signature)h(\(and)f
26556
 
(will)h(b)s(e)f(replaced)g(b)m(y)h(the)f(new)g(size\))390
26557
 
707 y(This)i(function)h(will)g(sign)g(the)g(giv)m(en)h(data)g(using)e
26558
 
(a)i(signature)f(algorithm)h(supp)s(orted)d(b)m(y)i(the)390
26559
 
816 y(priv)-5 b(ate)39 b(k)m(ey)-8 b(.)68 b(Signature)39
26560
 
b(algorithms)h(are)f(alw)m(a)m(ys)h(used)f(together)h(with)f(a)g(hash)f
26561
 
(functions.)390 926 y(Di\013eren)m(t)30 b(hash)e(functions)g(ma)m(y)h
26562
 
(b)s(e)e(used)h(for)g(the)h(RSA)f(algorithm,)i(but)e(only)g(SHA-1)i
26563
 
(for)e(the)390 1035 y(DSA)i(k)m(eys.)390 1171 y(If)g(the)h(bu\013er)e
26564
 
(pro)m(vided)h(is)h(not)f(long)i(enough)e(to)h(hold)f(the)h(output,)f
26565
 
(then)g(*)p Ft(signature_size)390 1281 y FB(is)g(up)s(dated)f(and)h
 
26555
1475 V 41 w(t)d(*)h Fe(signature_size)12 b Fg(\))390
 
26556
1585 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
 
26557
1718 y Ff(digest)r FB(:)41 b(should)30 b(b)s(e)g(MD5)h(or)f(SHA1)390
 
26558
1850 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390
 
26559
1983 y Ff(data)p FB(:)41 b(holds)30 b(the)h(data)g(to)g(b)s(e)f(signed)
 
26560
390 2116 y Ff(signature)5 b FB(:)41 b(will)31 b(con)m(tain)h(the)e
 
26561
(signature)390 2249 y Ff(signature)p 760 2249 V 40 w(size)5
 
26562
b FB(:)42 b(holds)30 b(the)h(size)g(of)f(signature)h(\(and)f(will)h(b)s
 
26563
(e)f(replaced)g(b)m(y)h(the)f(new)g(size\))390 2381 y(This)i(function)h
 
26564
(will)g(sign)g(the)g(giv)m(en)h(data)g(using)e(a)i(signature)f
 
26565
(algorithm)h(supp)s(orted)d(b)m(y)i(the)390 2491 y(priv)-5
 
26566
b(ate)39 b(k)m(ey)-8 b(.)68 b(Signature)39 b(algorithms)h(are)f(alw)m
 
26567
(a)m(ys)h(used)f(together)h(with)f(a)g(hash)f(functions.)390
 
26568
2600 y(Di\013eren)m(t)30 b(hash)e(functions)g(ma)m(y)h(b)s(e)e(used)h
 
26569
(for)g(the)h(RSA)f(algorithm,)i(but)e(only)g(SHA-1)i(for)e(the)390
 
26570
2710 y(DSA)i(k)m(eys.)390 2843 y(If)g(the)h(bu\013er)e(pro)m(vided)h
 
26571
(is)h(not)f(long)i(enough)e(to)h(hold)f(the)h(output,)f(then)g(*)p
 
26572
Ft(signature_size)390 2952 y FB(is)g(up)s(dated)f(and)h
26566
26573
Ft(GNUTLS_E_SHORT_MEMORY_BUF)o(FER)24 b FB(will)31 b(b)s(e)e(returned.)
26567
 
390 1417 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
 
26574
390 3085 y Fn(Returns:)36 b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)
26568
26575
16 b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26569
 
b(alue.)150 1617 y Fv(gn)m(utls)p 483 1617 37 5 v 55
26570
 
w(x509)p 786 1617 V 54 w(privk)m(ey)p 1240 1617 V 54
26571
 
w(sign)p 1505 1617 V 55 w(hash)3350 1816 y FB([F)d(unction])-3599
 
26576
b(alue.)150 3281 y Fv(gn)m(utls)p 483 3281 37 5 v 55
 
26577
w(x509)p 786 3281 V 54 w(privk)m(ey)p 1240 3281 V 54
 
26578
w(sign)p 1505 3281 V 55 w(hash)3350 3474 y FB([F)d(unction])-3599
26572
26579
b Fh(int)53 b(gnutls_x509_privkey_s)q(ign_)q(has)q(h)e
26573
 
Fg(\()p Ff(gn)m(utls)p 2202 1816 28 4 v 41 w(x509)p 2426
26574
 
1816 V 42 w(privk)m(ey)p 2761 1816 V 40 w(t)30 b Fe(key)12
26575
 
b Ff(,)565 1925 y(const)31 b(gn)m(utls)p 1049 1925 V
26576
 
40 w(datum)p 1347 1925 V 40 w(t)g(*)f Fe(hash)12 b Ff(,)32
26577
 
b(gn)m(utls)p 2045 1925 V 40 w(datum)p 2343 1925 V 40
26578
 
w(t)e(*)h Fe(signature)12 b Fg(\))390 2035 y Ff(k)m(ey)c
26579
 
FB(:)41 b(Holds)31 b(the)f(k)m(ey)390 2171 y Ff(hash)p
 
26580
Fg(\()p Ff(gn)m(utls)p 2202 3474 28 4 v 41 w(x509)p 2426
 
26581
3474 V 42 w(privk)m(ey)p 2761 3474 V 40 w(t)30 b Fe(key)12
 
26582
b Ff(,)565 3584 y(const)31 b(gn)m(utls)p 1049 3584 V
 
26583
40 w(datum)p 1347 3584 V 40 w(t)g(*)f Fe(hash)12 b Ff(,)32
 
26584
b(gn)m(utls)p 2045 3584 V 40 w(datum)p 2343 3584 V 40
 
26585
w(t)e(*)h Fe(signature)12 b Fg(\))390 3693 y Ff(k)m(ey)c
 
26586
FB(:)41 b(Holds)31 b(the)f(k)m(ey)390 3826 y Ff(hash)p
26580
26587
FB(:)40 b(holds)30 b(the)g(data)h(to)h(b)s(e)d(signed)390
26581
 
2307 y Ff(signature)5 b FB(:)41 b(will)31 b(con)m(tain)h(newly)e(allo)s
26582
 
(cated)i(signature)390 2442 y(This)e(function)g(will)g(sign)h(the)f
 
26588
3959 y Ff(signature)5 b FB(:)41 b(will)31 b(con)m(tain)h(newly)e(allo)s
 
26589
(cated)i(signature)390 4091 y(This)e(function)g(will)g(sign)h(the)f
26583
26590
(giv)m(en)i(hash)d(using)h(the)h(priv)-5 b(ate)31 b(k)m(ey)-8
26584
 
b(.)390 2578 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26591
b(.)390 4224 y Fn(Returns:)36 b FB(On)20 b(success,)j
26585
26592
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26586
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2779 y Fv(gn)m(utls)p
26587
 
483 2779 37 5 v 55 w(x509)p 786 2779 V 54 w(privk)m(ey)p
26588
 
1240 2779 V 54 w(v)m(erify)p 1598 2779 V 54 w(data)3350
26589
 
2977 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_v)q
26590
 
(erif)q(y_d)q(ata)f Fg(\()p Ff(gn)m(utls)p 2307 2977
26591
 
28 4 v 41 w(x509)p 2531 2977 V 41 w(privk)m(ey)p 2865
26592
 
2977 V 40 w(t)31 b Fe(key)12 b Ff(,)565 3087 y(unsigned)29
 
26593
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4420 y Fv(gn)m(utls)p
 
26594
483 4420 37 5 v 55 w(x509)p 786 4420 V 54 w(privk)m(ey)p
 
26595
1240 4420 V 54 w(v)m(erify)p 1598 4420 V 54 w(data)3350
 
26596
4613 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_x509_privkey_v)q
 
26597
(erif)q(y_d)q(ata)f Fg(\()p Ff(gn)m(utls)p 2307 4613
 
26598
28 4 v 41 w(x509)p 2531 4613 V 41 w(privk)m(ey)p 2865
 
26599
4613 V 40 w(t)31 b Fe(key)12 b Ff(,)565 4723 y(unsigned)29
26593
26600
b(in)m(t)i Fe(flags)12 b Ff(,)32 b(const)f(gn)m(utls)p
26594
 
1896 3087 V 40 w(datum)p 2194 3087 V 40 w(t)f(*)h Fe(data)12
26595
 
b Ff(,)31 b(const)g(gn)m(utls)p 3129 3087 V 41 w(datum)p
26596
 
3428 3087 V 39 w(t)g(*)565 3196 y Fe(signature)12 b Fg(\))390
26597
 
3306 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
26598
 
3442 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390
26599
 
3578 y Ff(data)p FB(:)41 b(holds)30 b(the)h(data)g(to)g(b)s(e)f(signed)
26600
 
390 3714 y Ff(signature)5 b FB(:)41 b(con)m(tains)32
26601
 
b(the)e(signature)390 3850 y(This)k(function)h(will)h(v)m(erify)f(the)h
26602
 
(giv)m(en)g(signed)f(data,)j(using)c(the)i(parameters)f(in)g(the)g
26603
 
(priv)-5 b(ate)390 3959 y(k)m(ey)d(.)390 4095 y Fn(Returns:)40
26604
 
b FB(In)30 b(case)h(of)g(a)g(v)m(eri\014cation)h(failure)e(0)h(is)f
26605
 
(returned,)g(and)g(1)g(on)h(success.)150 4296 y Fv(gn)m(utls)p
26606
 
483 4296 37 5 v 55 w(x509)p 786 4296 V 54 w(rdn)p 1026
26607
 
4296 V 55 w(get)p 1246 4296 V 54 w(b)m(y)p 1430 4296
26608
 
V 54 w(oid)3350 4494 y FB([F)-8 b(unction])-3599 b Fh(int)53
26609
 
b(gnutls_x509_rdn_get_b)q(y_oi)q(d)f Fg(\()p Ff(const)31
26610
 
b(gn)m(utls)p 2284 4494 28 4 v 40 w(datum)p 2582 4494
26611
 
V 40 w(t)f(*)h Fe(idn)12 b Ff(,)31 b(const)565 4603 y(c)m(har)g(*)g
26612
 
Fe(oid)12 b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m
26613
 
(t)i Fe(raw_flag)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(buf)12
26614
 
b Ff(,)31 b(size)p 3127 4603 V 41 w(t)g(*)565 4713 y
26615
 
Fe(sizeof_buf)12 b Fg(\))390 4823 y Ff(idn)p FB(:)40
26616
 
b(should)29 b(con)m(tain)j(a)f(DER)f(enco)s(ded)g(RDN)h(sequence)390
26617
 
4959 y Ff(oid)t FB(:)40 b(an)31 b(Ob)5 b(ject)30 b(Iden)m(ti\014er)390
26618
 
5094 y Ff(indx)6 b FB(:)47 b(In)33 b(case)h(m)m(ultiple)h(same)f(OIDs)f
26619
 
(exist)h(in)g(the)g(RDN)g(indicates)g(whic)m(h)f(to)i(send.)50
26620
 
b(Use)34 b(0)390 5204 y(for)c(the)h(\014rst)e(one.)390
26621
 
5340 y Ff(ra)m(w)p 540 5340 V 40 w(\015ag)8 b FB(:)41
26622
 
b(If)30 b(non)g(zero)h(then)f(the)h(ra)m(w)f(DER)h(data)g(are)f
26623
 
(returned.)p eop end
 
26601
1896 4723 V 40 w(datum)p 2194 4723 V 40 w(t)f(*)h Fe(data)12
 
26602
b Ff(,)31 b(const)g(gn)m(utls)p 3129 4723 V 41 w(datum)p
 
26603
3428 4723 V 39 w(t)g(*)565 4832 y Fe(signature)12 b Fg(\))390
 
26604
4942 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)390
 
26605
5075 y Ff(\015ags)t FB(:)41 b(should)29 b(b)s(e)h(0)h(for)f(no)m(w)390
 
26606
5207 y Ff(data)p FB(:)41 b(holds)30 b(the)h(data)g(to)g(b)s(e)f(signed)
 
26607
390 5340 y Ff(signature)5 b FB(:)41 b(con)m(tains)32
 
26608
b(the)e(signature)p eop end
26624
26609
%%Page: 231 237
26625
26610
TeXDict begin 231 236 bop 150 -116 a FB(Chapter)30 b(9:)41
26626
 
b(F)-8 b(unction)31 b(Reference)2237 b(231)390 299 y
26627
 
Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h
26628
 
(hold)f(the)h(p)s(eer's)e(name)390 432 y Ff(sizeof)p
26629
 
610 432 28 4 v 41 w(buf)17 b FB(:)40 b(holds)30 b(the)h(size)g(of)f
26630
 
Ft(buf)390 565 y FB(This)21 b(function)g(will)g(return)g(the)g(name)h
26631
 
(of)f(the)h(giv)m(en)g(Ob)5 b(ject)22 b(iden)m(ti\014er,)h(of)f(the)f
26632
 
(RDN)h(sequence.)390 675 y(The)30 b(name)g(will)h(b)s(e)f(enco)s(ded)g
26633
 
(using)g(the)g(rules)g(from)g(RF)m(C2253.)390 808 y Fn(Returns:)51
26634
 
b FB(On)34 b(success,)k Ft(GNUTLS_E_SUCCESS)31 b FB(is)36
26635
 
b(returned,)f(or)h Ft(GNUTLS_E_SHORT_MEMORY_)390 918
26636
 
y(BUFFER)h FB(is)i(returned)f(and)g(*)p Ft(sizeof_buf)f
26637
 
FB(is)i(up)s(dated)f(if)g(the)i(pro)m(vided)e(bu\013er)g(is)h(not)g
26638
 
(long)390 1027 y(enough,)30 b(otherwise)h(a)g(negativ)m(e)i(error)d(v)
26639
 
-5 b(alue.)150 1224 y Fv(gn)m(utls)p 483 1224 37 5 v
26640
 
55 w(x509)p 786 1224 V 54 w(rdn)p 1026 1224 V 55 w(get)p
26641
 
1246 1224 V 54 w(oid)3350 1418 y FB([F)d(unction])-3599
26642
 
b Fh(int)53 b(gnutls_x509_rdn_get_o)q(id)f Fg(\()p Ff(const)31
26643
 
b(gn)m(utls)p 2127 1418 28 4 v 40 w(datum)p 2425 1418
26644
 
V 40 w(t)g(*)f Fe(idn)12 b Ff(,)31 b(in)m(t)565 1528
26645
 
y Fe(indx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(buf)12 b Ff(,)31
26646
 
b(size)p 1485 1528 V 41 w(t)g(*)f Fe(sizeof_buf)12 b
26647
 
Fg(\))390 1637 y Ff(idn)p FB(:)40 b(should)29 b(con)m(tain)j(a)f(DER)f
26648
 
(enco)s(ded)g(RDN)h(sequence)390 1771 y Ff(indx)6 b FB(:)40
26649
 
b(Indicates)31 b(whic)m(h)f(OID)g(to)i(return.)39 b(Use)31
26650
 
b(0)g(for)f(the)g(\014rst)g(one.)390 1904 y(This)g(function)g(will)g
26651
 
(return)g(the)g(sp)s(eci\014ed)g(Ob)5 b(ject)30 b(iden)m(ti\014er,)h
26652
 
(of)g(the)f(RDN)h(sequence.)390 2037 y Fn(Returns:)51
26653
 
b FB(On)34 b(success,)k Ft(GNUTLS_E_SUCCESS)31 b FB(is)36
26654
 
b(returned,)f(or)h Ft(GNUTLS_E_SHORT_MEMORY_)390 2147
26655
 
y(BUFFER)h FB(is)i(returned)f(and)g(*)p Ft(sizeof_buf)f
26656
 
FB(is)i(up)s(dated)f(if)g(the)i(pro)m(vided)e(bu\013er)g(is)h(not)g
26657
 
(long)390 2256 y(enough,)30 b(otherwise)h(a)g(negativ)m(e)i(error)d(v)
26658
 
-5 b(alue.)390 2389 y Fn(Since:)41 b FB(2.4.0)150 2586
26659
 
y Fv(gn)m(utls)p 483 2586 37 5 v 55 w(x509)p 786 2586
26660
 
V 54 w(rdn)p 1026 2586 V 55 w(get)3350 2780 y FB([F)-8
 
26611
b(F)-8 b(unction)31 b(Reference)2237 b(231)390 299 y(This)34
 
26612
b(function)h(will)h(v)m(erify)f(the)h(giv)m(en)g(signed)f(data,)j
 
26613
(using)c(the)i(parameters)f(in)g(the)g(priv)-5 b(ate)390
 
26614
408 y(k)m(ey)d(.)390 537 y Fn(Returns:)40 b FB(In)30
 
26615
b(case)h(of)g(a)g(v)m(eri\014cation)h(failure)e(0)h(is)f(returned,)g
 
26616
(and)g(1)g(on)h(success.)150 723 y Fv(gn)m(utls)p 483
 
26617
723 37 5 v 55 w(x509)p 786 723 V 54 w(rdn)p 1026 723
 
26618
V 55 w(get)p 1246 723 V 54 w(b)m(y)p 1430 723 V 54 w(oid)3350
 
26619
907 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_x509_rdn_get_b)q
 
26620
(y_oi)q(d)f Fg(\()p Ff(const)31 b(gn)m(utls)p 2284 907
 
26621
28 4 v 40 w(datum)p 2582 907 V 40 w(t)f(*)h Fe(idn)12
 
26622
b Ff(,)31 b(const)565 1017 y(c)m(har)g(*)g Fe(oid)12
 
26623
b Ff(,)31 b(in)m(t)g Fe(indx)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
26624
Fe(raw_flag)12 b Ff(,)32 b(v)m(oid)f(*)g Fe(buf)12 b
 
26625
Ff(,)31 b(size)p 3127 1017 V 41 w(t)g(*)565 1126 y Fe(sizeof_buf)12
 
26626
b Fg(\))390 1236 y Ff(idn)p FB(:)40 b(should)29 b(con)m(tain)j(a)f(DER)
 
26627
f(enco)s(ded)g(RDN)h(sequence)390 1364 y Ff(oid)t FB(:)40
 
26628
b(an)31 b(Ob)5 b(ject)30 b(Iden)m(ti\014er)390 1492 y
 
26629
Ff(indx)6 b FB(:)47 b(In)33 b(case)h(m)m(ultiple)h(same)f(OIDs)f(exist)
 
26630
h(in)g(the)g(RDN)g(indicates)g(whic)m(h)f(to)i(send.)50
 
26631
b(Use)34 b(0)390 1601 y(for)c(the)h(\014rst)e(one.)390
 
26632
1730 y Ff(ra)m(w)p 540 1730 V 40 w(\015ag)8 b FB(:)41
 
26633
b(If)30 b(non)g(zero)h(then)f(the)h(ra)m(w)f(DER)h(data)g(are)f
 
26634
(returned.)390 1858 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f(to)h
 
26635
(a)g(structure)f(to)h(hold)f(the)h(p)s(eer's)e(name)390
 
26636
1986 y Ff(sizeof)p 610 1986 V 41 w(buf)17 b FB(:)40 b(holds)30
 
26637
b(the)h(size)g(of)f Ft(buf)390 2114 y FB(This)21 b(function)g(will)g
 
26638
(return)g(the)g(name)h(of)f(the)h(giv)m(en)g(Ob)5 b(ject)22
 
26639
b(iden)m(ti\014er,)h(of)f(the)f(RDN)h(sequence.)390 2223
 
26640
y(The)30 b(name)g(will)h(b)s(e)f(enco)s(ded)g(using)g(the)g(rules)g
 
26641
(from)g(RF)m(C2253.)390 2351 y Fn(Returns:)51 b FB(On)34
 
26642
b(success,)k Ft(GNUTLS_E_SUCCESS)31 b FB(is)36 b(returned,)f(or)h
 
26643
Ft(GNUTLS_E_SHORT_MEMORY_)390 2461 y(BUFFER)h FB(is)i(returned)f(and)g
 
26644
(*)p Ft(sizeof_buf)f FB(is)i(up)s(dated)f(if)g(the)i(pro)m(vided)e
 
26645
(bu\013er)g(is)h(not)g(long)390 2571 y(enough,)30 b(otherwise)h(a)g
 
26646
(negativ)m(e)i(error)d(v)-5 b(alue.)150 2757 y Fv(gn)m(utls)p
 
26647
483 2757 37 5 v 55 w(x509)p 786 2757 V 54 w(rdn)p 1026
 
26648
2757 V 55 w(get)p 1246 2757 V 54 w(oid)3350 2941 y FB([F)d(unction])
 
26649
-3599 b Fh(int)53 b(gnutls_x509_rdn_get_o)q(id)f Fg(\()p
 
26650
Ff(const)31 b(gn)m(utls)p 2127 2941 28 4 v 40 w(datum)p
 
26651
2425 2941 V 40 w(t)g(*)f Fe(idn)12 b Ff(,)31 b(in)m(t)565
 
26652
3051 y Fe(indx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(buf)12
 
26653
b Ff(,)31 b(size)p 1485 3051 V 41 w(t)g(*)f Fe(sizeof_buf)12
 
26654
b Fg(\))390 3160 y Ff(idn)p FB(:)40 b(should)29 b(con)m(tain)j(a)f(DER)
 
26655
f(enco)s(ded)g(RDN)h(sequence)390 3288 y Ff(indx)6 b
 
26656
FB(:)40 b(Indicates)31 b(whic)m(h)f(OID)g(to)i(return.)39
 
26657
b(Use)31 b(0)g(for)f(the)g(\014rst)g(one.)390 3416 y(This)g(function)g
 
26658
(will)g(return)g(the)g(sp)s(eci\014ed)g(Ob)5 b(ject)30
 
26659
b(iden)m(ti\014er,)h(of)g(the)f(RDN)h(sequence.)390 3544
 
26660
y Fn(Returns:)51 b FB(On)34 b(success,)k Ft(GNUTLS_E_SUCCESS)31
 
26661
b FB(is)36 b(returned,)f(or)h Ft(GNUTLS_E_SHORT_MEMORY_)390
 
26662
3654 y(BUFFER)h FB(is)i(returned)f(and)g(*)p Ft(sizeof_buf)f
 
26663
FB(is)i(up)s(dated)f(if)g(the)i(pro)m(vided)e(bu\013er)g(is)h(not)g
 
26664
(long)390 3764 y(enough,)30 b(otherwise)h(a)g(negativ)m(e)i(error)d(v)
 
26665
-5 b(alue.)390 3892 y Fn(Since:)41 b FB(2.4.0)150 4078
 
26666
y Fv(gn)m(utls)p 483 4078 37 5 v 55 w(x509)p 786 4078
 
26667
V 54 w(rdn)p 1026 4078 V 55 w(get)3350 4262 y FB([F)-8
26661
26668
b(unction])-3599 b Fh(int)53 b(gnutls_x509_rdn_get)e
26662
 
Fg(\()p Ff(const)32 b(gn)m(utls)p 1918 2780 28 4 v 40
26663
 
w(datum)p 2216 2780 V 40 w(t)e(*)h Fe(idn)12 b Ff(,)31
26664
 
b(c)m(har)g(*)g Fe(buf)12 b Ff(,)565 2890 y(size)p 712
26665
 
2890 V 41 w(t)31 b(*)f Fe(sizeof_buf)12 b Fg(\))390 2999
 
26669
Fg(\()p Ff(const)32 b(gn)m(utls)p 1918 4262 28 4 v 40
 
26670
w(datum)p 2216 4262 V 40 w(t)e(*)h Fe(idn)12 b Ff(,)31
 
26671
b(c)m(har)g(*)g Fe(buf)12 b Ff(,)565 4372 y(size)p 712
 
26672
4372 V 41 w(t)31 b(*)f Fe(sizeof_buf)12 b Fg(\))390 4481
26666
26673
y Ff(idn)p FB(:)40 b(should)29 b(con)m(tain)j(a)f(DER)f(enco)s(ded)g
26667
 
(RDN)h(sequence)390 3133 y Ff(buf)16 b FB(:)41 b(a)31
 
26674
(RDN)h(sequence)390 4609 y Ff(buf)16 b FB(:)41 b(a)31
26668
26675
b(p)s(oin)m(ter)f(to)h(a)g(structure)f(to)h(hold)f(the)h(p)s(eer's)e
26669
 
(name)390 3266 y Ff(sizeof)p 610 3266 V 41 w(buf)17 b
26670
 
FB(:)40 b(holds)30 b(the)h(size)g(of)f Ft(buf)390 3399
 
26676
(name)390 4737 y Ff(sizeof)p 610 4737 V 41 w(buf)17 b
 
26677
FB(:)40 b(holds)30 b(the)h(size)g(of)f Ft(buf)390 4865
26671
26678
y FB(This)g(function)g(will)h(return)e(the)i(name)f(of)h(the)g(giv)m
26672
26679
(en)g(RDN)g(sequence.)42 b(The)30 b(name)h(will)f(b)s(e)g(in)390
26673
 
3509 y(the)h(form)e Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p
 
26680
4975 y(the)h(form)e Ft(")p FB(C=xxxx,O=yyyy)-8 b(,CN=zzzz)p
26674
26681
Ft(")31 b FB(as)g(describ)s(ed)e(in)h(RF)m(C2253.)390
26675
 
3642 y Fn(Returns:)51 b FB(On)34 b(success,)k Ft(GNUTLS_E_SUCCESS)31
 
26682
5103 y Fn(Returns:)51 b FB(On)34 b(success,)k Ft(GNUTLS_E_SUCCESS)31
26676
26683
b FB(is)36 b(returned,)f(or)h Ft(GNUTLS_E_SHORT_MEMORY_)390
26677
 
3751 y(BUFFER)h FB(is)i(returned)f(and)g(*)p Ft(sizeof_buf)f
 
26684
5213 y(BUFFER)h FB(is)i(returned)f(and)g(*)p Ft(sizeof_buf)f
26678
26685
FB(is)i(up)s(dated)f(if)g(the)i(pro)m(vided)e(bu\013er)g(is)h(not)g
26679
 
(long)390 3861 y(enough,)30 b(otherwise)h(a)g(negativ)m(e)i(error)d(v)
26680
 
-5 b(alue.)150 4091 y FA(9.3)68 b Fv(Gn)m(uTLS-extra)45
26681
 
b FA(F)-11 b(unctions)150 4250 y FB(These)21 b(functions)f(are)h(only)g
26682
 
(a)m(v)-5 b(ailable)23 b(in)e(the)g(GPLv3)p Ft(+)f FB(v)m(ersion)i(of)f
26683
 
(the)g(library)f(called)i Ft(gnutls-extra)p FB(.)150
26684
 
4360 y(The)30 b(protot)m(yp)s(es)h(for)f(this)g(library)g(lie)h(in)f(`)
26685
 
p Ft(gnutls/extra.h)p FB('.)150 4557 y Fv(gn)m(utls)p
26686
 
483 4557 37 5 v 55 w(extra)p 817 4557 V 53 w(c)m(hec)m(k)p
26687
 
1163 4557 V 52 w(v)m(ersion)3350 4751 y FB([F)-8 b(unction])-3599
 
26686
(long)390 5322 y(enough,)30 b(otherwise)h(a)g(negativ)m(e)i(error)d(v)
 
26687
-5 b(alue.)p eop end
 
26688
%%Page: 232 238
 
26689
TeXDict begin 232 237 bop 150 -116 a FB(Chapter)30 b(9:)41
 
26690
b(F)-8 b(unction)31 b(Reference)2237 b(232)150 299 y
 
26691
FA(9.3)68 b Fv(Gn)m(uTLS-extra)45 b FA(F)-11 b(unctions)150
 
26692
458 y FB(These)21 b(functions)f(are)h(only)g(a)m(v)-5
 
26693
b(ailable)23 b(in)e(the)g(GPLv3)p Ft(+)f FB(v)m(ersion)i(of)f(the)g
 
26694
(library)f(called)i Ft(gnutls-extra)p FB(.)150 568 y(The)30
 
26695
b(protot)m(yp)s(es)h(for)f(this)g(library)g(lie)h(in)f(`)p
 
26696
Ft(gnutls/extra.h)p FB('.)150 791 y Fv(gn)m(utls)p 483
 
26697
791 37 5 v 55 w(extra)p 817 791 V 53 w(c)m(hec)m(k)p
 
26698
1163 791 V 52 w(v)m(ersion)3350 1012 y FB([F)-8 b(unction])-3599
26688
26699
b Fh(const)54 b(char)f(*)g(gnutls_extra_check_ver)q(sio)q(n)e
26689
 
Fg(\()p Ff(const)32 b(c)m(har)e(*)565 4860 y Fe(req_version)12
26690
 
b Fg(\))390 4970 y Ff(req)p 520 4970 28 4 v 40 w(v)m(ersion)p
 
26700
Fg(\()p Ff(const)32 b(c)m(har)e(*)565 1122 y Fe(req_version)12
 
26701
b Fg(\))390 1231 y Ff(req)p 520 1231 28 4 v 40 w(v)m(ersion)p
26691
26702
FB(:)41 b(the)31 b(v)m(ersion)g(to)g(c)m(hec)m(k)390
26692
 
5103 y(Chec)m(k)k(that)g(the)g(v)m(ersion)g(of)f(the)h(gn)m(utls-extra)
 
26703
1390 y(Chec)m(k)k(that)g(the)g(v)m(ersion)g(of)f(the)h(gn)m(utls-extra)
26693
26704
h(library)e(is)h(at)g(minim)m(um)e(the)i(requested)g(one)390
26694
 
5213 y(and)23 b(return)f(the)i(v)m(ersion)g(string;)i(return)c(NULL)i
 
26705
1500 y(and)23 b(return)f(the)i(v)m(ersion)g(string;)i(return)c(NULL)i
26695
26706
(if)f(the)h(condition)g(is)g(not)f(satis\014ed.)39 b(If)23
26696
 
b(a)h(NULL)390 5322 y(is)k(passed)g(to)h(this)f(function,)h(no)f(c)m
 
26707
b(a)h(NULL)390 1609 y(is)k(passed)g(to)h(this)f(function,)h(no)f(c)m
26697
26708
(hec)m(k)h(is)g(done,)f(but)g(the)g(v)m(ersion)h(string)f(is)g(simply)g
26698
 
(returned.)p eop end
26699
 
%%Page: 232 238
26700
 
TeXDict begin 232 237 bop 150 -116 a FB(Chapter)30 b(9:)41
26701
 
b(F)-8 b(unction)31 b(Reference)2237 b(232)150 299 y
26702
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(global)p 856 299 V
26703
 
54 w(init)p 1094 299 V 54 w(extra)3350 512 y FB([F)-8
26704
 
b(unction])-3599 b Fh(int)53 b(gnutls_global_init_ex)q(tra)f
26705
 
Fg(\()31 b Fe(void)12 b Fg(\))390 622 y FB(This)32 b(function)h
26706
 
(initializes)j(the)d(global)h(state)h(of)e(gn)m(utls-extra)i(library)e
26707
 
(to)h(defaults.)49 b(Returns)390 731 y(zero)31 b(on)f(success.)390
26708
 
882 y(Note)h(that)g Ft(gnutls_global_init\(\))24 b FB(has)30
26709
 
b(to)g(b)s(e)g(called)h(b)s(efore)e(this)h(function.)40
26710
 
b(If)30 b(this)g(func-)390 992 y(tion)h(is)f(not)h(called)g(then)g(the)
26711
 
f(gn)m(utls-extra)i(library)e(will)h(not)f(b)s(e)g(usable.)150
26712
 
1249 y FA(9.4)68 b Fv(Op)s(enPGP)46 b FA(F)-11 b(unctions)150
26713
 
1408 y FB(The)30 b(follo)m(wing)i(functions)e(are)h(to)g(b)s(e)f(used)f
 
26709
(returned.)150 1833 y Fv(gn)m(utls)p 483 1833 37 5 v
 
26710
55 w(global)p 856 1833 V 54 w(init)p 1094 1833 V 54 w(extra)3350
 
26711
2053 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_global_init_ex)q
 
26712
(tra)f Fg(\()31 b Fe(void)12 b Fg(\))390 2163 y FB(This)32
 
26713
b(function)h(initializes)j(the)d(global)h(state)h(of)e(gn)m(utls-extra)
 
26714
i(library)e(to)h(defaults.)49 b(Returns)390 2273 y(zero)31
 
26715
b(on)f(success.)390 2431 y(Note)h(that)g Ft(gnutls_global_init\(\))24
 
26716
b FB(has)30 b(to)g(b)s(e)g(called)h(b)s(efore)e(this)h(function.)40
 
26717
b(If)30 b(this)g(func-)390 2541 y(tion)h(is)f(not)h(called)g(then)g
 
26718
(the)f(gn)m(utls-extra)i(library)e(will)h(not)f(b)s(e)g(usable.)150
 
26719
2810 y FA(9.4)68 b Fv(Op)s(enPGP)46 b FA(F)-11 b(unctions)150
 
26720
2969 y FB(The)30 b(follo)m(wing)i(functions)e(are)h(to)g(b)s(e)f(used)f
26714
26721
(for)h Fu(Op)r(enPGP)g FB(certi\014cate)i(handling.)41
26715
 
b(Their)30 b(protot)m(yp)s(es)150 1518 y(lie)h(in)f(`)p
26716
 
Ft(gnutls/openpgp.h)p FB('.)150 1733 y Fv(gn)m(utls)p
26717
 
483 1733 V 55 w(certi\014cate)p 1068 1733 V 52 w(set)p
26718
 
1272 1733 V 54 w(op)s(enpgp)p 1779 1733 V 56 w(k)m(ey)p
26719
 
2018 1733 V 53 w(\014le2)3350 1946 y FB([F)-8 b(unction])-3599
 
26722
b(Their)30 b(protot)m(yp)s(es)150 3079 y(lie)h(in)f(`)p
 
26723
Ft(gnutls/openpgp.h)p FB('.)150 3302 y Fv(gn)m(utls)p
 
26724
483 3302 V 55 w(certi\014cate)p 1068 3302 V 52 w(set)p
 
26725
1272 3302 V 54 w(op)s(enpgp)p 1779 3302 V 56 w(k)m(ey)p
 
26726
2018 3302 V 53 w(\014le2)3350 3523 y FB([F)-8 b(unction])-3599
26720
26727
b Fh(int)53 b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(_fil)q
26721
 
(e2)565 2056 y Fg(\()p Ff(gn)m(utls)p 846 2056 28 4 v
26722
 
41 w(certi\014cate)p 1274 2056 V 42 w(creden)m(tials)p
26723
 
1737 2056 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g
26724
 
Fe(certfile)12 b Ff(,)32 b(const)f(c)m(har)g(*)565 2165
 
26728
(e2)565 3632 y Fg(\()p Ff(gn)m(utls)p 846 3632 28 4 v
 
26729
41 w(certi\014cate)p 1274 3632 V 42 w(creden)m(tials)p
 
26730
1737 3632 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g
 
26731
Fe(certfile)12 b Ff(,)32 b(const)f(c)m(har)g(*)565 3742
26725
26732
y Fe(keyfile)12 b Ff(,)32 b(const)f(c)m(har)g(*)g Fe(subkey_id)12
26726
 
b Ff(,)33 b(gn)m(utls)p 2296 2165 V 40 w(op)s(enpgp)p
26727
 
2673 2165 V 39 w(crt)p 2823 2165 V 40 w(fm)m(t)p 2999
26728
 
2165 V 41 w(t)d Fe(format)12 b Fg(\))390 2275 y Ff(res)t
 
26733
b Ff(,)33 b(gn)m(utls)p 2296 3742 V 40 w(op)s(enpgp)p
 
26734
2673 3742 V 39 w(crt)p 2823 3742 V 40 w(fm)m(t)p 2999
 
26735
3742 V 41 w(t)d Fe(format)12 b Fg(\))390 3852 y Ff(res)t
26729
26736
FB(:)40 b(the)31 b(destination)g(con)m(text)h(to)f(sa)m(v)m(e)h(the)f
26730
 
(data.)390 2426 y Ff(cert\014le)5 b FB(:)42 b(the)30
 
26737
(data.)390 4010 y Ff(cert\014le)5 b FB(:)42 b(the)30
26731
26738
b(\014le)h(that)g(con)m(tains)g(the)g(public)f(k)m(ey)-8
26732
 
b(.)390 2577 y Ff(k)m(ey\014le)5 b FB(:)42 b(the)30 b(\014le)h(that)g
26733
 
(con)m(tains)g(the)g(secret)g(k)m(ey)-8 b(.)390 2728
26734
 
y Ff(subk)m(ey)p 667 2728 V 40 w(id)t FB(:)40 b(a)30
26735
 
b(hex)h(enco)s(ded)f(subk)m(ey)g(id)390 2878 y Ff(format)r
26736
 
FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390 3029
 
26739
b(.)390 4169 y Ff(k)m(ey\014le)5 b FB(:)42 b(the)30 b(\014le)h(that)g
 
26740
(con)m(tains)g(the)g(secret)g(k)m(ey)-8 b(.)390 4328
 
26741
y Ff(subk)m(ey)p 667 4328 V 40 w(id)t FB(:)40 b(a)30
 
26742
b(hex)h(enco)s(ded)f(subk)m(ey)g(id)390 4486 y Ff(format)r
 
26743
FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390 4645
26737
26744
y(This)36 b(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)e(k)m(eys)j
26738
26745
(in)m(to)f(the)g(Gn)m(uTLS)f(creden)m(tial)i(structure.)390
26739
 
3139 y(The)30 b(\014les)g(should)g(con)m(tain)h(non)f(encrypted)g(k)m
26740
 
(eys.)390 3290 y(The)25 b(sp)s(ecial)h(k)m(eyw)m(ord)g
 
26746
4754 y(The)30 b(\014les)g(should)g(con)m(tain)h(non)f(encrypted)g(k)m
 
26747
(eys.)390 4913 y(The)25 b(sp)s(ecial)h(k)m(eyw)m(ord)g
26741
26748
Ft(")p FB(auto)p Ft(")g FB(is)f(also)i(accepted)g(as)e(&subk)m(ey)p
26742
 
2602 3290 V 40 w(id.)39 b(In)24 b(that)j(case)f(the)g
26743
 
Ft(gnutls_)390 3399 y(openpgp_crt_get_auth_sub)o(key\()o(\))e
 
26749
2602 4913 V 40 w(id.)39 b(In)24 b(that)j(case)f(the)g
 
26750
Ft(gnutls_)390 5023 y(openpgp_crt_get_auth_sub)o(key\()o(\))e
26744
26751
FB(will)31 b(b)s(e)f(used)f(to)j(retriev)m(e)f(the)g(subk)m(ey)-8
26745
 
b(.)390 3550 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26752
b(.)390 5181 y Fn(Returns:)36 b FB(On)20 b(success,)j
26746
26753
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26747
 
(negativ)m(e)h(error)d(v)-5 b(alue.)390 3701 y Fn(Since:)41
26748
 
b FB(2.4.0)150 3917 y Fv(gn)m(utls)p 483 3917 37 5 v
26749
 
55 w(certi\014cate)p 1068 3917 V 52 w(set)p 1272 3917
26750
 
V 54 w(op)s(enpgp)p 1779 3917 V 56 w(k)m(ey)p 2018 3917
26751
 
V 53 w(\014le)3350 4130 y FB([F)-8 b(unction])-3599 b
26752
 
Fh(int)53 b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(_fil)q(e)
26753
 
565 4239 y Fg(\()p Ff(gn)m(utls)p 846 4239 28 4 v 41
26754
 
w(certi\014cate)p 1274 4239 V 42 w(creden)m(tials)p 1737
26755
 
4239 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g
26756
 
Fe(certfile)12 b Ff(,)32 b(const)f(c)m(har)g(*)565 4349
26757
 
y Fe(keyfile)12 b Ff(,)32 b(gn)m(utls)p 1244 4349 V 41
26758
 
w(op)s(enpgp)p 1622 4349 V 39 w(crt)p 1772 4349 V 40
26759
 
w(fm)m(t)p 1948 4349 V 40 w(t)f Fe(format)12 b Fg(\))390
26760
 
4458 y Ff(res)t FB(:)40 b(the)31 b(destination)g(con)m(text)h(to)f(sa)m
26761
 
(v)m(e)h(the)f(data.)390 4609 y Ff(cert\014le)5 b FB(:)42
26762
 
b(the)30 b(\014le)h(that)g(con)m(tains)g(the)g(public)f(k)m(ey)-8
26763
 
b(.)390 4760 y Ff(k)m(ey\014le)5 b FB(:)42 b(the)30 b(\014le)h(that)g
26764
 
(con)m(tains)g(the)g(secret)g(k)m(ey)-8 b(.)390 4911
26765
 
y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390
26766
 
5062 y(This)j(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)e(k)m
26767
 
(eys)j(in)m(to)g(the)f(Gn)m(uTLS)e(creden)m(tials)j(structure.)390
26768
 
5171 y(The)30 b(\014les)g(should)g(only)g(con)m(tain)i(one)e(k)m(ey)i
26769
 
(whic)m(h)e(is)g(not)h(encrypted.)390 5322 y Fn(Returns:)36
26770
 
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
26771
 
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26772
 
b(alue.)p eop end
 
26754
(negativ)m(e)h(error)d(v)-5 b(alue.)390 5340 y Fn(Since:)41
 
26755
b FB(2.4.0)p eop end
26773
26756
%%Page: 233 239
26774
26757
TeXDict begin 233 238 bop 150 -116 a FB(Chapter)30 b(9:)41
26775
26758
b(F)-8 b(unction)31 b(Reference)2237 b(233)150 299 y
26776
26759
Fv(gn)m(utls)p 483 299 37 5 v 55 w(certi\014cate)p 1068
26777
26760
299 V 52 w(set)p 1272 299 V 54 w(op)s(enpgp)p 1779 299
26778
 
V 56 w(k)m(ey)p 2018 299 V 53 w(mem2)3350 499 y FB([F)-8
 
26761
V 56 w(k)m(ey)p 2018 299 V 53 w(\014le)3350 489 y FB([F)-8
26779
26762
b(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q(t_op)q(enp)q
26780
 
(gp_)q(key)q(_mem)q(2)565 609 y Fg(\()p Ff(gn)m(utls)p
26781
 
846 609 28 4 v 41 w(certi\014cate)p 1274 609 V 42 w(creden)m(tials)p
26782
 
1737 609 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p
26783
 
2546 609 V 40 w(datum)p 2844 609 V 40 w(t)g(*)f Fe(icert)12
26784
 
b Ff(,)32 b(const)565 718 y(gn)m(utls)p 811 718 V 41
26785
 
w(datum)p 1110 718 V 39 w(t)f(*)g Fe(ikey)12 b Ff(,)31
 
26763
(gp_)q(key)q(_fil)q(e)565 599 y Fg(\()p Ff(gn)m(utls)p
 
26764
846 599 28 4 v 41 w(certi\014cate)p 1274 599 V 42 w(creden)m(tials)p
 
26765
1737 599 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(const)g(c)m(har)g(*)g
 
26766
Fe(certfile)12 b Ff(,)32 b(const)f(c)m(har)g(*)565 708
 
26767
y Fe(keyfile)12 b Ff(,)32 b(gn)m(utls)p 1244 708 V 41
 
26768
w(op)s(enpgp)p 1622 708 V 39 w(crt)p 1772 708 V 40 w(fm)m(t)p
 
26769
1948 708 V 40 w(t)f Fe(format)12 b Fg(\))390 818 y Ff(res)t
 
26770
FB(:)40 b(the)31 b(destination)g(con)m(text)h(to)f(sa)m(v)m(e)h(the)f
 
26771
(data.)390 949 y Ff(cert\014le)5 b FB(:)42 b(the)30 b(\014le)h(that)g
 
26772
(con)m(tains)g(the)g(public)f(k)m(ey)-8 b(.)390 1081
 
26773
y Ff(k)m(ey\014le)5 b FB(:)42 b(the)30 b(\014le)h(that)g(con)m(tains)g
 
26774
(the)g(secret)g(k)m(ey)-8 b(.)390 1212 y Ff(format)r
 
26775
FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390 1343
 
26776
y(This)j(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)e(k)m(eys)j
 
26777
(in)m(to)g(the)f(Gn)m(uTLS)e(creden)m(tials)j(structure.)390
 
26778
1453 y(The)30 b(\014les)g(should)g(only)g(con)m(tain)i(one)e(k)m(ey)i
 
26779
(whic)m(h)e(is)g(not)h(encrypted.)390 1584 y Fn(Returns:)36
 
26780
b FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16 b FB(is)21
 
26781
b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
 
26782
b(alue.)150 1777 y Fv(gn)m(utls)p 483 1777 37 5 v 55
 
26783
w(certi\014cate)p 1068 1777 V 52 w(set)p 1272 1777 V
 
26784
54 w(op)s(enpgp)p 1779 1777 V 56 w(k)m(ey)p 2018 1777
 
26785
V 53 w(mem2)3350 1967 y FB([F)d(unction])-3599 b Fh(int)53
 
26786
b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(_mem)q(2)565
 
26787
2077 y Fg(\()p Ff(gn)m(utls)p 846 2077 28 4 v 41 w(certi\014cate)p
 
26788
1274 2077 V 42 w(creden)m(tials)p 1737 2077 V 41 w(t)31
 
26789
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 2077
 
26790
V 40 w(datum)p 2844 2077 V 40 w(t)g(*)f Fe(icert)12 b
 
26791
Ff(,)32 b(const)565 2186 y(gn)m(utls)p 811 2186 V 41
 
26792
w(datum)p 1110 2186 V 39 w(t)f(*)g Fe(ikey)12 b Ff(,)31
26786
26793
b(const)g(c)m(har)f(*)h Fe(subkey_id)12 b Ff(,)33 b(gn)m(utls)p
26787
 
2858 718 V 40 w(op)s(enpgp)p 3235 718 V 39 w(crt)p 3385
26788
 
718 V 41 w(fm)m(t)p 3562 718 V 40 w(t)565 828 y Fe(format)12
26789
 
b Fg(\))390 938 y Ff(res)t FB(:)40 b(the)31 b(destination)g(con)m(text)
26790
 
h(to)f(sa)m(v)m(e)h(the)f(data.)390 1076 y Ff(subk)m(ey)p
26791
 
667 1076 V 40 w(id)t FB(:)40 b(a)30 b(hex)h(enco)s(ded)f(subk)m(ey)g
26792
 
(id)390 1214 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m
26793
 
(eys)390 1352 y(This)j(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)
26794
 
e(k)m(eys)j(in)m(to)g(the)f(Gn)m(uTLS)e(creden)m(tials)j(structure.)390
26795
 
1462 y(The)30 b(\014les)g(should)g(only)g(con)m(tain)i(one)e(k)m(ey)i
26796
 
(whic)m(h)e(is)g(not)h(encrypted.)390 1600 y(The)25 b(sp)s(ecial)h(k)m
 
26794
2858 2186 V 40 w(op)s(enpgp)p 3235 2186 V 39 w(crt)p
 
26795
3385 2186 V 41 w(fm)m(t)p 3562 2186 V 40 w(t)565 2296
 
26796
y Fe(format)12 b Fg(\))390 2406 y Ff(res)t FB(:)40 b(the)31
 
26797
b(destination)g(con)m(text)h(to)f(sa)m(v)m(e)h(the)f(data.)390
 
26798
2537 y Ff(subk)m(ey)p 667 2537 V 40 w(id)t FB(:)40 b(a)30
 
26799
b(hex)h(enco)s(ded)f(subk)m(ey)g(id)390 2668 y Ff(format)r
 
26800
FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390 2800
 
26801
y(This)j(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)e(k)m(eys)j
 
26802
(in)m(to)g(the)f(Gn)m(uTLS)e(creden)m(tials)j(structure.)390
 
26803
2909 y(The)30 b(\014les)g(should)g(only)g(con)m(tain)i(one)e(k)m(ey)i
 
26804
(whic)m(h)e(is)g(not)h(encrypted.)390 3040 y(The)25 b(sp)s(ecial)h(k)m
26797
26805
(eyw)m(ord)g Ft(")p FB(auto)p Ft(")g FB(is)f(also)i(accepted)g(as)e
26798
 
(&subk)m(ey)p 2602 1600 V 40 w(id.)39 b(In)24 b(that)j(case)f(the)g
26799
 
Ft(gnutls_)390 1710 y(openpgp_crt_get_auth_sub)o(key\()o(\))e
 
26806
(&subk)m(ey)p 2602 3040 V 40 w(id.)39 b(In)24 b(that)j(case)f(the)g
 
26807
Ft(gnutls_)390 3150 y(openpgp_crt_get_auth_sub)o(key\()o(\))e
26800
26808
FB(will)31 b(b)s(e)f(used)f(to)j(retriev)m(e)f(the)g(subk)m(ey)-8
26801
 
b(.)390 1848 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26809
b(.)390 3281 y Fn(Returns:)36 b FB(On)20 b(success,)j
26802
26810
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26803
 
(negativ)m(e)h(error)d(v)-5 b(alue.)390 1986 y Fn(Since:)41
26804
 
b FB(2.4.0)150 2189 y Fv(gn)m(utls)p 483 2189 37 5 v
26805
 
55 w(certi\014cate)p 1068 2189 V 52 w(set)p 1272 2189
26806
 
V 54 w(op)s(enpgp)p 1779 2189 V 56 w(k)m(ey)p 2018 2189
26807
 
V 53 w(mem)3350 2389 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
26811
(negativ)m(e)h(error)d(v)-5 b(alue.)390 3413 y Fn(Since:)41
 
26812
b FB(2.4.0)150 3605 y Fv(gn)m(utls)p 483 3605 37 5 v
 
26813
55 w(certi\014cate)p 1068 3605 V 52 w(set)p 1272 3605
 
26814
V 54 w(op)s(enpgp)p 1779 3605 V 56 w(k)m(ey)p 2018 3605
 
26815
V 53 w(mem)3350 3796 y FB([F)-8 b(unction])-3599 b Fh(int)53
26808
26816
b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(_mem)565
26809
 
2499 y Fg(\()p Ff(gn)m(utls)p 846 2499 28 4 v 41 w(certi\014cate)p
26810
 
1274 2499 V 42 w(creden)m(tials)p 1737 2499 V 41 w(t)31
26811
 
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 2499
26812
 
V 40 w(datum)p 2844 2499 V 40 w(t)g(*)f Fe(icert)12 b
26813
 
Ff(,)32 b(const)565 2608 y(gn)m(utls)p 811 2608 V 41
26814
 
w(datum)p 1110 2608 V 39 w(t)f(*)g Fe(ikey)12 b Ff(,)31
26815
 
b(gn)m(utls)p 1807 2608 V 40 w(op)s(enpgp)p 2184 2608
26816
 
V 39 w(crt)p 2334 2608 V 40 w(fm)m(t)p 2510 2608 V 41
26817
 
w(t)f Fe(format)12 b Fg(\))390 2718 y Ff(res)t FB(:)40
 
26817
3905 y Fg(\()p Ff(gn)m(utls)p 846 3905 28 4 v 41 w(certi\014cate)p
 
26818
1274 3905 V 42 w(creden)m(tials)p 1737 3905 V 41 w(t)31
 
26819
b Fe(res)12 b Ff(,)31 b(const)g(gn)m(utls)p 2546 3905
 
26820
V 40 w(datum)p 2844 3905 V 40 w(t)g(*)f Fe(icert)12 b
 
26821
Ff(,)32 b(const)565 4015 y(gn)m(utls)p 811 4015 V 41
 
26822
w(datum)p 1110 4015 V 39 w(t)f(*)g Fe(ikey)12 b Ff(,)31
 
26823
b(gn)m(utls)p 1807 4015 V 40 w(op)s(enpgp)p 2184 4015
 
26824
V 39 w(crt)p 2334 4015 V 40 w(fm)m(t)p 2510 4015 V 41
 
26825
w(t)f Fe(format)12 b Fg(\))390 4125 y Ff(res)t FB(:)40
26818
26826
b(the)31 b(destination)g(con)m(text)h(to)f(sa)m(v)m(e)h(the)f(data.)390
26819
 
2856 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390
26820
 
2994 y(This)36 b(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)e(k)m
 
26827
4256 y Ff(format)r FB(:)41 b(the)31 b(format)f(of)h(the)f(k)m(eys)390
 
26828
4387 y(This)36 b(fun)m(tion)g(is)h(used)f(to)i(load)f(Op)s(enPGP)e(k)m
26821
26829
(eys)j(in)m(to)f(the)g(Gn)m(uTLS)f(creden)m(tial)i(structure.)390
26822
 
3104 y(The)30 b(\014les)g(should)g(con)m(tain)h(non)f(encrypted)g(k)m
26823
 
(eys.)390 3242 y Fn(Returns:)36 b FB(On)20 b(success,)j
26824
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26825
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 3445 y Fv(gn)m(utls)p
26826
 
483 3445 37 5 v 55 w(certi\014cate)p 1068 3445 V 52 w(set)p
26827
 
1272 3445 V 54 w(op)s(enpgp)p 1779 3445 V 56 w(k)m(eyring)p
26828
 
2231 3445 V 54 w(\014le)3350 3645 y FB([F)d(unction])-3599
26829
 
b Fh(int)53 b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(ring)q
26830
 
(_fi)q(le)565 3755 y Fg(\()p Ff(gn)m(utls)p 846 3755
26831
 
28 4 v 41 w(certi\014cate)p 1274 3755 V 42 w(creden)m(tials)p
26832
 
1737 3755 V 41 w(t)31 b Fe(c)12 b Ff(,)31 b(const)f(c)m(har)h(*)g
26833
 
Fe(file)12 b Ff(,)565 3865 y(gn)m(utls)p 811 3865 V 41
26834
 
w(op)s(enpgp)p 1189 3865 V 38 w(crt)p 1338 3865 V 41
26835
 
w(fm)m(t)p 1515 3865 V 40 w(t)31 b Fe(format)12 b Fg(\))390
26836
 
3974 y Ff(c)6 b FB(:)41 b(A)30 b(certi\014cate)j(creden)m(tials)e
26837
 
(structure)390 4112 y Ff(\014le)5 b FB(:)41 b(\014lename)30
26838
 
b(of)h(the)g(k)m(eyring.)390 4251 y(The)26 b(function)h(is)g(used)f(to)
26839
 
i(set)f(k)m(eyrings)h(that)f(will)g(b)s(e)g(used)f(in)m(ternally)i(b)m
26840
 
(y)e(v)-5 b(arious)27 b(Op)s(enPGP)390 4360 y(functions.)39
26841
 
b(F)-8 b(or)26 b(example)h(to)f(\014nd)e(a)j(k)m(ey)f(when)f(it)h(is)g
26842
 
(needed)f(for)h(an)g(op)s(erations.)39 b(The)25 b(k)m(eyring)390
26843
 
4470 y(will)31 b(also)g(b)s(e)f(used)f(at)i(the)g(v)m(eri\014cation)h
26844
 
(functions.)390 4608 y Fn(Returns:)k FB(On)20 b(success,)j
26845
 
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
26846
 
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4811 y Fv(gn)m(utls)p
26847
 
483 4811 37 5 v 55 w(certi\014cate)p 1068 4811 V 52 w(set)p
26848
 
1272 4811 V 54 w(op)s(enpgp)p 1779 4811 V 56 w(k)m(eyring)p
26849
 
2231 4811 V 54 w(mem)3350 5011 y FB([F)d(unction])-3599
26850
 
b Fh(int)53 b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(ring)q
26851
 
(_me)q(m)565 5121 y Fg(\()p Ff(gn)m(utls)p 846 5121 28
26852
 
4 v 41 w(certi\014cate)p 1274 5121 V 42 w(creden)m(tials)p
26853
 
1737 5121 V 41 w(t)31 b Fe(c)12 b Ff(,)31 b(const)f(opaque)h(*)g
26854
 
Fe(data)12 b Ff(,)31 b(size)p 3005 5121 V 41 w(t)g Fe(dlen)12
26855
 
b Ff(,)565 5230 y(gn)m(utls)p 811 5230 V 41 w(op)s(enpgp)p
26856
 
1189 5230 V 38 w(crt)p 1338 5230 V 41 w(fm)m(t)p 1515
26857
 
5230 V 40 w(t)31 b Fe(format)12 b Fg(\))390 5340 y Ff(c)6
26858
 
b FB(:)41 b(A)30 b(certi\014cate)j(creden)m(tials)e(structure)p
26859
 
eop end
 
26830
4497 y(The)30 b(\014les)g(should)g(con)m(tain)h(non)f(encrypted)g(k)m
 
26831
(eys.)390 4628 y Fn(Returns:)36 b FB(On)20 b(success,)j
 
26832
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
26833
(negativ)m(e)h(error)d(v)-5 b(alue.)150 4821 y Fv(gn)m(utls)p
 
26834
483 4821 37 5 v 55 w(certi\014cate)p 1068 4821 V 52 w(set)p
 
26835
1272 4821 V 54 w(op)s(enpgp)p 1779 4821 V 56 w(k)m(eyring)p
 
26836
2231 4821 V 54 w(\014le)3350 5011 y FB([F)d(unction])-3599
 
26837
b Fh(int)53 b(gnutls_certificate_se)q(t_op)q(enp)q(gp_)q(key)q(ring)q
 
26838
(_fi)q(le)565 5121 y Fg(\()p Ff(gn)m(utls)p 846 5121
 
26839
28 4 v 41 w(certi\014cate)p 1274 5121 V 42 w(creden)m(tials)p
 
26840
1737 5121 V 41 w(t)31 b Fe(c)12 b Ff(,)31 b(const)f(c)m(har)h(*)g
 
26841
Fe(file)12 b Ff(,)565 5230 y(gn)m(utls)p 811 5230 V 41
 
26842
w(op)s(enpgp)p 1189 5230 V 38 w(crt)p 1338 5230 V 41
 
26843
w(fm)m(t)p 1515 5230 V 40 w(t)31 b Fe(format)12 b Fg(\))390
 
26844
5340 y Ff(c)6 b FB(:)41 b(A)30 b(certi\014cate)j(creden)m(tials)e
 
26845
(structure)p eop end
26860
26846
%%Page: 234 240
26861
26847
TeXDict begin 234 239 bop 150 -116 a FB(Chapter)30 b(9:)41
26862
26848
b(F)-8 b(unction)31 b(Reference)2237 b(234)390 299 y
26863
 
Ff(data)p FB(:)41 b(bu\013er)30 b(with)g(k)m(eyring)h(data.)390
26864
 
432 y Ff(dlen)p FB(:)40 b(length)31 b(of)g(data)g(bu\013er.)390
26865
 
565 y(The)26 b(function)h(is)g(used)f(to)i(set)f(k)m(eyrings)h(that)f
 
26849
Ff(\014le)5 b FB(:)41 b(\014lename)30 b(of)h(the)g(k)m(eyring.)390
 
26850
427 y(The)26 b(function)h(is)g(used)f(to)i(set)f(k)m(eyrings)h(that)f
26866
26851
(will)g(b)s(e)g(used)f(in)m(ternally)i(b)m(y)e(v)-5 b(arious)27
26867
 
b(Op)s(enPGP)390 674 y(functions.)39 b(F)-8 b(or)26 b(example)h(to)f
 
26852
b(Op)s(enPGP)390 537 y(functions.)39 b(F)-8 b(or)26 b(example)h(to)f
26868
26853
(\014nd)e(a)j(k)m(ey)f(when)f(it)h(is)g(needed)f(for)h(an)g(op)s
26869
 
(erations.)39 b(The)25 b(k)m(eyring)390 784 y(will)31
 
26854
(erations.)39 b(The)25 b(k)m(eyring)390 647 y(will)31
26870
26855
b(also)g(b)s(e)f(used)f(at)i(the)g(v)m(eri\014cation)h(functions.)390
26871
 
917 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
 
26856
775 y Fn(Returns:)k FB(On)20 b(success,)j Ft(GNUTLS_E_SUCCESS)16
26872
26857
b FB(is)21 b(returned,)h(otherwise)f(a)h(negativ)m(e)h(error)d(v)-5
26873
 
b(alue.)150 1113 y Fv(gn)m(utls)p 483 1113 37 5 v 55
26874
 
w(certi\014cate)p 1068 1113 V 52 w(set)p 1272 1113 V
26875
 
54 w(op)s(enpgp)p 1779 1113 V 56 w(k)m(ey)3350 1307 y
26876
 
FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q(t_op)q
26877
 
(enp)q(gp_)q(key)565 1416 y Fg(\()p Ff(gn)m(utls)p 846
26878
 
1416 28 4 v 41 w(certi\014cate)p 1274 1416 V 42 w(creden)m(tials)p
26879
 
1737 1416 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
26880
 
2308 1416 V 41 w(op)s(enpgp)p 2686 1416 V 38 w(crt)p
26881
 
2835 1416 V 41 w(t)f Fe(crt)12 b Ff(,)565 1526 y(gn)m(utls)p
26882
 
811 1526 V 41 w(op)s(enpgp)p 1189 1526 V 38 w(privk)m(ey)p
26883
 
1520 1526 V 41 w(t)30 b Fe(pkey)12 b Fg(\))390 1636 y
 
26858
b(alue.)150 963 y Fv(gn)m(utls)p 483 963 37 5 v 55 w(certi\014cate)p
 
26859
1068 963 V 52 w(set)p 1272 963 V 54 w(op)s(enpgp)p 1779
 
26860
963 V 56 w(k)m(eyring)p 2231 963 V 54 w(mem)3350 1147
 
26861
y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q(t_op)q
 
26862
(enp)q(gp_)q(key)q(ring)q(_me)q(m)565 1257 y Fg(\()p
 
26863
Ff(gn)m(utls)p 846 1257 28 4 v 41 w(certi\014cate)p 1274
 
26864
1257 V 42 w(creden)m(tials)p 1737 1257 V 41 w(t)31 b
 
26865
Fe(c)12 b Ff(,)31 b(const)f(opaque)h(*)g Fe(data)12 b
 
26866
Ff(,)31 b(size)p 3005 1257 V 41 w(t)g Fe(dlen)12 b Ff(,)565
 
26867
1367 y(gn)m(utls)p 811 1367 V 41 w(op)s(enpgp)p 1189
 
26868
1367 V 38 w(crt)p 1338 1367 V 41 w(fm)m(t)p 1515 1367
 
26869
V 40 w(t)31 b Fe(format)12 b Fg(\))390 1476 y Ff(c)6
 
26870
b FB(:)41 b(A)30 b(certi\014cate)j(creden)m(tials)e(structure)390
 
26871
1605 y Ff(data)p FB(:)41 b(bu\013er)30 b(with)g(k)m(eyring)h(data.)390
 
26872
1733 y Ff(dlen)p FB(:)40 b(length)31 b(of)g(data)g(bu\013er.)390
 
26873
1862 y(The)26 b(function)h(is)g(used)f(to)i(set)f(k)m(eyrings)h(that)f
 
26874
(will)g(b)s(e)g(used)f(in)m(ternally)i(b)m(y)e(v)-5 b(arious)27
 
26875
b(Op)s(enPGP)390 1971 y(functions.)39 b(F)-8 b(or)26
 
26876
b(example)h(to)f(\014nd)e(a)j(k)m(ey)f(when)f(it)h(is)g(needed)f(for)h
 
26877
(an)g(op)s(erations.)39 b(The)25 b(k)m(eyring)390 2081
 
26878
y(will)31 b(also)g(b)s(e)f(used)f(at)i(the)g(v)m(eri\014cation)h
 
26879
(functions.)390 2210 y Fn(Returns:)k FB(On)20 b(success,)j
 
26880
Ft(GNUTLS_E_SUCCESS)16 b FB(is)21 b(returned,)h(otherwise)f(a)h
 
26881
(negativ)m(e)h(error)d(v)-5 b(alue.)150 2397 y Fv(gn)m(utls)p
 
26882
483 2397 37 5 v 55 w(certi\014cate)p 1068 2397 V 52 w(set)p
 
26883
1272 2397 V 54 w(op)s(enpgp)p 1779 2397 V 56 w(k)m(ey)3350
 
26884
2582 y FB([F)d(unction])-3599 b Fh(int)53 b(gnutls_certificate_se)q
 
26885
(t_op)q(enp)q(gp_)q(key)565 2692 y Fg(\()p Ff(gn)m(utls)p
 
26886
846 2692 28 4 v 41 w(certi\014cate)p 1274 2692 V 42 w(creden)m(tials)p
 
26887
1737 2692 V 41 w(t)31 b Fe(res)12 b Ff(,)31 b(gn)m(utls)p
 
26888
2308 2692 V 41 w(op)s(enpgp)p 2686 2692 V 38 w(crt)p
 
26889
2835 2692 V 41 w(t)f Fe(crt)12 b Ff(,)565 2801 y(gn)m(utls)p
 
26890
811 2801 V 41 w(op)s(enpgp)p 1189 2801 V 38 w(privk)m(ey)p
 
26891
1520 2801 V 41 w(t)30 b Fe(pkey)12 b Fg(\))390 2911 y
26884
26892
Ff(res)t FB(:)40 b(is)31 b(an)f Ft(gnutls_certificate_crede)o(ntia)o
26885
 
(ls_)o(t)25 b FB(structure.)390 1768 y Ff(pk)m(ey)8 b
 
26893
(ls_)o(t)25 b FB(structure.)390 3039 y Ff(pk)m(ey)8 b
26886
26894
FB(:)41 b(is)30 b(an)g(op)s(enpgp)g(priv)-5 b(ate)30
26887
 
b(k)m(ey)390 1901 y(This)d(function)h(sets)h(a)g(certi\014cate/priv)-5
 
26895
b(k)m(ey)390 3168 y(This)d(function)h(sets)h(a)g(certi\014cate/priv)-5
26888
26896
b(ate)31 b(k)m(ey)e(pair)f(in)g(the)h(gn)m(utls)p 2789
26889
 
1901 V 40 w(certi\014cate)p 3216 1901 V 42 w(creden)m(tials)p
26890
 
3679 1901 V 42 w(t)390 2011 y(structure.)153 b(This)67
 
26897
3168 V 40 w(certi\014cate)p 3216 3168 V 42 w(creden)m(tials)p
 
26898
3679 3168 V 42 w(t)390 3277 y(structure.)153 b(This)67
26891
26899
b(function)g(ma)m(y)h(b)s(e)g(called)h(more)f(than)f(once)i(\(in)e
26892
 
(case)i(m)m(ultiple)390 2121 y(k)m(eys/certi\014cates)33
26893
 
b(exist)f(for)e(the)g(serv)m(er\).)390 2254 y(With)h(this)f(function)g
 
26900
(case)i(m)m(ultiple)390 3387 y(k)m(eys/certi\014cates)33
 
26901
b(exist)f(for)e(the)g(serv)m(er\).)390 3516 y(With)h(this)f(function)g
26894
26902
(the)h(subk)m(eys)f(of)g(the)h(certi\014cate)h(are)f(not)g(used.)150
26895
 
2450 y Fv(gn)m(utls)p 483 2450 37 5 v 55 w(op)s(enpgp)p
26896
 
991 2450 V 55 w(crt)p 1199 2450 V 54 w(c)m(hec)m(k)p
26897
 
1546 2450 V 52 w(hostname)3350 2643 y FB([F)-8 b(unction])-3599
 
26903
3703 y Fv(gn)m(utls)p 483 3703 37 5 v 55 w(op)s(enpgp)p
 
26904
991 3703 V 55 w(crt)p 1199 3703 V 54 w(c)m(hec)m(k)p
 
26905
1546 3703 V 52 w(hostname)3350 3888 y FB([F)-8 b(unction])-3599
26898
26906
b Fh(int)53 b(gnutls_openpgp_crt_ch)q(eck_)q(hos)q(tna)q(me)f
26899
 
Fg(\()p Ff(gn)m(utls)p 2412 2643 28 4 v 40 w(op)s(enpgp)p
26900
 
2789 2643 V 39 w(crt)p 2939 2643 V 41 w(t)565 2753 y
 
26907
Fg(\()p Ff(gn)m(utls)p 2412 3888 28 4 v 40 w(op)s(enpgp)p
 
26908
2789 3888 V 39 w(crt)p 2939 3888 V 41 w(t)565 3997 y
26901
26909
Fe(key)12 b Ff(,)31 b(const)g(c)m(har)g(*)f Fe(hostname)12
26902
 
b Fg(\))390 2863 y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(an)g
26903
 
Ft(gnutls_openpgp_crt_t)24 b FB(structure)390 2995 y
 
26910
b Fg(\))390 4107 y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(an)g
 
26911
Ft(gnutls_openpgp_crt_t)24 b FB(structure)390 4236 y
26904
26912
Ff(hostname)5 b FB(:)41 b(A)31 b(n)m(ull)f(terminated)h(string)f(that)h
26905
 
(con)m(tains)h(a)e(DNS)h(name)390 3128 y(This)i(function)g(will)g(c)m
 
26913
(con)m(tains)h(a)e(DNS)h(name)390 4364 y(This)i(function)g(will)g(c)m
26906
26914
(hec)m(k)i(if)e(the)h(giv)m(en)g(k)m(ey's)g(o)m(wner)g(matc)m(hes)g
26907
 
(the)g(giv)m(en)g(hostname.)50 b(This)390 3238 y(is)38
 
26915
(the)g(giv)m(en)g(hostname.)50 b(This)390 4474 y(is)38
26908
26916
b(a)g(basic)g(implemen)m(tation)i(of)e(the)g(matc)m(hing)h(describ)s
26909
 
(ed)d(in)i(RF)m(C2818)i(\(HTTPS\),)d(whic)m(h)390 3348
 
26917
(ed)d(in)i(RF)m(C2818)i(\(HTTPS\),)d(whic)m(h)390 4583
26910
26918
y(tak)m(es)32 b(in)m(to)f(accoun)m(t)h(wildcards.)390
26911
 
3481 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
26912
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 3677 y Fv(gn)m(utls)p
26913
 
483 3677 37 5 v 55 w(op)s(enpgp)p 991 3677 V 55 w(crt)p
26914
 
1199 3677 V 54 w(deinit)3350 3870 y FB([F)-8 b(unction])-3599
 
26919
4712 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
26920
b(success,)f(or)h(an)f(error)g(co)s(de.)150 4899 y Fv(gn)m(utls)p
 
26921
483 4899 37 5 v 55 w(op)s(enpgp)p 991 4899 V 55 w(crt)p
 
26922
1199 4899 V 54 w(deinit)3350 5084 y FB([F)-8 b(unction])-3599
26915
26923
b Fh(void)54 b(gnutls_openpgp_crt_deini)q(t)e Fg(\()p
26916
 
Ff(gn)m(utls)p 2046 3870 28 4 v 40 w(op)s(enpgp)p 2423
26917
 
3870 V 39 w(crt)p 2573 3870 V 41 w(t)30 b Fe(key)12 b
26918
 
Fg(\))390 3980 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)
26919
 
f(initialized)390 4113 y(This)g(function)g(will)g(deinitialize)j(a)e(k)
26920
 
m(ey)g(structure.)150 4309 y Fv(gn)m(utls)p 483 4309
26921
 
37 5 v 55 w(op)s(enpgp)p 991 4309 V 55 w(crt)p 1199 4309
26922
 
V 54 w(exp)s(ort)3350 4503 y FB([F)-8 b(unction])-3599
26923
 
b Fh(int)53 b(gnutls_openpgp_crt_ex)q(port)f Fg(\()p
26924
 
Ff(gn)m(utls)p 1993 4503 28 4 v 41 w(op)s(enpgp)p 2371
26925
 
4503 V 39 w(crt)p 2521 4503 V 40 w(t)31 b Fe(key)12 b
26926
 
Ff(,)565 4612 y(gn)m(utls)p 811 4612 V 41 w(op)s(enpgp)p
26927
 
1189 4612 V 38 w(crt)p 1338 4612 V 41 w(fm)m(t)p 1515
26928
 
4612 V 40 w(t)31 b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)f
26929
 
Fe(output_data)12 b Ff(,)34 b(size)p 3058 4612 V 41 w(t)c(*)565
26930
 
4722 y Fe(output_data_size)12 b Fg(\))390 4832 y Ff(k)m(ey)c
26931
 
FB(:)41 b(Holds)31 b(the)f(k)m(ey)-8 b(.)390 4964 y Ff(format)r
26932
 
FB(:)41 b(One)30 b(of)g(gn)m(utls)p 1264 4964 V 41 w(op)s(enpgp)p
26933
 
1642 4964 V 39 w(crt)p 1792 4964 V 40 w(fm)m(t)p 1968
26934
 
4964 V 40 w(t)h(elemen)m(ts.)390 5097 y Ff(output)p 664
26935
 
5097 V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(the)e(k)m(ey)h
26936
 
(base64)h(enco)s(ded)e(or)g(ra)m(w)390 5230 y Ff(output)p
26937
 
664 5230 V 40 w(data)p 880 5230 V 40 w(size)5 b FB(:)49
26938
 
b(holds)34 b(the)g(size)h(of)f(output)p 2093 5230 V 39
26939
 
w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i(actual)390
26940
 
5340 y(size)c(of)g(parameters\))p eop end
 
26924
Ff(gn)m(utls)p 2046 5084 28 4 v 40 w(op)s(enpgp)p 2423
 
26925
5084 V 39 w(crt)p 2573 5084 V 41 w(t)30 b Fe(key)12 b
 
26926
Fg(\))390 5194 y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)
 
26927
f(initialized)390 5322 y(This)g(function)g(will)g(deinitialize)j(a)e(k)
 
26928
m(ey)g(structure.)p eop end
26941
26929
%%Page: 235 241
26942
26930
TeXDict begin 235 240 bop 150 -116 a FB(Chapter)30 b(9:)41
26943
 
b(F)-8 b(unction)31 b(Reference)2237 b(235)390 299 y(This)27
26944
 
b(function)h(will)g(con)m(v)m(ert)i(the)e(giv)m(en)h(k)m(ey)g(to)g(RA)
26945
 
-10 b(W)28 b(or)g(Base64)i(format.)40 b(If)28 b(the)g(bu\013er)f(pro-)
26946
 
390 408 y(vided)k(is)h(not)h(long)f(enough)g(to)g(hold)g(the)g(output,)
26947
 
g(then)g Ft(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)390 518
26948
 
y FB(will)f(b)s(e)e(returned.)390 656 y Fn(Returns:)40
26949
 
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
26950
 
(de.)150 859 y Fv(gn)m(utls)p 483 859 37 5 v 55 w(op)s(enpgp)p
26951
 
991 859 V 55 w(crt)p 1199 859 V 54 w(get)p 1418 859 V
26952
 
54 w(auth)p 1716 859 V 54 w(subk)m(ey)3350 1059 y FB([F)-8
26953
 
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_au)q(th_)q
26954
 
(sub)q(key)f Fg(\()p Ff(gn)m(utls)p 2464 1059 28 4 v
26955
 
41 w(op)s(enpgp)p 2842 1059 V 39 w(crt)p 2992 1059 V
26956
 
40 w(t)565 1169 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p 1035
26957
 
1169 V 41 w(op)s(enpgp)p 1413 1169 V 38 w(k)m(eyid)p
26958
 
1660 1169 V 41 w(t)g Fe(keyid)12 b Ff(,)31 b(unsigned)f(in)m(t)g
26959
 
Fe(flag)12 b Fg(\))390 1279 y Ff(k)m(eyid)t FB(:)41 b(the)30
26960
 
b(struct)h(to)g(sa)m(v)m(e)h(the)e(k)m(eyid.)390 1417
 
26931
b(F)-8 b(unction)31 b(Reference)2237 b(235)150 299 y
 
26932
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
 
26933
V 55 w(crt)p 1199 299 V 54 w(exp)s(ort)3350 504 y FB([F)-8
 
26934
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ex)q(port)f
 
26935
Fg(\()p Ff(gn)m(utls)p 1993 504 28 4 v 41 w(op)s(enpgp)p
 
26936
2371 504 V 39 w(crt)p 2521 504 V 40 w(t)31 b Fe(key)12
 
26937
b Ff(,)565 614 y(gn)m(utls)p 811 614 V 41 w(op)s(enpgp)p
 
26938
1189 614 V 38 w(crt)p 1338 614 V 41 w(fm)m(t)p 1515 614
 
26939
V 40 w(t)31 b Fe(format)12 b Ff(,)32 b(v)m(oid)f(*)f
 
26940
Fe(output_data)12 b Ff(,)34 b(size)p 3058 614 V 41 w(t)c(*)565
 
26941
723 y Fe(output_data_size)12 b Fg(\))390 833 y Ff(k)m(ey)c
 
26942
FB(:)41 b(Holds)31 b(the)f(k)m(ey)-8 b(.)390 976 y Ff(format)r
 
26943
FB(:)41 b(One)30 b(of)g(gn)m(utls)p 1264 976 V 41 w(op)s(enpgp)p
 
26944
1642 976 V 39 w(crt)p 1792 976 V 40 w(fm)m(t)p 1968 976
 
26945
V 40 w(t)h(elemen)m(ts.)390 1119 y Ff(output)p 664 1119
 
26946
V 40 w(data)p FB(:)41 b(will)31 b(con)m(tain)h(the)e(k)m(ey)h(base64)h
 
26947
(enco)s(ded)e(or)g(ra)m(w)390 1262 y Ff(output)p 664
 
26948
1262 V 40 w(data)p 880 1262 V 40 w(size)5 b FB(:)49 b(holds)34
 
26949
b(the)g(size)h(of)f(output)p 2093 1262 V 39 w(data)h(\(and)f(will)g(b)s
 
26950
(e)f(replaced)i(b)m(y)e(the)i(actual)390 1372 y(size)c(of)g
 
26951
(parameters\))390 1515 y(This)c(function)h(will)g(con)m(v)m(ert)i(the)e
 
26952
(giv)m(en)h(k)m(ey)g(to)g(RA)-10 b(W)28 b(or)g(Base64)i(format.)40
 
26953
b(If)28 b(the)g(bu\013er)f(pro-)390 1624 y(vided)k(is)h(not)h(long)f
 
26954
(enough)g(to)g(hold)g(the)g(output,)g(then)g Ft
 
26955
(GNUTLS_E_SHORT_MEMORY_B)o(UFFE)o(R)390 1734 y FB(will)f(b)s(e)e
 
26956
(returned.)390 1877 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
26957
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
26958
2084 y Fv(gn)m(utls)p 483 2084 37 5 v 55 w(op)s(enpgp)p
 
26959
991 2084 V 55 w(crt)p 1199 2084 V 54 w(get)p 1418 2084
 
26960
V 54 w(auth)p 1716 2084 V 54 w(subk)m(ey)3350 2290 y
 
26961
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_au)q
 
26962
(th_)q(sub)q(key)f Fg(\()p Ff(gn)m(utls)p 2464 2290 28
 
26963
4 v 41 w(op)s(enpgp)p 2842 2290 V 39 w(crt)p 2992 2290
 
26964
V 40 w(t)565 2399 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p
 
26965
1035 2399 V 41 w(op)s(enpgp)p 1413 2399 V 38 w(k)m(eyid)p
 
26966
1660 2399 V 41 w(t)g Fe(keyid)12 b Ff(,)31 b(unsigned)f(in)m(t)g
 
26967
Fe(flag)12 b Fg(\))390 2509 y Ff(k)m(eyid)t FB(:)41 b(the)30
 
26968
b(struct)h(to)g(sa)m(v)m(e)h(the)e(k)m(eyid.)390 2652
26961
26969
y Ff(\015ag)8 b FB(:)41 b(Non)30 b(zero)h(indicates)h(that)f(a)f(v)-5
26962
26970
b(alid)31 b(subk)m(ey)f(is)h(alw)m(a)m(ys)h(returned.)390
26963
 
1555 y(Returns)e(the)i(64-bit)g(k)m(eyID)h(of)e(the)h(\014rst)e(v)-5
 
26971
2795 y(Returns)e(the)i(64-bit)g(k)m(eyID)h(of)e(the)h(\014rst)e(v)-5
26964
26972
b(alid)32 b(Op)s(enPGP)e(subk)m(ey)h(mark)m(ed)g(for)g(authen)m(tica-)
26965
 
390 1664 y(tion.)41 b(If)29 b(\015ag)h(is)f(non)g(zero)h(and)f(no)g
 
26973
390 2905 y(tion.)41 b(If)29 b(\015ag)h(is)f(non)g(zero)h(and)f(no)g
26966
26974
(authen)m(tication)j(subk)m(ey)d(exists,)h(then)f(a)h(v)-5
26967
 
b(alid)30 b(subk)m(ey)f(will)390 1774 y(b)s(e)i(returned)g(ev)m(en)i
 
26975
b(alid)30 b(subk)m(ey)f(will)390 3014 y(b)s(e)i(returned)g(ev)m(en)i
26968
26976
(if)f(it)h(is)f(not)g(mark)m(ed)g(for)g(authen)m(tication.)48
26969
 
b(Returns)31 b(the)h(64-bit)i(k)m(eyID)f(of)390 1884
 
26977
b(Returns)31 b(the)h(64-bit)i(k)m(eyID)f(of)390 3124
26970
26978
y(the)j(\014rst)f(v)-5 b(alid)37 b(Op)s(enPGP)d(subk)m(ey)i(mark)m(ed)g
26971
26979
(for)g(authen)m(tication.)60 b(If)35 b(\015ag)h(is)g(non)g(zero)h(and)
26972
 
390 1993 y(no)29 b(authen)m(tication)i(subk)m(ey)e(exists,)h(then)f(a)g
 
26980
390 3233 y(no)29 b(authen)m(tication)i(subk)m(ey)e(exists,)h(then)f(a)g
26973
26981
(v)-5 b(alid)30 b(subk)m(ey)e(will)i(b)s(e)e(returned)g(ev)m(en)i(if)f
26974
 
(it)h(is)f(not)390 2103 y(mark)m(ed)h(for)h(authen)m(tication.)390
26975
 
2241 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
26976
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 2444 y Fv(gn)m(utls)p
26977
 
483 2444 37 5 v 55 w(op)s(enpgp)p 991 2444 V 55 w(crt)p
26978
 
1199 2444 V 54 w(get)p 1418 2444 V 54 w(creation)p 1904
26979
 
2444 V 54 w(time)3350 2644 y FB([F)-8 b(unction])-3599
 
26982
(it)h(is)f(not)390 3343 y(mark)m(ed)h(for)h(authen)m(tication.)390
 
26983
3486 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
26984
b(success,)f(or)h(an)f(error)g(co)s(de.)150 3694 y Fv(gn)m(utls)p
 
26985
483 3694 37 5 v 55 w(op)s(enpgp)p 991 3694 V 55 w(crt)p
 
26986
1199 3694 V 54 w(get)p 1418 3694 V 54 w(creation)p 1904
 
26987
3694 V 54 w(time)3350 3899 y FB([F)-8 b(unction])-3599
26980
26988
b Fh(time_t)54 b(gnutls_openpgp_crt_get)q(_cr)q(eat)q(ion)q(_tim)q(e)
26981
 
565 2754 y Fg(\()p Ff(gn)m(utls)p 846 2754 28 4 v 41
26982
 
w(op)s(enpgp)p 1224 2754 V 39 w(crt)p 1374 2754 V 40
26983
 
w(t)31 b Fe(key)12 b Fg(\))390 2863 y Ff(k)m(ey)c FB(:)41
 
26989
565 4008 y Fg(\()p Ff(gn)m(utls)p 846 4008 28 4 v 41
 
26990
w(op)s(enpgp)p 1224 4008 V 39 w(crt)p 1374 4008 V 40
 
26991
w(t)31 b Fe(key)12 b Fg(\))390 4118 y Ff(k)m(ey)c FB(:)41
26984
26992
b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e(public)h
26985
 
(k)m(ey)-8 b(.)390 3001 y(Get)31 b(k)m(ey)h(creation)f(time.)390
26986
 
3139 y Fn(Returns:)40 b FB(the)31 b(timestamp)g(when)e(the)i(Op)s
26987
 
(enPGP)e(k)m(ey)i(w)m(as)g(created.)150 3342 y Fv(gn)m(utls)p
26988
 
483 3342 37 5 v 55 w(op)s(enpgp)p 991 3342 V 55 w(crt)p
26989
 
1199 3342 V 54 w(get)p 1418 3342 V 54 w(expiration)p
26990
 
2016 3342 V 54 w(time)3350 3543 y FB([F)-8 b(unction])-3599
 
26993
(k)m(ey)-8 b(.)390 4261 y(Get)31 b(k)m(ey)h(creation)f(time.)390
 
26994
4404 y Fn(Returns:)40 b FB(the)31 b(timestamp)g(when)e(the)i(Op)s
 
26995
(enPGP)e(k)m(ey)i(w)m(as)g(created.)150 4612 y Fv(gn)m(utls)p
 
26996
483 4612 37 5 v 55 w(op)s(enpgp)p 991 4612 V 55 w(crt)p
 
26997
1199 4612 V 54 w(get)p 1418 4612 V 54 w(expiration)p
 
26998
2016 4612 V 54 w(time)3350 4817 y FB([F)-8 b(unction])-3599
26991
26999
b Fh(time_t)54 b(gnutls_openpgp_crt_get)q(_ex)q(pir)q(ati)q(on_t)q(ime)
26992
 
565 3652 y Fg(\()p Ff(gn)m(utls)p 846 3652 28 4 v 41
26993
 
w(op)s(enpgp)p 1224 3652 V 39 w(crt)p 1374 3652 V 40
26994
 
w(t)31 b Fe(key)12 b Fg(\))390 3762 y Ff(k)m(ey)c FB(:)41
 
27000
565 4927 y Fg(\()p Ff(gn)m(utls)p 846 4927 28 4 v 41
 
27001
w(op)s(enpgp)p 1224 4927 V 39 w(crt)p 1374 4927 V 40
 
27002
w(t)31 b Fe(key)12 b Fg(\))390 5036 y Ff(k)m(ey)c FB(:)41
26995
27003
b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e(public)h
26996
 
(k)m(ey)-8 b(.)390 3900 y(Get)31 b(k)m(ey)h(expiration)f(time.)41
 
27004
(k)m(ey)-8 b(.)390 5179 y(Get)31 b(k)m(ey)h(expiration)f(time.)41
26997
27005
b(A)31 b(v)-5 b(alue)30 b(of)h('0')g(means)f(that)h(the)g(k)m(ey)g(do)s
26998
 
(esn't)f(expire)h(at)g(all.)390 4038 y Fn(Returns:)40
26999
 
b FB(the)31 b(time)g(when)e(the)i(Op)s(enPGP)e(k)m(ey)i(expires.)150
27000
 
4241 y Fv(gn)m(utls)p 483 4241 37 5 v 55 w(op)s(enpgp)p
27001
 
991 4241 V 55 w(crt)p 1199 4241 V 54 w(get)p 1418 4241
27002
 
V 54 w(\014ngerprin)m(t)3350 4441 y FB([F)-8 b(unction])-3599
27003
 
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_fi)q(nge)q(rpr)q(int)f
27004
 
Fg(\()p Ff(gn)m(utls)p 2464 4441 28 4 v 41 w(op)s(enpgp)p
27005
 
2842 4441 V 39 w(crt)p 2992 4441 V 40 w(t)565 4551 y
27006
 
Fe(key)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(fpr)12 b Ff(,)31
27007
 
b(size)p 1433 4551 V 41 w(t)f(*)h Fe(fprlen)12 b Fg(\))390
27008
 
4660 y Ff(k)m(ey)c FB(:)41 b(the)31 b(ra)m(w)f(data)h(that)g(con)m
27009
 
(tains)h(the)f(Op)s(enPGP)e(public)g(k)m(ey)-8 b(.)390
27010
 
4798 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)m(v)m(e)h(the)f
 
27006
(esn't)f(expire)h(at)g(all.)390 5322 y Fn(Returns:)40
 
27007
b FB(the)31 b(time)g(when)e(the)i(Op)s(enPGP)e(k)m(ey)i(expires.)p
 
27008
eop end
 
27009
%%Page: 236 242
 
27010
TeXDict begin 236 241 bop 150 -116 a FB(Chapter)30 b(9:)41
 
27011
b(F)-8 b(unction)31 b(Reference)2237 b(236)150 299 y
 
27012
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
 
27013
V 55 w(crt)p 1199 299 V 54 w(get)p 1418 299 V 54 w(\014ngerprin)m(t)
 
27014
3350 498 y FB([F)-8 b(unction])-3599 b Fh(int)53 b
 
27015
(gnutls_openpgp_crt_ge)q(t_fi)q(nge)q(rpr)q(int)f Fg(\()p
 
27016
Ff(gn)m(utls)p 2464 498 28 4 v 41 w(op)s(enpgp)p 2842
 
27017
498 V 39 w(crt)p 2992 498 V 40 w(t)565 608 y Fe(key)12
 
27018
b Ff(,)31 b(v)m(oid)g(*)g Fe(fpr)12 b Ff(,)31 b(size)p
 
27019
1433 608 V 41 w(t)f(*)h Fe(fprlen)12 b Fg(\))390 718
 
27020
y Ff(k)m(ey)c FB(:)41 b(the)31 b(ra)m(w)f(data)h(that)g(con)m(tains)h
 
27021
(the)f(Op)s(enPGP)e(public)g(k)m(ey)-8 b(.)390 855 y
 
27022
Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)m(v)m(e)h(the)f
27011
27023
(\014ngerprin)m(t,)e(m)m(ust)i(hold)f(at)h(least)g(20)h(b)m(ytes.)390
27012
 
4937 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f(sa)m(v)m(e)h
27013
 
(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390 5075
 
27024
992 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f(sa)m(v)m(e)h
 
27025
(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390 1129
27014
27026
y(Get)41 b(k)m(ey)f(\014ngerprin)m(t.)67 b(Dep)s(ending)39
27015
27027
b(on)g(the)h(algorithm,)j(the)d(\014ngerprin)m(t)f(can)g(b)s(e)g(16)i
27016
 
(or)e(20)390 5184 y(b)m(ytes.)390 5322 y Fn(Returns:)h
 
27028
(or)e(20)390 1239 y(b)m(ytes.)390 1376 y Fn(Returns:)h
27017
27029
FB(On)30 b(success,)h(0)g(is)f(returned.)39 b(Otherwise,)31
27018
 
b(an)f(error)g(co)s(de.)p eop end
27019
 
%%Page: 236 242
27020
 
TeXDict begin 236 241 bop 150 -116 a FB(Chapter)30 b(9:)41
27021
 
b(F)-8 b(unction)31 b(Reference)2237 b(236)150 299 y
27022
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27023
 
V 55 w(crt)p 1199 299 V 54 w(get)p 1418 299 V 54 w(k)m(ey)p
27024
 
1655 299 V 53 w(id)3350 485 y FB([F)-8 b(unction])-3599
27025
 
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_ke)q(y_i)q(d)e
27026
 
Fg(\()p Ff(gn)m(utls)p 2202 485 28 4 v 41 w(op)s(enpgp)p
27027
 
2580 485 V 39 w(crt)p 2730 485 V 40 w(t)31 b Fe(key)12
27028
 
b Ff(,)565 595 y(gn)m(utls)p 811 595 V 41 w(op)s(enpgp)p
27029
 
1189 595 V 38 w(k)m(eyid)p 1436 595 V 41 w(t)31 b Fe(keyid)12
27030
 
b Fg(\))390 704 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27031
 
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
27032
 
b(.)390 834 y Ff(k)m(eyid)t FB(:)41 b(the)30 b(bu\013er)g(to)h(sa)m(v)m
27033
 
(e)h(the)e(k)m(eyid.)390 963 y(Get)h(k)m(ey)h(id)e(string.)390
27034
 
1092 y Fn(Returns:)40 b FB(the)31 b(64-bit)h(k)m(eyID)f(of)g(the)f(Op)s
27035
 
(enPGP)f(k)m(ey)-8 b(.)390 1221 y Fn(Since:)41 b FB(2.4.0)150
27036
 
1410 y Fv(gn)m(utls)p 483 1410 37 5 v 55 w(op)s(enpgp)p
27037
 
991 1410 V 55 w(crt)p 1199 1410 V 54 w(get)p 1418 1410
27038
 
V 54 w(k)m(ey)p 1655 1410 V 53 w(usage)3350 1596 y FB([F)-8
27039
 
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_ke)q(y_u)q
27040
 
(sag)q(e)e Fg(\()p Ff(gn)m(utls)p 2359 1596 28 4 v 41
27041
 
w(op)s(enpgp)p 2737 1596 V 39 w(crt)p 2887 1596 V 40
27042
 
w(t)31 b Fe(key)12 b Ff(,)565 1706 y(unsigned)29 b(in)m(t)i(*)g
27043
 
Fe(key_usage)12 b Fg(\))390 1816 y Ff(k)m(ey)c FB(:)41
27044
 
b(should)30 b(con)m(tain)h(a)g(gn)m(utls)p 1528 1816
27045
 
V 41 w(op)s(enpgp)p 1906 1816 V 38 w(crt)p 2055 1816
27046
 
V 41 w(t)f(structure)390 1945 y Ff(k)m(ey)p 529 1945
27047
 
V 41 w(usage)5 b FB(:)41 b(where)30 b(the)h(k)m(ey)g(usage)g(bits)f
27048
 
(will)h(b)s(e)f(stored)390 2074 y(This)g(function)h(will)g(return)f
27049
 
(certi\014cate's)j(k)m(ey)f(usage,)g(b)m(y)f(c)m(hec)m(king)i(the)e(k)m
27050
 
(ey)h(algorithm.)43 b(The)390 2184 y(k)m(ey)30 b(usage)g(v)-5
27051
 
b(alue)29 b(will)h(ORed)f(v)-5 b(alues)29 b(of)h(the:)40
27052
 
b Ft(GNUTLS_KEY_DIGITAL_SIGNA)o(TURE)o FB(,)24 b Ft(GNUTLS_)390
27053
 
2293 y(KEY_KEY_ENCIPHERMENT)p FB(.)390 2423 y Fn(Returns:)40
27054
 
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
27055
 
(de.)150 2611 y Fv(gn)m(utls)p 483 2611 37 5 v 55 w(op)s(enpgp)p
27056
 
991 2611 V 55 w(crt)p 1199 2611 V 54 w(get)p 1418 2611
27057
 
V 54 w(name)3350 2798 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
27030
b(an)f(error)g(co)s(de.)150 1578 y Fv(gn)m(utls)p 483
 
27031
1578 37 5 v 55 w(op)s(enpgp)p 991 1578 V 55 w(crt)p 1199
 
27032
1578 V 54 w(get)p 1418 1578 V 54 w(k)m(ey)p 1655 1578
 
27033
V 53 w(id)3350 1777 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
27034
b(gnutls_openpgp_crt_ge)q(t_ke)q(y_i)q(d)e Fg(\()p Ff(gn)m(utls)p
 
27035
2202 1777 28 4 v 41 w(op)s(enpgp)p 2580 1777 V 39 w(crt)p
 
27036
2730 1777 V 40 w(t)31 b Fe(key)12 b Ff(,)565 1887 y(gn)m(utls)p
 
27037
811 1887 V 41 w(op)s(enpgp)p 1189 1887 V 38 w(k)m(eyid)p
 
27038
1436 1887 V 41 w(t)31 b Fe(keyid)12 b Fg(\))390 1996
 
27039
y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g
 
27040
(Op)s(enPGP)e(public)h(k)m(ey)-8 b(.)390 2134 y Ff(k)m(eyid)t
 
27041
FB(:)41 b(the)30 b(bu\013er)g(to)h(sa)m(v)m(e)h(the)e(k)m(eyid.)390
 
27042
2271 y(Get)h(k)m(ey)h(id)e(string.)390 2408 y Fn(Returns:)40
 
27043
b FB(the)31 b(64-bit)h(k)m(eyID)f(of)g(the)f(Op)s(enPGP)f(k)m(ey)-8
 
27044
b(.)390 2545 y Fn(Since:)41 b FB(2.4.0)150 2747 y Fv(gn)m(utls)p
 
27045
483 2747 37 5 v 55 w(op)s(enpgp)p 991 2747 V 55 w(crt)p
 
27046
1199 2747 V 54 w(get)p 1418 2747 V 54 w(k)m(ey)p 1655
 
27047
2747 V 53 w(usage)3350 2947 y FB([F)-8 b(unction])-3599
 
27048
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_ke)q(y_u)q(sag)q(e)e
 
27049
Fg(\()p Ff(gn)m(utls)p 2359 2947 28 4 v 41 w(op)s(enpgp)p
 
27050
2737 2947 V 39 w(crt)p 2887 2947 V 40 w(t)31 b Fe(key)12
 
27051
b Ff(,)565 3056 y(unsigned)29 b(in)m(t)i(*)g Fe(key_usage)12
 
27052
b Fg(\))390 3166 y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(a)g
 
27053
(gn)m(utls)p 1528 3166 V 41 w(op)s(enpgp)p 1906 3166
 
27054
V 38 w(crt)p 2055 3166 V 41 w(t)f(structure)390 3303
 
27055
y Ff(k)m(ey)p 529 3303 V 41 w(usage)5 b FB(:)41 b(where)30
 
27056
b(the)h(k)m(ey)g(usage)g(bits)f(will)h(b)s(e)f(stored)390
 
27057
3440 y(This)g(function)h(will)g(return)f(certi\014cate's)j(k)m(ey)f
 
27058
(usage,)g(b)m(y)f(c)m(hec)m(king)i(the)e(k)m(ey)h(algorithm.)43
 
27059
b(The)390 3550 y(k)m(ey)30 b(usage)g(v)-5 b(alue)29 b(will)h(ORed)f(v)
 
27060
-5 b(alues)29 b(of)h(the:)40 b Ft(GNUTLS_KEY_DIGITAL_SIGNA)o(TURE)o
 
27061
FB(,)24 b Ft(GNUTLS_)390 3659 y(KEY_KEY_ENCIPHERMENT)p
 
27062
FB(.)390 3797 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
27063
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
27064
3999 y Fv(gn)m(utls)p 483 3999 37 5 v 55 w(op)s(enpgp)p
 
27065
991 3999 V 55 w(crt)p 1199 3999 V 54 w(get)p 1418 3999
 
27066
V 54 w(name)3350 4198 y FB([F)-8 b(unction])-3599 b Fh(int)53
27058
27067
b(gnutls_openpgp_crt_ge)q(t_na)q(me)f Fg(\()p Ff(gn)m(utls)p
27059
 
2098 2798 28 4 v 41 w(op)s(enpgp)p 2476 2798 V 38 w(crt)p
27060
 
2625 2798 V 41 w(t)31 b Fe(key)12 b Ff(,)30 b(in)m(t)565
27061
 
2907 y Fe(idx)12 b Ff(,)31 b(c)m(har)g(*)g Fe(buf)12
27062
 
b Ff(,)31 b(size)p 1436 2907 V 41 w(t)f(*)h Fe(sizeof_buf)12
27063
 
b Fg(\))390 3017 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
 
27068
2098 4198 28 4 v 41 w(op)s(enpgp)p 2476 4198 V 38 w(crt)p
 
27069
2625 4198 V 41 w(t)31 b Fe(key)12 b Ff(,)30 b(in)m(t)565
 
27070
4308 y Fe(idx)12 b Ff(,)31 b(c)m(har)g(*)g Fe(buf)12
 
27071
b Ff(,)31 b(size)p 1436 4308 V 41 w(t)f(*)h Fe(sizeof_buf)12
 
27072
b Fg(\))390 4417 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27064
27073
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
27065
 
b(.)390 3146 y Ff(idx)6 b FB(:)41 b(the)30 b(index)g(of)h(the)f(ID)h
27066
 
(to)g(extract)390 3275 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f
27067
 
(to)h(a)g(structure)f(to)h(hold)f(the)h(name)390 3405
27068
 
y Ff(sizeof)p 610 3405 V 41 w(buf)17 b FB(:)48 b(holds)33
 
27074
b(.)390 4554 y Ff(idx)6 b FB(:)41 b(the)30 b(index)g(of)h(the)f(ID)h
 
27075
(to)g(extract)390 4692 y Ff(buf)16 b FB(:)41 b(a)31 b(p)s(oin)m(ter)f
 
27076
(to)h(a)g(structure)f(to)h(hold)f(the)h(name)390 4829
 
27077
y Ff(sizeof)p 610 4829 V 41 w(buf)17 b FB(:)48 b(holds)33
27069
27078
b(the)i(maxim)m(um)f(size)h(of)f Ft(buf)p FB(,)h(on)f(return)f(hold)h
27070
 
(the)g(actual/required)h(size)390 3514 y(of)c Ft(buf)p
27071
 
FB(.)390 3643 y(Extracts)g(the)g(userID)f(from)g(the)g(parsed)g(Op)s
27072
 
(enPGP)f(k)m(ey)-8 b(.)390 3773 y Fn(Returns:)56 b Ft(GNUTLS_E_SUCCESS)
 
27079
(the)g(actual/required)h(size)390 4938 y(of)c Ft(buf)p
 
27080
FB(.)390 5076 y(Extracts)g(the)g(userID)f(from)g(the)g(parsed)g(Op)s
 
27081
(enPGP)f(k)m(ey)-8 b(.)390 5213 y Fn(Returns:)56 b Ft(GNUTLS_E_SUCCESS)
27073
27082
34 b FB(on)k(success,)i(and)e(if)g(the)g(index)g(of)g(the)h(ID)f(do)s
27074
 
(es)g(not)g(exist)390 3882 y Ft(GNUTLS_E_REQUESTED_DATA_)o(NOT_)o(AVAI)
27075
 
o(LAB)o(LE)p FB(,)24 b(or)31 b(an)f(error)g(co)s(de.)150
27076
 
4071 y Fv(gn)m(utls)p 483 4071 37 5 v 55 w(op)s(enpgp)p
27077
 
991 4071 V 55 w(crt)p 1199 4071 V 54 w(get)p 1418 4071
27078
 
V 54 w(pk)p 1605 4071 V 54 w(algorithm)3350 4257 y FB([F)-8
27079
 
b(unction])-3599 b Fh(gnutls_pk_algorithm_t)59 b
27080
 
(gnutls_openpgp_crt_get_)q(pk_)q(algo)q(rit)q(hm)565
27081
 
4367 y Fg(\()p Ff(gn)m(utls)p 846 4367 28 4 v 41 w(op)s(enpgp)p
27082
 
1224 4367 V 39 w(crt)p 1374 4367 V 40 w(t)31 b Fe(key)12
27083
 
b Ff(,)31 b(unsigned)e(in)m(t)i(*)g Fe(bits)12 b Fg(\))390
27084
 
4477 y Ff(k)m(ey)c FB(:)41 b(is)31 b(an)f(Op)s(enPGP)f(k)m(ey)390
27085
 
4606 y Ff(bits)t FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h
27086
 
(will)g(hold)f(the)h(size)g(of)f(the)h(parameters')g(in)f(bits)390
27087
 
4735 y(This)g(function)g(will)g(return)g(the)g(public)g(k)m(ey)h
27088
 
(algorithm)g(of)g(an)f(Op)s(enPGP)f(certi\014cate.)390
27089
 
4864 y(If)g(bits)g(is)g(non)g(n)m(ull,)g(it)h(should)e(ha)m(v)m(e)i
27090
 
(enough)f(size)h(to)g(hold)f(the)h(parameters)f(size)h(in)f(bits.)40
27091
 
b(F)-8 b(or)390 4974 y(RSA)33 b(the)h(bits)f(returned)f(is)i(the)f(mo)s
27092
 
(dulus.)49 b(F)-8 b(or)34 b(DSA)f(the)h(bits)f(returned)f(are)i(of)g
27093
 
(the)g(public)390 5083 y(exp)s(onen)m(t.)390 5213 y Fn(Returns:)61
27094
 
b FB(a)40 b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
27095
 
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 5322
27096
 
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)p eop
27097
 
end
 
27083
(es)g(not)g(exist)390 5322 y Ft(GNUTLS_E_REQUESTED_DATA_)o(NOT_)o(AVAI)
 
27084
o(LAB)o(LE)p FB(,)24 b(or)31 b(an)f(error)g(co)s(de.)p
 
27085
eop end
27098
27086
%%Page: 237 243
27099
27087
TeXDict begin 237 242 bop 150 -116 a FB(Chapter)30 b(9:)41
27100
27088
b(F)-8 b(unction)31 b(Reference)2237 b(237)150 299 y
27101
27089
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27102
27090
V 55 w(crt)p 1199 299 V 54 w(get)p 1418 299 V 54 w(pk)p
27103
 
1605 299 V 54 w(dsa)p 1835 299 V 54 w(ra)m(w)3350 484
27104
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_pk)
27105
 
q(_ds)q(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2412 484 28
27106
 
4 v 40 w(op)s(enpgp)p 2789 484 V 39 w(crt)p 2939 484
27107
 
V 41 w(t)565 593 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p
27108
 
1035 593 V 41 w(datum)p 1334 593 V 39 w(t)g(*)g Fe(p)12
27109
 
b Ff(,)30 b(gn)m(utls)p 1874 593 V 40 w(datum)p 2172
27110
 
593 V 40 w(t)h(*)f Fe(q)12 b Ff(,)31 b(gn)m(utls)p 2713
27111
 
593 V 40 w(datum)p 3011 593 V 40 w(t)f(*)h Fe(g)12 b
27112
 
Ff(,)565 703 y(gn)m(utls)p 811 703 V 41 w(datum)p 1110
27113
 
703 V 39 w(t)31 b(*)g Fe(y)12 b Fg(\))390 813 y Ff(crt)r
27114
 
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 941 y Ff(p)s
27115
 
FB(:)40 b(will)31 b(hold)f(the)g(p)390 1070 y Ff(q)r
27116
 
FB(:)41 b(will)30 b(hold)g(the)h(q)390 1198 y Ff(g)8
27117
 
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 1327 y Ff(y)8
27118
 
b FB(:)40 b(will)31 b(hold)f(the)h(y)390 1455 y(This)37
27119
 
b(function)g(will)g(exp)s(ort)h(the)f(DSA)h(public)e(k)m(ey's)i
27120
 
(parameters)g(found)e(in)h(the)h(giv)m(en)g(cer-)390
27121
 
1565 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f
 
27091
1605 299 V 54 w(algorithm)3350 513 y FB([F)-8 b(unction])-3599
 
27092
b Fh(gnutls_pk_algorithm_t)59 b(gnutls_openpgp_crt_get_)q(pk_)q(algo)q
 
27093
(rit)q(hm)565 623 y Fg(\()p Ff(gn)m(utls)p 846 623 28
 
27094
4 v 41 w(op)s(enpgp)p 1224 623 V 39 w(crt)p 1374 623
 
27095
V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i(*)g
 
27096
Fe(bits)12 b Fg(\))390 732 y Ff(k)m(ey)c FB(:)41 b(is)31
 
27097
b(an)f(Op)s(enPGP)f(k)m(ey)390 884 y Ff(bits)t FB(:)40
 
27098
b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h(will)g(hold)f(the)h(size)g
 
27099
(of)f(the)h(parameters')g(in)f(bits)390 1036 y(This)g(function)g(will)g
 
27100
(return)g(the)g(public)g(k)m(ey)h(algorithm)g(of)g(an)f(Op)s(enPGP)f
 
27101
(certi\014cate.)390 1188 y(If)g(bits)g(is)g(non)g(n)m(ull,)g(it)h
 
27102
(should)e(ha)m(v)m(e)i(enough)f(size)h(to)g(hold)f(the)h(parameters)f
 
27103
(size)h(in)f(bits.)40 b(F)-8 b(or)390 1298 y(RSA)33 b(the)h(bits)f
 
27104
(returned)f(is)i(the)f(mo)s(dulus.)49 b(F)-8 b(or)34
 
27105
b(DSA)f(the)h(bits)f(returned)f(are)i(of)g(the)g(public)390
 
27106
1407 y(exp)s(onen)m(t.)390 1559 y Fn(Returns:)61 b FB(a)40
 
27107
b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
 
27108
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 1669
 
27109
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)150 1885
 
27110
y Fv(gn)m(utls)p 483 1885 37 5 v 55 w(op)s(enpgp)p 991
 
27111
1885 V 55 w(crt)p 1199 1885 V 54 w(get)p 1418 1885 V
 
27112
54 w(pk)p 1605 1885 V 54 w(dsa)p 1835 1885 V 54 w(ra)m(w)3350
 
27113
2100 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q
 
27114
(t_pk)q(_ds)q(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2412
 
27115
2100 28 4 v 40 w(op)s(enpgp)p 2789 2100 V 39 w(crt)p
 
27116
2939 2100 V 41 w(t)565 2209 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p
 
27117
1035 2209 V 41 w(datum)p 1334 2209 V 39 w(t)g(*)g Fe(p)12
 
27118
b Ff(,)30 b(gn)m(utls)p 1874 2209 V 40 w(datum)p 2172
 
27119
2209 V 40 w(t)h(*)f Fe(q)12 b Ff(,)31 b(gn)m(utls)p 2713
 
27120
2209 V 40 w(datum)p 3011 2209 V 40 w(t)f(*)h Fe(g)12
 
27121
b Ff(,)565 2319 y(gn)m(utls)p 811 2319 V 41 w(datum)p
 
27122
1110 2319 V 39 w(t)31 b(*)g Fe(y)12 b Fg(\))390 2428
 
27123
y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)390
 
27124
2580 y Ff(p)s FB(:)40 b(will)31 b(hold)f(the)g(p)390
 
27125
2732 y Ff(q)r FB(:)41 b(will)30 b(hold)g(the)h(q)390
 
27126
2884 y Ff(g)8 b FB(:)41 b(will)31 b(hold)f(the)g(g)390
 
27127
3036 y Ff(y)8 b FB(:)40 b(will)31 b(hold)f(the)h(y)390
 
27128
3188 y(This)37 b(function)g(will)g(exp)s(ort)h(the)f(DSA)h(public)e(k)m
 
27129
(ey's)i(parameters)g(found)e(in)h(the)h(giv)m(en)g(cer-)390
 
27130
3298 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f
27122
27131
(allo)s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36
27123
 
b(will)g(b)s(e)390 1675 y(stored)30 b(in)h(the)f(appropriate)h(datum.)
27124
 
390 1803 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b
27125
 
FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 1932
27126
 
y Fn(Since:)41 b FB(2.4.0)150 2119 y Fv(gn)m(utls)p 483
27127
 
2119 37 5 v 55 w(op)s(enpgp)p 991 2119 V 55 w(crt)p 1199
27128
 
2119 V 54 w(get)p 1418 2119 V 54 w(pk)p 1605 2119 V 54
27129
 
w(rsa)p 1817 2119 V 54 w(ra)m(w)3350 2304 y FB([F)-8
 
27132
b(will)g(b)s(e)390 3407 y(stored)30 b(in)h(the)f(appropriate)h(datum.)
 
27133
390 3559 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b
 
27134
FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 3711
 
27135
y Fn(Since:)41 b FB(2.4.0)150 3928 y Fv(gn)m(utls)p 483
 
27136
3928 37 5 v 55 w(op)s(enpgp)p 991 3928 V 55 w(crt)p 1199
 
27137
3928 V 54 w(get)p 1418 3928 V 54 w(pk)p 1605 3928 V 54
 
27138
w(rsa)p 1817 3928 V 54 w(ra)m(w)3350 4142 y FB([F)-8
27130
27139
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_pk)q(_rs)q
27131
 
(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2412 2304 28 4 v 40
27132
 
w(op)s(enpgp)p 2789 2304 V 39 w(crt)p 2939 2304 V 41
27133
 
w(t)565 2414 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p 1035
27134
 
2414 V 41 w(datum)p 1334 2414 V 39 w(t)g(*)g Fe(m)12
27135
 
b Ff(,)30 b(gn)m(utls)p 1874 2414 V 40 w(datum)p 2172
27136
 
2414 V 40 w(t)h(*)f Fe(e)12 b Fg(\))390 2523 y Ff(crt)r
27137
 
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 2652 y Ff(m)p
27138
 
FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390 2781
 
27140
(a_r)q(aw)f Fg(\()p Ff(gn)m(utls)p 2412 4142 28 4 v 40
 
27141
w(op)s(enpgp)p 2789 4142 V 39 w(crt)p 2939 4142 V 41
 
27142
w(t)565 4252 y Fe(crt)12 b Ff(,)31 b(gn)m(utls)p 1035
 
27143
4252 V 41 w(datum)p 1334 4252 V 39 w(t)g(*)g Fe(m)12
 
27144
b Ff(,)30 b(gn)m(utls)p 1874 4252 V 40 w(datum)p 2172
 
27145
4252 V 40 w(t)h(*)f Fe(e)12 b Fg(\))390 4361 y Ff(crt)r
 
27146
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 4513 y Ff(m)p
 
27147
FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390 4665
27139
27148
y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m(t)390
27140
 
2909 y(This)h(function)g(will)g(exp)s(ort)g(the)h(RSA)f(public)f(k)m
 
27149
4817 y(This)h(function)g(will)g(exp)s(ort)g(the)h(RSA)f(public)f(k)m
27141
27150
(ey's)i(parameters)g(found)e(in)h(the)h(giv)m(en)g(struc-)390
27142
 
3019 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
 
27151
4927 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
27143
27152
(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g(stored)
27144
 
390 3128 y(in)30 b(the)h(appropriate)f(datum.)390 3257
 
27153
390 5036 y(in)30 b(the)h(appropriate)f(datum.)390 5188
27145
27154
y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27146
 
b(success,)f(otherwise)h(an)f(error.)390 3385 y Fn(Since:)41
27147
 
b FB(2.4.0)150 3573 y Fv(gn)m(utls)p 483 3573 37 5 v
27148
 
55 w(op)s(enpgp)p 991 3573 V 55 w(crt)p 1199 3573 V 54
27149
 
w(get)p 1418 3573 V 54 w(preferred)p 1963 3573 V 55 w(k)m(ey)p
27150
 
2201 3573 V 53 w(id)3350 3758 y FB([F)-8 b(unction])-3599
27151
 
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_pr)q(efe)q(rre)q(d_k)q(ey_i)q
27152
 
(d)565 3867 y Fg(\()p Ff(gn)m(utls)p 846 3867 28 4 v
27153
 
41 w(op)s(enpgp)p 1224 3867 V 39 w(crt)p 1374 3867 V
27154
 
40 w(t)31 b Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1944 3867
27155
 
V 40 w(op)s(enpgp)p 2321 3867 V 39 w(k)m(eyid)p 2569
27156
 
3867 V 41 w(t)f Fe(keyid)12 b Fg(\))390 3977 y Ff(k)m(ey)c
 
27155
b(success,)f(otherwise)h(an)f(error.)390 5340 y Fn(Since:)41
 
27156
b FB(2.4.0)p eop end
 
27157
%%Page: 238 244
 
27158
TeXDict begin 238 243 bop 150 -116 a FB(Chapter)30 b(9:)41
 
27159
b(F)-8 b(unction)31 b(Reference)2237 b(238)150 299 y
 
27160
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
 
27161
V 55 w(crt)p 1199 299 V 54 w(get)p 1418 299 V 54 w(preferred)p
 
27162
1963 299 V 55 w(k)m(ey)p 2201 299 V 53 w(id)3350 482
 
27163
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_pr)
 
27164
q(efe)q(rre)q(d_k)q(ey_i)q(d)565 592 y Fg(\()p Ff(gn)m(utls)p
 
27165
846 592 28 4 v 41 w(op)s(enpgp)p 1224 592 V 39 w(crt)p
 
27166
1374 592 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(gn)m(utls)p
 
27167
1944 592 V 40 w(op)s(enpgp)p 2321 592 V 39 w(k)m(eyid)p
 
27168
2569 592 V 41 w(t)f Fe(keyid)12 b Fg(\))390 702 y Ff(k)m(ey)c
27157
27169
FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e
27158
 
(public)h(k)m(ey)-8 b(.)390 4106 y Ff(k)m(eyid)t FB(:)41
 
27170
(public)h(k)m(ey)-8 b(.)390 829 y Ff(k)m(eyid)t FB(:)41
27159
27171
b(the)30 b(struct)h(to)g(sa)m(v)m(e)h(the)e(k)m(eyid.)390
27160
 
4234 y(Get)h(preferred)f(k)m(ey)h(id.)40 b(If)30 b(it)h(hasn't)f(b)s
 
27172
957 y(Get)h(preferred)f(k)m(ey)h(id.)40 b(If)30 b(it)h(hasn't)f(b)s
27161
27173
(een)g(set)h(it)g(returns)e Ft(GNUTLS_E_INVALID_REQUES)o(T)p
27162
 
FB(.)390 4363 y Fn(Returns:)40 b FB(the)31 b(64-bit)h(preferred)d(k)m
27163
 
(eyID)i(of)g(the)f(Op)s(enPGP)f(k)m(ey)-8 b(.)150 4550
27164
 
y Fv(gn)m(utls)p 483 4550 37 5 v 55 w(op)s(enpgp)p 991
27165
 
4550 V 55 w(crt)p 1199 4550 V 54 w(get)p 1418 4550 V
27166
 
54 w(rev)m(ok)m(ed)p 1887 4550 V 53 w(status)3350 4735
 
27174
FB(.)390 1085 y Fn(Returns:)40 b FB(the)31 b(64-bit)h(preferred)d(k)m
 
27175
(eyID)i(of)g(the)f(Op)s(enPGP)f(k)m(ey)-8 b(.)150 1271
 
27176
y Fv(gn)m(utls)p 483 1271 37 5 v 55 w(op)s(enpgp)p 991
 
27177
1271 V 55 w(crt)p 1199 1271 V 54 w(get)p 1418 1271 V
 
27178
54 w(rev)m(ok)m(ed)p 1887 1271 V 53 w(status)3350 1455
27167
27179
y FB([F)g(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_re)q
27168
 
(vok)q(ed_)q(sta)q(tus)565 4845 y Fg(\()p Ff(gn)m(utls)p
27169
 
846 4845 28 4 v 41 w(op)s(enpgp)p 1224 4845 V 39 w(crt)p
27170
 
1374 4845 V 40 w(t)31 b Fe(key)12 b Fg(\))390 4954 y
 
27180
(vok)q(ed_)q(sta)q(tus)565 1564 y Fg(\()p Ff(gn)m(utls)p
 
27181
846 1564 28 4 v 41 w(op)s(enpgp)p 1224 1564 V 39 w(crt)p
 
27182
1374 1564 V 40 w(t)31 b Fe(key)12 b Fg(\))390 1674 y
27171
27183
Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g
27172
 
(Op)s(enPGP)e(public)h(k)m(ey)-8 b(.)390 5083 y(Get)31
 
27184
(Op)s(enPGP)e(public)h(k)m(ey)-8 b(.)390 1802 y(Get)31
27173
27185
b(rev)m(o)s(cation)i(status)d(of)h(k)m(ey)-8 b(.)390
27174
 
5211 y Fn(Returns:)40 b FB(true)31 b(\(1\))g(if)f(the)h(k)m(ey)g(has)f
 
27186
1930 y Fn(Returns:)40 b FB(true)31 b(\(1\))g(if)f(the)h(k)m(ey)g(has)f
27175
27187
(b)s(een)g(rev)m(ok)m(ed,)i(or)e(false)h(\(0\))h(if)e(it)h(has)f(not.)
27176
 
390 5340 y Fn(Since:)41 b FB(2.4.0)p eop end
27177
 
%%Page: 238 244
27178
 
TeXDict begin 238 243 bop 150 -116 a FB(Chapter)30 b(9:)41
27179
 
b(F)-8 b(unction)31 b(Reference)2237 b(238)150 299 y
27180
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27181
 
V 55 w(crt)p 1199 299 V 54 w(get)p 1418 299 V 54 w(subk)m(ey)p
27182
 
1839 299 V 54 w(coun)m(t)3350 507 y FB([F)-8 b(unction])-3599
 
27188
390 2058 y Fn(Since:)41 b FB(2.4.0)150 2244 y Fv(gn)m(utls)p
 
27189
483 2244 37 5 v 55 w(op)s(enpgp)p 991 2244 V 55 w(crt)p
 
27190
1199 2244 V 54 w(get)p 1418 2244 V 54 w(subk)m(ey)p 1839
 
27191
2244 V 54 w(coun)m(t)3350 2427 y FB([F)-8 b(unction])-3599
27183
27192
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)q(bke)q(y_c)q(oun)q(t)e
27184
 
Fg(\()p Ff(gn)m(utls)p 2516 507 28 4 v 41 w(op)s(enpgp)p
27185
 
2894 507 V 39 w(crt)p 3044 507 V 40 w(t)565 617 y Fe(key)12
27186
 
b Fg(\))390 726 y Ff(k)m(ey)c FB(:)41 b(is)31 b(an)f(Op)s(enPGP)f(k)m
27187
 
(ey)390 872 y(This)i(function)g(will)h(return)e(the)i(n)m(um)m(b)s(er)e
27188
 
(of)i(subk)m(eys)f(presen)m(t)h(in)f(the)h(giv)m(en)g(Op)s(enPGP)e
27189
 
(cer-)390 982 y(ti\014cate.)390 1128 y Fn(Returns:)40
27190
 
b FB(the)31 b(n)m(um)m(b)s(er)e(of)i(subk)m(eys,)f(or)g(a)h(negativ)m
27191
 
(e)h(v)-5 b(alue)31 b(on)f(error.)390 1274 y Fn(Since:)41
27192
 
b FB(2.4.0)150 1484 y Fv(gn)m(utls)p 483 1484 37 5 v
27193
 
55 w(op)s(enpgp)p 991 1484 V 55 w(crt)p 1199 1484 V 54
27194
 
w(get)p 1418 1484 V 54 w(subk)m(ey)p 1839 1484 V 54 w(creation)p
27195
 
2325 1484 V 54 w(time)3350 1692 y FB([F)-8 b(unction])-3599
27196
 
b Fh(time_t)54 b(gnutls_openpgp_crt_get)q(_su)q(bke)q(y_c)q(reat)q(ion)
27197
 
q(_ti)q(me)565 1802 y Fg(\()p Ff(gn)m(utls)p 846 1802
27198
 
28 4 v 41 w(op)s(enpgp)p 1224 1802 V 39 w(crt)p 1374
27199
 
1802 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27200
 
Fe(idx)12 b Fg(\))390 1912 y Ff(k)m(ey)c FB(:)41 b(the)31
27201
 
b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)
27202
 
-8 b(.)390 2057 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
27203
 
2203 y(Get)h(subk)m(ey)f(creation)i(time.)390 2349 y
27204
 
Fn(Returns:)40 b FB(the)31 b(timestamp)g(when)e(the)i(Op)s(enPGP)e
27205
 
(sub-k)m(ey)h(w)m(as)h(created.)390 2495 y Fn(Since:)41
27206
 
b FB(2.4.0)150 2706 y Fv(gn)m(utls)p 483 2706 37 5 v
27207
 
55 w(op)s(enpgp)p 991 2706 V 55 w(crt)p 1199 2706 V 54
27208
 
w(get)p 1418 2706 V 54 w(subk)m(ey)p 1839 2706 V 54 w(expiration)p
27209
 
2437 2706 V 54 w(time)3350 2914 y FB([F)-8 b(unction])-3599
27210
 
b Fh(time_t)54 b(gnutls_openpgp_crt_get)q(_su)q(bke)q(y_e)q(xpir)q(ati)
27211
 
q(on_)q(time)565 3024 y Fg(\()p Ff(gn)m(utls)p 846 3024
27212
 
28 4 v 41 w(op)s(enpgp)p 1224 3024 V 39 w(crt)p 1374
27213
 
3024 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27214
 
Fe(idx)12 b Fg(\))390 3133 y Ff(k)m(ey)c FB(:)41 b(the)31
27215
 
b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)
27216
 
-8 b(.)390 3279 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
27217
 
3425 y(Get)h(subk)m(ey)f(expiration)h(time.)42 b(A)30
27218
 
b(v)-5 b(alue)31 b(of)g('0')g(means)f(that)h(the)g(k)m(ey)g(do)s(esn't)
27219
 
f(expire)h(at)g(all.)390 3571 y Fn(Returns:)40 b FB(the)31
 
27193
Fg(\()p Ff(gn)m(utls)p 2516 2427 28 4 v 41 w(op)s(enpgp)p
 
27194
2894 2427 V 39 w(crt)p 3044 2427 V 40 w(t)565 2537 y
 
27195
Fe(key)12 b Fg(\))390 2646 y Ff(k)m(ey)c FB(:)41 b(is)31
 
27196
b(an)f(Op)s(enPGP)f(k)m(ey)390 2774 y(This)i(function)g(will)h(return)e
 
27197
(the)i(n)m(um)m(b)s(er)e(of)i(subk)m(eys)f(presen)m(t)h(in)f(the)h(giv)
 
27198
m(en)g(Op)s(enPGP)e(cer-)390 2884 y(ti\014cate.)390 3012
 
27199
y Fn(Returns:)40 b FB(the)31 b(n)m(um)m(b)s(er)e(of)i(subk)m(eys,)f(or)
 
27200
g(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(error.)390
 
27201
3140 y Fn(Since:)41 b FB(2.4.0)150 3326 y Fv(gn)m(utls)p
 
27202
483 3326 37 5 v 55 w(op)s(enpgp)p 991 3326 V 55 w(crt)p
 
27203
1199 3326 V 54 w(get)p 1418 3326 V 54 w(subk)m(ey)p 1839
 
27204
3326 V 54 w(creation)p 2325 3326 V 54 w(time)3350 3509
 
27205
y FB([F)-8 b(unction])-3599 b Fh(time_t)54 b(gnutls_openpgp_crt_get)q
 
27206
(_su)q(bke)q(y_c)q(reat)q(ion)q(_ti)q(me)565 3619 y Fg(\()p
 
27207
Ff(gn)m(utls)p 846 3619 28 4 v 41 w(op)s(enpgp)p 1224
 
27208
3619 V 39 w(crt)p 1374 3619 V 40 w(t)31 b Fe(key)12 b
 
27209
Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Fg(\))390 3728
 
27210
y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g
 
27211
(Op)s(enPGP)e(public)h(k)m(ey)-8 b(.)390 3856 y Ff(idx)6
 
27212
b FB(:)41 b(the)30 b(subk)m(ey)g(index)390 3984 y(Get)h(subk)m(ey)f
 
27213
(creation)i(time.)390 4112 y Fn(Returns:)40 b FB(the)31
 
27214
b(timestamp)g(when)e(the)i(Op)s(enPGP)e(sub-k)m(ey)h(w)m(as)h(created.)
 
27215
390 4240 y Fn(Since:)41 b FB(2.4.0)150 4426 y Fv(gn)m(utls)p
 
27216
483 4426 37 5 v 55 w(op)s(enpgp)p 991 4426 V 55 w(crt)p
 
27217
1199 4426 V 54 w(get)p 1418 4426 V 54 w(subk)m(ey)p 1839
 
27218
4426 V 54 w(expiration)p 2437 4426 V 54 w(time)3350 4609
 
27219
y FB([F)-8 b(unction])-3599 b Fh(time_t)54 b(gnutls_openpgp_crt_get)q
 
27220
(_su)q(bke)q(y_e)q(xpir)q(ati)q(on_)q(time)565 4719 y
 
27221
Fg(\()p Ff(gn)m(utls)p 846 4719 28 4 v 41 w(op)s(enpgp)p
 
27222
1224 4719 V 39 w(crt)p 1374 4719 V 40 w(t)31 b Fe(key)12
 
27223
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Fg(\))390
 
27224
4828 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g
 
27225
(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8 b(.)390 4956 y
 
27226
Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390 5084
 
27227
y(Get)h(subk)m(ey)f(expiration)h(time.)42 b(A)30 b(v)-5
 
27228
b(alue)31 b(of)g('0')g(means)f(that)h(the)g(k)m(ey)g(do)s(esn't)f
 
27229
(expire)h(at)g(all.)390 5212 y Fn(Returns:)40 b FB(the)31
27220
27230
b(time)g(when)e(the)i(Op)s(enPGP)e(k)m(ey)i(expires.)390
27221
 
3717 y Fn(Since:)41 b FB(2.4.0)150 3928 y Fv(gn)m(utls)p
27222
 
483 3928 37 5 v 55 w(op)s(enpgp)p 991 3928 V 55 w(crt)p
27223
 
1199 3928 V 54 w(get)p 1418 3928 V 54 w(subk)m(ey)p 1839
27224
 
3928 V 54 w(\014ngerprin)m(t)3350 4136 y FB([F)-8 b(unction])-3599
27225
 
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)q(bke)q(y_f)q(ing)q(erpr)q
27226
 
(int)565 4245 y Fg(\()p Ff(gn)m(utls)p 846 4245 28 4
27227
 
v 41 w(op)s(enpgp)p 1224 4245 V 39 w(crt)p 1374 4245
27228
 
V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27229
 
Fe(idx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(fpr)12 b Ff(,)31
27230
 
b(size)p 3084 4245 V 41 w(t)f(*)h Fe(fprlen)12 b Fg(\))390
27231
 
4355 y Ff(k)m(ey)c FB(:)41 b(the)31 b(ra)m(w)f(data)h(that)g(con)m
27232
 
(tains)h(the)f(Op)s(enPGP)e(public)g(k)m(ey)-8 b(.)390
27233
 
4501 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
27234
 
4647 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)m(v)m(e)h(the)f
27235
 
(\014ngerprin)m(t,)e(m)m(ust)i(hold)f(at)h(least)g(20)h(b)m(ytes.)390
27236
 
4793 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f(sa)m(v)m(e)h
27237
 
(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390 4939
27238
 
y(Get)i(k)m(ey)f(\014ngerprin)m(t)f(of)h(a)g(subk)m(ey)-8
27239
 
b(.)45 b(Dep)s(ending)31 b(on)h(the)g(algorithm,)h(the)f(\014ngerprin)m
27240
 
(t)f(can)h(b)s(e)390 5048 y(16)f(or)g(20)g(b)m(ytes.)390
27241
 
5194 y Fn(Returns:)40 b FB(On)30 b(success,)h(0)g(is)f(returned.)39
27242
 
b(Otherwise,)31 b(an)f(error)g(co)s(de.)390 5340 y Fn(Since:)41
27243
 
b FB(2.4.0)p eop end
 
27231
5340 y Fn(Since:)41 b FB(2.4.0)p eop end
27244
27232
%%Page: 239 245
27245
27233
TeXDict begin 239 244 bop 150 -116 a FB(Chapter)30 b(9:)41
27246
27234
b(F)-8 b(unction)31 b(Reference)2237 b(239)150 299 y
27247
27235
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27248
27236
V 55 w(crt)p 1199 299 V 54 w(get)p 1418 299 V 54 w(subk)m(ey)p
27249
 
1839 299 V 54 w(idx)3350 494 y FB([F)-8 b(unction])-3599
27250
 
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)q(bke)q(y_i)q(dx)f
27251
 
Fg(\()p Ff(gn)m(utls)p 2412 494 28 4 v 40 w(op)s(enpgp)p
27252
 
2789 494 V 39 w(crt)p 2939 494 V 41 w(t)565 603 y Fe(key)12
27253
 
b Ff(,)31 b(const)g(gn)m(utls)p 1273 603 V 40 w(op)s(enpgp)p
27254
 
1650 603 V 39 w(k)m(eyid)p 1898 603 V 41 w(t)g Fe(keyid)12
27255
 
b Fg(\))390 713 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27256
 
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
27257
 
b(.)390 846 y Ff(k)m(eyid)t FB(:)41 b(the)30 b(k)m(eyid.)390
27258
 
980 y(Get)h(subk)m(ey's)g(index.)390 1113 y Fn(Returns:)40
27259
 
b FB(the)31 b(index)f(of)g(the)h(subk)m(ey)f(or)g(a)h(negativ)m(e)i
27260
 
(error)d(v)-5 b(alue.)390 1247 y Fn(Since:)41 b FB(2.4.0)150
27261
 
1444 y Fv(gn)m(utls)p 483 1444 37 5 v 55 w(op)s(enpgp)p
27262
 
991 1444 V 55 w(crt)p 1199 1444 V 54 w(get)p 1418 1444
27263
 
V 54 w(subk)m(ey)p 1839 1444 V 54 w(id)3350 1639 y FB([F)-8
 
27237
1839 299 V 54 w(\014ngerprin)m(t)3350 502 y FB([F)-8
27264
27238
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)q(bke)q
27265
 
(y_i)q(d)e Fg(\()p Ff(gn)m(utls)p 2359 1639 28 4 v 41
27266
 
w(op)s(enpgp)p 2737 1639 V 39 w(crt)p 2887 1639 V 40
27267
 
w(t)31 b Fe(key)12 b Ff(,)565 1748 y(unsigned)29 b(in)m(t)i
27268
 
Fe(idx)12 b Ff(,)31 b(gn)m(utls)p 1553 1748 V 41 w(op)s(enpgp)p
27269
 
1931 1748 V 39 w(k)m(eyid)p 2179 1748 V 40 w(t)g Fe(keyid)12
27270
 
b Fg(\))390 1858 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27271
 
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
27272
 
b(.)390 1992 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
27273
 
2125 y Ff(k)m(eyid)t FB(:)41 b(the)30 b(bu\013er)g(to)h(sa)m(v)m(e)h
27274
 
(the)e(k)m(eyid.)390 2259 y(Get)h(the)g(subk)m(ey's)f(k)m(ey-id.)390
27275
 
2392 y Fn(Returns:)40 b FB(the)31 b(64-bit)h(k)m(eyID)f(of)g(the)f(Op)s
27276
 
(enPGP)f(k)m(ey)-8 b(.)150 2589 y Fv(gn)m(utls)p 483
27277
 
2589 37 5 v 55 w(op)s(enpgp)p 991 2589 V 55 w(crt)p 1199
27278
 
2589 V 54 w(get)p 1418 2589 V 54 w(subk)m(ey)p 1839 2589
27279
 
V 54 w(pk)p 2026 2589 V 54 w(algorithm)3350 2784 y FB([F)g(unction])
27280
 
-3599 b Fh(gnutls_pk_algorithm_t)565 2894 y(gnutls_openpgp_crt_get)q
 
27239
(y_f)q(ing)q(erpr)q(int)565 612 y Fg(\()p Ff(gn)m(utls)p
 
27240
846 612 28 4 v 41 w(op)s(enpgp)p 1224 612 V 39 w(crt)p
 
27241
1374 612 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
27242
Fe(idx)12 b Ff(,)31 b(v)m(oid)g(*)g Fe(fpr)12 b Ff(,)31
 
27243
b(size)p 3084 612 V 41 w(t)f(*)h Fe(fprlen)12 b Fg(\))390
 
27244
722 y Ff(k)m(ey)c FB(:)41 b(the)31 b(ra)m(w)f(data)h(that)g(con)m
 
27245
(tains)h(the)f(Op)s(enPGP)e(public)g(k)m(ey)-8 b(.)390
 
27246
863 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
 
27247
1004 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)m(v)m(e)h(the)f
 
27248
(\014ngerprin)m(t,)e(m)m(ust)i(hold)f(at)h(least)g(20)h(b)m(ytes.)390
 
27249
1146 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f(sa)m(v)m(e)h
 
27250
(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390 1287
 
27251
y(Get)i(k)m(ey)f(\014ngerprin)m(t)f(of)h(a)g(subk)m(ey)-8
 
27252
b(.)45 b(Dep)s(ending)31 b(on)h(the)g(algorithm,)h(the)f(\014ngerprin)m
 
27253
(t)f(can)h(b)s(e)390 1397 y(16)f(or)g(20)g(b)m(ytes.)390
 
27254
1538 y Fn(Returns:)40 b FB(On)30 b(success,)h(0)g(is)f(returned.)39
 
27255
b(Otherwise,)31 b(an)f(error)g(co)s(de.)390 1679 y Fn(Since:)41
 
27256
b FB(2.4.0)150 1885 y Fv(gn)m(utls)p 483 1885 37 5 v
 
27257
55 w(op)s(enpgp)p 991 1885 V 55 w(crt)p 1199 1885 V 54
 
27258
w(get)p 1418 1885 V 54 w(subk)m(ey)p 1839 1885 V 54 w(idx)3350
 
27259
2089 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q
 
27260
(t_su)q(bke)q(y_i)q(dx)f Fg(\()p Ff(gn)m(utls)p 2412
 
27261
2089 28 4 v 40 w(op)s(enpgp)p 2789 2089 V 39 w(crt)p
 
27262
2939 2089 V 41 w(t)565 2199 y Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p
 
27263
1273 2199 V 40 w(op)s(enpgp)p 1650 2199 V 39 w(k)m(eyid)p
 
27264
1898 2199 V 41 w(t)g Fe(keyid)12 b Fg(\))390 2308 y Ff(k)m(ey)c
 
27265
FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e
 
27266
(public)h(k)m(ey)-8 b(.)390 2450 y Ff(k)m(eyid)t FB(:)41
 
27267
b(the)30 b(k)m(eyid.)390 2591 y(Get)h(subk)m(ey's)g(index.)390
 
27268
2732 y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(subk)m(ey)f(or)g
 
27269
(a)h(negativ)m(e)i(error)d(v)-5 b(alue.)390 2874 y Fn(Since:)41
 
27270
b FB(2.4.0)150 3080 y Fv(gn)m(utls)p 483 3080 37 5 v
 
27271
55 w(op)s(enpgp)p 991 3080 V 55 w(crt)p 1199 3080 V 54
 
27272
w(get)p 1418 3080 V 54 w(subk)m(ey)p 1839 3080 V 54 w(id)3350
 
27273
3283 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q
 
27274
(t_su)q(bke)q(y_i)q(d)e Fg(\()p Ff(gn)m(utls)p 2359 3283
 
27275
28 4 v 41 w(op)s(enpgp)p 2737 3283 V 39 w(crt)p 2887
 
27276
3283 V 40 w(t)31 b Fe(key)12 b Ff(,)565 3393 y(unsigned)29
 
27277
b(in)m(t)i Fe(idx)12 b Ff(,)31 b(gn)m(utls)p 1553 3393
 
27278
V 41 w(op)s(enpgp)p 1931 3393 V 39 w(k)m(eyid)p 2179
 
27279
3393 V 40 w(t)g Fe(keyid)12 b Fg(\))390 3502 y Ff(k)m(ey)c
 
27280
FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e
 
27281
(public)h(k)m(ey)-8 b(.)390 3644 y Ff(idx)6 b FB(:)41
 
27282
b(the)30 b(subk)m(ey)g(index)390 3785 y Ff(k)m(eyid)t
 
27283
FB(:)41 b(the)30 b(bu\013er)g(to)h(sa)m(v)m(e)h(the)e(k)m(eyid.)390
 
27284
3927 y(Get)h(the)g(subk)m(ey's)f(k)m(ey-id.)390 4068
 
27285
y Fn(Returns:)40 b FB(the)31 b(64-bit)h(k)m(eyID)f(of)g(the)f(Op)s
 
27286
(enPGP)f(k)m(ey)-8 b(.)150 4274 y Fv(gn)m(utls)p 483
 
27287
4274 37 5 v 55 w(op)s(enpgp)p 991 4274 V 55 w(crt)p 1199
 
27288
4274 V 54 w(get)p 1418 4274 V 54 w(subk)m(ey)p 1839 4274
 
27289
V 54 w(pk)p 2026 4274 V 54 w(algorithm)3350 4478 y FB([F)g(unction])
 
27290
-3599 b Fh(gnutls_pk_algorithm_t)565 4587 y(gnutls_openpgp_crt_get)q
27281
27291
(_su)q(bke)q(y_p)q(k_al)q(gor)q(ith)q(m)51 b Fg(\()p
27282
 
Ff(gn)m(utls)p 3088 2894 28 4 v 41 w(op)s(enpgp)p 3466
27283
 
2894 V 39 w(crt)p 3616 2894 V 40 w(t)565 3003 y Fe(key)12
 
27292
Ff(gn)m(utls)p 3088 4587 28 4 v 41 w(op)s(enpgp)p 3466
 
27293
4587 V 39 w(crt)p 3616 4587 V 40 w(t)565 4697 y Fe(key)12
27284
27294
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Ff(,)31 b(unsigned)f(in)m
27285
 
(t)g(*)h Fe(bits)12 b Fg(\))390 3113 y Ff(k)m(ey)c FB(:)41
27286
 
b(is)31 b(an)f(Op)s(enPGP)f(k)m(ey)390 3246 y Ff(idx)6
27287
 
b FB(:)41 b(is)30 b(the)h(subk)m(ey)f(index)390 3380
 
27295
(t)g(*)h Fe(bits)12 b Fg(\))390 4806 y Ff(k)m(ey)c FB(:)41
 
27296
b(is)31 b(an)f(Op)s(enPGP)f(k)m(ey)390 4948 y Ff(idx)6
 
27297
b FB(:)41 b(is)30 b(the)h(subk)m(ey)f(index)390 5089
27288
27298
y Ff(bits)t FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h(will)g
27289
27299
(hold)f(the)h(size)g(of)f(the)h(parameters')g(in)f(bits)390
27290
 
3513 y(This)j(function)g(will)g(return)g(the)g(public)g(k)m(ey)h
 
27300
5230 y(This)j(function)g(will)g(return)g(the)g(public)g(k)m(ey)h
27291
27301
(algorithm)g(of)g(a)g(subk)m(ey)f(of)g(an)g(Op)s(enPGP)f(cer-)390
27292
 
3623 y(ti\014cate.)390 3756 y(If)d(bits)g(is)g(non)g(n)m(ull,)g(it)h
27293
 
(should)e(ha)m(v)m(e)i(enough)f(size)h(to)g(hold)f(the)h(parameters)f
27294
 
(size)h(in)f(bits.)40 b(F)-8 b(or)390 3866 y(RSA)33 b(the)h(bits)f
27295
 
(returned)f(is)i(the)f(mo)s(dulus.)49 b(F)-8 b(or)34
27296
 
b(DSA)f(the)h(bits)f(returned)f(are)i(of)g(the)g(public)390
27297
 
3976 y(exp)s(onen)m(t.)390 4109 y Fn(Returns:)61 b FB(a)40
27298
 
b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
27299
 
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 4219
27300
 
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)390 4352
27301
 
y Fn(Since:)41 b FB(2.4.0)150 4549 y Fv(gn)m(utls)p 483
27302
 
4549 37 5 v 55 w(op)s(enpgp)p 991 4549 V 55 w(crt)p 1199
27303
 
4549 V 54 w(get)p 1418 4549 V 54 w(subk)m(ey)p 1839 4549
27304
 
V 54 w(pk)p 2026 4549 V 54 w(dsa)p 2256 4549 V 54 w(ra)m(w)3350
27305
 
4744 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q
27306
 
(t_su)q(bke)q(y_p)q(k_d)q(sa_r)q(aw)565 4854 y Fg(\()p
27307
 
Ff(gn)m(utls)p 846 4854 28 4 v 41 w(op)s(enpgp)p 1224
27308
 
4854 V 39 w(crt)p 1374 4854 V 40 w(t)31 b Fe(crt)12 b
27309
 
Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Ff(,)31 b(gn)m(utls)p
27310
 
2686 4854 V 40 w(datum)p 2984 4854 V 40 w(t)g(*)f Fe(p)12
27311
 
b Ff(,)565 4963 y(gn)m(utls)p 811 4963 V 41 w(datum)p
27312
 
1110 4963 V 39 w(t)31 b(*)g Fe(q)12 b Ff(,)30 b(gn)m(utls)p
27313
 
1650 4963 V 40 w(datum)p 1948 4963 V 40 w(t)h(*)f Fe(g)12
27314
 
b Ff(,)31 b(gn)m(utls)p 2489 4963 V 40 w(datum)p 2787
27315
 
4963 V 40 w(t)f(*)h Fe(y)12 b Fg(\))390 5073 y Ff(crt)r
27316
 
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 5206 y Ff(idx)6
27317
 
b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390 5340
27318
 
y Ff(p)s FB(:)40 b(will)31 b(hold)f(the)g(p)p eop end
 
27302
5340 y(ti\014cate.)p eop end
27319
27303
%%Page: 240 246
27320
27304
TeXDict begin 240 245 bop 150 -116 a FB(Chapter)30 b(9:)41
27321
 
b(F)-8 b(unction)31 b(Reference)2237 b(240)390 299 y
27322
 
Ff(q)r FB(:)41 b(will)30 b(hold)g(the)h(q)390 434 y Ff(g)8
27323
 
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 568 y Ff(y)8
27324
 
b FB(:)40 b(will)31 b(hold)f(the)h(y)390 703 y(This)37
27325
 
b(function)g(will)g(exp)s(ort)h(the)f(DSA)h(public)e(k)m(ey's)i
27326
 
(parameters)g(found)e(in)h(the)h(giv)m(en)g(cer-)390
27327
 
813 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f(allo)
27328
 
s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36 b(will)g(b)s(e)390
27329
 
922 y(stored)30 b(in)h(the)f(appropriate)h(datum.)390
27330
 
1057 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27331
 
b(success,)f(otherwise)h(an)f(error.)390 1192 y Fn(Since:)41
27332
 
b FB(2.4.0)150 1392 y Fv(gn)m(utls)p 483 1392 37 5 v
27333
 
55 w(op)s(enpgp)p 991 1392 V 55 w(crt)p 1199 1392 V 54
27334
 
w(get)p 1418 1392 V 54 w(subk)m(ey)p 1839 1392 V 54 w(pk)p
27335
 
2026 1392 V 54 w(rsa)p 2238 1392 V 54 w(ra)m(w)3350 1589
27336
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)
27337
 
q(bke)q(y_p)q(k_r)q(sa_r)q(aw)565 1698 y Fg(\()p Ff(gn)m(utls)p
27338
 
846 1698 28 4 v 41 w(op)s(enpgp)p 1224 1698 V 39 w(crt)p
27339
 
1374 1698 V 40 w(t)31 b Fe(crt)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27340
 
Fe(idx)12 b Ff(,)31 b(gn)m(utls)p 2686 1698 V 40 w(datum)p
27341
 
2984 1698 V 40 w(t)g(*)f Fe(m)12 b Ff(,)565 1808 y(gn)m(utls)p
27342
 
811 1808 V 41 w(datum)p 1110 1808 V 39 w(t)31 b(*)g Fe(e)12
27343
 
b Fg(\))390 1917 y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)
27344
 
390 2052 y Ff(idx)6 b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390
27345
 
2187 y Ff(m)p FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390
27346
 
2322 y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m
27347
 
(t)390 2457 y(This)h(function)g(will)g(exp)s(ort)g(the)h(RSA)f(public)f
 
27305
b(F)-8 b(unction)31 b(Reference)2237 b(240)390 299 y(If)29
 
27306
b(bits)g(is)g(non)g(n)m(ull,)g(it)h(should)e(ha)m(v)m(e)i(enough)f
 
27307
(size)h(to)g(hold)f(the)h(parameters)f(size)h(in)f(bits.)40
 
27308
b(F)-8 b(or)390 408 y(RSA)33 b(the)h(bits)f(returned)f(is)i(the)f(mo)s
 
27309
(dulus.)49 b(F)-8 b(or)34 b(DSA)f(the)h(bits)f(returned)f(are)i(of)g
 
27310
(the)g(public)390 518 y(exp)s(onen)m(t.)390 655 y Fn(Returns:)61
 
27311
b FB(a)40 b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
 
27312
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 765
 
27313
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)390 902
 
27314
y Fn(Since:)41 b FB(2.4.0)150 1104 y Fv(gn)m(utls)p 483
 
27315
1104 37 5 v 55 w(op)s(enpgp)p 991 1104 V 55 w(crt)p 1199
 
27316
1104 V 54 w(get)p 1418 1104 V 54 w(subk)m(ey)p 1839 1104
 
27317
V 54 w(pk)p 2026 1104 V 54 w(dsa)p 2256 1104 V 54 w(ra)m(w)3350
 
27318
1303 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q
 
27319
(t_su)q(bke)q(y_p)q(k_d)q(sa_r)q(aw)565 1413 y Fg(\()p
 
27320
Ff(gn)m(utls)p 846 1413 28 4 v 41 w(op)s(enpgp)p 1224
 
27321
1413 V 39 w(crt)p 1374 1413 V 40 w(t)31 b Fe(crt)12 b
 
27322
Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Ff(,)31 b(gn)m(utls)p
 
27323
2686 1413 V 40 w(datum)p 2984 1413 V 40 w(t)g(*)f Fe(p)12
 
27324
b Ff(,)565 1522 y(gn)m(utls)p 811 1522 V 41 w(datum)p
 
27325
1110 1522 V 39 w(t)31 b(*)g Fe(q)12 b Ff(,)30 b(gn)m(utls)p
 
27326
1650 1522 V 40 w(datum)p 1948 1522 V 40 w(t)h(*)f Fe(g)12
 
27327
b Ff(,)31 b(gn)m(utls)p 2489 1522 V 40 w(datum)p 2787
 
27328
1522 V 40 w(t)f(*)h Fe(y)12 b Fg(\))390 1632 y Ff(crt)r
 
27329
FB(:)41 b(Holds)31 b(the)f(certi\014cate)390 1769 y Ff(idx)6
 
27330
b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390 1906
 
27331
y Ff(p)s FB(:)40 b(will)31 b(hold)f(the)g(p)390 2043
 
27332
y Ff(q)r FB(:)41 b(will)30 b(hold)g(the)h(q)390 2180
 
27333
y Ff(g)8 b FB(:)41 b(will)31 b(hold)f(the)g(g)390 2317
 
27334
y Ff(y)8 b FB(:)40 b(will)31 b(hold)f(the)h(y)390 2454
 
27335
y(This)37 b(function)g(will)g(exp)s(ort)h(the)f(DSA)h(public)e(k)m
 
27336
(ey's)i(parameters)g(found)e(in)h(the)h(giv)m(en)g(cer-)390
 
27337
2564 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f
 
27338
(allo)s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36
 
27339
b(will)g(b)s(e)390 2674 y(stored)30 b(in)h(the)f(appropriate)h(datum.)
 
27340
390 2811 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b
 
27341
FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 2948
 
27342
y Fn(Since:)41 b FB(2.4.0)150 3150 y Fv(gn)m(utls)p 483
 
27343
3150 37 5 v 55 w(op)s(enpgp)p 991 3150 V 55 w(crt)p 1199
 
27344
3150 V 54 w(get)p 1418 3150 V 54 w(subk)m(ey)p 1839 3150
 
27345
V 54 w(pk)p 2026 3150 V 54 w(rsa)p 2238 3150 V 54 w(ra)m(w)3350
 
27346
3349 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ge)q
 
27347
(t_su)q(bke)q(y_p)q(k_r)q(sa_r)q(aw)565 3459 y Fg(\()p
 
27348
Ff(gn)m(utls)p 846 3459 28 4 v 41 w(op)s(enpgp)p 1224
 
27349
3459 V 39 w(crt)p 1374 3459 V 40 w(t)31 b Fe(crt)12 b
 
27350
Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Ff(,)31 b(gn)m(utls)p
 
27351
2686 3459 V 40 w(datum)p 2984 3459 V 40 w(t)g(*)f Fe(m)12
 
27352
b Ff(,)565 3568 y(gn)m(utls)p 811 3568 V 41 w(datum)p
 
27353
1110 3568 V 39 w(t)31 b(*)g Fe(e)12 b Fg(\))390 3678
 
27354
y Ff(crt)r FB(:)41 b(Holds)31 b(the)f(certi\014cate)390
 
27355
3815 y Ff(idx)6 b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390
 
27356
3952 y Ff(m)p FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390
 
27357
4089 y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m
 
27358
(t)390 4226 y(This)h(function)g(will)g(exp)s(ort)g(the)h(RSA)f(public)f
27348
27359
(k)m(ey's)i(parameters)g(found)e(in)h(the)h(giv)m(en)g(struc-)390
27349
 
2566 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
 
27360
4336 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g(allo)s
27350
27361
(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g(stored)
27351
 
390 2676 y(in)30 b(the)h(appropriate)f(datum.)390 2811
 
27362
390 4445 y(in)30 b(the)h(appropriate)f(datum.)390 4582
27352
27363
y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27353
 
b(success,)f(otherwise)h(an)f(error.)390 2946 y Fn(Since:)41
27354
 
b FB(2.4.0)150 3145 y Fv(gn)m(utls)p 483 3145 37 5 v
27355
 
55 w(op)s(enpgp)p 991 3145 V 55 w(crt)p 1199 3145 V 54
27356
 
w(get)p 1418 3145 V 54 w(subk)m(ey)p 1839 3145 V 54 w(rev)m(ok)m(ed)p
27357
 
2308 3145 V 53 w(status)3350 3342 y FB([F)-8 b(unction])-3599
 
27364
b(success,)f(otherwise)h(an)f(error.)390 4720 y Fn(Since:)41
 
27365
b FB(2.4.0)150 4921 y Fv(gn)m(utls)p 483 4921 37 5 v
 
27366
55 w(op)s(enpgp)p 991 4921 V 55 w(crt)p 1199 4921 V 54
 
27367
w(get)p 1418 4921 V 54 w(subk)m(ey)p 1839 4921 V 54 w(rev)m(ok)m(ed)p
 
27368
2308 4921 V 53 w(status)3350 5121 y FB([F)-8 b(unction])-3599
27358
27369
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)q(bke)q(y_r)q(evo)q(ked_)q
27359
 
(sta)q(tus)565 3452 y Fg(\()p Ff(gn)m(utls)p 846 3452
27360
 
28 4 v 41 w(op)s(enpgp)p 1224 3452 V 39 w(crt)p 1374
27361
 
3452 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27362
 
Fe(idx)12 b Fg(\))390 3561 y Ff(k)m(ey)c FB(:)41 b(the)31
 
27370
(sta)q(tus)565 5230 y Fg(\()p Ff(gn)m(utls)p 846 5230
 
27371
28 4 v 41 w(op)s(enpgp)p 1224 5230 V 39 w(crt)p 1374
 
27372
5230 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
27373
Fe(idx)12 b Fg(\))390 5340 y Ff(k)m(ey)c FB(:)41 b(the)31
27363
27374
b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)
27364
 
-8 b(.)390 3696 y Ff(idx)6 b FB(:)41 b(is)30 b(the)h(subk)m(ey)f(index)
27365
 
390 3831 y(Get)h(subk)m(ey)f(rev)m(o)s(cation)j(status.)41
 
27375
-8 b(.)p eop end
 
27376
%%Page: 241 247
 
27377
TeXDict begin 241 246 bop 150 -116 a FB(Chapter)30 b(9:)41
 
27378
b(F)-8 b(unction)31 b(Reference)2237 b(241)390 299 y
 
27379
Ff(idx)6 b FB(:)41 b(is)30 b(the)h(subk)m(ey)f(index)390
 
27380
440 y(Get)h(subk)m(ey)f(rev)m(o)s(cation)j(status.)41
27366
27381
b(A)30 b(negativ)m(e)j(v)-5 b(alue)31 b(indicates)g(an)f(error.)390
27367
 
3966 y Fn(Returns:)40 b FB(true)31 b(\(1\))g(if)f(the)h(k)m(ey)g(has)f
 
27382
581 y Fn(Returns:)40 b FB(true)31 b(\(1\))g(if)f(the)h(k)m(ey)g(has)f
27368
27383
(b)s(een)g(rev)m(ok)m(ed,)i(or)e(false)h(\(0\))h(if)e(it)h(has)f(not.)
27369
 
390 4101 y Fn(Since:)41 b FB(2.4.0)150 4300 y Fv(gn)m(utls)p
27370
 
483 4300 37 5 v 55 w(op)s(enpgp)p 991 4300 V 55 w(crt)p
27371
 
1199 4300 V 54 w(get)p 1418 4300 V 54 w(subk)m(ey)p 1839
27372
 
4300 V 54 w(usage)3350 4497 y FB([F)-8 b(unction])-3599
 
27384
390 722 y Fn(Since:)41 b FB(2.4.0)150 928 y Fv(gn)m(utls)p
 
27385
483 928 37 5 v 55 w(op)s(enpgp)p 991 928 V 55 w(crt)p
 
27386
1199 928 V 54 w(get)p 1418 928 V 54 w(subk)m(ey)p 1839
 
27387
928 V 54 w(usage)3350 1132 y FB([F)-8 b(unction])-3599
27373
27388
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_su)q(bke)q(y_u)q(sag)q(e)e
27374
 
Fg(\()p Ff(gn)m(utls)p 2516 4497 28 4 v 41 w(op)s(enpgp)p
27375
 
2894 4497 V 39 w(crt)p 3044 4497 V 40 w(t)565 4607 y
 
27389
Fg(\()p Ff(gn)m(utls)p 2516 1132 28 4 v 41 w(op)s(enpgp)p
 
27390
2894 1132 V 39 w(crt)p 3044 1132 V 40 w(t)565 1241 y
27376
27391
Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b
27377
27392
Ff(,)31 b(unsigned)f(in)m(t)g(*)h Fe(key_usage)12 b Fg(\))390
27378
 
4716 y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(a)g(gn)m(utls)p
27379
 
1528 4716 V 41 w(op)s(enpgp)p 1906 4716 V 38 w(crt)p
27380
 
2055 4716 V 41 w(t)f(structure)390 4851 y Ff(idx)6 b
27381
 
FB(:)41 b(the)30 b(subk)m(ey)g(index)390 4986 y Ff(k)m(ey)p
27382
 
529 4986 V 41 w(usage)5 b FB(:)41 b(where)30 b(the)h(k)m(ey)g(usage)g
27383
 
(bits)f(will)h(b)s(e)f(stored)390 5121 y(This)g(function)h(will)g
 
27393
1351 y Ff(k)m(ey)c FB(:)41 b(should)30 b(con)m(tain)h(a)g(gn)m(utls)p
 
27394
1528 1351 V 41 w(op)s(enpgp)p 1906 1351 V 38 w(crt)p
 
27395
2055 1351 V 41 w(t)f(structure)390 1492 y Ff(idx)6 b
 
27396
FB(:)41 b(the)30 b(subk)m(ey)g(index)390 1633 y Ff(k)m(ey)p
 
27397
529 1633 V 41 w(usage)5 b FB(:)41 b(where)30 b(the)h(k)m(ey)g(usage)g
 
27398
(bits)f(will)h(b)s(e)f(stored)390 1774 y(This)g(function)h(will)g
27384
27399
(return)f(certi\014cate's)j(k)m(ey)f(usage,)g(b)m(y)f(c)m(hec)m(king)i
27385
 
(the)e(k)m(ey)h(algorithm.)43 b(The)390 5230 y(k)m(ey)f(usage)f(v)-5
 
27400
(the)e(k)m(ey)h(algorithm.)43 b(The)390 1884 y(k)m(ey)f(usage)f(v)-5
27386
27401
b(alue)42 b(will)f(ORed)g(v)-5 b(alues)41 b(of)h Ft
27387
27402
(GNUTLS_KEY_DIGITAL_SIGN)o(ATU)o(RE)35 b FB(or)41 b Ft(GNUTLS_)390
27388
 
5340 y(KEY_KEY_ENCIPHERMENT)p FB(.)p eop end
27389
 
%%Page: 241 247
27390
 
TeXDict begin 241 246 bop 150 -116 a FB(Chapter)30 b(9:)41
27391
 
b(F)-8 b(unction)31 b(Reference)2237 b(241)390 299 y(A)30
27392
 
b(negativ)m(e)j(v)-5 b(alue)31 b(ma)m(y)g(b)s(e)f(returned)f(in)h(case)
27393
 
h(of)g(parsing)f(error.)390 450 y Fn(Returns:)40 b FB(k)m(ey)32
27394
 
b(usage)f(v)-5 b(alue.)390 602 y Fn(Since:)41 b FB(2.4.0)150
27395
 
818 y Fv(gn)m(utls)p 483 818 37 5 v 55 w(op)s(enpgp)p
27396
 
991 818 V 55 w(crt)p 1199 818 V 54 w(get)p 1418 818 V
27397
 
54 w(v)m(ersion)3350 1032 y FB([F)-8 b(unction])-3599
 
27403
1994 y(KEY_KEY_ENCIPHERMENT)p FB(.)390 2135 y(A)30 b(negativ)m(e)j(v)-5
 
27404
b(alue)31 b(ma)m(y)g(b)s(e)f(returned)f(in)h(case)h(of)g(parsing)f
 
27405
(error.)390 2276 y Fn(Returns:)40 b FB(k)m(ey)32 b(usage)f(v)-5
 
27406
b(alue.)390 2417 y Fn(Since:)41 b FB(2.4.0)150 2623 y
 
27407
Fv(gn)m(utls)p 483 2623 37 5 v 55 w(op)s(enpgp)p 991
 
27408
2623 V 55 w(crt)p 1199 2623 V 54 w(get)p 1418 2623 V
 
27409
54 w(v)m(ersion)3350 2826 y FB([F)-8 b(unction])-3599
27398
27410
b Fh(int)53 b(gnutls_openpgp_crt_ge)q(t_ve)q(rsi)q(on)f
27399
 
Fg(\()p Ff(gn)m(utls)p 2255 1032 28 4 v 41 w(op)s(enpgp)p
27400
 
2633 1032 V 38 w(crt)p 2782 1032 V 41 w(t)30 b Fe(key)12
27401
 
b Fg(\))390 1142 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
 
27411
Fg(\()p Ff(gn)m(utls)p 2255 2826 28 4 v 41 w(op)s(enpgp)p
 
27412
2633 2826 V 38 w(crt)p 2782 2826 V 41 w(t)30 b Fe(key)12
 
27413
b Fg(\))390 2936 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27402
27414
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
27403
 
b(.)390 1294 y(Extract)31 b(the)g(v)m(ersion)g(of)f(the)h(Op)s(enPGP)e
27404
 
(k)m(ey)-8 b(.)390 1445 y Fn(Returns:)40 b FB(the)31
 
27415
b(.)390 3077 y(Extract)31 b(the)g(v)m(ersion)g(of)f(the)h(Op)s(enPGP)e
 
27416
(k)m(ey)-8 b(.)390 3218 y Fn(Returns:)40 b FB(the)31
27405
27417
b(v)m(ersion)g(n)m(um)m(b)s(er)e(is)h(returned,)g(or)g(a)h(negativ)m(e)
27406
 
h(v)-5 b(alue)31 b(on)g(errors.)150 1662 y Fv(gn)m(utls)p
27407
 
483 1662 37 5 v 55 w(op)s(enpgp)p 991 1662 V 55 w(crt)p
27408
 
1199 1662 V 54 w(imp)s(ort)3350 1875 y FB([F)-8 b(unction])-3599
 
27418
h(v)-5 b(alue)31 b(on)g(errors.)150 3424 y Fv(gn)m(utls)p
 
27419
483 3424 37 5 v 55 w(op)s(enpgp)p 991 3424 V 55 w(crt)p
 
27420
1199 3424 V 54 w(imp)s(ort)3350 3628 y FB([F)-8 b(unction])-3599
27409
27421
b Fh(int)53 b(gnutls_openpgp_crt_im)q(port)f Fg(\()p
27410
 
Ff(gn)m(utls)p 1993 1875 28 4 v 41 w(op)s(enpgp)p 2371
27411
 
1875 V 39 w(crt)p 2521 1875 V 40 w(t)31 b Fe(key)12 b
27412
 
Ff(,)31 b(const)565 1985 y(gn)m(utls)p 811 1985 V 41
27413
 
w(datum)p 1110 1985 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31
27414
 
b(gn)m(utls)p 1807 1985 V 40 w(op)s(enpgp)p 2184 1985
27415
 
V 39 w(crt)p 2334 1985 V 40 w(fm)m(t)p 2510 1985 V 41
27416
 
w(t)f Fe(format)12 b Fg(\))390 2095 y Ff(k)m(ey)c FB(:)41
 
27422
Ff(gn)m(utls)p 1993 3628 28 4 v 41 w(op)s(enpgp)p 2371
 
27423
3628 V 39 w(crt)p 2521 3628 V 40 w(t)31 b Fe(key)12 b
 
27424
Ff(,)31 b(const)565 3737 y(gn)m(utls)p 811 3737 V 41
 
27425
w(datum)p 1110 3737 V 39 w(t)g(*)g Fe(data)12 b Ff(,)31
 
27426
b(gn)m(utls)p 1807 3737 V 40 w(op)s(enpgp)p 2184 3737
 
27427
V 39 w(crt)p 2334 3737 V 40 w(fm)m(t)p 2510 3737 V 41
 
27428
w(t)f Fe(format)12 b Fg(\))390 3847 y Ff(k)m(ey)c FB(:)41
27417
27429
b(The)30 b(structure)g(to)h(store)g(the)g(parsed)e(k)m(ey)-8
27418
 
b(.)390 2246 y Ff(data)p FB(:)41 b(The)30 b(RA)-10 b(W)31
27419
 
b(or)f(BASE64)i(enco)s(ded)e(k)m(ey)-8 b(.)390 2398 y
 
27430
b(.)390 3988 y Ff(data)p FB(:)41 b(The)30 b(RA)-10 b(W)31
 
27431
b(or)f(BASE64)i(enco)s(ded)e(k)m(ey)-8 b(.)390 4129 y
27420
27432
Ff(format)r FB(:)41 b(One)30 b(of)g(gn)m(utls)p 1264
27421
 
2398 V 41 w(op)s(enpgp)p 1642 2398 V 39 w(crt)p 1792
27422
 
2398 V 40 w(fm)m(t)p 1968 2398 V 40 w(t)h(elemen)m(ts.)390
27423
 
2549 y(This)46 b(function)h(will)g(con)m(v)m(ert)i(the)e(giv)m(en)h(RA)
 
27433
4129 V 41 w(op)s(enpgp)p 1642 4129 V 39 w(crt)p 1792
 
27434
4129 V 40 w(fm)m(t)p 1968 4129 V 40 w(t)h(elemen)m(ts.)390
 
27435
4270 y(This)46 b(function)h(will)g(con)m(v)m(ert)i(the)e(giv)m(en)h(RA)
27424
27436
-10 b(W)48 b(or)f(Base64)i(enco)s(ded)e(k)m(ey)h(to)f(the)h(nativ)m(e)
27425
 
390 2659 y Ft(gnutls_openpgp_crt_t)25 b FB(format.)41
 
27437
390 4380 y Ft(gnutls_openpgp_crt_t)25 b FB(format.)41
27426
27438
b(The)30 b(output)g(will)g(b)s(e)g(stored)h(in)f('k)m(ey'.)390
27427
 
2811 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27428
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 3027 y Fv(gn)m(utls)p
27429
 
483 3027 37 5 v 55 w(op)s(enpgp)p 991 3027 V 55 w(crt)p
27430
 
1199 3027 V 54 w(init)3350 3241 y FB([F)-8 b(unction])-3599
 
27439
4521 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27440
b(success,)f(or)h(an)f(error)g(co)s(de.)150 4727 y Fv(gn)m(utls)p
 
27441
483 4727 37 5 v 55 w(op)s(enpgp)p 991 4727 V 55 w(crt)p
 
27442
1199 4727 V 54 w(init)3350 4930 y FB([F)-8 b(unction])-3599
27431
27443
b Fh(int)53 b(gnutls_openpgp_crt_in)q(it)f Fg(\()p Ff(gn)m(utls)p
27432
 
1889 3241 28 4 v 40 w(op)s(enpgp)p 2266 3241 V 39 w(crt)p
27433
 
2416 3241 V 41 w(t)30 b(*)h Fe(key)12 b Fg(\))390 3350
 
27444
1889 4930 28 4 v 40 w(op)s(enpgp)p 2266 4930 V 39 w(crt)p
 
27445
2416 4930 V 41 w(t)30 b(*)h Fe(key)12 b Fg(\))390 5040
27434
27446
y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)
27435
 
390 3502 y(This)g(function)g(will)g(initialize)j(an)d(Op)s(enPGP)f(k)m
27436
 
(ey)i(structure.)390 3654 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
27437
 
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
27438
 
3870 y Fv(gn)m(utls)p 483 3870 37 5 v 55 w(op)s(enpgp)p
27439
 
991 3870 V 55 w(crt)p 1199 3870 V 54 w(prin)m(t)3350
27440
 
4084 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_pr)q
27441
 
(int)f Fg(\()p Ff(gn)m(utls)p 1941 4084 28 4 v 41 w(op)s(enpgp)p
27442
 
2319 4084 V 39 w(crt)p 2469 4084 V 40 w(t)31 b Fe(cert)12
27443
 
b Ff(,)565 4193 y(gn)m(utls)p 811 4193 V 41 w(certi\014cate)p
27444
 
1239 4193 V 42 w(prin)m(t)p 1476 4193 V 39 w(formats)p
27445
 
1816 4193 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(gn)m(utls)p
27446
 
2543 4193 V 41 w(datum)p 2842 4193 V 39 w(t)f(*)g Fe(out)12
27447
 
b Fg(\))390 4303 y Ff(cert)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)
27448
 
f(prin)m(ted)390 4455 y Ff(format)r FB(:)41 b(Indicate)31
27449
 
b(the)g(format)f(to)h(use)390 4606 y Ff(out)r FB(:)41
27450
 
b(Newly)31 b(allo)s(cated)h(datum)e(with)g(zero)h(terminated)g(string.)
27451
 
390 4758 y(This)44 b(function)g(will)h(prett)m(y)g(prin)m(t)f(an)g(Op)s
27452
 
(enPGP)f(certi\014cate,)50 b(suitable)45 b(for)g(displa)m(y)f(to)i(a)
27453
 
390 4867 y(h)m(uman.)390 5019 y(The)30 b(format)h(should)e(b)s(e)h
27454
 
(zero)h(for)f(future)f(compatibilit)m(y)-8 b(.)390 5171
27455
 
y(The)30 b(output)g Ft(out)f FB(needs)h(to)h(b)s(e)f(deallo)s(cate)j
27456
 
(using)d Ft(gnutls_free\(\))p FB(.)390 5322 y Fn(Returns:)40
27457
 
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
27458
 
(de.)p eop end
 
27447
390 5181 y(This)g(function)g(will)g(initialize)j(an)d(Op)s(enPGP)f(k)m
 
27448
(ey)i(structure.)390 5322 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
27449
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)p
 
27450
eop end
27459
27451
%%Page: 242 248
27460
27452
TeXDict begin 242 247 bop 150 -116 a FB(Chapter)30 b(9:)41
27461
27453
b(F)-8 b(unction)31 b(Reference)2237 b(242)150 299 y
27462
27454
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27463
 
V 55 w(crt)p 1199 299 V 54 w(set)p 1405 299 V 54 w(preferred)p
27464
 
1950 299 V 55 w(k)m(ey)p 2188 299 V 53 w(id)3350 494
27465
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_se)q(t_pr)
27466
 
q(efe)q(rre)q(d_k)q(ey_i)q(d)565 603 y Fg(\()p Ff(gn)m(utls)p
27467
 
846 603 28 4 v 41 w(op)s(enpgp)p 1224 603 V 39 w(crt)p
27468
 
1374 603 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(const)g(gn)m(utls)p
27469
 
2182 603 V 40 w(op)s(enpgp)p 2559 603 V 39 w(k)m(eyid)p
27470
 
2807 603 V 40 w(t)g Fe(keyid)12 b Fg(\))390 713 y Ff(k)m(ey)c
27471
 
FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e
27472
 
(public)h(k)m(ey)-8 b(.)390 846 y Ff(k)m(eyid)t FB(:)41
27473
 
b(the)30 b(selected)i(k)m(eyid)390 980 y(This)f(allo)m(ws)h(setting)h
27474
 
(a)f(preferred)e(k)m(ey)i(id)f(for)g(the)h(giv)m(en)g(certi\014cate.)46
27475
 
b(This)31 b(k)m(ey)h(will)g(b)s(e)f(used)390 1089 y(b)m(y)f(functions)g
27476
 
(that)h(in)m(v)m(olv)m(e)i(k)m(ey)e(handling.)150 1287
27477
 
y Fv(gn)m(utls)p 483 1287 37 5 v 55 w(op)s(enpgp)p 991
27478
 
1287 V 55 w(crt)p 1199 1287 V 54 w(v)m(erify)p 1557 1287
27479
 
V 54 w(ring)3350 1481 y FB([F)-8 b(unction])-3599 b Fh(int)53
27480
 
b(gnutls_openpgp_crt_ve)q(rify)q(_ri)q(ng)f Fg(\()p Ff(gn)m(utls)p
27481
 
2255 1481 28 4 v 41 w(op)s(enpgp)p 2633 1481 V 38 w(crt)p
27482
 
2782 1481 V 41 w(t)30 b Fe(key)12 b Ff(,)565 1591 y(gn)m(utls)p
27483
 
811 1591 V 41 w(op)s(enpgp)p 1189 1591 V 38 w(k)m(eyring)p
27484
 
1517 1591 V 41 w(t)31 b Fe(keyring)12 b Ff(,)32 b(unsigned)d(in)m(t)i
27485
 
Fe(flags)12 b Ff(,)32 b(unsigned)d(in)m(t)i(*)565 1701
27486
 
y Fe(verify)12 b Fg(\))390 1810 y Ff(k)m(ey)c FB(:)41
27487
 
b(the)31 b(structure)f(that)h(holds)f(the)g(k)m(ey)-8
27488
 
b(.)390 1944 y Ff(k)m(eyring)8 b FB(:)41 b(holds)30 b(the)h(k)m(eyring)
27489
 
g(to)g(c)m(hec)m(k)h(against)390 2077 y Ff(\015ags)t
27490
 
FB(:)41 b(un)m(used)29 b(\(should)g(b)s(e)h(0\))390 2211
27491
 
y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g(certi\014cate)j(v)m
27492
 
(eri\014cation)f(output.)390 2344 y(V)-8 b(erify)31 b(all)g(signatures)
27493
 
g(in)f(the)g(k)m(ey)-8 b(,)32 b(using)e(the)h(giv)m(en)g(set)g(of)f(k)m
27494
 
(eys)h(\(k)m(eyring\).)390 2478 y(The)39 b(k)m(ey)i(v)m(eri\014cation)g
27495
 
(output)e(will)h(b)s(e)f(put)g(in)g Ft(verify)f FB(and)h(will)h(b)s(e)f
27496
 
(one)h(or)g(more)g(of)g(the)390 2587 y Ft(gnutls_certificate_statu)o
27497
 
(s_t)24 b FB(en)m(umerated)31 b(elemen)m(ts)g(bit)m(wise)g(or'd.)390
27498
 
2721 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27499
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 2918 y Fv(gn)m(utls)p
27500
 
483 2918 37 5 v 55 w(op)s(enpgp)p 991 2918 V 55 w(crt)p
27501
 
1199 2918 V 54 w(v)m(erify)p 1557 2918 V 54 w(self)3350
27502
 
3113 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ve)q
27503
 
(rify)q(_se)q(lf)f Fg(\()p Ff(gn)m(utls)p 2255 3113 28
27504
 
4 v 41 w(op)s(enpgp)p 2633 3113 V 38 w(crt)p 2782 3113
27505
 
V 41 w(t)30 b Fe(key)12 b Ff(,)565 3222 y(unsigned)29
 
27455
V 55 w(crt)p 1199 299 V 54 w(prin)m(t)3350 504 y FB([F)-8
 
27456
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_pr)q(int)f
 
27457
Fg(\()p Ff(gn)m(utls)p 1941 504 28 4 v 41 w(op)s(enpgp)p
 
27458
2319 504 V 39 w(crt)p 2469 504 V 40 w(t)31 b Fe(cert)12
 
27459
b Ff(,)565 613 y(gn)m(utls)p 811 613 V 41 w(certi\014cate)p
 
27460
1239 613 V 42 w(prin)m(t)p 1476 613 V 39 w(formats)p
 
27461
1816 613 V 41 w(t)30 b Fe(format)12 b Ff(,)32 b(gn)m(utls)p
 
27462
2543 613 V 41 w(datum)p 2842 613 V 39 w(t)f(*)g Fe(out)12
 
27463
b Fg(\))390 723 y Ff(cert)r FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f
 
27464
(prin)m(ted)390 866 y Ff(format)r FB(:)41 b(Indicate)31
 
27465
b(the)g(format)f(to)h(use)390 1009 y Ff(out)r FB(:)41
 
27466
b(Newly)31 b(allo)s(cated)h(datum)e(with)g(zero)h(terminated)g(string.)
 
27467
390 1151 y(This)44 b(function)g(will)h(prett)m(y)g(prin)m(t)f(an)g(Op)s
 
27468
(enPGP)f(certi\014cate,)50 b(suitable)45 b(for)g(displa)m(y)f(to)i(a)
 
27469
390 1261 y(h)m(uman.)390 1404 y(The)30 b(format)h(should)e(b)s(e)h
 
27470
(zero)h(for)f(future)f(compatibilit)m(y)-8 b(.)390 1546
 
27471
y(The)30 b(output)g Ft(out)f FB(needs)h(to)h(b)s(e)f(deallo)s(cate)j
 
27472
(using)d Ft(gnutls_free\(\))p FB(.)390 1689 y Fn(Returns:)40
 
27473
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
 
27474
(de.)150 1896 y Fv(gn)m(utls)p 483 1896 37 5 v 55 w(op)s(enpgp)p
 
27475
991 1896 V 55 w(crt)p 1199 1896 V 54 w(set)p 1405 1896
 
27476
V 54 w(preferred)p 1950 1896 V 55 w(k)m(ey)p 2188 1896
 
27477
V 53 w(id)3350 2101 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
27478
b(gnutls_openpgp_crt_se)q(t_pr)q(efe)q(rre)q(d_k)q(ey_i)q(d)565
 
27479
2211 y Fg(\()p Ff(gn)m(utls)p 846 2211 28 4 v 41 w(op)s(enpgp)p
 
27480
1224 2211 V 39 w(crt)p 1374 2211 V 40 w(t)31 b Fe(key)12
 
27481
b Ff(,)31 b(const)g(gn)m(utls)p 2182 2211 V 40 w(op)s(enpgp)p
 
27482
2559 2211 V 39 w(k)m(eyid)p 2807 2211 V 40 w(t)g Fe(keyid)12
 
27483
b Fg(\))390 2321 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
 
27484
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
 
27485
b(.)390 2463 y Ff(k)m(eyid)t FB(:)41 b(the)30 b(selected)i(k)m(eyid)390
 
27486
2606 y(This)f(allo)m(ws)h(setting)h(a)f(preferred)e(k)m(ey)i(id)f(for)g
 
27487
(the)h(giv)m(en)g(certi\014cate.)46 b(This)31 b(k)m(ey)h(will)g(b)s(e)f
 
27488
(used)390 2716 y(b)m(y)f(functions)g(that)h(in)m(v)m(olv)m(e)i(k)m(ey)e
 
27489
(handling.)150 2923 y Fv(gn)m(utls)p 483 2923 37 5 v
 
27490
55 w(op)s(enpgp)p 991 2923 V 55 w(crt)p 1199 2923 V 54
 
27491
w(v)m(erify)p 1557 2923 V 54 w(ring)3350 3128 y FB([F)-8
 
27492
b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ve)q(rify)q(_ri)q(ng)
 
27493
f Fg(\()p Ff(gn)m(utls)p 2255 3128 28 4 v 41 w(op)s(enpgp)p
 
27494
2633 3128 V 38 w(crt)p 2782 3128 V 41 w(t)30 b Fe(key)12
 
27495
b Ff(,)565 3238 y(gn)m(utls)p 811 3238 V 41 w(op)s(enpgp)p
 
27496
1189 3238 V 38 w(k)m(eyring)p 1517 3238 V 41 w(t)31 b
 
27497
Fe(keyring)12 b Ff(,)32 b(unsigned)d(in)m(t)i Fe(flags)12
 
27498
b Ff(,)32 b(unsigned)d(in)m(t)i(*)565 3347 y Fe(verify)12
 
27499
b Fg(\))390 3457 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
 
27500
(holds)f(the)g(k)m(ey)-8 b(.)390 3600 y Ff(k)m(eyring)8
 
27501
b FB(:)41 b(holds)30 b(the)h(k)m(eyring)g(to)g(c)m(hec)m(k)h(against)
 
27502
390 3742 y Ff(\015ags)t FB(:)41 b(un)m(used)29 b(\(should)g(b)s(e)h
 
27503
(0\))390 3885 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g
 
27504
(certi\014cate)j(v)m(eri\014cation)f(output.)390 4028
 
27505
y(V)-8 b(erify)31 b(all)g(signatures)g(in)f(the)g(k)m(ey)-8
 
27506
b(,)32 b(using)e(the)h(giv)m(en)g(set)g(of)f(k)m(eys)h(\(k)m(eyring\).)
 
27507
390 4171 y(The)39 b(k)m(ey)i(v)m(eri\014cation)g(output)e(will)h(b)s(e)
 
27508
f(put)g(in)g Ft(verify)f FB(and)h(will)h(b)s(e)f(one)h(or)g(more)g(of)g
 
27509
(the)390 4280 y Ft(gnutls_certificate_statu)o(s_t)24
 
27510
b FB(en)m(umerated)31 b(elemen)m(ts)g(bit)m(wise)g(or'd.)390
 
27511
4423 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27512
b(success,)f(or)h(an)f(error)g(co)s(de.)150 4630 y Fv(gn)m(utls)p
 
27513
483 4630 37 5 v 55 w(op)s(enpgp)p 991 4630 V 55 w(crt)p
 
27514
1199 4630 V 54 w(v)m(erify)p 1557 4630 V 54 w(self)3350
 
27515
4835 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_crt_ve)q
 
27516
(rify)q(_se)q(lf)f Fg(\()p Ff(gn)m(utls)p 2255 4835 28
 
27517
4 v 41 w(op)s(enpgp)p 2633 4835 V 38 w(crt)p 2782 4835
 
27518
V 41 w(t)30 b Fe(key)12 b Ff(,)565 4945 y(unsigned)29
27506
27519
b(in)m(t)i Fe(flags)12 b Ff(,)32 b(unsigned)d(in)m(t)i(*)g
27507
 
Fe(verify)12 b Fg(\))390 3332 y Ff(k)m(ey)c FB(:)41 b(the)31
 
27520
Fe(verify)12 b Fg(\))390 5055 y Ff(k)m(ey)c FB(:)41 b(the)31
27508
27521
b(structure)f(that)h(holds)f(the)g(k)m(ey)-8 b(.)390
27509
 
3466 y Ff(\015ags)t FB(:)41 b(un)m(used)29 b(\(should)g(b)s(e)h(0\))390
27510
 
3599 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g(k)m(ey)h(v)m
27511
 
(eri\014cation)h(output.)390 3733 y(V)-8 b(eri\014es)24
27512
 
b(the)g(self)g(signature)f(in)h(the)f(k)m(ey)-8 b(.)40
27513
 
b(The)23 b(k)m(ey)h(v)m(eri\014cation)i(output)d(will)h(b)s(e)f(put)f
27514
 
(in)i Ft(verify)390 3842 y FB(and)f(will)h(b)s(e)g(one)g(or)g(more)g
27515
 
(of)g(the)g(gn)m(utls)p 1822 3842 V 40 w(certi\014cate)p
27516
 
2249 3842 V 42 w(status)p 2529 3842 V 41 w(t)g(en)m(umerated)g(elemen)m
27517
 
(ts)h(bit)m(wise)390 3952 y(or'd.)390 4085 y Fn(Returns:)40
 
27522
5197 y Ff(\015ags)t FB(:)41 b(un)m(used)29 b(\(should)g(b)s(e)h(0\))390
 
27523
5340 y Ff(v)m(erify)8 b FB(:)41 b(will)31 b(hold)f(the)g(k)m(ey)h(v)m
 
27524
(eri\014cation)h(output.)p eop end
 
27525
%%Page: 243 249
 
27526
TeXDict begin 243 248 bop 150 -116 a FB(Chapter)30 b(9:)41
 
27527
b(F)-8 b(unction)31 b(Reference)2237 b(243)390 299 y(V)-8
 
27528
b(eri\014es)24 b(the)g(self)g(signature)f(in)h(the)f(k)m(ey)-8
 
27529
b(.)40 b(The)23 b(k)m(ey)h(v)m(eri\014cation)i(output)d(will)h(b)s(e)f
 
27530
(put)f(in)i Ft(verify)390 408 y FB(and)f(will)h(b)s(e)g(one)g(or)g
 
27531
(more)g(of)g(the)g(gn)m(utls)p 1822 408 28 4 v 40 w(certi\014cate)p
 
27532
2249 408 V 42 w(status)p 2529 408 V 41 w(t)g(en)m(umerated)g(elemen)m
 
27533
(ts)h(bit)m(wise)390 518 y(or'd.)390 651 y Fn(Returns:)40
27518
27534
b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s
27519
 
(de.)150 4282 y Fv(gn)m(utls)p 483 4282 37 5 v 55 w(op)s(enpgp)p
27520
 
991 4282 V 55 w(k)m(eyring)p 1442 4282 V 54 w(c)m(hec)m(k)p
27521
 
1789 4282 V 53 w(id)3350 4477 y FB([F)-8 b(unction])-3599
 
27535
(de.)150 848 y Fv(gn)m(utls)p 483 848 37 5 v 55 w(op)s(enpgp)p
 
27536
991 848 V 55 w(k)m(eyring)p 1442 848 V 54 w(c)m(hec)m(k)p
 
27537
1789 848 V 53 w(id)3350 1042 y FB([F)-8 b(unction])-3599
27522
27538
b Fh(int)53 b(gnutls_openpgp_keyrin)q(g_ch)q(eck)q(_id)f
27523
 
Fg(\()p Ff(gn)m(utls)p 2307 4477 28 4 v 41 w(op)s(enpgp)p
27524
 
2685 4477 V 39 w(k)m(eyring)p 3014 4477 V 40 w(t)565
27525
 
4587 y Fe(ring)12 b Ff(,)31 b(const)g(gn)m(utls)p 1325
27526
 
4587 V 41 w(op)s(enpgp)p 1703 4587 V 39 w(k)m(eyid)p
27527
 
1951 4587 V 40 w(t)g Fe(keyid)12 b Ff(,)31 b(unsigned)f(in)m(t)h
27528
 
Fe(flags)12 b Fg(\))390 4696 y Ff(ring)c FB(:)40 b(holds)30
27529
 
b(the)h(k)m(eyring)g(to)g(c)m(hec)m(k)h(against)390 4830
 
27539
Fg(\()p Ff(gn)m(utls)p 2307 1042 28 4 v 41 w(op)s(enpgp)p
 
27540
2685 1042 V 39 w(k)m(eyring)p 3014 1042 V 40 w(t)565
 
27541
1152 y Fe(ring)12 b Ff(,)31 b(const)g(gn)m(utls)p 1325
 
27542
1152 V 41 w(op)s(enpgp)p 1703 1152 V 39 w(k)m(eyid)p
 
27543
1951 1152 V 40 w(t)g Fe(keyid)12 b Ff(,)31 b(unsigned)f(in)m(t)h
 
27544
Fe(flags)12 b Fg(\))390 1262 y Ff(ring)c FB(:)40 b(holds)30
 
27545
b(the)h(k)m(eyring)g(to)g(c)m(hec)m(k)h(against)390 1395
27530
27546
y Ff(k)m(eyid)t FB(:)41 b(will)31 b(hold)f(the)g(k)m(eyid)h(to)g(c)m
27531
 
(hec)m(k)h(for.)390 4963 y Ff(\015ags)t FB(:)41 b(un)m(used)29
27532
 
b(\(should)g(b)s(e)h(0\))390 5097 y(Chec)m(k)h(if)f(a)h(giv)m(en)g(k)m
27533
 
(ey)g(ID)g(exists)g(in)f(the)h(k)m(eyring.)390 5230 y
 
27547
(hec)m(k)h(for.)390 1528 y Ff(\015ags)t FB(:)41 b(un)m(used)29
 
27548
b(\(should)g(b)s(e)h(0\))390 1661 y(Chec)m(k)h(if)f(a)h(giv)m(en)g(k)m
 
27549
(ey)g(ID)g(exists)g(in)f(the)h(k)m(eyring.)390 1795 y
27534
27550
Fn(Returns:)39 b Ft(GNUTLS_E_SUCCESS)22 b FB(on)k(success)h(\(if)g(k)m
27535
27551
(eyid)g(exists\))h(and)e(a)h(negativ)m(e)i(error)d(co)s(de)h(on)390
27536
 
5340 y(failure.)p eop end
27537
 
%%Page: 243 249
27538
 
TeXDict begin 243 248 bop 150 -116 a FB(Chapter)30 b(9:)41
27539
 
b(F)-8 b(unction)31 b(Reference)2237 b(243)150 299 y
27540
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27541
 
V 55 w(k)m(eyring)p 1442 299 V 54 w(deinit)3350 507 y
27542
 
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_openpgp_keyring_d)q
27543
 
(ein)q(it)e Fg(\()p Ff(gn)m(utls)p 2255 507 28 4 v 41
27544
 
w(op)s(enpgp)p 2633 507 V 38 w(k)m(eyring)p 2961 507
27545
 
V 41 w(t)565 617 y Fe(keyring)12 b Fg(\))390 726 y Ff(k)m(eyring)c
 
27552
1904 y(failure.)150 2101 y Fv(gn)m(utls)p 483 2101 37
 
27553
5 v 55 w(op)s(enpgp)p 991 2101 V 55 w(k)m(eyring)p 1442
 
27554
2101 V 54 w(deinit)3350 2295 y FB([F)-8 b(unction])-3599
 
27555
b Fh(void)54 b(gnutls_openpgp_keyring_d)q(ein)q(it)e
 
27556
Fg(\()p Ff(gn)m(utls)p 2255 2295 28 4 v 41 w(op)s(enpgp)p
 
27557
2633 2295 V 38 w(k)m(eyring)p 2961 2295 V 41 w(t)565
 
27558
2405 y Fe(keyring)12 b Fg(\))390 2514 y Ff(k)m(eyring)c
27546
27559
FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390
27547
 
872 y(This)g(function)g(will)g(deinitialize)j(a)e(k)m(eyring)g
27548
 
(structure.)150 1083 y Fv(gn)m(utls)p 483 1083 37 5 v
27549
 
55 w(op)s(enpgp)p 991 1083 V 55 w(k)m(eyring)p 1442 1083
27550
 
V 54 w(get)p 1661 1083 V 54 w(crt)p 1868 1083 V 54 w(coun)m(t)3350
27551
 
1291 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_keyrin)q
27552
 
(g_ge)q(t_c)q(rt_)q(cou)q(nt)565 1401 y Fg(\()p Ff(gn)m(utls)p
27553
 
846 1401 28 4 v 41 w(op)s(enpgp)p 1224 1401 V 39 w(k)m(eyring)p
27554
 
1553 1401 V 40 w(t)31 b Fe(ring)12 b Fg(\))390 1510 y
 
27560
2648 y(This)g(function)g(will)g(deinitialize)j(a)e(k)m(eyring)g
 
27561
(structure.)150 2844 y Fv(gn)m(utls)p 483 2844 37 5 v
 
27562
55 w(op)s(enpgp)p 991 2844 V 55 w(k)m(eyring)p 1442 2844
 
27563
V 54 w(get)p 1661 2844 V 54 w(crt)p 1868 2844 V 54 w(coun)m(t)3350
 
27564
3039 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_keyrin)q
 
27565
(g_ge)q(t_c)q(rt_)q(cou)q(nt)565 3148 y Fg(\()p Ff(gn)m(utls)p
 
27566
846 3148 28 4 v 41 w(op)s(enpgp)p 1224 3148 V 39 w(k)m(eyring)p
 
27567
1553 3148 V 40 w(t)31 b Fe(ring)12 b Fg(\))390 3258 y
27555
27568
Ff(ring)c FB(:)40 b(is)31 b(an)f(Op)s(enPGP)f(k)m(ey)i(ring)390
27556
 
1656 y(This)36 b(function)g(will)h(return)e(the)i(n)m(um)m(b)s(er)e(of)
 
27569
3391 y(This)36 b(function)g(will)h(return)e(the)i(n)m(um)m(b)s(er)e(of)
27557
27570
i(Op)s(enPGP)e(certi\014cates)j(presen)m(t)f(in)f(the)h(giv)m(en)390
27558
 
1766 y(k)m(eyring.)390 1912 y Fn(Returns:)j FB(the)31
 
27571
3501 y(k)m(eyring.)390 3634 y Fn(Returns:)j FB(the)31
27559
27572
b(n)m(um)m(b)s(er)e(of)i(subk)m(eys,)f(or)g(a)h(negativ)m(e)h(v)-5
27560
 
b(alue)31 b(on)f(error.)150 2122 y Fv(gn)m(utls)p 483
27561
 
2122 37 5 v 55 w(op)s(enpgp)p 991 2122 V 55 w(k)m(eyring)p
27562
 
1442 2122 V 54 w(get)p 1661 2122 V 54 w(crt)3350 2331
 
27573
b(alue)31 b(on)f(error.)150 3831 y Fv(gn)m(utls)p 483
 
27574
3831 37 5 v 55 w(op)s(enpgp)p 991 3831 V 55 w(k)m(eyring)p
 
27575
1442 3831 V 54 w(get)p 1661 3831 V 54 w(crt)3350 4025
27563
27576
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_keyrin)q(g_ge)
27564
 
q(t_c)q(rt)f Fg(\()p Ff(gn)m(utls)p 2255 2331 28 4 v
27565
 
41 w(op)s(enpgp)p 2633 2331 V 38 w(k)m(eyring)p 2961
27566
 
2331 V 41 w(t)565 2440 y Fe(ring)12 b Ff(,)31 b(unsigned)f(in)m(t)h
27567
 
Fe(idx)12 b Ff(,)31 b(gn)m(utls)p 1830 2440 V 40 w(op)s(enpgp)p
27568
 
2207 2440 V 39 w(crt)p 2357 2440 V 40 w(t)g(*)g Fe(cert)12
27569
 
b Fg(\))390 2550 y Ff(idx)6 b FB(:)41 b(the)30 b(index)g(of)h(the)f
27570
 
(certi\014cate)j(to)e(exp)s(ort)390 2696 y(This)22 b(function)g(will)g
 
27577
q(t_c)q(rt)f Fg(\()p Ff(gn)m(utls)p 2255 4025 28 4 v
 
27578
41 w(op)s(enpgp)p 2633 4025 V 38 w(k)m(eyring)p 2961
 
27579
4025 V 41 w(t)565 4134 y Fe(ring)12 b Ff(,)31 b(unsigned)f(in)m(t)h
 
27580
Fe(idx)12 b Ff(,)31 b(gn)m(utls)p 1830 4134 V 40 w(op)s(enpgp)p
 
27581
2207 4134 V 39 w(crt)p 2357 4134 V 40 w(t)g(*)g Fe(cert)12
 
27582
b Fg(\))390 4244 y Ff(idx)6 b FB(:)41 b(the)30 b(index)g(of)h(the)f
 
27583
(certi\014cate)j(to)e(exp)s(ort)390 4377 y(This)22 b(function)g(will)g
27571
27584
(extract)i(an)e(Op)s(enPGP)f(certi\014cate)k(from)c(the)i(giv)m(en)g(k)
27572
 
m(eyring.)39 b(If)22 b(the)g(index)390 2805 y(giv)m(en)39
 
27585
m(eyring.)39 b(If)22 b(the)g(index)390 4487 y(giv)m(en)39
27573
27586
b(is)f(out)h(of)f(range)h Ft(GNUTLS_E_REQUESTED_DATA)o(_NOT)o(_AVA)o
27574
 
(ILA)o(BLE)32 b FB(will)38 b(b)s(e)g(returned.)390 2915
 
27587
(ILA)o(BLE)32 b FB(will)38 b(b)s(e)g(returned.)390 4597
27575
27588
y(The)30 b(returned)f(structure)h(needs)g(to)h(b)s(e)f(deinited.)390
27576
 
3061 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27577
 
b(success,)f(or)h(an)f(error)g(co)s(de.)150 3272 y Fv(gn)m(utls)p
27578
 
483 3272 37 5 v 55 w(op)s(enpgp)p 991 3272 V 55 w(k)m(eyring)p
27579
 
1442 3272 V 54 w(imp)s(ort)3350 3480 y FB([F)-8 b(unction])-3599
 
27589
4730 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27590
b(success,)f(or)h(an)f(error)g(co)s(de.)150 4927 y Fv(gn)m(utls)p
 
27591
483 4927 37 5 v 55 w(op)s(enpgp)p 991 4927 V 55 w(k)m(eyring)p
 
27592
1442 4927 V 54 w(imp)s(ort)3350 5121 y FB([F)-8 b(unction])-3599
27580
27593
b Fh(int)53 b(gnutls_openpgp_keyrin)q(g_im)q(por)q(t)e
27581
 
Fg(\()p Ff(gn)m(utls)p 2202 3480 28 4 v 41 w(op)s(enpgp)p
27582
 
2580 3480 V 39 w(k)m(eyring)p 2909 3480 V 41 w(t)565
27583
 
3589 y Fe(keyring)12 b Ff(,)32 b(const)f(gn)m(utls)p
27584
 
1482 3589 V 41 w(datum)p 1781 3589 V 39 w(t)g(*)g Fe(data)12
27585
 
b Ff(,)31 b(gn)m(utls)p 2478 3589 V 40 w(op)s(enpgp)p
27586
 
2855 3589 V 39 w(crt)p 3005 3589 V 41 w(fm)m(t)p 3182
27587
 
3589 V 40 w(t)g Fe(format)12 b Fg(\))390 3699 y Ff(k)m(eyring)c
 
27594
Fg(\()p Ff(gn)m(utls)p 2202 5121 28 4 v 41 w(op)s(enpgp)p
 
27595
2580 5121 V 39 w(k)m(eyring)p 2909 5121 V 41 w(t)565
 
27596
5230 y Fe(keyring)12 b Ff(,)32 b(const)f(gn)m(utls)p
 
27597
1482 5230 V 41 w(datum)p 1781 5230 V 39 w(t)g(*)g Fe(data)12
 
27598
b Ff(,)31 b(gn)m(utls)p 2478 5230 V 40 w(op)s(enpgp)p
 
27599
2855 5230 V 39 w(crt)p 3005 5230 V 41 w(fm)m(t)p 3182
 
27600
5230 V 40 w(t)g Fe(format)12 b Fg(\))390 5340 y Ff(k)m(eyring)c
27588
27601
FB(:)41 b(The)30 b(structure)g(to)h(store)g(the)g(parsed)e(k)m(ey)-8
27589
 
b(.)390 3845 y Ff(data)p FB(:)41 b(The)30 b(RA)-10 b(W)31
27590
 
b(or)f(BASE64)i(enco)s(ded)e(k)m(eyring.)390 3991 y Ff(format)r
27591
 
FB(:)41 b(One)30 b(of)g Ft(gnutls_openpgp_keyring_fmt)24
27592
 
b FB(elemen)m(ts.)390 4137 y(This)34 b(function)h(will)g(con)m(v)m(ert)
27593
 
i(the)e(giv)m(en)h(RA)-10 b(W)35 b(or)g(Base64)i(enco)s(ded)e(k)m
27594
 
(eyring)h(to)f(the)h(nativ)m(e)390 4246 y Ft(gnutls_openpgp_keyring_t)
27595
 
24 b FB(format.)41 b(The)30 b(output)g(will)g(b)s(e)g(stored)h(in)f('k)
27596
 
m(eyring'.)390 4392 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
27597
 
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
27598
 
4603 y Fv(gn)m(utls)p 483 4603 37 5 v 55 w(op)s(enpgp)p
27599
 
991 4603 V 55 w(k)m(eyring)p 1442 4603 V 54 w(init)3350
27600
 
4811 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_keyrin)q
27601
 
(g_in)q(it)f Fg(\()p Ff(gn)m(utls)p 2098 4811 28 4 v
27602
 
41 w(op)s(enpgp)p 2476 4811 V 38 w(k)m(eyring)p 2804
27603
 
4811 V 41 w(t)31 b(*)565 4921 y Fe(keyring)12 b Fg(\))390
27604
 
5030 y Ff(k)m(eyring)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f
27605
 
(initialized)390 5176 y(This)g(function)g(will)g(initialize)j(an)d(k)m
27606
 
(eyring)h(structure.)390 5322 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
27607
 
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)p
27608
 
eop end
 
27602
b(.)p eop end
27609
27603
%%Page: 244 250
27610
27604
TeXDict begin 244 249 bop 150 -116 a FB(Chapter)30 b(9:)41
27611
 
b(F)-8 b(unction)31 b(Reference)2237 b(244)150 299 y
27612
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27613
 
V 55 w(privk)m(ey)p 1446 299 V 54 w(deinit)3350 505 y
27614
 
FB([F)-8 b(unction])-3599 b Fh(void)54 b(gnutls_openpgp_privkey_d)q
27615
 
(ein)q(it)e Fg(\()p Ff(gn)m(utls)p 2255 505 28 4 v 41
27616
 
w(op)s(enpgp)p 2633 505 V 38 w(privk)m(ey)p 2964 505
27617
 
V 41 w(t)565 614 y Fe(key)12 b Fg(\))390 724 y Ff(k)m(ey)c
 
27605
b(F)-8 b(unction)31 b(Reference)2237 b(244)390 299 y
 
27606
Ff(data)p FB(:)41 b(The)30 b(RA)-10 b(W)31 b(or)f(BASE64)i(enco)s(ded)e
 
27607
(k)m(eyring.)390 435 y Ff(format)r FB(:)41 b(One)30 b(of)g
 
27608
Ft(gnutls_openpgp_keyring_fmt)24 b FB(elemen)m(ts.)390
 
27609
571 y(This)34 b(function)h(will)g(con)m(v)m(ert)i(the)e(giv)m(en)h(RA)
 
27610
-10 b(W)35 b(or)g(Base64)i(enco)s(ded)e(k)m(eyring)h(to)f(the)h(nativ)m
 
27611
(e)390 681 y Ft(gnutls_openpgp_keyring_t)24 b FB(format.)41
 
27612
b(The)30 b(output)g(will)g(b)s(e)g(stored)h(in)f('k)m(eyring'.)390
 
27613
817 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27614
b(success,)f(or)h(an)f(error)g(co)s(de.)150 1018 y Fv(gn)m(utls)p
 
27615
483 1018 37 5 v 55 w(op)s(enpgp)p 991 1018 V 55 w(k)m(eyring)p
 
27616
1442 1018 V 54 w(init)3350 1217 y FB([F)-8 b(unction])-3599
 
27617
b Fh(int)53 b(gnutls_openpgp_keyrin)q(g_in)q(it)f Fg(\()p
 
27618
Ff(gn)m(utls)p 2098 1217 28 4 v 41 w(op)s(enpgp)p 2476
 
27619
1217 V 38 w(k)m(eyring)p 2804 1217 V 41 w(t)31 b(*)565
 
27620
1327 y Fe(keyring)12 b Fg(\))390 1436 y Ff(k)m(eyring)c
27618
27621
FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)390
27619
 
867 y(This)g(function)g(will)g(deinitialize)j(a)e(k)m(ey)g(structure.)
27620
 
150 1076 y Fv(gn)m(utls)p 483 1076 37 5 v 55 w(op)s(enpgp)p
27621
 
991 1076 V 55 w(privk)m(ey)p 1446 1076 V 54 w(exp)s(ort)p
27622
 
1851 1076 V 54 w(dsa)p 2081 1076 V 55 w(ra)m(w)3350 1281
27623
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)
27624
 
q(por)q(t_d)q(sa_)q(raw)565 1391 y Fg(\()p Ff(gn)m(utls)p
27625
 
846 1391 28 4 v 41 w(op)s(enpgp)p 1224 1391 V 39 w(privk)m(ey)p
27626
 
1556 1391 V 40 w(t)31 b Fe(pkey)12 b Ff(,)31 b(gn)m(utls)p
27627
 
2178 1391 V 40 w(datum)p 2476 1391 V 40 w(t)g(*)f Fe(p)12
27628
 
b Ff(,)31 b(gn)m(utls)p 3017 1391 V 40 w(datum)p 3315
27629
 
1391 V 40 w(t)f(*)h Fe(q)12 b Ff(,)565 1500 y(gn)m(utls)p
27630
 
811 1500 V 41 w(datum)p 1110 1500 V 39 w(t)31 b(*)g Fe(g)12
27631
 
b Ff(,)30 b(gn)m(utls)p 1650 1500 V 40 w(datum)p 1948
27632
 
1500 V 40 w(t)h(*)f Fe(y)12 b Ff(,)31 b(gn)m(utls)p 2489
27633
 
1500 V 40 w(datum)p 2787 1500 V 40 w(t)f(*)h Fe(x)12
27634
 
b Fg(\))390 1610 y Ff(pk)m(ey)c FB(:)41 b(Holds)30 b(the)h
27635
 
(certi\014cate)390 1754 y Ff(p)s FB(:)40 b(will)31 b(hold)f(the)g(p)390
27636
 
1897 y Ff(q)r FB(:)41 b(will)30 b(hold)g(the)h(q)390
27637
 
2041 y Ff(g)8 b FB(:)41 b(will)31 b(hold)f(the)g(g)390
27638
 
2184 y Ff(y)8 b FB(:)40 b(will)31 b(hold)f(the)h(y)390
27639
 
2327 y Ff(x)6 b FB(:)41 b(will)31 b(hold)f(the)g(x)390
27640
 
2471 y(This)k(function)h(will)g(exp)s(ort)f(the)h(DSA)g(priv)-5
27641
 
b(ate)36 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h(cer-)
27642
 
390 2581 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f
27643
 
(allo)s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36
27644
 
b(will)g(b)s(e)390 2690 y(stored)30 b(in)h(the)f(appropriate)h(datum.)
27645
 
390 2834 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b
27646
 
FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 2977
27647
 
y Fn(Since:)41 b FB(2.4.0)150 3185 y Fv(gn)m(utls)p 483
27648
 
3185 37 5 v 55 w(op)s(enpgp)p 991 3185 V 55 w(privk)m(ey)p
27649
 
1446 3185 V 54 w(exp)s(ort)p 1851 3185 V 54 w(rsa)p 2063
27650
 
3185 V 54 w(ra)m(w)3350 3391 y FB([F)-8 b(unction])-3599
27651
 
b Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)q(por)q(t_r)q(sa_)q(raw)565
27652
 
3501 y Fg(\()p Ff(gn)m(utls)p 846 3501 28 4 v 41 w(op)s(enpgp)p
27653
 
1224 3501 V 39 w(privk)m(ey)p 1556 3501 V 40 w(t)31 b
27654
 
Fe(pkey)12 b Ff(,)31 b(gn)m(utls)p 2178 3501 V 40 w(datum)p
27655
 
2476 3501 V 40 w(t)g(*)f Fe(m)12 b Ff(,)31 b(gn)m(utls)p
27656
 
3017 3501 V 40 w(datum)p 3315 3501 V 40 w(t)f(*)h Fe(e)12
27657
 
b Ff(,)565 3610 y(gn)m(utls)p 811 3610 V 41 w(datum)p
27658
 
1110 3610 V 39 w(t)31 b(*)g Fe(d)12 b Ff(,)30 b(gn)m(utls)p
27659
 
1650 3610 V 40 w(datum)p 1948 3610 V 40 w(t)h(*)f Fe(p)12
27660
 
b Ff(,)31 b(gn)m(utls)p 2489 3610 V 40 w(datum)p 2787
27661
 
3610 V 40 w(t)f(*)h Fe(q)12 b Ff(,)30 b(gn)m(utls)p 3327
27662
 
3610 V 41 w(datum)p 3626 3610 V 39 w(t)565 3720 y(*)h
27663
 
Fe(u)12 b Fg(\))390 3829 y Ff(pk)m(ey)c FB(:)41 b(Holds)30
27664
 
b(the)h(certi\014cate)390 3973 y Ff(m)p FB(:)40 b(will)31
27665
 
b(hold)f(the)h(mo)s(dulus)390 4116 y Ff(e)5 b FB(:)41
27666
 
b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m(t)390
27667
 
4260 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
27668
 
b(ate)31 b(exp)s(onen)m(t)390 4403 y Ff(p)s FB(:)40 b(will)31
27669
 
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 4547 y Ff(q)r
27670
 
FB(:)41 b(will)30 b(hold)g(the)h(second)f(prime)g(\(q\))390
27671
 
4690 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
27672
 
4834 y(This)e(function)g(will)i(exp)s(ort)e(the)h(RSA)f(priv)-5
27673
 
b(ate)30 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h
27674
 
(struc-)390 4943 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)
27675
 
g(allo)s(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g
27676
 
(stored)390 5053 y(in)30 b(the)h(appropriate)f(datum.)390
27677
 
5196 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27678
 
b(success,)f(otherwise)h(an)f(error.)390 5340 y Fn(Since:)41
27679
 
b FB(2.4.0)p eop end
 
27622
1573 y(This)g(function)g(will)g(initialize)j(an)d(k)m(eyring)h
 
27623
(structure.)390 1709 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
27624
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)150
 
27625
1910 y Fv(gn)m(utls)p 483 1910 37 5 v 55 w(op)s(enpgp)p
 
27626
991 1910 V 55 w(privk)m(ey)p 1446 1910 V 54 w(deinit)3350
 
27627
2108 y FB([F)-8 b(unction])-3599 b Fh(void)54 b
 
27628
(gnutls_openpgp_privkey_d)q(ein)q(it)e Fg(\()p Ff(gn)m(utls)p
 
27629
2255 2108 28 4 v 41 w(op)s(enpgp)p 2633 2108 V 38 w(privk)m(ey)p
 
27630
2964 2108 V 41 w(t)565 2218 y Fe(key)12 b Fg(\))390 2328
 
27631
y Ff(k)m(ey)c FB(:)41 b(The)30 b(structure)g(to)h(b)s(e)f(initialized)
 
27632
390 2464 y(This)g(function)g(will)g(deinitialize)j(a)e(k)m(ey)g
 
27633
(structure.)150 2665 y Fv(gn)m(utls)p 483 2665 37 5 v
 
27634
55 w(op)s(enpgp)p 991 2665 V 55 w(privk)m(ey)p 1446 2665
 
27635
V 54 w(exp)s(ort)p 1851 2665 V 54 w(dsa)p 2081 2665 V
 
27636
55 w(ra)m(w)3350 2864 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
27637
b(gnutls_openpgp_privke)q(y_ex)q(por)q(t_d)q(sa_)q(raw)565
 
27638
2973 y Fg(\()p Ff(gn)m(utls)p 846 2973 28 4 v 41 w(op)s(enpgp)p
 
27639
1224 2973 V 39 w(privk)m(ey)p 1556 2973 V 40 w(t)31 b
 
27640
Fe(pkey)12 b Ff(,)31 b(gn)m(utls)p 2178 2973 V 40 w(datum)p
 
27641
2476 2973 V 40 w(t)g(*)f Fe(p)12 b Ff(,)31 b(gn)m(utls)p
 
27642
3017 2973 V 40 w(datum)p 3315 2973 V 40 w(t)f(*)h Fe(q)12
 
27643
b Ff(,)565 3083 y(gn)m(utls)p 811 3083 V 41 w(datum)p
 
27644
1110 3083 V 39 w(t)31 b(*)g Fe(g)12 b Ff(,)30 b(gn)m(utls)p
 
27645
1650 3083 V 40 w(datum)p 1948 3083 V 40 w(t)h(*)f Fe(y)12
 
27646
b Ff(,)31 b(gn)m(utls)p 2489 3083 V 40 w(datum)p 2787
 
27647
3083 V 40 w(t)f(*)h Fe(x)12 b Fg(\))390 3192 y Ff(pk)m(ey)c
 
27648
FB(:)41 b(Holds)30 b(the)h(certi\014cate)390 3329 y Ff(p)s
 
27649
FB(:)40 b(will)31 b(hold)f(the)g(p)390 3465 y Ff(q)r
 
27650
FB(:)41 b(will)30 b(hold)g(the)h(q)390 3601 y Ff(g)8
 
27651
b FB(:)41 b(will)31 b(hold)f(the)g(g)390 3738 y Ff(y)8
 
27652
b FB(:)40 b(will)31 b(hold)f(the)h(y)390 3874 y Ff(x)6
 
27653
b FB(:)41 b(will)31 b(hold)f(the)g(x)390 4010 y(This)k(function)h(will)
 
27654
g(exp)s(ort)f(the)h(DSA)g(priv)-5 b(ate)36 b(k)m(ey's)f(parameters)g
 
27655
(found)f(in)g(the)h(giv)m(en)h(cer-)390 4120 y(ti\014cate.)58
 
27656
b(The)36 b(new)f(parameters)h(will)g(b)s(e)f(allo)s(cated)j(using)d
 
27657
Ft(gnutls_malloc\(\))c FB(and)36 b(will)g(b)s(e)390 4229
 
27658
y(stored)30 b(in)h(the)f(appropriate)h(datum.)390 4366
 
27659
y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27660
b(success,)f(otherwise)h(an)f(error.)390 4502 y Fn(Since:)41
 
27661
b FB(2.4.0)150 4703 y Fv(gn)m(utls)p 483 4703 37 5 v
 
27662
55 w(op)s(enpgp)p 991 4703 V 55 w(privk)m(ey)p 1446 4703
 
27663
V 54 w(exp)s(ort)p 1851 4703 V 54 w(rsa)p 2063 4703 V
 
27664
54 w(ra)m(w)3350 4902 y FB([F)-8 b(unction])-3599 b Fh(int)53
 
27665
b(gnutls_openpgp_privke)q(y_ex)q(por)q(t_r)q(sa_)q(raw)565
 
27666
5011 y Fg(\()p Ff(gn)m(utls)p 846 5011 28 4 v 41 w(op)s(enpgp)p
 
27667
1224 5011 V 39 w(privk)m(ey)p 1556 5011 V 40 w(t)31 b
 
27668
Fe(pkey)12 b Ff(,)31 b(gn)m(utls)p 2178 5011 V 40 w(datum)p
 
27669
2476 5011 V 40 w(t)g(*)f Fe(m)12 b Ff(,)31 b(gn)m(utls)p
 
27670
3017 5011 V 40 w(datum)p 3315 5011 V 40 w(t)f(*)h Fe(e)12
 
27671
b Ff(,)565 5121 y(gn)m(utls)p 811 5121 V 41 w(datum)p
 
27672
1110 5121 V 39 w(t)31 b(*)g Fe(d)12 b Ff(,)30 b(gn)m(utls)p
 
27673
1650 5121 V 40 w(datum)p 1948 5121 V 40 w(t)h(*)f Fe(p)12
 
27674
b Ff(,)31 b(gn)m(utls)p 2489 5121 V 40 w(datum)p 2787
 
27675
5121 V 40 w(t)f(*)h Fe(q)12 b Ff(,)30 b(gn)m(utls)p 3327
 
27676
5121 V 41 w(datum)p 3626 5121 V 39 w(t)565 5230 y(*)h
 
27677
Fe(u)12 b Fg(\))390 5340 y Ff(pk)m(ey)c FB(:)41 b(Holds)30
 
27678
b(the)h(certi\014cate)p eop end
27680
27679
%%Page: 245 251
27681
27680
TeXDict begin 245 250 bop 150 -116 a FB(Chapter)30 b(9:)41
27682
 
b(F)-8 b(unction)31 b(Reference)2237 b(245)150 299 y
27683
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27684
 
V 55 w(privk)m(ey)p 1446 299 V 54 w(exp)s(ort)p 1851
27685
 
299 V 54 w(subk)m(ey)p 2272 299 V 54 w(dsa)p 2502 299
27686
 
V 54 w(ra)m(w)3350 522 y FB([F)-8 b(unction])-3599 b
27687
 
Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)q(por)q(t_s)q(ubk)q(ey_d)q
27688
 
(sa_)q(raw)565 631 y Fg(\()p Ff(gn)m(utls)p 846 631 28
27689
 
4 v 41 w(op)s(enpgp)p 1224 631 V 39 w(privk)m(ey)p 1556
27690
 
631 V 40 w(t)31 b Fe(pkey)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27691
 
Fe(idx)12 b Ff(,)31 b(gn)m(utls)p 2920 631 V 40 w(datum)p
27692
 
3218 631 V 40 w(t)g(*)f Fe(p)12 b Ff(,)565 741 y(gn)m(utls)p
27693
 
811 741 V 41 w(datum)p 1110 741 V 39 w(t)31 b(*)g Fe(q)12
27694
 
b Ff(,)30 b(gn)m(utls)p 1650 741 V 40 w(datum)p 1948
27695
 
741 V 40 w(t)h(*)f Fe(g)12 b Ff(,)31 b(gn)m(utls)p 2489
27696
 
741 V 40 w(datum)p 2787 741 V 40 w(t)f(*)h Fe(y)12 b
27697
 
Ff(,)30 b(gn)m(utls)p 3327 741 V 41 w(datum)p 3626 741
27698
 
V 39 w(t)565 851 y(*)h Fe(x)12 b Fg(\))390 960 y Ff(pk)m(ey)c
27699
 
FB(:)41 b(Holds)30 b(the)h(certi\014cate)390 1121 y Ff(idx)6
27700
 
b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390 1282
27701
 
y Ff(p)s FB(:)40 b(will)31 b(hold)f(the)g(p)390 1443
27702
 
y Ff(q)r FB(:)41 b(will)30 b(hold)g(the)h(q)390 1603
27703
 
y Ff(g)8 b FB(:)41 b(will)31 b(hold)f(the)g(g)390 1764
27704
 
y Ff(y)8 b FB(:)40 b(will)31 b(hold)f(the)h(y)390 1925
27705
 
y Ff(x)6 b FB(:)41 b(will)31 b(hold)f(the)g(x)390 2086
27706
 
y(This)k(function)h(will)g(exp)s(ort)f(the)h(DSA)g(priv)-5
27707
 
b(ate)36 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h(cer-)
27708
 
390 2195 y(ti\014cate.)58 b(The)36 b(new)f(parameters)h(will)g(b)s(e)f
27709
 
(allo)s(cated)j(using)d Ft(gnutls_malloc\(\))c FB(and)36
27710
 
b(will)g(b)s(e)390 2305 y(stored)30 b(in)h(the)f(appropriate)h(datum.)
27711
 
390 2466 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b
27712
 
FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 2626
27713
 
y Fn(Since:)41 b FB(2.4.0)150 2852 y Fv(gn)m(utls)p 483
27714
 
2852 37 5 v 55 w(op)s(enpgp)p 991 2852 V 55 w(privk)m(ey)p
27715
 
1446 2852 V 54 w(exp)s(ort)p 1851 2852 V 54 w(subk)m(ey)p
27716
 
2272 2852 V 54 w(rsa)p 2484 2852 V 54 w(ra)m(w)3350 3075
 
27681
b(F)-8 b(unction)31 b(Reference)2237 b(245)390 299 y
 
27682
Ff(m)p FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390
 
27683
433 y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m
 
27684
(t)390 566 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
 
27685
b(ate)31 b(exp)s(onen)m(t)390 700 y Ff(p)s FB(:)40 b(will)31
 
27686
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 834 y Ff(q)r
 
27687
FB(:)41 b(will)30 b(hold)g(the)h(second)f(prime)g(\(q\))390
 
27688
967 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
 
27689
1101 y(This)e(function)g(will)i(exp)s(ort)e(the)h(RSA)f(priv)-5
 
27690
b(ate)30 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h
 
27691
(struc-)390 1210 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)
 
27692
g(allo)s(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g
 
27693
(stored)390 1320 y(in)30 b(the)h(appropriate)f(datum.)390
 
27694
1454 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27695
b(success,)f(otherwise)h(an)f(error.)390 1587 y Fn(Since:)41
 
27696
b FB(2.4.0)150 1785 y Fv(gn)m(utls)p 483 1785 37 5 v
 
27697
55 w(op)s(enpgp)p 991 1785 V 55 w(privk)m(ey)p 1446 1785
 
27698
V 54 w(exp)s(ort)p 1851 1785 V 54 w(subk)m(ey)p 2272
 
27699
1785 V 54 w(dsa)p 2502 1785 V 54 w(ra)m(w)3350 1980 y
 
27700
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)q
 
27701
(por)q(t_s)q(ubk)q(ey_d)q(sa_)q(raw)565 2090 y Fg(\()p
 
27702
Ff(gn)m(utls)p 846 2090 28 4 v 41 w(op)s(enpgp)p 1224
 
27703
2090 V 39 w(privk)m(ey)p 1556 2090 V 40 w(t)31 b Fe(pkey)12
 
27704
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Ff(,)31 b(gn)m(utls)p
 
27705
2920 2090 V 40 w(datum)p 3218 2090 V 40 w(t)g(*)f Fe(p)12
 
27706
b Ff(,)565 2199 y(gn)m(utls)p 811 2199 V 41 w(datum)p
 
27707
1110 2199 V 39 w(t)31 b(*)g Fe(q)12 b Ff(,)30 b(gn)m(utls)p
 
27708
1650 2199 V 40 w(datum)p 1948 2199 V 40 w(t)h(*)f Fe(g)12
 
27709
b Ff(,)31 b(gn)m(utls)p 2489 2199 V 40 w(datum)p 2787
 
27710
2199 V 40 w(t)f(*)h Fe(y)12 b Ff(,)30 b(gn)m(utls)p 3327
 
27711
2199 V 41 w(datum)p 3626 2199 V 39 w(t)565 2309 y(*)h
 
27712
Fe(x)12 b Fg(\))390 2418 y Ff(pk)m(ey)c FB(:)41 b(Holds)30
 
27713
b(the)h(certi\014cate)390 2552 y Ff(idx)6 b FB(:)41 b(Is)30
 
27714
b(the)g(subk)m(ey)g(index)390 2686 y Ff(p)s FB(:)40 b(will)31
 
27715
b(hold)f(the)g(p)390 2819 y Ff(q)r FB(:)41 b(will)30
 
27716
b(hold)g(the)h(q)390 2953 y Ff(g)8 b FB(:)41 b(will)31
 
27717
b(hold)f(the)g(g)390 3087 y Ff(y)8 b FB(:)40 b(will)31
 
27718
b(hold)f(the)h(y)390 3220 y Ff(x)6 b FB(:)41 b(will)31
 
27719
b(hold)f(the)g(x)390 3354 y(This)k(function)h(will)g(exp)s(ort)f(the)h
 
27720
(DSA)g(priv)-5 b(ate)36 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h
 
27721
(giv)m(en)h(cer-)390 3464 y(ti\014cate.)58 b(The)36 b(new)f(parameters)
 
27722
h(will)g(b)s(e)f(allo)s(cated)j(using)d Ft(gnutls_malloc\(\))c
 
27723
FB(and)36 b(will)g(b)s(e)390 3573 y(stored)30 b(in)h(the)f(appropriate)
 
27724
h(datum.)390 3707 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
27725
b FB(on)31 b(success,)f(otherwise)h(an)f(error.)390 3841
 
27726
y Fn(Since:)41 b FB(2.4.0)150 4038 y Fv(gn)m(utls)p 483
 
27727
4038 37 5 v 55 w(op)s(enpgp)p 991 4038 V 55 w(privk)m(ey)p
 
27728
1446 4038 V 54 w(exp)s(ort)p 1851 4038 V 54 w(subk)m(ey)p
 
27729
2272 4038 V 54 w(rsa)p 2484 4038 V 54 w(ra)m(w)3350 4233
27717
27730
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)
27718
 
q(por)q(t_s)q(ubk)q(ey_r)q(sa_)q(raw)565 3184 y Fg(\()p
27719
 
Ff(gn)m(utls)p 846 3184 28 4 v 41 w(op)s(enpgp)p 1224
27720
 
3184 V 39 w(privk)m(ey)p 1556 3184 V 40 w(t)31 b Fe(pkey)12
 
27731
q(por)q(t_s)q(ubk)q(ey_r)q(sa_)q(raw)565 4343 y Fg(\()p
 
27732
Ff(gn)m(utls)p 846 4343 28 4 v 41 w(op)s(enpgp)p 1224
 
27733
4343 V 39 w(privk)m(ey)p 1556 4343 V 40 w(t)31 b Fe(pkey)12
27721
27734
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Ff(,)31 b(gn)m(utls)p
27722
 
2920 3184 V 40 w(datum)p 3218 3184 V 40 w(t)g(*)f Fe(m)12
27723
 
b Ff(,)565 3294 y(gn)m(utls)p 811 3294 V 41 w(datum)p
27724
 
1110 3294 V 39 w(t)31 b(*)g Fe(e)12 b Ff(,)30 b(gn)m(utls)p
27725
 
1650 3294 V 40 w(datum)p 1948 3294 V 40 w(t)h(*)f Fe(d)12
27726
 
b Ff(,)31 b(gn)m(utls)p 2489 3294 V 40 w(datum)p 2787
27727
 
3294 V 40 w(t)f(*)h Fe(p)12 b Ff(,)30 b(gn)m(utls)p 3327
27728
 
3294 V 41 w(datum)p 3626 3294 V 39 w(t)565 3404 y(*)h
27729
 
Fe(q)12 b Ff(,)30 b(gn)m(utls)p 1006 3404 V 41 w(datum)p
27730
 
1305 3404 V 39 w(t)h(*)g Fe(u)12 b Fg(\))390 3513 y Ff(pk)m(ey)c
27731
 
FB(:)41 b(Holds)30 b(the)h(certi\014cate)390 3674 y Ff(idx)6
27732
 
b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390 3835
 
27735
2920 4343 V 40 w(datum)p 3218 4343 V 40 w(t)g(*)f Fe(m)12
 
27736
b Ff(,)565 4452 y(gn)m(utls)p 811 4452 V 41 w(datum)p
 
27737
1110 4452 V 39 w(t)31 b(*)g Fe(e)12 b Ff(,)30 b(gn)m(utls)p
 
27738
1650 4452 V 40 w(datum)p 1948 4452 V 40 w(t)h(*)f Fe(d)12
 
27739
b Ff(,)31 b(gn)m(utls)p 2489 4452 V 40 w(datum)p 2787
 
27740
4452 V 40 w(t)f(*)h Fe(p)12 b Ff(,)30 b(gn)m(utls)p 3327
 
27741
4452 V 41 w(datum)p 3626 4452 V 39 w(t)565 4562 y(*)h
 
27742
Fe(q)12 b Ff(,)30 b(gn)m(utls)p 1006 4562 V 41 w(datum)p
 
27743
1305 4562 V 39 w(t)h(*)g Fe(u)12 b Fg(\))390 4672 y Ff(pk)m(ey)c
 
27744
FB(:)41 b(Holds)30 b(the)h(certi\014cate)390 4805 y Ff(idx)6
 
27745
b FB(:)41 b(Is)30 b(the)g(subk)m(ey)g(index)390 4939
27733
27746
y Ff(m)p FB(:)40 b(will)31 b(hold)f(the)h(mo)s(dulus)390
27734
 
3995 y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m
27735
 
(t)390 4156 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
27736
 
b(ate)31 b(exp)s(onen)m(t)390 4317 y Ff(p)s FB(:)40 b(will)31
27737
 
b(hold)f(the)g(\014rst)g(prime)g(\(p\))390 4478 y Ff(q)r
27738
 
FB(:)41 b(will)30 b(hold)g(the)h(second)f(prime)g(\(q\))390
27739
 
4639 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
27740
 
4799 y(This)e(function)g(will)i(exp)s(ort)e(the)h(RSA)f(priv)-5
27741
 
b(ate)30 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h
27742
 
(struc-)390 4909 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)
27743
 
g(allo)s(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g
27744
 
(stored)390 5018 y(in)30 b(the)h(appropriate)f(datum.)390
27745
 
5179 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
27746
 
b(success,)f(otherwise)h(an)f(error.)390 5340 y Fn(Since:)41
27747
 
b FB(2.4.0)p eop end
 
27747
5073 y Ff(e)5 b FB(:)41 b(will)31 b(hold)f(the)g(public)g(exp)s(onen)m
 
27748
(t)390 5206 y Ff(d)t FB(:)40 b(will)30 b(hold)g(the)h(priv)-5
 
27749
b(ate)31 b(exp)s(onen)m(t)390 5340 y Ff(p)s FB(:)40 b(will)31
 
27750
b(hold)f(the)g(\014rst)g(prime)g(\(p\))p eop end
27748
27751
%%Page: 246 252
27749
27752
TeXDict begin 246 251 bop 150 -116 a FB(Chapter)30 b(9:)41
27750
 
b(F)-8 b(unction)31 b(Reference)2237 b(246)150 299 y
27751
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27752
 
V 55 w(privk)m(ey)p 1446 299 V 54 w(exp)s(ort)3350 521
27753
 
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)
27754
 
q(por)q(t)e Fg(\()p Ff(gn)m(utls)p 2202 521 28 4 v 41
27755
 
w(op)s(enpgp)p 2580 521 V 39 w(privk)m(ey)p 2912 521
27756
 
V 40 w(t)565 631 y Fe(key)12 b Ff(,)31 b(gn)m(utls)p
27757
 
1035 631 V 41 w(op)s(enpgp)p 1413 631 V 38 w(crt)p 1562
27758
 
631 V 41 w(fm)m(t)p 1739 631 V 40 w(t)g Fe(format)12
27759
 
b Ff(,)32 b(const)f(c)m(har)f(*)h Fe(password)12 b Ff(,)33
27760
 
b(unsigned)c(in)m(t)565 740 y Fe(flags)12 b Ff(,)32 b(v)m(oid)f(*)f
27761
 
Fe(output_data)12 b Ff(,)34 b(size)p 1956 740 V 41 w(t)c(*)h
27762
 
Fe(output_data_size)12 b Fg(\))390 850 y Ff(k)m(ey)c
27763
 
FB(:)41 b(Holds)31 b(the)f(k)m(ey)-8 b(.)390 1010 y Ff(format)r
27764
 
FB(:)41 b(One)30 b(of)g(gn)m(utls)p 1264 1010 V 41 w(op)s(enpgp)p
27765
 
1642 1010 V 39 w(crt)p 1792 1010 V 40 w(fm)m(t)p 1968
27766
 
1010 V 40 w(t)h(elemen)m(ts.)390 1170 y Ff(passw)m(ord)t
27767
 
FB(:)40 b(the)30 b(passw)m(ord)g(that)h(will)g(b)s(e)e(used)h(to)h
27768
 
(encrypt)f(the)h(k)m(ey)-8 b(.)42 b(\(un)m(used)29 b(for)h(no)m(w\))390
27769
 
1330 y Ff(\015ags)t FB(:)41 b(zero)31 b(for)f(future)f(compatibilit)m
27770
 
(y)390 1490 y Ff(output)p 664 1490 V 40 w(data)p FB(:)41
27771
 
b(will)31 b(con)m(tain)h(the)e(k)m(ey)h(base64)h(enco)s(ded)e(or)g(ra)m
27772
 
(w)390 1650 y Ff(output)p 664 1650 V 40 w(data)p 880
27773
 
1650 V 40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
27774
 
2093 1650 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
27775
 
(actual)390 1759 y(size)c(of)g(parameters\))390 1919
 
27753
b(F)-8 b(unction)31 b(Reference)2237 b(246)390 299 y
 
27754
Ff(q)r FB(:)41 b(will)30 b(hold)g(the)h(second)f(prime)g(\(q\))390
 
27755
434 y Ff(u)p FB(:)40 b(will)31 b(hold)f(the)g(co)s(e\016cien)m(t)390
 
27756
568 y(This)e(function)g(will)i(exp)s(ort)e(the)h(RSA)f(priv)-5
 
27757
b(ate)30 b(k)m(ey's)f(parameters)g(found)f(in)g(the)h(giv)m(en)h
 
27758
(struc-)390 678 y(ture.)38 b(The)21 b(new)h(parameters)h(will)f(b)s(e)g
 
27759
(allo)s(cated)i(using)d Ft(gnutls_malloc\(\))d FB(and)k(will)g(b)s(e)g
 
27760
(stored)390 788 y(in)30 b(the)h(appropriate)f(datum.)390
 
27761
922 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26 b FB(on)31
 
27762
b(success,)f(otherwise)h(an)f(error.)390 1057 y Fn(Since:)41
 
27763
b FB(2.4.0)150 1257 y Fv(gn)m(utls)p 483 1257 37 5 v
 
27764
55 w(op)s(enpgp)p 991 1257 V 55 w(privk)m(ey)p 1446 1257
 
27765
V 54 w(exp)s(ort)3350 1454 y FB([F)-8 b(unction])-3599
 
27766
b Fh(int)53 b(gnutls_openpgp_privke)q(y_ex)q(por)q(t)e
 
27767
Fg(\()p Ff(gn)m(utls)p 2202 1454 28 4 v 41 w(op)s(enpgp)p
 
27768
2580 1454 V 39 w(privk)m(ey)p 2912 1454 V 40 w(t)565
 
27769
1564 y Fe(key)12 b Ff(,)31 b(gn)m(utls)p 1035 1564 V
 
27770
41 w(op)s(enpgp)p 1413 1564 V 38 w(crt)p 1562 1564 V
 
27771
41 w(fm)m(t)p 1739 1564 V 40 w(t)g Fe(format)12 b Ff(,)32
 
27772
b(const)f(c)m(har)f(*)h Fe(password)12 b Ff(,)33 b(unsigned)c(in)m(t)
 
27773
565 1673 y Fe(flags)12 b Ff(,)32 b(v)m(oid)f(*)f Fe(output_data)12
 
27774
b Ff(,)34 b(size)p 1956 1673 V 41 w(t)c(*)h Fe(output_data_size)12
 
27775
b Fg(\))390 1783 y Ff(k)m(ey)c FB(:)41 b(Holds)31 b(the)f(k)m(ey)-8
 
27776
b(.)390 1917 y Ff(format)r FB(:)41 b(One)30 b(of)g(gn)m(utls)p
 
27777
1264 1917 V 41 w(op)s(enpgp)p 1642 1917 V 39 w(crt)p
 
27778
1792 1917 V 40 w(fm)m(t)p 1968 1917 V 40 w(t)h(elemen)m(ts.)390
 
27779
2052 y Ff(passw)m(ord)t FB(:)40 b(the)30 b(passw)m(ord)g(that)h(will)g
 
27780
(b)s(e)e(used)h(to)h(encrypt)f(the)h(k)m(ey)-8 b(.)42
 
27781
b(\(un)m(used)29 b(for)h(no)m(w\))390 2187 y Ff(\015ags)t
 
27782
FB(:)41 b(zero)31 b(for)f(future)f(compatibilit)m(y)390
 
27783
2322 y Ff(output)p 664 2322 V 40 w(data)p FB(:)41 b(will)31
 
27784
b(con)m(tain)h(the)e(k)m(ey)h(base64)h(enco)s(ded)e(or)g(ra)m(w)390
 
27785
2457 y Ff(output)p 664 2457 V 40 w(data)p 880 2457 V
 
27786
40 w(size)5 b FB(:)49 b(holds)34 b(the)g(size)h(of)f(output)p
 
27787
2093 2457 V 39 w(data)h(\(and)f(will)g(b)s(e)f(replaced)i(b)m(y)e(the)i
 
27788
(actual)390 2566 y(size)c(of)g(parameters\))390 2701
27776
27789
y(This)91 b(function)h(will)g(con)m(v)m(ert)h(the)f(giv)m(en)h(k)m(ey)g
27777
 
(to)f(RA)-10 b(W)93 b(or)f(Base64)h(format.)390 2029
 
27790
(to)f(RA)-10 b(W)93 b(or)f(Base64)h(format.)390 2811
27778
27791
y(If)e(the)g(bu\013er)f(pro)m(vided)h(is)g(not)h(long)g(enough)f(to)h
27779
 
(hold)f(the)g(output,)106 b(then)390 2138 y(GNUTLS)p
27780
 
777 2138 V 40 w(E)p 879 2138 V 40 w(SHOR)-8 b(T)p 1234
27781
 
2138 V 39 w(MEMOR)g(Y)p 1699 2138 V 41 w(BUFFER)31 b(will)g(b)s(e)f
27782
 
(returned.)390 2298 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
 
27792
(hold)f(the)g(output,)106 b(then)390 2920 y(GNUTLS)p
 
27793
777 2920 V 40 w(E)p 879 2920 V 40 w(SHOR)-8 b(T)p 1234
 
27794
2920 V 39 w(MEMOR)g(Y)p 1699 2920 V 41 w(BUFFER)31 b(will)g(b)s(e)f
 
27795
(returned.)390 3055 y Fn(Returns:)40 b Ft(GNUTLS_E_SUCCESS)26
27783
27796
b FB(on)31 b(success,)f(or)h(an)f(error)g(co)s(de.)390
27784
 
2458 y Fn(Since:)41 b FB(2.4.0)150 2683 y Fv(gn)m(utls)p
27785
 
483 2683 37 5 v 55 w(op)s(enpgp)p 991 2683 V 55 w(privk)m(ey)p
27786
 
1446 2683 V 54 w(get)p 1665 2683 V 54 w(\014ngerprin)m(t)3350
27787
 
2905 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q
27788
 
(y_ge)q(t_f)q(ing)q(erp)q(rint)565 3015 y Fg(\()p Ff(gn)m(utls)p
27789
 
846 3015 28 4 v 41 w(op)s(enpgp)p 1224 3015 V 39 w(privk)m(ey)p
27790
 
1556 3015 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(v)m(oid)g(*)f
27791
 
Fe(fpr)12 b Ff(,)31 b(size)p 2523 3015 V 41 w(t)g(*)g
27792
 
Fe(fprlen)12 b Fg(\))390 3125 y Ff(k)m(ey)c FB(:)41 b(the)31
 
27797
3190 y Fn(Since:)41 b FB(2.4.0)150 3389 y Fv(gn)m(utls)p
 
27798
483 3389 37 5 v 55 w(op)s(enpgp)p 991 3389 V 55 w(privk)m(ey)p
 
27799
1446 3389 V 54 w(get)p 1665 3389 V 54 w(\014ngerprin)m(t)3350
 
27800
3587 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q
 
27801
(y_ge)q(t_f)q(ing)q(erp)q(rint)565 3696 y Fg(\()p Ff(gn)m(utls)p
 
27802
846 3696 28 4 v 41 w(op)s(enpgp)p 1224 3696 V 39 w(privk)m(ey)p
 
27803
1556 3696 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(v)m(oid)g(*)f
 
27804
Fe(fpr)12 b Ff(,)31 b(size)p 2523 3696 V 41 w(t)g(*)g
 
27805
Fe(fprlen)12 b Fg(\))390 3806 y Ff(k)m(ey)c FB(:)41 b(the)31
27793
27806
b(ra)m(w)f(data)h(that)g(con)m(tains)h(the)f(Op)s(enPGP)e(secret)i(k)m
27794
 
(ey)-8 b(.)390 3285 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)
 
27807
(ey)-8 b(.)390 3941 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)
27795
27808
m(v)m(e)h(the)f(\014ngerprin)m(t,)e(m)m(ust)i(hold)f(at)h(least)g(20)h
27796
 
(b)m(ytes.)390 3444 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f
 
27809
(b)m(ytes.)390 4075 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f
27797
27810
(sa)m(v)m(e)h(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390
27798
 
3604 y(Get)i(the)f(\014ngerprin)m(t)f(of)h(the)g(Op)s(enPGP)e(k)m(ey)-8
 
27811
4210 y(Get)i(the)f(\014ngerprin)m(t)f(of)h(the)g(Op)s(enPGP)e(k)m(ey)-8
27799
27812
b(.)46 b(Dep)s(ends)31 b(on)h(the)f(algorithm,)j(the)e(\014ngerprin)m
27800
 
(t)390 3714 y(can)f(b)s(e)e(16)j(or)e(20)h(b)m(ytes.)390
27801
 
3874 y Fn(Returns:)40 b FB(On)30 b(success,)h(0)g(is)f(returned,)f(or)i
27802
 
(an)f(error)g(co)s(de.)390 4034 y Fn(Since:)41 b FB(2.4.0)150
27803
 
4259 y Fv(gn)m(utls)p 483 4259 37 5 v 55 w(op)s(enpgp)p
27804
 
991 4259 V 55 w(privk)m(ey)p 1446 4259 V 54 w(get)p 1665
27805
 
4259 V 54 w(k)m(ey)p 1902 4259 V 53 w(id)3350 4481 y
 
27813
(t)390 4320 y(can)f(b)s(e)e(16)j(or)e(20)h(b)m(ytes.)390
 
27814
4455 y Fn(Returns:)40 b FB(On)30 b(success,)h(0)g(is)f(returned,)f(or)i
 
27815
(an)f(error)g(co)s(de.)390 4589 y Fn(Since:)41 b FB(2.4.0)150
 
27816
4789 y Fv(gn)m(utls)p 483 4789 37 5 v 55 w(op)s(enpgp)p
 
27817
991 4789 V 55 w(privk)m(ey)p 1446 4789 V 54 w(get)p 1665
 
27818
4789 V 54 w(k)m(ey)p 1902 4789 V 53 w(id)3350 4986 y
27806
27819
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ge)q
27807
 
(t_k)q(ey_)q(id)f Fg(\()p Ff(gn)m(utls)p 2412 4481 28
27808
 
4 v 40 w(op)s(enpgp)p 2789 4481 V 39 w(privk)m(ey)p 3121
27809
 
4481 V 40 w(t)565 4591 y Fe(key)12 b Ff(,)31 b(gn)m(utls)p
27810
 
1035 4591 V 41 w(op)s(enpgp)p 1413 4591 V 38 w(k)m(eyid)p
27811
 
1660 4591 V 41 w(t)g Fe(keyid)12 b Fg(\))390 4700 y Ff(k)m(ey)c
 
27820
(t_k)q(ey_)q(id)f Fg(\()p Ff(gn)m(utls)p 2412 4986 28
 
27821
4 v 40 w(op)s(enpgp)p 2789 4986 V 39 w(privk)m(ey)p 3121
 
27822
4986 V 40 w(t)565 5096 y Fe(key)12 b Ff(,)31 b(gn)m(utls)p
 
27823
1035 5096 V 41 w(op)s(enpgp)p 1413 5096 V 38 w(k)m(eyid)p
 
27824
1660 5096 V 41 w(t)g Fe(keyid)12 b Fg(\))390 5205 y Ff(k)m(ey)c
27812
27825
FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e
27813
 
(secret)i(k)m(ey)-8 b(.)390 4860 y Ff(k)m(eyid)t FB(:)41
27814
 
b(the)30 b(bu\013er)g(to)h(sa)m(v)m(e)h(the)e(k)m(eyid.)390
27815
 
5020 y(Get)h(k)m(ey-id.)390 5180 y Fn(Returns:)40 b FB(the)31
27816
 
b(64-bit)h(k)m(eyID)f(of)g(the)f(Op)s(enPGP)f(k)m(ey)-8
27817
 
b(.)390 5340 y Fn(Since:)41 b FB(2.4.0)p eop end
 
27826
(secret)i(k)m(ey)-8 b(.)390 5340 y Ff(k)m(eyid)t FB(:)41
 
27827
b(the)30 b(bu\013er)g(to)h(sa)m(v)m(e)h(the)e(k)m(eyid.)p
 
27828
eop end
27818
27829
%%Page: 247 253
27819
27830
TeXDict begin 247 252 bop 150 -116 a FB(Chapter)30 b(9:)41
27820
 
b(F)-8 b(unction)31 b(Reference)2237 b(247)150 299 y
27821
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27822
 
V 55 w(privk)m(ey)p 1446 299 V 54 w(get)p 1665 299 V
27823
 
54 w(pk)p 1852 299 V 54 w(algorithm)3350 502 y FB([F)-8
27824
 
b(unction])-3599 b Fh(gnutls_pk_algorithm_t)565 611 y
27825
 
(gnutls_openpgp_privkey)q(_ge)q(t_p)q(k_a)q(lgor)q(ith)q(m)51
27826
 
b Fg(\()p Ff(gn)m(utls)p 2931 611 28 4 v 41 w(op)s(enpgp)p
27827
 
3309 611 V 39 w(privk)m(ey)p 3641 611 V 40 w(t)565 721
27828
 
y Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i(*)g Fe(bits)12
27829
 
b Fg(\))390 831 y Ff(k)m(ey)c FB(:)41 b(is)31 b(an)f(Op)s(enPGP)f(k)m
27830
 
(ey)390 971 y Ff(bits)t FB(:)40 b(if)31 b(bits)f(is)g(non)g(n)m(ull)g
27831
 
(it)h(will)g(hold)f(the)h(size)g(of)f(the)h(parameters')g(in)f(bits)390
27832
 
1112 y(This)g(function)g(will)g(return)g(the)g(public)g(k)m(ey)h
27833
 
(algorithm)g(of)g(an)f(Op)s(enPGP)f(certi\014cate.)390
27834
 
1253 y(If)g(bits)g(is)g(non)g(n)m(ull,)g(it)h(should)e(ha)m(v)m(e)i
27835
 
(enough)f(size)h(to)g(hold)f(the)h(parameters)f(size)h(in)f(bits.)40
27836
 
b(F)-8 b(or)390 1362 y(RSA)33 b(the)h(bits)f(returned)f(is)i(the)f(mo)s
27837
 
(dulus.)49 b(F)-8 b(or)34 b(DSA)f(the)h(bits)f(returned)f(are)i(of)g
27838
 
(the)g(public)390 1472 y(exp)s(onen)m(t.)390 1612 y Fn(Returns:)61
27839
 
b FB(a)40 b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
27840
 
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 1722
27841
 
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)390 1863
27842
 
y Fn(Since:)41 b FB(2.4.0)150 2068 y Fv(gn)m(utls)p 483
27843
 
2068 37 5 v 55 w(op)s(enpgp)p 991 2068 V 55 w(privk)m(ey)p
27844
 
1446 2068 V 54 w(get)p 1665 2068 V 54 w(preferred)p 2210
27845
 
2068 V 55 w(k)m(ey)p 2448 2068 V 53 w(id)3350 2271 y
 
27831
b(F)-8 b(unction)31 b(Reference)2237 b(247)390 299 y(Get)31
 
27832
b(k)m(ey-id.)390 431 y Fn(Returns:)40 b FB(the)31 b(64-bit)h(k)m(eyID)f
 
27833
(of)g(the)f(Op)s(enPGP)f(k)m(ey)-8 b(.)390 563 y Fn(Since:)41
 
27834
b FB(2.4.0)150 758 y Fv(gn)m(utls)p 483 758 37 5 v 55
 
27835
w(op)s(enpgp)p 991 758 V 55 w(privk)m(ey)p 1446 758 V
 
27836
54 w(get)p 1665 758 V 54 w(pk)p 1852 758 V 54 w(algorithm)3350
 
27837
950 y FB([F)-8 b(unction])-3599 b Fh(gnutls_pk_algorithm_t)565
 
27838
1060 y(gnutls_openpgp_privkey)q(_ge)q(t_p)q(k_a)q(lgor)q(ith)q(m)51
 
27839
b Fg(\()p Ff(gn)m(utls)p 2931 1060 28 4 v 41 w(op)s(enpgp)p
 
27840
3309 1060 V 39 w(privk)m(ey)p 3641 1060 V 40 w(t)565
 
27841
1169 y Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i(*)g
 
27842
Fe(bits)12 b Fg(\))390 1279 y Ff(k)m(ey)c FB(:)41 b(is)31
 
27843
b(an)f(Op)s(enPGP)f(k)m(ey)390 1411 y Ff(bits)t FB(:)40
 
27844
b(if)31 b(bits)f(is)g(non)g(n)m(ull)g(it)h(will)g(hold)f(the)h(size)g
 
27845
(of)f(the)h(parameters')g(in)f(bits)390 1543 y(This)g(function)g(will)g
 
27846
(return)g(the)g(public)g(k)m(ey)h(algorithm)g(of)g(an)f(Op)s(enPGP)f
 
27847
(certi\014cate.)390 1675 y(If)g(bits)g(is)g(non)g(n)m(ull,)g(it)h
 
27848
(should)e(ha)m(v)m(e)i(enough)f(size)h(to)g(hold)f(the)h(parameters)f
 
27849
(size)h(in)f(bits.)40 b(F)-8 b(or)390 1785 y(RSA)33 b(the)h(bits)f
 
27850
(returned)f(is)i(the)f(mo)s(dulus.)49 b(F)-8 b(or)34
 
27851
b(DSA)f(the)h(bits)f(returned)f(are)i(of)g(the)g(public)390
 
27852
1894 y(exp)s(onen)m(t.)390 2027 y Fn(Returns:)61 b FB(a)40
 
27853
b(mem)m(b)s(er)g(of)h(the)g Ft(gnutls_pk_algorithm_t)34
 
27854
b FB(en)m(umeration)41 b(on)g(success,)i(or)e(a)390 2136
 
27855
y(negativ)m(e)33 b(v)-5 b(alue)30 b(on)h(error.)390 2268
 
27856
y Fn(Since:)41 b FB(2.4.0)150 2463 y Fv(gn)m(utls)p 483
 
27857
2463 37 5 v 55 w(op)s(enpgp)p 991 2463 V 55 w(privk)m(ey)p
 
27858
1446 2463 V 54 w(get)p 1665 2463 V 54 w(preferred)p 2210
 
27859
2463 V 55 w(k)m(ey)p 2448 2463 V 53 w(id)3350 2655 y
27846
27860
FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ge)q
27847
 
(t_p)q(ref)q(err)q(ed_k)q(ey_)q(id)565 2381 y Fg(\()p
27848
 
Ff(gn)m(utls)p 846 2381 28 4 v 41 w(op)s(enpgp)p 1224
27849
 
2381 V 39 w(privk)m(ey)p 1556 2381 V 40 w(t)31 b Fe(key)12
27850
 
b Ff(,)31 b(gn)m(utls)p 2126 2381 V 40 w(op)s(enpgp)p
27851
 
2503 2381 V 39 w(k)m(eyid)p 2751 2381 V 40 w(t)g Fe(keyid)12
27852
 
b Fg(\))390 2490 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
 
27861
(t_p)q(ref)q(err)q(ed_k)q(ey_)q(id)565 2765 y Fg(\()p
 
27862
Ff(gn)m(utls)p 846 2765 28 4 v 41 w(op)s(enpgp)p 1224
 
27863
2765 V 39 w(privk)m(ey)p 1556 2765 V 40 w(t)31 b Fe(key)12
 
27864
b Ff(,)31 b(gn)m(utls)p 2126 2765 V 40 w(op)s(enpgp)p
 
27865
2503 2765 V 39 w(k)m(eyid)p 2751 2765 V 40 w(t)g Fe(keyid)12
 
27866
b Fg(\))390 2874 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27853
27867
(con)m(tains)g(the)g(Op)s(enPGP)e(public)h(k)m(ey)-8
27854
 
b(.)390 2631 y Ff(k)m(eyid)t FB(:)41 b(the)30 b(struct)h(to)g(sa)m(v)m
27855
 
(e)h(the)e(k)m(eyid.)390 2772 y(Get)h(the)g(preferred)e(k)m(ey-id)i
27856
 
(for)f(the)h(k)m(ey)-8 b(.)390 2912 y Fn(Returns:)45
 
27868
b(.)390 3006 y Ff(k)m(eyid)t FB(:)41 b(the)30 b(struct)h(to)g(sa)m(v)m
 
27869
(e)h(the)e(k)m(eyid.)390 3139 y(Get)h(the)g(preferred)e(k)m(ey-id)i
 
27870
(for)f(the)h(k)m(ey)-8 b(.)390 3271 y Fn(Returns:)45
27857
27871
b FB(the)34 b(64-bit)g(preferred)d(k)m(eyID)j(of)f(the)g(Op)s(enPGP)f
27858
27872
(k)m(ey)-8 b(,)35 b(or)e(if)g(it)g(hasn't)g(b)s(een)f(set)h(it)390
27859
 
3022 y(returns)c Ft(GNUTLS_E_INVALID_REQUEST)p FB(.)150
27860
 
3227 y Fv(gn)m(utls)p 483 3227 37 5 v 55 w(op)s(enpgp)p
27861
 
991 3227 V 55 w(privk)m(ey)p 1446 3227 V 54 w(get)p 1665
27862
 
3227 V 54 w(rev)m(ok)m(ed)p 2134 3227 V 53 w(status)3350
27863
 
3430 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q
27864
 
(y_ge)q(t_r)q(evo)q(ked)q(_sta)q(tus)565 3540 y Fg(\()p
27865
 
Ff(gn)m(utls)p 846 3540 28 4 v 41 w(op)s(enpgp)p 1224
27866
 
3540 V 39 w(privk)m(ey)p 1556 3540 V 40 w(t)31 b Fe(key)12
27867
 
b Fg(\))390 3649 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
 
27873
3380 y(returns)c Ft(GNUTLS_E_INVALID_REQUEST)p FB(.)150
 
27874
3575 y Fv(gn)m(utls)p 483 3575 37 5 v 55 w(op)s(enpgp)p
 
27875
991 3575 V 55 w(privk)m(ey)p 1446 3575 V 54 w(get)p 1665
 
27876
3575 V 54 w(rev)m(ok)m(ed)p 2134 3575 V 53 w(status)3350
 
27877
3767 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q
 
27878
(y_ge)q(t_r)q(evo)q(ked)q(_sta)q(tus)565 3877 y Fg(\()p
 
27879
Ff(gn)m(utls)p 846 3877 28 4 v 41 w(op)s(enpgp)p 1224
 
27880
3877 V 39 w(privk)m(ey)p 1556 3877 V 40 w(t)31 b Fe(key)12
 
27881
b Fg(\))390 3986 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h
27868
27882
(con)m(tains)g(the)g(Op)s(enPGP)e(priv)-5 b(ate)31 b(k)m(ey)-8
27869
 
b(.)390 3790 y(Get)31 b(rev)m(o)s(cation)i(status)d(of)h(k)m(ey)-8
27870
 
b(.)390 3931 y Fn(Returns:)40 b FB(true)30 b(\(1\))h(if)f(the)g(k)m(ey)
 
27883
b(.)390 4118 y(Get)31 b(rev)m(o)s(cation)i(status)d(of)h(k)m(ey)-8
 
27884
b(.)390 4251 y Fn(Returns:)40 b FB(true)30 b(\(1\))h(if)f(the)g(k)m(ey)
27871
27885
g(has)g(b)s(een)f(rev)m(ok)m(ed,)j(or)e(false)g(\(0\))h(if)f(it)g(has)g
27872
 
(not,)h(or)e(a)i(negativ)m(e)390 4040 y(v)-5 b(alue)31
27873
 
b(indicates)g(an)f(error.)390 4181 y Fn(Since:)41 b FB(2.4.0)150
27874
 
4386 y Fv(gn)m(utls)p 483 4386 37 5 v 55 w(op)s(enpgp)p
27875
 
991 4386 V 55 w(privk)m(ey)p 1446 4386 V 54 w(get)p 1665
27876
 
4386 V 54 w(subk)m(ey)p 2086 4386 V 54 w(coun)m(t)3350
27877
 
4589 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q
27878
 
(y_ge)q(t_s)q(ubk)q(ey_)q(coun)q(t)565 4699 y Fg(\()p
27879
 
Ff(gn)m(utls)p 846 4699 28 4 v 41 w(op)s(enpgp)p 1224
27880
 
4699 V 39 w(privk)m(ey)p 1556 4699 V 40 w(t)31 b Fe(key)12
27881
 
b Fg(\))390 4808 y Ff(k)m(ey)c FB(:)41 b(is)31 b(an)f(Op)s(enPGP)f(k)m
27882
 
(ey)390 4949 y(This)i(function)g(will)h(return)e(the)i(n)m(um)m(b)s(er)
 
27886
(not,)h(or)e(a)i(negativ)m(e)390 4360 y(v)-5 b(alue)31
 
27887
b(indicates)g(an)f(error.)390 4492 y Fn(Since:)41 b FB(2.4.0)150
 
27888
4687 y Fv(gn)m(utls)p 483 4687 37 5 v 55 w(op)s(enpgp)p
 
27889
991 4687 V 55 w(privk)m(ey)p 1446 4687 V 54 w(get)p 1665
 
27890
4687 V 54 w(subk)m(ey)p 2086 4687 V 54 w(coun)m(t)3350
 
27891
4879 y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q
 
27892
(y_ge)q(t_s)q(ubk)q(ey_)q(coun)q(t)565 4989 y Fg(\()p
 
27893
Ff(gn)m(utls)p 846 4989 28 4 v 41 w(op)s(enpgp)p 1224
 
27894
4989 V 39 w(privk)m(ey)p 1556 4989 V 40 w(t)31 b Fe(key)12
 
27895
b Fg(\))390 5098 y Ff(k)m(ey)c FB(:)41 b(is)31 b(an)f(Op)s(enPGP)f(k)m
 
27896
(ey)390 5230 y(This)i(function)g(will)h(return)e(the)i(n)m(um)m(b)s(er)
27883
27897
e(of)i(subk)m(eys)f(presen)m(t)h(in)f(the)h(giv)m(en)g(Op)s(enPGP)e
27884
 
(cer-)390 5059 y(ti\014cate.)390 5199 y Fn(Returns:)40
27885
 
b FB(the)31 b(n)m(um)m(b)s(er)e(of)i(subk)m(eys,)f(or)g(a)h(negativ)m
27886
 
(e)h(v)-5 b(alue)31 b(on)f(error.)390 5340 y Fn(Since:)41
27887
 
b FB(2.4.0)p eop end
 
27898
(cer-)390 5340 y(ti\014cate.)p eop end
27888
27899
%%Page: 248 254
27889
27900
TeXDict begin 248 253 bop 150 -116 a FB(Chapter)30 b(9:)41
27890
 
b(F)-8 b(unction)31 b(Reference)2237 b(248)150 299 y
27891
 
Fv(gn)m(utls)p 483 299 37 5 v 55 w(op)s(enpgp)p 991 299
27892
 
V 55 w(privk)m(ey)p 1446 299 V 54 w(get)p 1665 299 V
27893
 
54 w(subk)m(ey)p 2086 299 V 54 w(creation)p 2572 299
27894
 
V 53 w(time)3350 501 y FB([F)-8 b(unction])-3599 b Fh(time_t)54
27895
 
b(gnutls_openpgp_privkey)q(_ge)q(t_s)q(ubk)q(ey_c)q(rea)q(tio)q(n_ti)q
27896
 
(me)565 611 y Fg(\()p Ff(gn)m(utls)p 846 611 28 4 v 41
27897
 
w(op)s(enpgp)p 1224 611 V 39 w(privk)m(ey)p 1556 611
27898
 
V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27899
 
Fe(idx)12 b Fg(\))390 720 y Ff(k)m(ey)c FB(:)41 b(the)31
 
27901
b(F)-8 b(unction)31 b(Reference)2237 b(248)390 299 y
 
27902
Fn(Returns:)40 b FB(the)31 b(n)m(um)m(b)s(er)e(of)i(subk)m(eys,)f(or)g
 
27903
(a)h(negativ)m(e)h(v)-5 b(alue)31 b(on)f(error.)390 428
 
27904
y Fn(Since:)41 b FB(2.4.0)150 616 y Fv(gn)m(utls)p 483
 
27905
616 37 5 v 55 w(op)s(enpgp)p 991 616 V 55 w(privk)m(ey)p
 
27906
1446 616 V 54 w(get)p 1665 616 V 54 w(subk)m(ey)p 2086
 
27907
616 V 54 w(creation)p 2572 616 V 53 w(time)3350 802 y
 
27908
FB([F)-8 b(unction])-3599 b Fh(time_t)54 b(gnutls_openpgp_privkey)q
 
27909
(_ge)q(t_s)q(ubk)q(ey_c)q(rea)q(tio)q(n_ti)q(me)565 911
 
27910
y Fg(\()p Ff(gn)m(utls)p 846 911 28 4 v 41 w(op)s(enpgp)p
 
27911
1224 911 V 39 w(privk)m(ey)p 1556 911 V 40 w(t)31 b Fe(key)12
 
27912
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Fg(\))390
 
27913
1021 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g
 
27914
(the)g(Op)s(enPGP)e(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390
 
27915
1150 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
 
27916
1279 y(Get)h(subk)m(ey)f(creation)i(time.)390 1408 y
 
27917
Fn(Returns:)40 b FB(the)31 b(timestamp)g(when)e(the)i(Op)s(enPGP)e(k)m
 
27918
(ey)i(w)m(as)g(created.)390 1537 y Fn(Since:)41 b FB(2.4.0)150
 
27919
1725 y Fv(gn)m(utls)p 483 1725 37 5 v 55 w(op)s(enpgp)p
 
27920
991 1725 V 55 w(privk)m(ey)p 1446 1725 V 54 w(get)p 1665
 
27921
1725 V 54 w(subk)m(ey)p 2086 1725 V 54 w(expiration)p
 
27922
2684 1725 V 54 w(time)3350 1910 y FB([F)-8 b(unction])-3599
 
27923
b Fh(time_t)54 b(gnutls_openpgp_privkey)q(_ge)q(t_s)q(ubk)q(ey_e)q(xpi)
 
27924
q(rat)q(ion_)q(tim)q(e)565 2020 y Fg(\()p Ff(gn)m(utls)p
 
27925
846 2020 28 4 v 41 w(op)s(enpgp)p 1224 2020 V 39 w(privk)m(ey)p
 
27926
1556 2020 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
27927
Fe(idx)12 b Fg(\))390 2130 y Ff(k)m(ey)c FB(:)41 b(the)31
27900
27928
b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e(priv)-5
27901
 
b(ate)31 b(k)m(ey)-8 b(.)390 860 y Ff(idx)6 b FB(:)41
27902
 
b(the)30 b(subk)m(ey)g(index)390 1001 y(Get)h(subk)m(ey)f(creation)i
27903
 
(time.)390 1141 y Fn(Returns:)40 b FB(the)31 b(timestamp)g(when)e(the)i
27904
 
(Op)s(enPGP)e(k)m(ey)i(w)m(as)g(created.)390 1281 y Fn(Since:)41
27905
 
b FB(2.4.0)150 1486 y Fv(gn)m(utls)p 483 1486 37 5 v
27906
 
55 w(op)s(enpgp)p 991 1486 V 55 w(privk)m(ey)p 1446 1486
27907
 
V 54 w(get)p 1665 1486 V 54 w(subk)m(ey)p 2086 1486 V
27908
 
54 w(expiration)p 2684 1486 V 54 w(time)3350 1688 y FB([F)-8
27909
 
b(unction])-3599 b Fh(time_t)54 b(gnutls_openpgp_privkey)q(_ge)q(t_s)q
27910
 
(ubk)q(ey_e)q(xpi)q(rat)q(ion_)q(tim)q(e)565 1797 y Fg(\()p
27911
 
Ff(gn)m(utls)p 846 1797 28 4 v 41 w(op)s(enpgp)p 1224
27912
 
1797 V 39 w(privk)m(ey)p 1556 1797 V 40 w(t)31 b Fe(key)12
27913
 
b Ff(,)31 b(unsigned)e(in)m(t)i Fe(idx)12 b Fg(\))390
27914
 
1907 y Ff(k)m(ey)c FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g
27915
 
(the)g(Op)s(enPGP)e(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390
27916
 
2047 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
27917
 
2187 y(Get)h(subk)m(ey)f(expiration)h(time.)42 b(A)30
27918
 
b(v)-5 b(alue)31 b(of)g('0')g(means)f(that)h(the)g(k)m(ey)g(do)s(esn't)
27919
 
f(expire)h(at)g(all.)390 2327 y Fn(Returns:)40 b FB(the)31
27920
 
b(time)g(when)e(the)i(Op)s(enPGP)e(k)m(ey)i(expires.)390
27921
 
2467 y Fn(Since:)41 b FB(2.4.0)150 2672 y Fv(gn)m(utls)p
27922
 
483 2672 37 5 v 55 w(op)s(enpgp)p 991 2672 V 55 w(privk)m(ey)p
27923
 
1446 2672 V 54 w(get)p 1665 2672 V 54 w(subk)m(ey)p 2086
27924
 
2672 V 54 w(\014ngerprin)m(t)3350 2875 y FB([F)-8 b(unction])-3599
 
27929
b(ate)31 b(k)m(ey)-8 b(.)390 2259 y Ff(idx)6 b FB(:)41
 
27930
b(the)30 b(subk)m(ey)g(index)390 2387 y(Get)h(subk)m(ey)f(expiration)h
 
27931
(time.)42 b(A)30 b(v)-5 b(alue)31 b(of)g('0')g(means)f(that)h(the)g(k)m
 
27932
(ey)g(do)s(esn't)f(expire)h(at)g(all.)390 2516 y Fn(Returns:)40
 
27933
b FB(the)31 b(time)g(when)e(the)i(Op)s(enPGP)e(k)m(ey)i(expires.)390
 
27934
2645 y Fn(Since:)41 b FB(2.4.0)150 2834 y Fv(gn)m(utls)p
 
27935
483 2834 37 5 v 55 w(op)s(enpgp)p 991 2834 V 55 w(privk)m(ey)p
 
27936
1446 2834 V 54 w(get)p 1665 2834 V 54 w(subk)m(ey)p 2086
 
27937
2834 V 54 w(\014ngerprin)m(t)3350 3019 y FB([F)-8 b(unction])-3599
27925
27938
b Fh(int)53 b(gnutls_openpgp_privke)q(y_ge)q(t_s)q(ubk)q(ey_)q(fing)q
27926
 
(erp)q(rin)q(t)565 2984 y Fg(\()p Ff(gn)m(utls)p 846
27927
 
2984 28 4 v 41 w(op)s(enpgp)p 1224 2984 V 39 w(privk)m(ey)p
27928
 
1556 2984 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
 
27939
(erp)q(rin)q(t)565 3129 y Fg(\()p Ff(gn)m(utls)p 846
 
27940
3129 28 4 v 41 w(op)s(enpgp)p 1224 3129 V 39 w(privk)m(ey)p
 
27941
1556 3129 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(unsigned)e(in)m(t)i
27929
27942
Fe(idx)12 b Ff(,)31 b(v)m(oid)g(*)f Fe(fpr)12 b Ff(,)31
27930
 
b(size)p 3265 2984 V 41 w(t)g(*)565 3094 y Fe(fprlen)12
27931
 
b Fg(\))390 3203 y Ff(k)m(ey)c FB(:)41 b(the)31 b(ra)m(w)f(data)h(that)
 
27943
b(size)p 3265 3129 V 41 w(t)g(*)565 3238 y Fe(fprlen)12
 
27944
b Fg(\))390 3348 y Ff(k)m(ey)c FB(:)41 b(the)31 b(ra)m(w)f(data)h(that)
27932
27945
g(con)m(tains)h(the)f(Op)s(enPGP)e(secret)i(k)m(ey)-8
27933
 
b(.)390 3343 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
27934
 
3483 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)m(v)m(e)h(the)f
 
27946
b(.)390 3477 y Ff(idx)6 b FB(:)41 b(the)30 b(subk)m(ey)g(index)390
 
27947
3606 y Ff(fpr)7 b FB(:)39 b(the)31 b(bu\013er)e(to)i(sa)m(v)m(e)h(the)f
27935
27948
(\014ngerprin)m(t,)e(m)m(ust)i(hold)f(at)h(least)g(20)h(b)m(ytes.)390
27936
 
3624 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f(sa)m(v)m(e)h
27937
 
(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390 3764
 
27949
3735 y Ff(fprlen)p FB(:)40 b(the)30 b(in)m(teger)i(to)f(sa)m(v)m(e)h
 
27950
(the)f(length)f(of)h(the)g(\014ngerprin)m(t.)390 3864
27938
27951
y(Get)24 b(the)e(\014ngerprin)m(t)g(of)h(an)f(Op)s(enPGP)g(subk)m(ey)-8
27939
27952
b(.)38 b(Dep)s(ends)21 b(on)i(the)g(algorithm,)i(the)e(\014ngerprin)m
27940
 
(t)390 3873 y(can)31 b(b)s(e)e(16)j(or)e(20)h(b)m(ytes.)390
27941
 
4013 y Fn(Returns:)40 b FB(On)30 b(success,)h(0)g(is)f(returned,)f(or)i
27942
 
(an)f(error)g(co)s(de.)390 4153 y Fn(Since:)41 b FB(2.4.0)150
27943
 
4358 y Fv(gn)m(utls)p 483 4358 37 5 v 55 w(op)s(enpgp)p
27944
 
991 4358 V 55 w(privk)m(ey)p 1446 4358 V 54 w(get)p 1665
27945
 
4358 V 54 w(subk)m(ey)p 2086 4358 V 54 w(idx)3350 4560
 
27953
(t)390 3973 y(can)31 b(b)s(e)e(16)j(or)e(20)h(b)m(ytes.)390
 
27954
4102 y Fn(Returns:)40 b FB(On)30 b(success,)h(0)g(is)f(returned,)f(or)i
 
27955
(an)f(error)g(co)s(de.)390 4231 y Fn(Since:)41 b FB(2.4.0)150
 
27956
4419 y Fv(gn)m(utls)p 483 4419 37 5 v 55 w(op)s(enpgp)p
 
27957
991 4419 V 55 w(privk)m(ey)p 1446 4419 V 54 w(get)p 1665
 
27958
4419 V 54 w(subk)m(ey)p 2086 4419 V 54 w(idx)3350 4605
27946
27959
y FB([F)-8 b(unction])-3599 b Fh(int)53 b(gnutls_openpgp_privke)q(y_ge)
27947
 
q(t_s)q(ubk)q(ey_)q(idx)565 4670 y Fg(\()p Ff(gn)m(utls)p
27948
 
846 4670 28 4 v 41 w(op)s(enpgp)p 1224 4670 V 39 w(privk)m(ey)p
27949
 
1556 4670 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(const)f(gn)m(utls)p
27950
 
2363 4670 V 41 w(op)s(enpgp)p 2741 4670 V 39 w(k)m(eyid)p
27951
 
2989 4670 V 40 w(t)h Fe(keyid)12 b Fg(\))390 4780 y Ff(k)m(ey)c
 
27960
q(t_s)q(ubk)q(ey_)q(idx)565 4715 y Fg(\()p Ff(gn)m(utls)p
 
27961
846 4715 28 4 v 41 w(op)s(enpgp)p 1224 4715 V 39 w(privk)m(ey)p
 
27962
1556 4715 V 40 w(t)31 b Fe(key)12 b Ff(,)31 b(const)f(gn)m(utls)p
 
27963
2363 4715 V 41 w(op)s(enpgp)p 2741 4715 V 39 w(k)m(eyid)p
 
27964
2989 4715 V 40 w(t)h Fe(keyid)12 b Fg(\))390 4824 y Ff(k)m(ey)c
27952
27965
FB(:)41 b(the)31 b(structure)f(that)h(con)m(tains)g(the)g(Op)s(enPGP)e
27953
 
(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 4920 y Ff(k)m(eyid)t
27954
 
FB(:)41 b(the)30 b(k)m(eyid.)390 5060 y(Get)h(index)f(of)h(subk)m(ey)-8
27955
 
b(.)390 5200 y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(subk)m
 
27966
(priv)-5 b(ate)31 b(k)m(ey)-8 b(.)390 4953 y Ff(k)m(eyid)t
 
27967
FB(:)41 b(the)30 b(k)m(eyid.)390 5082 y(Get)h(index)f(of)h(subk)m(ey)-8
 
27968
b(.)390 5211 y Fn(Returns:)40 b FB(the)31 b(index)f(of)g(the)h(subk)m
27956
27969
(ey)f(or)g(a)h(negativ)m(e)i(error)d(v)-5 b(alue.)390
27957
27970
5340 y Fn(Since:)41 b FB(2.4.0)p eop end
27958
27971
%%Page: 249 255
28121
28134
FB('.)61 b(Y)-8 b(ou)39 b(need)f(to)h(link)f(with)g(`)p
28122
28135
Ft(libgnutls-extra)p FB(')d(to)k(b)s(e)f(able)g(to)h(use)f(these)150
28123
28136
677 y(functions)30 b(\(see)h(Section)g(9.3)h([Gn)m(uTLS-extra)e
28124
 
(functions],)h(page)g(231\).)150 824 y(The)d(t)m(ypical)i(con)m(trol)g
 
28137
(functions],)h(page)g(232\).)150 824 y(The)d(t)m(ypical)i(con)m(trol)g
28125
28138
(\015o)m(w)f(in)f(an)h(TLS/IA)f(clien)m(t)i(\(that)f(w)m(ould)g(not)g
28126
28139
(require)f(an)g(Application)i(Phase)150 934 y(for)g(resumed)f
28127
28140
(sessions\))i(w)m(ould)f(b)s(e)g(similar)h(to)g(the)f(follo)m(wing:)390
155409
155422
b(page)f(135)h(T)-8 b(o)31 b(o)m(v)m(erride)g(the)g(digest)g
155410
155423
(algorithms)g(bac)m(k)m(end.)225 2859 y Fs(\017)60 b
155411
155424
FB([gn)m(utls)p 601 2859 V 41 w(crypto)p 897 2859 V 40
155412
 
w(rnd)p 1075 2859 V 39 w(register2],)25 b(page)e(136)g(T)-8
 
155425
w(rnd)p 1075 2859 V 39 w(register2],)25 b(page)e(137)g(T)-8
155413
155426
b(o)22 b(o)m(v)m(erride)h(the)f(random)f(n)m(um)m(b)s(er)g(generator)i
155414
155427
(bac)m(k-)330 2969 y(end.)225 3103 y Fs(\017)60 b FB([gn)m(utls)p
155415
155428
601 3103 V 41 w(crypto)p 897 3103 V 40 w(bigin)m(t)p
155416
 
1166 3103 V 41 w(register2],)39 b(page)d(134)h(T)-8 b(o)36
 
155429
1166 3103 V 41 w(register2],)39 b(page)d(135)h(T)-8 b(o)36
155417
155430
b(o)m(v)m(erride)h(the)f(big)g(n)m(um)m(b)s(er)e(n)m(um)m(b)s(er)h(op)s
155418
155431
(era-)330 3213 y(tions)c(bac)m(k)m(end.)225 3347 y Fs(\017)60
155419
155432
b FB([gn)m(utls)p 601 3347 V 41 w(crypto)p 897 3347 V
157881
157894
b Fp(121)2025 1836 y Fq(gnutls_certificate_free_creden)q(tials)10
157882
157895
b Fa(:)19 b(:)13 b(:)g(:)h(:)f(:)36 b Fp(121)2025 1923
157883
157896
y Fq(gnutls_certificate_free_crls)11 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)
157884
 
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(121)2025 2011 y Fq
 
157897
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(122)2025 2011 y Fq
157885
157898
(gnutls_certificate_free_keys)11 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)
157886
157899
g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(122)2025 2099 y Fq
157887
157900
(gnutls_certificate_get_openpgp)q(_keyr)q(ing)25 b Fa(:)13
157890
157903
b Fp(122)2025 2274 y Fq(gnutls_certificate_get_peers)11
157891
157904
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37
157892
157905
b Fp(122)2025 2362 y Fq(gnutls_certificate_get_x509_ca)q(s)25
157893
 
b Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fp(122)2025
 
157906
b Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fp(123)2025
157894
157907
2450 y Fq(gnutls_certificate_get_x509_cr)q(ls)17 b Fa(:)i(:)13
157895
157908
b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(123)2025 2538 y Fq
157896
157909
(gnutls_certificate_send_x509_r)q(dn_se)q(quen)q(ce)2200
157902
157915
(gnutls_certificate_server_set_)q(retri)q(eve_)2178 2887
157903
157916
y(function)18 b Fa(:)e(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
157904
157917
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
157905
 
f(:)45 b Fp(123)2025 2975 y Fq(gnutls_certificate_set_dh_para)q(ms)17
 
157918
f(:)45 b Fp(124)2025 2975 y Fq(gnutls_certificate_set_dh_para)q(ms)17
157906
157919
b Fa(:)i(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(124)2025
157907
157920
3063 y Fq(gnutls_certificate_set_openpgp)q(_key)13 b
157908
157921
Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(234)2025 3151
157909
157922
y Fq(gnutls_certificate_set_openpgp)q(_key_)q(file)2200
157910
157923
3238 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
157911
157924
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
157912
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(232)2025 3325
 
157925
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(233)2025 3325
157913
157926
y Fq(gnutls_certificate_set_openpgp)q(_key_)q(file)q(2)2200
157914
157927
3413 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
157915
157928
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
157927
157940
y Fq(gnutls_certificate_set_openpgp)q(_keyr)q(ing_)q(mem)2200
157928
157941
4025 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
157929
157942
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
157930
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(233)2025 4113
 
157943
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(234)2025 4113
157931
157944
y Fq(gnutls_certificate_set_params_)q(funct)q(ion)25
157932
157945
b Fa(:)13 b(:)46 b Fp(124)2025 4201 y Fq
157933
157946
(gnutls_certificate_set_rsa_exp)q(ort_p)q(aram)q(s)2200
157935
157948
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
157936
157949
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(124)2025 4375
157937
157950
y Fq(gnutls_certificate_set_verify_)q(flags)10 b Fa(:)19
157938
 
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(124)2025 4463 y Fq
 
157951
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(125)2025 4463 y Fq
157939
157952
(gnutls_certificate_set_verify_)q(limit)q(s)7 b Fa(:)19
157940
157953
b(:)13 b(:)g(:)g(:)34 b Fp(125)2025 4551 y Fq
157941
157954
(gnutls_certificate_set_x509_cr)q(l)25 b Fa(:)13 b(:)h(:)f(:)g(:)g(:)g
157955
157968
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
157956
157969
g(:)g(:)g(:)g(:)g(:)h(:)38 b Fp(127)2025 5252 y Fq
157957
157970
(gnutls_certificate_set_x509_tr)q(ust)15 b Fa(:)k(:)13
157958
 
b(:)g(:)g(:)g(:)h(:)f(:)41 b Fp(128)2025 5340 y Fq
 
157971
b(:)g(:)g(:)g(:)h(:)f(:)41 b Fp(129)2025 5340 y Fq
157959
157972
(gnutls_certificate_set_x509_tr)q(ust_f)q(ile)25 b Fa(:)13
157960
157973
b(:)46 b Fp(128)p eop end
157961
157974
%%Page: 322 328
157970
157983
b Fa(:)g(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)44 b Fp(129)150
157971
157984
653 y Fq(gnutls_certificate_type_list)11 b Fa(:)19 b(:)13
157972
157985
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b
157973
 
Fp(129)150 741 y Fq(gnutls_certificate_type_set_p)q(rior)q(ity)7
 
157986
Fp(130)150 741 y Fq(gnutls_certificate_type_set_p)q(rior)q(ity)7
157974
157987
b Fa(:)19 b(:)13 b(:)g(:)h(:)33 b Fp(130)150 830 y Fq
157975
157988
(gnutls_certificate_verify_fla)q(gs)28 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h
157976
157989
(:)f(:)g(:)g(:)g(:)48 b Fp(25)150 918 y Fq
157981
157994
b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
157982
157995
g(:)g(:)h(:)f(:)g(:)40 b Fp(131)150 1183 y Fq(gnutls_cipher_get)25
157983
157996
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
157984
 
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fp(131)150
 
157997
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fp(132)150
157985
157998
1272 y Fq(gnutls_cipher_get_id)13 b Fa(:)18 b(:)13 b(:)g(:)h(:)f(:)g(:)
157986
157999
g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40
157987
158000
b Fp(131)150 1360 y Fq(gnutls_cipher_get_key_size)16
157997
158010
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b
157998
158011
Fp(132)150 1802 y Fq(gnutls_cipher_suite_info)26 b Fa(:)13
157999
158012
b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47
158000
 
b Fp(132)150 1891 y Fq(gnutls_compression_get)8 b Fa(:)18
 
158013
b Fp(133)150 1891 y Fq(gnutls_compression_get)8 b Fa(:)18
158001
158014
b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158002
158015
(:)g(:)g(:)35 b Fp(133)150 1979 y Fq(gnutls_compression_get_id)18
158003
158016
b Fa(:)h(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
158005
158018
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158006
158019
b Fp(133)150 2156 y Fq(gnutls_compression_list)28 b Fa(:)13
158007
158020
b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158008
 
(:)50 b Fp(133)150 2245 y Fq(gnutls_compression_set_priori)q(ty)26
 
158021
(:)50 b Fp(134)150 2245 y Fq(gnutls_compression_set_priori)q(ty)26
158009
158022
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(134)150
158010
158023
2333 y Fq(gnutls_credentials_clear)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h
158011
158024
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fp(134)150
158013
158026
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35
158014
158027
b Fp(134)150 2510 y Fq(gnutls_crypto_bigint_register)q(2)28
158015
158028
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158016
 
b Fp(134)150 2598 y Fq(gnutls_crypto_cipher_register)q(2)28
 
158029
b Fp(135)150 2598 y Fq(gnutls_crypto_cipher_register)q(2)28
158017
158030
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158018
158031
b Fp(135)150 2687 y Fq(gnutls_crypto_digest_register)q(2)28
158019
158032
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158023
158036
b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158024
158037
42 b Fp(136)150 2952 y Fq(gnutls_crypto_rnd_register2)13
158025
158038
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158026
 
b Fp(136)150 3041 y Fq(gnutls_crypto_single_cipher_r)q(egis)q(ter2)28
 
158039
b Fp(137)150 3041 y Fq(gnutls_crypto_single_cipher_r)q(egis)q(ter2)28
158027
158040
b Fa(:)13 b(:)g(:)48 b Fp(137)150 3129 y Fq
158028
158041
(gnutls_crypto_single_digest_r)q(egis)q(ter2)28 b Fa(:)13
158029
158042
b(:)g(:)48 b Fp(137)150 3217 y Fq(gnutls_crypto_single_mac_regi)q(ster)
158034
158047
b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158035
158048
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fp(138)150 3483 y
158036
158049
Fq(gnutls_db_remove_session)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158037
 
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fp(138)150
 
158050
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fp(139)150
158038
158051
3571 y Fq(gnutls_db_set_cache_expiratio)q(n)28 b Fa(:)13
158039
158052
b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fp(139)150
158040
158053
3660 y Fq(gnutls_db_set_ptr)25 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158045
158058
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(139)150
158046
158059
3925 y Fq(gnutls_db_set_store_function)11 b Fa(:)19 b(:)13
158047
158060
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b
158048
 
Fp(139)150 4013 y Fq(gnutls_deinit)14 b Fa(:)i(:)d(:)h(:)f(:)g(:)g(:)g
 
158061
Fp(140)150 4013 y Fq(gnutls_deinit)14 b Fa(:)i(:)d(:)h(:)f(:)g(:)g(:)g
158049
158062
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
158050
158063
g(:)h(:)f(:)g(:)g(:)g(:)41 b Fp(140)150 4102 y Fq(gnutls_dh_get_group)
158051
158064
16 b Fa(:)h(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158053
158066
Fq(gnutls_dh_get_peers_public_bi)q(ts)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)
158054
158067
g(:)h(:)f(:)g(:)46 b Fp(140)150 4279 y Fq(gnutls_dh_get_prime_bits)26
158055
158068
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158056
 
(:)g(:)47 b Fp(140)150 4367 y Fq(gnutls_dh_get_pubkey)13
 
158069
(:)g(:)47 b Fp(141)150 4367 y Fq(gnutls_dh_get_pubkey)13
158057
158070
b Fa(:)18 b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158058
158071
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 b Fp(141)150 4456 y
158059
158072
Fq(gnutls_dh_get_secret_bits)18 b Fa(:)h(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h
158064
158077
b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158065
158078
(:)50 b Fp(141)150 4721 y Fq(gnutls_dh_params_export_pkcs3)9
158066
158079
b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34
158067
 
b Fp(141)150 4809 y Fq(gnutls_dh_params_export_raw)13
 
158080
b Fp(142)150 4809 y Fq(gnutls_dh_params_export_raw)13
158068
158081
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158069
158082
b Fp(142)150 4898 y Fq(gnutls_dh_params_generate2)16
158070
158083
b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158071
158084
42 b Fp(142)150 4986 y Fq(gnutls_dh_params_import_pkcs3)9
158072
158085
b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34
158073
 
b Fp(142)150 5075 y Fq(gnutls_dh_params_import_raw)13
 
158086
b Fp(143)150 5075 y Fq(gnutls_dh_params_import_raw)13
158074
158087
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158075
158088
b Fp(143)150 5163 y Fq(gnutls_dh_params_init)11 b Fa(:)18
158076
158089
b(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158078
158091
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158079
158092
(:)g(:)47 b Fp(143)150 5340 y Fq(gnutls_error_is_fatal)11
158080
158093
b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158081
 
(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fp(143)2025 299 y Fq
 
158094
(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fp(144)2025 299 y Fq
158082
158095
(gnutls_error_to_alert)11 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)
158083
158096
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
158084
 
b Fp(143)2025 387 y Fq(gnutls_ext_register)16 b Fa(:)h(:)c(:)g(:)h(:)f
 
158097
b Fp(144)2025 387 y Fq(gnutls_ext_register)16 b Fa(:)h(:)c(:)g(:)h(:)f
158085
158098
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158086
158099
g(:)43 b Fp(144)2025 476 y Fq(gnutls_extra_check_version)15
158087
158100
b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158088
 
42 b Fp(231)2025 564 y Fq(gnutls_fingerprint)22 b Fa(:)14
 
158101
42 b Fp(232)2025 564 y Fq(gnutls_fingerprint)22 b Fa(:)14
158089
158102
b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158090
158103
(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fp(144)2025 653 y Fq(gnutls_free)22
158091
158104
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158092
158105
(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
158093
 
b Fp(144)2025 741 y Fq(gnutls_global_deinit)13 b Fa(:)18
 
158106
b Fp(145)2025 741 y Fq(gnutls_global_deinit)13 b Fa(:)18
158094
158107
b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158095
158108
g(:)g(:)g(:)h(:)f(:)40 b Fp(145)2025 830 y Fq(gnutls_global_init)22
158096
158109
b Fa(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158098
158111
y Fq(gnutls_global_init_extra)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)
158099
158112
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(232)2025
158100
158113
1007 y Fq(gnutls_global_set_log_function)29 b Fa(:)13
158101
 
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fp(145)2025
 
158114
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fp(146)2025
158102
158115
1095 y Fq(gnutls_global_set_log_level)13 b Fa(:)19 b(:)13
158103
158116
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40
158104
 
b Fp(145)2025 1184 y Fq(gnutls_global_set_mem_function)q(s)25
 
158117
b Fp(146)2025 1184 y Fq(gnutls_global_set_mem_function)q(s)25
158105
158118
b Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fp(146)2025
158106
158119
1272 y Fq(gnutls_handshake)7 b Fa(:)16 b(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)
158107
158120
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158109
158122
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37
158110
158123
b Fp(146)2025 1449 y Fq(gnutls_handshake_get_last_out)8
158111
158124
b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34
158112
 
b Fp(146)2025 1538 y Fq(gnutls_handshake_set_max_packe)q(t_len)q(gth)25
 
158125
b Fp(147)2025 1538 y Fq(gnutls_handshake_set_max_packe)q(t_len)q(gth)25
158113
158126
b Fa(:)13 b(:)46 b Fp(147)2025 1626 y Fq
158114
158127
(gnutls_handshake_set_post_clie)q(nt_he)q(llo_)2178 1713
158115
158128
y(function)18 b Fa(:)e(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158117
158130
f(:)45 b Fp(147)2025 1802 y Fq(gnutls_handshake_set_private_e)q(xtens)q
158118
158131
(ions)2200 1889 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158119
158132
(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158120
 
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(147)2025
 
158133
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(148)2025
158121
158134
1977 y Fq(gnutls_hex_decode)25 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158122
158135
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158123
 
48 b Fp(148)2025 2066 y Fq(gnutls_hex_encode)25 b Fa(:)13
 
158136
48 b Fp(149)2025 2066 y Fq(gnutls_hex_encode)25 b Fa(:)13
158124
158137
b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
158125
158138
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 b Fp(149)2025 2154
158126
158139
y Fq(gnutls_hex2bin)12 b Fa(:)k(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
158171
158184
g(:)h(:)f(:)g(:)46 b Fp(149)2025 4101 y Fq(gnutls_kx_get)14
158172
158185
b Fa(:)i(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158173
158186
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)41
158174
 
b Fp(149)2025 4190 y Fq(gnutls_kx_get_id)7 b Fa(:)16
 
158187
b Fp(150)2025 4190 y Fq(gnutls_kx_get_id)7 b Fa(:)16
158175
158188
b(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158176
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fp(149)2025
 
158189
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fp(150)2025
158177
158190
4278 y Fq(gnutls_kx_get_name)22 b Fa(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158178
158191
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)45
158179
 
b Fp(149)2025 4367 y Fq(gnutls_kx_list)12 b Fa(:)k(:)d(:)g(:)g(:)g(:)g
 
158192
b Fp(150)2025 4367 y Fq(gnutls_kx_list)12 b Fa(:)k(:)d(:)g(:)g(:)g(:)g
158180
158193
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
158181
158194
f(:)g(:)g(:)g(:)g(:)g(:)39 b Fp(150)2025 4455 y Fq
158182
158195
(gnutls_kx_set_priority)8 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)
158185
158198
h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158186
158199
(:)g(:)g(:)g(:)g(:)g(:)39 b Fp(151)2025 4632 y Fq(gnutls_mac_get_id)25
158187
158200
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158188
 
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 b Fp(150)2025
 
158201
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 b Fp(151)2025
158189
158202
4721 y Fq(gnutls_mac_get_key_size)28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)
158190
158203
g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)50 b
158191
 
Fp(150)2025 4809 y Fq(gnutls_mac_get_name)16 b Fa(:)h(:)c(:)g(:)h(:)f
 
158204
Fp(151)2025 4809 y Fq(gnutls_mac_get_name)16 b Fa(:)h(:)c(:)g(:)h(:)f
158192
158205
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158193
 
g(:)43 b Fp(150)2025 4898 y Fq(gnutls_mac_list)9 b Fa(:)16
 
158206
g(:)43 b Fp(151)2025 4898 y Fq(gnutls_mac_list)9 b Fa(:)16
158194
158207
b(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158195
158208
(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b Fp(151)2025
158196
158209
4986 y Fq(gnutls_mac_set_priority)28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)
158197
158210
g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)50 b
158198
 
Fp(151)2025 5075 y Fq(gnutls_malloc)14 b Fa(:)i(:)d(:)g(:)g(:)h(:)f(:)g
 
158211
Fp(152)2025 5075 y Fq(gnutls_malloc)14 b Fa(:)i(:)d(:)g(:)g(:)h(:)f(:)g
158199
158212
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158200
 
g(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(151)2025 5163 y Fq
 
158213
g(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(152)2025 5163 y Fq
158201
158214
(gnutls_openpgp_crt_check_hostn)q(ame)15 b Fa(:)k(:)13
158202
158215
b(:)g(:)g(:)g(:)h(:)f(:)41 b Fp(234)2025 5251 y Fq
158203
158216
(gnutls_openpgp_crt_deinit)18 b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158204
158217
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(234)2025 5340
158205
158218
y Fq(gnutls_openpgp_crt_export)18 b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g
158206
 
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(234)p
 
158219
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(235)p
158207
158220
eop end
158208
158221
%%Page: 323 329
158209
158222
TeXDict begin 323 328 bop 150 -116 a FB(F)-8 b(unction)31
158214
158227
b(:)13 b(:)g(:)h(:)33 b Fp(235)150 480 y Fq
158215
158228
(gnutls_openpgp_crt_get_expira)q(tion)q(_time)25 b Fa(:)14
158216
158229
b(:)45 b Fp(235)150 571 y Fq(gnutls_openpgp_crt_get_finger)q(prin)q(t)
158217
 
12 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(235)150
 
158230
12 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(236)150
158218
158231
662 y Fq(gnutls_openpgp_crt_get_key_id)9 b Fa(:)18 b(:)13
158219
158232
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(236)150
158220
158233
753 y Fq(gnutls_openpgp_crt_get_key_us)q(age)18 b Fa(:)g(:)c(:)f(:)g(:)
158221
158234
g(:)g(:)g(:)g(:)44 b Fp(236)150 844 y Fq(gnutls_openpgp_crt_get_name)13
158222
158235
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158223
158236
b Fp(236)150 934 y Fq(gnutls_openpgp_crt_get_pk_alg)q(orit)q(hm)10
158224
 
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(236)150 1025 y
 
158237
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(237)150 1025 y
158225
158238
Fq(gnutls_openpgp_crt_get_pk_dsa)q(_raw)15 b Fa(:)k(:)13
158226
158239
b(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(237)150 1116 y Fq
158227
158240
(gnutls_openpgp_crt_get_pk_rsa)q(_raw)15 b Fa(:)k(:)13
158229
158242
(gnutls_openpgp_crt_get_prefer)q(red_)q(key_i)q(d)325
158230
158243
1294 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158231
158244
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158232
 
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(237)150 1385
 
158245
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(238)150 1385
158233
158246
y Fq(gnutls_openpgp_crt_get_revoke)q(d_st)q(atus)28 b
158234
 
Fa(:)13 b(:)g(:)48 b Fp(237)150 1476 y Fq
 
158247
Fa(:)13 b(:)g(:)48 b Fp(238)150 1476 y Fq
158235
158248
(gnutls_openpgp_crt_get_subkey)q(_cou)q(nt)10 b Fa(:)18
158236
158249
b(:)c(:)f(:)g(:)g(:)36 b Fp(238)150 1566 y Fq
158237
158250
(gnutls_openpgp_crt_get_subkey)q(_cre)q(ation)q(_tim)q(e)325
158245
158258
(gnutls_openpgp_crt_get_subkey)q(_fin)q(gerpr)q(int)325
158246
158259
2010 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158247
158260
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158248
 
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(238)150 2100
 
158261
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(239)150 2100
158249
158262
y Fq(gnutls_openpgp_crt_get_subkey)q(_id)18 b Fa(:)g(:)c(:)f(:)g(:)g(:)
158250
158263
g(:)g(:)g(:)44 b Fp(239)150 2191 y Fq(gnutls_openpgp_crt_get_subkey)q
158251
158264
(_idx)15 b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(239)150
158256
158269
y Fq(gnutls_openpgp_crt_get_subkey)q(_pk_)q(dsa_r)q(aw)325
158257
158270
2547 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158258
158271
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158259
 
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(239)150 2638
 
158272
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(240)150 2638
158260
158273
y Fq(gnutls_openpgp_crt_get_subkey)q(_pk_)q(rsa_r)q(aw)325
158261
158274
2725 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158262
158275
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158266
158279
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158267
158280
g(:)g(:)h(:)f(:)g(:)33 b Fp(240)150 2994 y Fq
158268
158281
(gnutls_openpgp_crt_get_subkey)q(_usa)q(ge)10 b Fa(:)18
158269
 
b(:)c(:)f(:)g(:)g(:)36 b Fp(240)150 3085 y Fq
 
158282
b(:)c(:)f(:)g(:)g(:)36 b Fp(241)150 3085 y Fq
158270
158283
(gnutls_openpgp_crt_get_versio)q(n)28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f
158271
158284
(:)g(:)g(:)g(:)g(:)49 b Fp(241)150 3175 y Fq(gnutls_openpgp_crt_import)
158272
158285
18 b Fa(:)h(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158274
158287
b Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158275
158288
(:)g(:)g(:)50 b Fp(241)150 3357 y Fq(gnutls_openpgp_crt_print)26
158276
158289
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158277
 
(:)g(:)47 b Fp(241)150 3448 y Fq(gnutls_openpgp_crt_set_prefer)q(red_)q
 
158290
(:)g(:)47 b Fp(242)150 3448 y Fq(gnutls_openpgp_crt_set_prefer)q(red_)q
158278
158291
(key_i)q(d)325 3535 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158279
158292
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158280
158293
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b
158283
158296
b Fp(242)150 3717 y Fq(gnutls_openpgp_crt_verify_sel)q(f)28
158284
158297
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158285
158298
b Fp(242)150 3807 y Fq(gnutls_openpgp_keyring_check_)q(id)26
158286
 
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(242)150
 
158299
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(243)150
158287
158300
3898 y Fq(gnutls_openpgp_keyring_deinit)9 b Fa(:)18 b(:)13
158288
158301
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(243)150
158289
158302
3989 y Fq(gnutls_openpgp_keyring_get_cr)q(t)28 b Fa(:)13
158293
158306
(gnutls_openpgp_keyring_import)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g
158294
158307
(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(243)150 4261 y Fq
158295
158308
(gnutls_openpgp_keyring_init)13 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f
158296
 
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fp(243)150 4352 y
 
158309
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fp(244)150 4352 y
158297
158310
Fq(gnutls_openpgp_privkey_deinit)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g
158298
158311
(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(244)150 4443 y Fq
158299
158312
(gnutls_openpgp_privkey_export)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g
158360
158373
y Fq(gnutls_openpgp_privkey_sign_ha)q(sh)17 b Fa(:)i(:)13
158361
158374
b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(250)2025 2325 y Fq
158362
158375
(gnutls_openpgp_send_cert)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
158363
 
f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(151)2025
 
158376
f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(152)2025
158364
158377
2414 y Fq(gnutls_openpgp_set_recv_key_fu)q(nctio)q(n)7
158365
158378
b Fa(:)19 b(:)13 b(:)g(:)g(:)34 b Fp(250)2025 2502 y
158366
158379
Fq(gnutls_oprfi_enable_client)15 b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)
158370
158383
y Fq(gnutls_pem_base64_decode)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)
158371
158384
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(153)2025
158372
158385
2768 y Fq(gnutls_pem_base64_decode_alloc)29 b Fa(:)13
158373
 
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fp(152)2025
 
158386
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fp(153)2025
158374
158387
2857 y Fq(gnutls_pem_base64_encode)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g
158375
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(153)2025
 
158388
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(154)2025
158376
158389
2946 y Fq(gnutls_pem_base64_encode_alloc)29 b Fa(:)13
158377
158390
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fp(153)2025
158378
158391
3034 y Fq(gnutls_perror)14 b Fa(:)i(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158384
158397
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fp(154)2025
158385
158398
3300 y Fq(gnutls_pk_get_name)22 b Fa(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158386
158399
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)45
158387
 
b Fp(154)2025 3389 y Fq(gnutls_pk_list)12 b Fa(:)k(:)d(:)g(:)g(:)g(:)g
 
158400
b Fp(155)2025 3389 y Fq(gnutls_pk_list)12 b Fa(:)k(:)d(:)g(:)g(:)g(:)g
158388
158401
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
158389
 
f(:)g(:)g(:)g(:)g(:)g(:)39 b Fp(154)2025 3478 y Fq
 
158402
f(:)g(:)g(:)g(:)g(:)g(:)39 b Fp(155)2025 3478 y Fq
158390
158403
(gnutls_pkcs12_bag_decrypt)18 b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158391
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(180)2025 3566
 
158404
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(181)2025 3566
158392
158405
y Fq(gnutls_pkcs12_bag_deinit)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)
158393
 
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(180)2025
 
158406
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(181)2025
158394
158407
3655 y Fq(gnutls_pkcs12_bag_encrypt)18 b Fa(:)g(:)13
158395
158408
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45
158396
158409
b Fp(181)2025 3744 y Fq(gnutls_pkcs12_bag_get_count)13
158398
158411
b Fp(181)2025 3832 y Fq(gnutls_pkcs12_bag_get_data)15
158399
158412
b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158400
158413
42 b Fp(181)2025 3921 y Fq(gnutls_pkcs12_bag_get_friendly)q(_name)10
158401
 
b Fa(:)19 b(:)13 b(:)g(:)h(:)f(:)36 b Fp(181)2025 4010
 
158414
b Fa(:)19 b(:)13 b(:)g(:)h(:)f(:)36 b Fp(182)2025 4010
158402
158415
y Fq(gnutls_pkcs12_bag_get_key_id)11 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)
158403
 
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(181)2025 4098 y Fq
 
158416
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(182)2025 4098 y Fq
158404
158417
(gnutls_pkcs12_bag_get_type)15 b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g
158405
158418
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42 b Fp(182)2025 4187
158406
158419
y Fq(gnutls_pkcs12_bag_init)8 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)
158409
158422
b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158410
158423
(:)45 b Fp(182)2025 4365 y Fq(gnutls_pkcs12_bag_set_crt)18
158411
158424
b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158412
 
(:)45 b Fp(182)2025 4453 y Fq(gnutls_pkcs12_bag_set_data)15
 
158425
(:)45 b Fp(183)2025 4453 y Fq(gnutls_pkcs12_bag_set_data)15
158413
158426
b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158414
158427
42 b Fp(183)2025 4542 y Fq(gnutls_pkcs12_bag_set_friendly)q(_name)10
158415
158428
b Fa(:)19 b(:)13 b(:)g(:)h(:)f(:)36 b Fp(183)2025 4631
158417
158430
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(183)2025 4719 y Fq
158418
158431
(gnutls_pkcs12_deinit)13 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158419
158432
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40
158420
 
b Fp(183)2025 4808 y Fq(gnutls_pkcs12_export)13 b Fa(:)18
 
158433
b Fp(184)2025 4808 y Fq(gnutls_pkcs12_export)13 b Fa(:)18
158421
158434
b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158422
158435
g(:)g(:)g(:)h(:)f(:)40 b Fp(184)2025 4897 y Fq
158423
158436
(gnutls_pkcs12_generate_mac)15 b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g
158426
158439
g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
158427
158440
b Fp(184)2025 5074 y Fq(gnutls_pkcs12_import)13 b Fa(:)18
158428
158441
b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158429
 
g(:)g(:)g(:)h(:)f(:)40 b Fp(184)2025 5163 y Fq(gnutls_pkcs12_init)22
 
158442
g(:)g(:)g(:)h(:)f(:)40 b Fp(185)2025 5163 y Fq(gnutls_pkcs12_init)22
158430
158443
b Fa(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158431
158444
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fp(185)2025 5251
158432
158445
y Fq(gnutls_pkcs12_set_bag)11 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)
158438
158451
TeXDict begin 324 329 bop 150 -116 a FB(F)-8 b(unction)31
158439
158452
b(and)f(Data)i(Index)2458 b(324)150 299 y Fq(gnutls_pkcs7_deinit)16
158440
158453
b Fa(:)h(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
158441
 
h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fp(185)150 387 y Fq
 
158454
h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fp(186)150 387 y Fq
158442
158455
(gnutls_pkcs7_delete_crl)28 b Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158443
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)50 b Fp(185)150
 
158456
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)50 b Fp(186)150
158444
158457
476 y Fq(gnutls_pkcs7_delete_crt)28 b Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g
158445
158458
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)50 b Fp(186)150
158446
158459
564 y Fq(gnutls_pkcs7_export)16 b Fa(:)h(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)
158449
158462
Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42
158450
158463
b Fp(186)150 741 y Fq(gnutls_pkcs7_get_crl_raw)26 b Fa(:)13
158451
158464
b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47
158452
 
b Fp(186)150 830 y Fq(gnutls_pkcs7_get_crt_count)16 b
 
158465
b Fp(187)150 830 y Fq(gnutls_pkcs7_get_crt_count)16 b
158453
158466
Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42
158454
158467
b Fp(187)150 918 y Fq(gnutls_pkcs7_get_crt_raw)26 b Fa(:)13
158455
158468
b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47
158457
158470
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158458
158471
g(:)43 b Fp(187)150 1095 y Fq(gnutls_pkcs7_init)25 b
158459
158472
Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
158460
 
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fp(187)150
 
158473
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fp(188)150
158461
158474
1184 y Fq(gnutls_pkcs7_set_crl)13 b Fa(:)18 b(:)13 b(:)g(:)h(:)f(:)g(:)
158462
158475
g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40
158463
158476
b Fp(188)150 1272 y Fq(gnutls_pkcs7_set_crl_raw)26 b
158464
158477
Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158465
 
(:)g(:)47 b Fp(187)150 1361 y Fq(gnutls_pkcs7_set_crt)13
 
158478
(:)g(:)47 b Fp(188)150 1361 y Fq(gnutls_pkcs7_set_crt)13
158466
158479
b Fa(:)18 b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158467
158480
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 b Fp(188)150 1449 y
158468
158481
Fq(gnutls_pkcs7_set_crt_raw)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158469
158482
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fp(188)150
158470
158483
1538 y Fq(gnutls_prf)24 b Fa(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158471
158484
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
158472
 
g(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(155)150 1626 y Fq(gnutls_prf_raw)12
 
158485
g(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(156)150 1626 y Fq(gnutls_prf_raw)12
158473
158486
b Fa(:)k(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158474
158487
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38
158475
158488
b Fp(155)150 1715 y Fq(gnutls_priority_deinit)8 b Fa(:)18
158479
158492
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 b Fp(156)150 1892 y
158480
158493
Fq(gnutls_priority_set)16 b Fa(:)h(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
158481
158494
(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43
158482
 
b Fp(157)150 1980 y Fq(gnutls_priority_set_direct)16
 
158495
b Fp(158)150 1980 y Fq(gnutls_priority_set_direct)16
158483
158496
b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158484
 
42 b Fp(157)150 2069 y Fq(gnutls_protocol_get_id)8 b
 
158497
42 b Fp(158)150 2069 y Fq(gnutls_protocol_get_id)8 b
158485
158498
Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158486
158499
(:)h(:)f(:)g(:)g(:)35 b Fp(158)150 2157 y Fq(gnutls_protocol_get_name)
158487
158500
26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158489
158502
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158490
158503
b Fp(158)150 2334 y Fq(gnutls_protocol_list)13 b Fa(:)18
158491
158504
b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158492
 
g(:)g(:)h(:)f(:)g(:)40 b Fp(158)150 2423 y Fq
 
158505
g(:)g(:)h(:)f(:)g(:)40 b Fp(159)150 2423 y Fq
158493
158506
(gnutls_protocol_set_priority)11 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g
158494
 
(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fp(158)150 2511 y Fq
 
158507
(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fp(159)150 2511 y Fq
158495
158508
(gnutls_psk_allocate_client_cr)q(eden)q(tials)25 b Fa(:)14
158496
 
b(:)45 b Fp(158)150 2600 y Fq(gnutls_psk_allocate_server_cr)q(eden)q
 
158509
b(:)45 b Fp(159)150 2600 y Fq(gnutls_psk_allocate_server_cr)q(eden)q
158497
158510
(tials)25 b Fa(:)14 b(:)45 b Fp(159)150 2688 y Fq
158498
158511
(gnutls_psk_client_get_hint)16 b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158499
158512
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fp(159)150 2776 y
158500
158513
Fq(gnutls_psk_free_client_creden)q(tial)q(s)12 b Fa(:)19
158501
 
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(159)150 2865 y Fq
 
158514
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(160)150 2865 y Fq
158502
158515
(gnutls_psk_free_server_creden)q(tial)q(s)12 b Fa(:)19
158503
 
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(159)150 2953 y Fq
 
158516
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(160)150 2953 y Fq
158504
158517
(gnutls_psk_netconf_derive_key)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g
158505
 
(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(159)150 3042 y Fq
 
158518
(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(160)150 3042 y Fq
158506
158519
(gnutls_psk_server_get_usernam)q(e)28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f
158507
158520
(:)g(:)g(:)g(:)g(:)49 b Fp(160)150 3130 y Fq
158508
158521
(gnutls_psk_set_client_credent)q(ials)15 b Fa(:)k(:)13
158509
 
b(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(160)150 3219 y Fq
 
158522
b(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(161)150 3219 y Fq
158510
158523
(gnutls_psk_set_client_credent)q(ials)q(_func)q(tion)325
158511
158524
3306 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158512
158525
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158518
158531
(_func)q(tion)325 3659 y Fa(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158519
158532
(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158520
158533
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48
158521
 
b Fp(161)150 3747 y Fq(gnutls_psk_set_server_credent)q(ials)q(_hint)25
158522
 
b Fa(:)14 b(:)45 b Fp(161)150 3836 y Fq(gnutls_psk_set_server_dh_para)q
 
158534
b Fp(162)150 3747 y Fq(gnutls_psk_set_server_credent)q(ials)q(_hint)25
 
158535
b Fa(:)14 b(:)45 b Fp(162)150 3836 y Fq(gnutls_psk_set_server_dh_para)q
158523
158536
(ms)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
158524
158537
b Fp(162)150 3924 y Fq(gnutls_psk_set_server_params_)q(func)q(tion)28
158525
158538
b Fa(:)13 b(:)g(:)48 b Fp(162)150 4013 y Fq
158526
158539
(gnutls_record_check_pending)13 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f
158527
 
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fp(162)150 4101 y
 
158540
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fp(163)150 4101 y
158528
158541
Fq(gnutls_record_disable_padding)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g
158529
 
(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(162)150 4190 y Fq
 
158542
(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(163)150 4190 y Fq
158530
158543
(gnutls_record_get_direction)13 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f
158531
 
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fp(162)150 4278 y
 
158544
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fp(163)150 4278 y
158532
158545
Fq(gnutls_record_get_max_size)16 b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)
158533
158546
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fp(163)150 4367
158534
158547
y Fq(gnutls_record_recv)23 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158535
158548
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45
158536
158549
b Fp(163)150 4455 y Fq(gnutls_record_send)23 b Fa(:)13
158537
158550
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158538
 
(:)g(:)g(:)g(:)h(:)f(:)g(:)45 b Fp(163)150 4544 y Fq
 
158551
(:)g(:)g(:)g(:)h(:)f(:)g(:)45 b Fp(164)150 4544 y Fq
158539
158552
(gnutls_record_set_max_size)16 b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158540
158553
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fp(164)150 4632 y
158541
158554
Fq(gnutls_rehandshake)23 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158542
158555
g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45
158543
 
b Fp(164)150 4721 y Fq(gnutls_rsa_export_get_modulus)q(_bit)q(s)12
 
158556
b Fp(165)150 4721 y Fq(gnutls_rsa_export_get_modulus)q(_bit)q(s)12
158544
158557
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(165)150
158545
158558
4809 y Fq(gnutls_rsa_export_get_pubkey)11 b Fa(:)19 b(:)13
158546
158559
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b
158547
158560
Fp(165)150 4898 y Fq(gnutls_rsa_params_cpy)11 b Fa(:)18
158548
158561
b(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158549
 
g(:)g(:)g(:)g(:)38 b Fp(165)150 4986 y Fq(gnutls_rsa_params_deinit)26
 
158562
g(:)g(:)g(:)g(:)38 b Fp(166)150 4986 y Fq(gnutls_rsa_params_deinit)26
158550
158563
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158551
 
(:)g(:)47 b Fp(165)150 5075 y Fq(gnutls_rsa_params_export_pkcs)q(1)28
 
158564
(:)g(:)47 b Fp(166)150 5075 y Fq(gnutls_rsa_params_export_pkcs)q(1)28
158552
158565
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158553
 
b Fp(165)150 5163 y Fq(gnutls_rsa_params_export_raw)11
 
158566
b Fp(166)150 5163 y Fq(gnutls_rsa_params_export_raw)11
158554
158567
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37
158555
158568
b Fp(166)150 5251 y Fq(gnutls_rsa_params_generate2)13
158556
158569
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158557
 
b Fp(166)150 5340 y Fq(gnutls_rsa_params_import_pkcs)q(1)28
 
158570
b Fp(167)150 5340 y Fq(gnutls_rsa_params_import_pkcs)q(1)28
158558
158571
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158559
 
b Fp(166)2025 299 y Fq(gnutls_rsa_params_import_raw)11
 
158572
b Fp(167)2025 299 y Fq(gnutls_rsa_params_import_raw)11
158560
158573
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37
158561
158574
b Fp(167)2025 387 y Fq(gnutls_rsa_params_init)8 b Fa(:)18
158562
158575
b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
158563
 
g(:)h(:)f(:)35 b Fp(167)2025 476 y Fq(gnutls_server_name_get)8
 
158576
g(:)h(:)f(:)35 b Fp(168)2025 476 y Fq(gnutls_server_name_get)8
158564
158577
b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
158565
 
(:)g(:)g(:)g(:)h(:)f(:)35 b Fp(167)2025 564 y Fq
 
158578
(:)g(:)g(:)g(:)h(:)f(:)35 b Fp(168)2025 564 y Fq
158566
158579
(gnutls_server_name_set)8 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)
158567
158580
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 b
158568
158581
Fp(168)2025 653 y Fq(gnutls_session_enable_compatib)q(ility)q(_mod)q(e)
158570
158583
g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158571
158584
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(168)2025
158572
158585
829 y Fq(gnutls_session_get_client_rand)q(om)17 b Fa(:)i(:)13
158573
 
b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(168)2025 917 y Fq
 
158586
b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(169)2025 917 y Fq
158574
158587
(gnutls_session_get_data)28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
158575
158588
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)50 b Fp(169)2025
158576
158589
1006 y Fq(gnutls_session_get_data2)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g
158577
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(168)2025
 
158590
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fp(169)2025
158578
158591
1094 y Fq(gnutls_session_get_id)11 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g
158579
158592
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
158580
 
b Fp(169)2025 1183 y Fq(gnutls_session_get_master_secr)q(et)17
158581
 
b Fa(:)i(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(169)2025
 
158593
b Fp(170)2025 1183 y Fq(gnutls_session_get_master_secr)q(et)17
 
158594
b Fa(:)i(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(170)2025
158582
158595
1271 y Fq(gnutls_session_get_ptr)8 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g
158583
158596
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35
158584
158597
b Fp(170)2025 1360 y Fq(gnutls_session_get_server_rand)q(om)17
158585
158598
b Fa(:)i(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(170)2025
158586
158599
1448 y Fq(gnutls_session_is_resumed)18 b Fa(:)g(:)13
158587
158600
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45
158588
 
b Fp(170)2025 1537 y Fq(gnutls_session_set_data)28 b
 
158601
b Fp(171)2025 1537 y Fq(gnutls_session_set_data)28 b
158589
158602
Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158590
 
(:)g(:)g(:)50 b Fp(170)2025 1625 y Fq(gnutls_session_set_finished_fu)q
 
158603
(:)g(:)g(:)50 b Fp(171)2025 1625 y Fq(gnutls_session_set_finished_fu)q
158591
158604
(nctio)q(n)7 b Fa(:)19 b(:)13 b(:)g(:)g(:)34 b Fp(171)2025
158592
158605
1714 y Fq(gnutls_session_set_ptr)8 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g
158593
158606
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35
158594
158607
b Fp(171)2025 1802 y Fq(gnutls_set_default_export_prio)q(rity)13
158595
 
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(171)2025
 
158608
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(172)2025
158596
158609
1891 y Fq(gnutls_set_default_priority)13 b Fa(:)19 b(:)13
158597
158610
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40
158598
 
b Fp(171)2025 1979 y Fq(gnutls_sign_algorithm_get_name)29
 
158611
b Fp(172)2025 1979 y Fq(gnutls_sign_algorithm_get_name)29
158599
158612
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49
158600
158613
b Fp(172)2025 2068 y Fq(gnutls_sign_callback_get)26 b
158601
158614
Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158602
158615
(:)g(:)47 b Fp(172)2025 2156 y Fq(gnutls_sign_callback_set)26
158603
158616
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158604
 
(:)g(:)47 b Fp(172)2025 2245 y Fq(gnutls_sign_get_id)22
 
158617
(:)g(:)47 b Fp(173)2025 2245 y Fq(gnutls_sign_get_id)22
158605
158618
b Fa(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158606
 
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fp(172)2025 2333
 
158619
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fp(173)2025 2333
158607
158620
y Fq(gnutls_sign_get_name)13 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g
158608
158621
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40
158609
158622
b Fp(173)2025 2422 y Fq(gnutls_sign_list)7 b Fa(:)16
158612
158625
2510 y Fq(gnutls_srp_allocate_client_cre)q(denti)q(als)25
158613
158626
b Fa(:)13 b(:)46 b Fp(173)2025 2599 y Fq
158614
158627
(gnutls_srp_allocate_server_cre)q(denti)q(als)25 b Fa(:)13
158615
 
b(:)46 b Fp(173)2025 2687 y Fq(gnutls_srp_base64_decode)26
 
158628
b(:)46 b Fp(174)2025 2687 y Fq(gnutls_srp_base64_decode)26
158616
158629
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158617
158630
(:)g(:)47 b Fp(174)2025 2776 y Fq(gnutls_srp_base64_decode_alloc)29
158618
158631
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49
158619
 
b Fp(173)2025 2864 y Fq(gnutls_srp_base64_encode)26 b
 
158632
b Fp(174)2025 2864 y Fq(gnutls_srp_base64_encode)26 b
158620
158633
Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158621
 
(:)g(:)47 b Fp(174)2025 2953 y Fq(gnutls_srp_base64_encode_alloc)29
 
158634
(:)g(:)47 b Fp(175)2025 2953 y Fq(gnutls_srp_base64_encode_alloc)29
158622
158635
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49
158623
158636
b Fp(174)2025 3041 y Fq(gnutls_srp_free_client_credent)q(ials)13
158624
158637
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(175)2025
158631
158644
(gnutls_srp_set_client_credenti)q(als_f)q(unct)q(ion)2200
158632
158645
3483 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158633
158646
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158634
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(175)2025 3571
 
158647
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(176)2025 3571
158635
158648
y Fq(gnutls_srp_set_prime_bits)18 b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g
158636
158649
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(176)2025
158637
158650
3660 y Fq(gnutls_srp_set_server_credenti)q(als_f)q(ile)25
158638
 
b Fa(:)13 b(:)46 b Fp(176)2025 3748 y Fq
 
158651
b Fa(:)13 b(:)46 b Fp(177)2025 3748 y Fq
158639
158652
(gnutls_srp_set_server_credenti)q(als_f)q(unct)q(ion)2200
158640
158653
3835 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
158641
158654
g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158642
 
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(176)2025 3924
 
158655
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(177)2025 3924
158643
158656
y Fq(gnutls_srp_verifier)16 b Fa(:)h(:)c(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158644
158657
g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43
158645
158658
b Fp(177)2025 4012 y Fq(gnutls_strerror)9 b Fa(:)16 b(:)e(:)f(:)g(:)g
158647
158660
g(:)g(:)h(:)f(:)g(:)g(:)36 b Fp(178)2025 4101 y Fq
158648
158661
(gnutls_strerror_name)13 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158649
158662
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40
158650
 
b Fp(177)2025 4189 y Fq(gnutls_transport_get_ptr)26 b
 
158663
b Fp(178)2025 4189 y Fq(gnutls_transport_get_ptr)26 b
158651
158664
Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158652
158665
(:)g(:)47 b Fp(178)2025 4278 y Fq(gnutls_transport_get_ptr2)18
158653
158666
b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158654
158667
(:)45 b Fp(178)2025 4366 y Fq(gnutls_transport_set_errno)15
158655
158668
b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158656
 
42 b Fp(178)2025 4455 y Fq(gnutls_transport_set_global_er)q(rno)15
 
158669
42 b Fp(179)2025 4455 y Fq(gnutls_transport_set_global_er)q(rno)15
158657
158670
b Fa(:)k(:)13 b(:)g(:)g(:)g(:)h(:)f(:)41 b Fp(179)2025
158658
158671
4543 y Fq(gnutls_transport_set_lowat)15 b Fa(:)k(:)13
158659
158672
b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42
158660
158673
b Fp(179)2025 4632 y Fq(gnutls_transport_set_ptr)26 b
158661
158674
Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158662
 
(:)g(:)47 b Fp(179)2025 4720 y Fq(gnutls_transport_set_ptr2)18
 
158675
(:)g(:)47 b Fp(180)2025 4720 y Fq(gnutls_transport_set_ptr2)18
158663
158676
b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158664
 
(:)45 b Fp(179)2025 4809 y Fq(gnutls_transport_set_pull_func)q(tion)13
 
158677
(:)45 b Fp(180)2025 4809 y Fq(gnutls_transport_set_pull_func)q(tion)13
158665
158678
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(180)2025
158666
158679
4897 y Fq(gnutls_transport_set_push_func)q(tion)13 b
158667
158680
Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(180)2025 4986
158669
158682
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(188)2025 5074 y Fq
158670
158683
(gnutls_x509_crl_deinit)8 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)
158671
158684
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 b
158672
 
Fp(188)2025 5163 y Fq(gnutls_x509_crl_export)8 b Fa(:)18
 
158685
Fp(189)2025 5163 y Fq(gnutls_x509_crl_export)8 b Fa(:)18
158673
158686
b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
158674
158687
g(:)h(:)f(:)35 b Fp(189)2025 5251 y Fq(gnutls_x509_crl_get_crt_count)8
158675
158688
b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34
158680
158693
TeXDict begin 325 330 bop 150 -116 a FB(F)-8 b(unction)31
158681
158694
b(and)f(Data)i(Index)2458 b(325)150 299 y Fq
158682
158695
(gnutls_x509_crl_get_dn_oid)16 b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158683
 
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fp(189)150 387 y
 
158696
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fp(190)150 387 y
158684
158697
Fq(gnutls_x509_crl_get_issuer_dn)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g
158685
 
(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(190)150 476 y Fq
 
158698
(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(191)150 476 y Fq
158686
158699
(gnutls_x509_crl_get_issuer_dn)q(_by_)q(oid)7 b Fa(:)19
158687
158700
b(:)13 b(:)g(:)h(:)33 b Fp(190)150 564 y Fq
158688
158701
(gnutls_x509_crl_get_next_upda)q(te)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g
158693
158706
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
158694
158707
h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fp(191)150 917
158695
158708
y Fq(gnutls_x509_crl_get_this_upda)q(te)26 b Fa(:)13
158696
 
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(191)150 1005
 
158709
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(192)150 1005
158697
158710
y Fq(gnutls_x509_crl_get_version)13 b Fa(:)19 b(:)13
158698
158711
b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
158699
 
b Fp(191)150 1094 y Fq(gnutls_x509_crl_import)8 b Fa(:)18
 
158712
b Fp(192)150 1094 y Fq(gnutls_x509_crl_import)8 b Fa(:)18
158700
158713
b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158701
158714
(:)g(:)g(:)35 b Fp(192)150 1182 y Fq(gnutls_x509_crl_init)13
158702
158715
b Fa(:)18 b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
158707
158720
b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158708
158721
(:)50 b Fp(193)150 1448 y Fq(gnutls_x509_crl_set_crt_seria)q(l)28
158709
158722
b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
158710
 
b Fp(192)150 1536 y Fq(gnutls_x509_crl_set_next_upda)q(te)26
 
158723
b Fp(193)150 1536 y Fq(gnutls_x509_crl_set_next_upda)q(te)26
158711
158724
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(193)150
158712
158725
1625 y Fq(gnutls_x509_crl_set_this_upda)q(te)26 b Fa(:)13
158713
158726
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fp(193)150 1713
158717
158730
b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158718
158731
g(:)g(:)h(:)f(:)g(:)40 b Fp(194)150 1890 y Fq(gnutls_x509_crl_sign2)11
158719
158732
b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158720
 
(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fp(193)150 1978 y Fq
 
158733
(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fp(194)150 1978 y Fq
158721
158734
(gnutls_x509_crl_verify)8 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158722
158735
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b Fp(194)150
158723
158736
2067 y Fq(gnutls_x509_crq_deinit)8 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g
158724
158737
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35
158725
 
b Fp(194)150 2155 y Fq(gnutls_x509_crq_export)8 b Fa(:)18
 
158738
b Fp(195)150 2155 y Fq(gnutls_x509_crq_export)8 b Fa(:)18
158726
158739
b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158727
158740
(:)g(:)g(:)35 b Fp(195)150 2244 y Fq(gnutls_x509_crq_get_attribute)q
158728
158741
(_by_)q(oid)7 b Fa(:)19 b(:)13 b(:)g(:)h(:)33 b Fp(195)150
158729
158742
2332 y Fq(gnutls_x509_crq_get_challenge)q(_pas)q(sword)25
158730
 
b Fa(:)14 b(:)45 b Fp(195)150 2421 y Fq(gnutls_x509_crq_get_dn)8
 
158743
b Fa(:)14 b(:)45 b Fp(196)150 2421 y Fq(gnutls_x509_crq_get_dn)8
158731
158744
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
158732
 
(:)h(:)f(:)g(:)g(:)35 b Fp(196)150 2509 y Fq
 
158745
(:)h(:)f(:)g(:)g(:)35 b Fp(197)150 2509 y Fq
158733
158746
(gnutls_x509_crq_get_dn_by_oid)9 b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g
158734
158747
(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(196)150 2598 y Fq
158735
158748
(gnutls_x509_crq_get_dn_oid)16 b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158757
158770
b(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158758
158771
g(:)g(:)h(:)f(:)g(:)40 b Fp(200)150 3659 y Fq(gnutls_x509_crq_sign2)11
158759
158772
b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158760
 
(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fp(199)150 3748 y Fq
 
158773
(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fp(200)150 3748 y Fq
158761
158774
(gnutls_x509_crt_check_hostnam)q(e)28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f
158762
158775
(:)g(:)g(:)g(:)g(:)49 b Fp(200)150 3836 y Fq
158763
158776
(gnutls_x509_crt_check_issuer)11 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g
158764
158777
(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fp(200)150 3925 y Fq
158765
158778
(gnutls_x509_crt_check_revocat)q(ion)18 b Fa(:)g(:)c(:)f(:)g(:)g(:)g(:)
158766
 
g(:)g(:)44 b Fp(200)150 4013 y Fq(gnutls_x509_crt_cpy_crl_dist_)q(poin)
 
158779
g(:)g(:)44 b Fp(201)150 4013 y Fq(gnutls_x509_crt_cpy_crl_dist_)q(poin)
158767
158780
q(ts)10 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(201)150
158768
158781
4101 y Fq(gnutls_x509_crt_deinit)8 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g
158769
158782
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35
158770
158783
b Fp(201)150 4190 y Fq(gnutls_x509_crt_export)8 b Fa(:)18
158771
158784
b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158772
158785
(:)g(:)g(:)35 b Fp(201)150 4278 y Fq(gnutls_x509_crt_get_activatio)q
158773
 
(n_ti)q(me)10 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(201)150
 
158786
(n_ti)q(me)10 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(202)150
158774
158787
4367 y Fq(gnutls_x509_crt_get_authority)q(_key)q(_id)7
158775
158788
b Fa(:)19 b(:)13 b(:)g(:)h(:)33 b Fp(202)150 4455 y Fq
158776
158789
(gnutls_x509_crt_get_basic_con)q(stra)q(ints)28 b Fa(:)13
158777
158790
b(:)g(:)48 b Fp(202)150 4544 y Fq(gnutls_x509_crt_get_ca_status)9
158778
158791
b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34
158779
 
b Fp(202)150 4632 y Fq(gnutls_x509_crt_get_crl_dist_)q(poin)q(ts)10
 
158792
b Fp(203)150 4632 y Fq(gnutls_x509_crt_get_crl_dist_)q(poin)q(ts)10
158780
158793
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(203)150 4721 y
158781
158794
Fq(gnutls_x509_crt_get_dn)8 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h
158782
158795
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b Fp(204)150
158783
158796
4809 y Fq(gnutls_x509_crt_get_dn_by_oid)9 b Fa(:)18 b(:)13
158784
 
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(203)150
 
158797
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(204)150
158785
158798
4898 y Fq(gnutls_x509_crt_get_dn_oid)16 b Fa(:)i(:)13
158786
158799
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42
158787
158800
b Fp(204)150 4986 y Fq(gnutls_x509_crt_get_expiratio)q(n_ti)q(me)10
158788
 
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(204)150 5075 y
 
158801
b Fa(:)18 b(:)c(:)f(:)g(:)g(:)36 b Fp(205)150 5075 y
158789
158802
Fq(gnutls_x509_crt_get_extension)q(_by_)q(oid)7 b Fa(:)19
158790
158803
b(:)13 b(:)g(:)h(:)33 b Fp(205)150 5163 y Fq
158791
158804
(gnutls_x509_crt_get_extension)q(_dat)q(a)12 b Fa(:)19
158792
158805
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(205)150 5252 y Fq
158793
158806
(gnutls_x509_crt_get_extension)q(_inf)q(o)12 b Fa(:)19
158794
 
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(205)150 5340 y Fq
 
158807
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(206)150 5340 y Fq
158795
158808
(gnutls_x509_crt_get_extension)q(_oid)15 b Fa(:)k(:)13
158796
158809
b(:)g(:)g(:)h(:)f(:)g(:)41 b Fp(206)2025 299 y Fq
158797
158810
(gnutls_x509_crt_get_fingerprin)q(t)25 b Fa(:)13 b(:)h(:)f(:)g(:)g(:)g
158798
 
(:)g(:)g(:)h(:)46 b Fp(206)2025 387 y Fq(gnutls_x509_crt_get_issuer)15
 
158811
(:)g(:)g(:)h(:)46 b Fp(207)2025 387 y Fq(gnutls_x509_crt_get_issuer)15
158799
158812
b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158800
158813
42 b Fp(208)2025 476 y Fq(gnutls_x509_crt_get_issuer_dn)8
158801
158814
b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34
158802
 
b Fp(207)2025 564 y Fq(gnutls_x509_crt_get_issuer_dn_)q(by_oi)q(d)7
158803
 
b Fa(:)19 b(:)13 b(:)g(:)g(:)34 b Fp(206)2025 653 y Fq
 
158815
b Fp(208)2025 564 y Fq(gnutls_x509_crt_get_issuer_dn_)q(by_oi)q(d)7
 
158816
b Fa(:)19 b(:)13 b(:)g(:)g(:)34 b Fp(207)2025 653 y Fq
158804
158817
(gnutls_x509_crt_get_issuer_dn_)q(oid)15 b Fa(:)k(:)13
158805
158818
b(:)g(:)g(:)g(:)h(:)f(:)41 b Fp(207)2025 741 y Fq
158806
158819
(gnutls_x509_crt_get_key_id)15 b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g
158807
158820
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42 b Fp(208)2025 830 y
158808
158821
Fq(gnutls_x509_crt_get_key_purpos)q(e_oid)10 b Fa(:)19
158809
 
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(208)2025 918 y Fq
 
158822
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(209)2025 918 y Fq
158810
158823
(gnutls_x509_crt_get_key_usage)8 b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g
158811
158824
(:)g(:)g(:)g(:)g(:)h(:)34 b Fp(209)2025 1007 y Fq
158812
158825
(gnutls_x509_crt_get_pk_algorit)q(hm)17 b Fa(:)i(:)13
158813
 
b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(209)2025 1095 y Fq
 
158826
b(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fp(210)2025 1095 y Fq
158814
158827
(gnutls_x509_crt_get_pk_dsa_raw)29 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h
158815
 
(:)f(:)g(:)g(:)49 b Fp(209)2025 1184 y Fq
 
158828
(:)f(:)g(:)g(:)49 b Fp(210)2025 1184 y Fq
158816
158829
(gnutls_x509_crt_get_pk_rsa_raw)29 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h
158817
158830
(:)f(:)g(:)g(:)49 b Fp(210)2025 1272 y Fq(gnutls_x509_crt_get_proxy)18
158818
158831
b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
158819
158832
(:)45 b Fp(210)2025 1361 y Fq(gnutls_x509_crt_get_raw_dn)15
158820
158833
b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
158821
 
42 b Fp(210)2025 1450 y Fq(gnutls_x509_crt_get_raw_issuer)q(_dn)15
 
158834
42 b Fp(211)2025 1450 y Fq(gnutls_x509_crt_get_raw_issuer)q(_dn)15
158822
158835
b Fa(:)k(:)13 b(:)g(:)g(:)g(:)h(:)f(:)41 b Fp(211)2025
158823
158836
1538 y Fq(gnutls_x509_crt_get_serial)15 b Fa(:)k(:)13
158824
158837
b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42
158825
158838
b Fp(211)2025 1627 y Fq(gnutls_x509_crt_get_signature)8
158826
158839
b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34
158827
 
b Fp(211)2025 1715 y Fq(gnutls_x509_crt_get_signature_)q(algor)q(ithm)
 
158840
b Fp(212)2025 1715 y Fq(gnutls_x509_crt_get_signature_)q(algor)q(ithm)
158828
158841
2200 1802 y Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158829
158842
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158830
 
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(211)2025
 
158843
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fp(212)2025
158831
158844
1891 y Fq(gnutls_x509_crt_get_subject)13 b Fa(:)19 b(:)13
158832
158845
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40
158833
 
b Fp(213)2025 1979 y Fq(gnutls_x509_crt_get_subject_al)q(t_nam)q(e)7
 
158846
b Fp(214)2025 1979 y Fq(gnutls_x509_crt_get_subject_al)q(t_nam)q(e)7
158834
158847
b Fa(:)19 b(:)13 b(:)g(:)g(:)34 b Fp(212)2025 2068 y
158835
158848
Fq(gnutls_x509_crt_get_subject_al)q(t_nam)q(e2)27 b Fa(:)14
158836
158849
b(:)f(:)48 b Fp(212)2025 2156 y Fq(gnutls_x509_crt_get_subject_al)q
158838
158851
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158839
158852
g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41
158840
158853
b Fp(213)2025 2332 y Fq(gnutls_x509_crt_get_subject_ke)q(y_id)13
158841
 
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(213)2025
 
158854
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(214)2025
158842
158855
2420 y Fq(gnutls_x509_crt_get_version)13 b Fa(:)19 b(:)13
158843
158856
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40
158844
158857
b Fp(214)2025 2509 y Fq(gnutls_x509_crt_import)8 b Fa(:)18
158845
158858
b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
158846
158859
g(:)h(:)f(:)35 b Fp(214)2025 2597 y Fq(gnutls_x509_crt_init)13
158847
158860
b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
158848
 
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 b Fp(214)2025 2686
 
158861
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 b Fp(215)2025 2686
158849
158862
y Fq(gnutls_x509_crt_list_import)13 b Fa(:)19 b(:)13
158850
158863
b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40
158851
 
b Fp(214)2025 2775 y Fq(gnutls_x509_crt_list_verify)13
 
158864
b Fp(215)2025 2775 y Fq(gnutls_x509_crt_list_verify)13
158852
158865
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40
158853
158866
b Fp(215)2025 2863 y Fq(gnutls_x509_crt_print)11 b Fa(:)18
158854
158867
b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
158855
 
g(:)g(:)g(:)g(:)38 b Fp(215)2025 2952 y Fq
 
158868
g(:)g(:)g(:)g(:)38 b Fp(216)2025 2952 y Fq
158856
158869
(gnutls_x509_crt_set_activation)q(_time)10 b Fa(:)19
158857
158870
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(216)2025 3040 y Fq
158858
158871
(gnutls_x509_crt_set_authority_)q(key_i)q(d)7 b Fa(:)19
158859
158872
b(:)13 b(:)g(:)g(:)34 b Fp(216)2025 3129 y Fq
158860
158873
(gnutls_x509_crt_set_basic_cons)q(train)q(ts)27 b Fa(:)14
158861
 
b(:)f(:)48 b Fp(216)2025 3217 y Fq(gnutls_x509_crt_set_ca_status)8
 
158874
b(:)f(:)48 b Fp(217)2025 3217 y Fq(gnutls_x509_crt_set_ca_status)8
158862
158875
b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34
158863
 
b Fp(216)2025 3306 y Fq(gnutls_x509_crt_set_crl_dist_p)q(oints)10
 
158876
b Fp(217)2025 3306 y Fq(gnutls_x509_crt_set_crl_dist_p)q(oints)10
158864
158877
b Fa(:)19 b(:)13 b(:)g(:)h(:)f(:)36 b Fp(217)2025 3394
158865
158878
y Fq(gnutls_x509_crt_set_crl_dist_p)q(oints)q(2)7 b Fa(:)19
158866
158879
b(:)13 b(:)g(:)g(:)34 b Fp(217)2025 3483 y Fq(gnutls_x509_crt_set_crq)
158867
158880
28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158868
 
(:)g(:)g(:)g(:)50 b Fp(217)2025 3571 y Fq
 
158881
(:)g(:)g(:)g(:)50 b Fp(218)2025 3571 y Fq
158869
158882
(gnutls_x509_crt_set_dn_by_oid)8 b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g
158870
 
(:)g(:)g(:)g(:)g(:)h(:)34 b Fp(217)2025 3660 y Fq
 
158883
(:)g(:)g(:)g(:)g(:)h(:)34 b Fp(218)2025 3660 y Fq
158871
158884
(gnutls_x509_crt_set_expiration)q(_time)10 b Fa(:)19
158872
158885
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(218)2025 3748 y Fq
158873
158886
(gnutls_x509_crt_set_extension_)q(by_oi)q(d)7 b Fa(:)19
158874
158887
b(:)13 b(:)g(:)g(:)34 b Fp(218)2025 3837 y Fq
158875
158888
(gnutls_x509_crt_set_issuer_dn_)q(by_oi)q(d)7 b Fa(:)19
158876
 
b(:)13 b(:)g(:)g(:)34 b Fp(218)2025 3925 y Fq(gnutls_x509_crt_set_key)
 
158889
b(:)13 b(:)g(:)g(:)34 b Fp(219)2025 3925 y Fq(gnutls_x509_crt_set_key)
158877
158890
28 b Fa(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158878
 
(:)g(:)g(:)g(:)50 b Fp(219)2025 4014 y Fq
 
158891
(:)g(:)g(:)g(:)50 b Fp(220)2025 4014 y Fq
158879
158892
(gnutls_x509_crt_set_key_purpos)q(e_oid)10 b Fa(:)19
158880
158893
b(:)13 b(:)g(:)h(:)f(:)36 b Fp(219)2025 4102 y Fq
158881
158894
(gnutls_x509_crt_set_key_usage)8 b Fa(:)19 b(:)13 b(:)g(:)g(:)h(:)f(:)g
158882
 
(:)g(:)g(:)g(:)g(:)h(:)34 b Fp(219)2025 4191 y Fq
 
158895
(:)g(:)g(:)g(:)g(:)h(:)34 b Fp(220)2025 4191 y Fq
158883
158896
(gnutls_x509_crt_set_proxy)18 b Fa(:)g(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g
158884
158897
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fp(220)2025 4279
158885
158898
y Fq(gnutls_x509_crt_set_proxy_dn)11 b Fa(:)18 b(:)c(:)f(:)g(:)g(:)g(:)
158886
158899
g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fp(220)2025 4368 y Fq
158887
158900
(gnutls_x509_crt_set_serial)15 b Fa(:)k(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g
158888
 
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42 b Fp(220)2025 4456
 
158901
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42 b Fp(221)2025 4456
158889
158902
y Fq(gnutls_x509_crt_set_subject_al)q(t_nam)q(e)7 b Fa(:)19
158890
158903
b(:)13 b(:)g(:)g(:)34 b Fp(221)2025 4545 y Fq
158891
158904
(gnutls_x509_crt_set_subject_al)q(terna)q(tive)q(_)2178
158893
158906
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
158894
158907
g(:)g(:)g(:)g(:)g(:)h(:)38 b Fp(221)2025 4720 y Fq
158895
158908
(gnutls_x509_crt_set_subject_ke)q(y_id)13 b Fa(:)19 b(:)13
158896
 
b(:)g(:)g(:)g(:)g(:)39 b Fp(221)2025 4809 y Fq
 
158909
b(:)g(:)g(:)g(:)g(:)39 b Fp(222)2025 4809 y Fq
158897
158910
(gnutls_x509_crt_set_version)13 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g
158898
158911
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40 b Fp(222)2025 4897
158899
158912
y Fq(gnutls_x509_crt_sign)13 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g
158900
158913
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40
158901
 
b Fp(222)2025 4986 y Fq(gnutls_x509_crt_sign2)11 b Fa(:)18
 
158914
b Fp(223)2025 4986 y Fq(gnutls_x509_crt_sign2)11 b Fa(:)18
158902
158915
b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
158903
158916
g(:)g(:)g(:)g(:)38 b Fp(222)2025 5074 y Fq(gnutls_x509_crt_verify)8
158904
158917
b Fa(:)18 b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
158905
158918
(:)g(:)g(:)g(:)h(:)f(:)35 b Fp(223)2025 5163 y Fq
158906
158919
(gnutls_x509_crt_verify_data)13 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g
158907
 
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40 b Fp(222)2025 5251
 
158920
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40 b Fp(223)2025 5251
158908
158921
y Fq(gnutls_x509_dn_deinit)11 b Fa(:)18 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)
158909
158922
g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
158910
158923
b Fp(223)2025 5340 y Fq(gnutls_x509_dn_export)11 b Fa(:)18
158911
158924
b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
158912
 
g(:)g(:)g(:)g(:)38 b Fp(223)p eop end
 
158925
g(:)g(:)g(:)g(:)38 b Fp(224)p eop end
158913
158926
%%Page: 326 332
158914
158927
TeXDict begin 326 331 bop 150 -116 a FB(F)-8 b(unction)31
158915
158928
b(and)f(Data)i(Index)2458 b(326)150 299 y Fq
158919
158932
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)38
158920
158933
b Fp(224)150 478 y Fq(gnutls_x509_dn_init)16 b Fa(:)h(:)d(:)f(:)g(:)g
158921
158934
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
158922
 
g(:)43 b Fp(224)150 568 y Fq(gnutls_x509_dn_oid_known)26
 
158935
g(:)43 b Fp(225)150 568 y Fq(gnutls_x509_dn_oid_known)26
158923
158936
b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
158924
 
(:)g(:)47 b Fp(224)150 658 y Fq(gnutls_x509_privkey_cpy)28
 
158937
(:)g(:)47 b Fp(225)150 658 y Fq(gnutls_x509_privkey_cpy)28
158925
158938
b Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158926
158939
(:)g(:)g(:)50 b Fp(225)150 748 y Fq(gnutls_x509_privkey_deinit)16
158927
158940
b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158928
158941
42 b Fp(225)150 838 y Fq(gnutls_x509_privkey_export)16
158929
158942
b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158930
 
42 b Fp(226)150 927 y Fq(gnutls_x509_privkey_export_ds)q(a_ra)q(w)12
 
158943
42 b Fp(227)150 927 y Fq(gnutls_x509_privkey_export_ds)q(a_ra)q(w)12
158931
158944
b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(225)150
158932
158945
1017 y Fq(gnutls_x509_privkey_export_pk)q(cs8)18 b Fa(:)g(:)c(:)f(:)g
158933
 
(:)g(:)g(:)g(:)g(:)44 b Fp(225)150 1107 y Fq
 
158946
(:)g(:)g(:)g(:)g(:)44 b Fp(226)150 1107 y Fq
158934
158947
(gnutls_x509_privkey_export_rs)q(a_ra)q(w)12 b Fa(:)19
158935
158948
b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(226)150 1197 y Fq
158936
158949
(gnutls_x509_privkey_fix)28 b Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158949
158962
g(:)g(:)44 b Fp(228)150 1825 y Fq(gnutls_x509_privkey_import_rs)q(a_ra)
158950
158963
q(w)12 b Fa(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)39 b Fp(229)150
158951
158964
1915 y Fq(gnutls_x509_privkey_init)26 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h
158952
 
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fp(229)150
 
158965
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fp(230)150
158953
158966
2005 y Fq(gnutls_x509_privkey_sign_data)9 b Fa(:)18 b(:)13
158954
 
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(229)150
 
158967
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(230)150
158955
158968
2095 y Fq(gnutls_x509_privkey_sign_hash)9 b Fa(:)18 b(:)13
158956
158969
b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fp(230)150
158957
158970
2185 y Fq(gnutls_x509_privkey_verify_da)q(ta)26 b Fa(:)13
158960
158973
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43
158961
158974
b Fp(231)150 2364 y Fq(gnutls_x509_rdn_get_by_oid)16
158962
158975
b Fa(:)i(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
158963
 
42 b Fp(230)150 2454 y Fq(gnutls_x509_rdn_get_oid)28
 
158976
42 b Fp(231)150 2454 y Fq(gnutls_x509_rdn_get_oid)28
158964
158977
b Fa(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
158965
158978
(:)g(:)g(:)50 b Fp(231)150 2719 y FA(H)150 2841 y Fq(handshake)7
158966
158979
b Fa(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
159307
159320
h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fp(270)150 4615
159308
159321
y Fo(Gn)n(uTLS-extra)27 b Fp(functions)16 b Fa(:)e(:)f(:)g(:)g(:)g(:)g
159309
159322
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43
159310
 
b Fp(231)150 4703 y(gn)n(utls-serv)19 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h
 
159323
b Fp(232)150 4703 y(gn)n(utls-serv)19 b Fa(:)13 b(:)g(:)g(:)g(:)g(:)h
159311
159324
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
159312
159325
g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)46 b Fp(111)150
159313
159326
4791 y(GPL,)26 b(GNU)f(General)i(Public)f(License)21
159430
159443
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)40 b Fp(17,)27
159431
159444
b(23)2025 1295 y Fo(X.509)f Fp(F)-6 b(unctions)21 b Fa(:)13
159432
159445
b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
159433
 
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)48 b Fp(180)p
 
159446
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)48 b Fp(181)p
159434
159447
eop end
159435
159448
%%Trailer
159436
159449