📄 pssl_8h-source.html
字号:
00255 00258 <a class="code" href="classPSSLCertificate.html#a0">PSSLCertificate</a>(00259 <span class="keyword">const</span> <a class="code" href="classPSSLCertificate.html">PSSLCertificate</a> & cert00260 );00261 00264 <a class="code" href="classPSSLCertificate.html">PSSLCertificate</a> & <a class="code" href="classPSSLCertificate.html#a6">operator=</a>(00265 <span class="keyword">const</span> <a class="code" href="classPSSLCertificate.html">PSSLCertificate</a> & cert00266 );00267 00270 <a class="code" href="classPSSLCertificate.html#a7">~PSSLCertificate</a>();00271 <a name="l00274"></a><a class="code" href="classPSSLCertificate.html#a8">00274</a> <a class="code" href="classPSSLCertificate.html#a8">operator x509_st *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPSSLCertificate.html#n0">certificate</a>; }00275 00284 BOOL <a class="code" href="classPSSLCertificate.html#a9">CreateRoot</a>(00285 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & subject, 00286 <span class="keyword">const</span> <a class="code" href="classPSSLPrivateKey.html">PSSLPrivateKey</a> & key 00287 );00288 00291 <a class="code" href="classPBYTEArray.html">PBYTEArray</a> <a class="code" href="classPSSLCertificate.html#a10">GetData</a>() <span class="keyword">const</span>;00292 00295 <a class="code" href="classPString.html">PString</a> <a class="code" href="classPSSLCertificate.html#a11">AsString</a>() <span class="keyword">const</span>;00296 00302 BOOL <a class="code" href="classPSSLCertificate.html#a12">Load</a>(00303 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & certFile, 00304 <a class="code" href="pssl_8h.html#a3">PSSLFileTypes</a> fileType = <a class="code" href="pssl_8h.html#a3a2">PSSLFileTypeDEFAULT</a> 00305 );00306 00312 BOOL <a class="code" href="classPSSLCertificate.html#a13">Save</a>(00313 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & keyFile, 00314 BOOL append = FALSE, 00315 <a class="code" href="pssl_8h.html#a3">PSSLFileTypes</a> fileType = <a class="code" href="pssl_8h.html#a3a2">PSSLFileTypeDEFAULT</a> 00316 );00317 00318 00319 <span class="keyword">protected</span>:<a name="l00320"></a><a class="code" href="classPSSLCertificate.html#n0">00320</a> x509_st * <a class="code" href="classPSSLCertificate.html#n0">certificate</a>;00321 };00322 00323 <a name="l00328"></a><a class="code" href="classPSSLDiffieHellman.html">00328</a> <span class="keyword">class </span><a class="code" href="classPSSLDiffieHellman.html">PSSLDiffieHellman</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00329 {00330 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSSLDiffieHellman.html">PSSLDiffieHellman</a>, <a class="code" href="classPObject.html">PObject</a>);00331 <span class="keyword">public</span>:00334 <a class="code" href="classPSSLDiffieHellman.html#a0">PSSLDiffieHellman</a>();00335 00341 <a class="code" href="classPSSLDiffieHellman.html#a0">PSSLDiffieHellman</a>(00342 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & dhFile, 00343 <a class="code" href="pssl_8h.html#a3">PSSLFileTypes</a> fileType = <a class="code" href="pssl_8h.html#a3a2">PSSLFileTypeDEFAULT</a> 00344 );00345 00348 <a class="code" href="classPSSLDiffieHellman.html#a0">PSSLDiffieHellman</a>(00349 <span class="keyword">const</span> BYTE * pData, 00350 PINDEX pSize, 00351 <span class="keyword">const</span> BYTE * gData, 00352 PINDEX gSize 00353 );00354 00357 <a class="code" href="classPSSLDiffieHellman.html#a0">PSSLDiffieHellman</a>(00358 <span class="keyword">const</span> <a class="code" href="classPSSLDiffieHellman.html">PSSLDiffieHellman</a> & <a class="code" href="classPSSLDiffieHellman.html#n0">dh</a>00359 );00360 00363 <a class="code" href="classPSSLDiffieHellman.html">PSSLDiffieHellman</a> & <a class="code" href="classPSSLDiffieHellman.html#a4">operator=</a>(00364 <span class="keyword">const</span> <a class="code" href="classPSSLDiffieHellman.html">PSSLDiffieHellman</a> & <a class="code" href="classPSSLDiffieHellman.html#n0">dh</a>00365 );00366 00369 <a class="code" href="classPSSLDiffieHellman.html#a5">~PSSLDiffieHellman</a>();00370 <a name="l00373"></a><a class="code" href="classPSSLDiffieHellman.html#a6">00373</a> <a class="code" href="classPSSLDiffieHellman.html#a6">operator dh_st *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPSSLDiffieHellman.html#n0">dh</a>; }00374 00380 BOOL <a class="code" href="classPSSLDiffieHellman.html#a7">Load</a>(00381 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & dhFile, 00382 <a class="code" href="pssl_8h.html#a3">PSSLFileTypes</a> fileType = <a class="code" href="pssl_8h.html#a3a2">PSSLFileTypeDEFAULT</a> 00383 );00384 00385 <span class="keyword">protected</span>:<a name="l00386"></a><a class="code" href="classPSSLDiffieHellman.html#n0">00386</a> dh_st * <a class="code" href="classPSSLDiffieHellman.html#n0">dh</a>;00387 };00388 00389 <a name="l00395"></a><a class="code" href="classPSSLContext.html">00395</a> <span class="keyword">class </span><a class="code" href="classPSSLContext.html">PSSLContext</a> {00396 <span class="keyword">public</span>:00404 <a class="code" href="classPSSLContext.html#a0">PSSLContext</a>(00405 <span class="keyword">const</span> <span class="keywordtype">void</span> * sessionId = NULL, 00406 PINDEX idSize = 0 00407 );00408 00411 <a class="code" href="classPSSLContext.html#a1">~PSSLContext</a>();00412 <a name="l00415"></a><a class="code" href="classPSSLContext.html#a2">00415</a> <a class="code" href="classPSSLContext.html#a2">operator ssl_ctx_st *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPSSLContext.html#n0">context</a>; }00416 00419 BOOL <a class="code" href="classPSSLContext.html#a3">SetCAPath</a>(00420 <span class="keyword">const</span> <a class="code" href="classPDirectory.html">PDirectory</a> & caPath 00421 );00422 00425 BOOL <a class="code" href="classPSSLContext.html#a4">SetCAFile</a>(00426 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & caFile 00427 );00428 00431 BOOL <a class="code" href="classPSSLContext.html#a5">UseCertificate</a>(00432 <span class="keyword">const</span> <a class="code" href="classPSSLCertificate.html">PSSLCertificate</a> & certificate00433 );00434 00437 BOOL <a class="code" href="classPSSLContext.html#a6">UsePrivateKey</a>(00438 <span class="keyword">const</span> <a class="code" href="classPSSLPrivateKey.html">PSSLPrivateKey</a> & key00439 );00440 00443 BOOL <a class="code" href="classPSSLContext.html#a7">UseDiffieHellman</a>(00444 <span class="keyword">const</span> <a class="code" href="classPSSLDiffieHellman.html">PSSLDiffieHellman</a> & dh00445 );00446 00449 BOOL <a class="code" href="classPSSLContext.html#a8">SetCipherList</a>(00450 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & ciphers 00451 );00452 00453 <span class="keyword">protected</span>:<a name="l00454"></a><a class="code" href="classPSSLContext.html#n0">00454</a> ssl_ctx_st * <a class="code" href="classPSSLContext.html#n0">context</a>;00455 };00456 00457 <a name="l00460"></a><a class="code" href="classPSSLChannel.html">00460</a> <span class="keyword">class </span><a class="code" href="classPSSLChannel.html">PSSLChannel</a> : <span class="keyword">public</span> <a class="code" href="classPIndirectChannel.html">PIndirectChannel</a>00461 {00462 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSSLChannel.html">PSSLChannel</a>, <a class="code" href="classPIndirectChannel.html">PIndirectChannel</a>)00463 <span class="keyword">public</span>:00467 <a class="code" href="classPSSLChannel.html#a0">PSSLChannel</a>(00468 <a class="code" href="classPSSLContext.html">PSSLContext</a> * <a class="code" href="classPSSLChannel.html#n0">context</a> = NULL, 00469 BOOL <a class="code" href="classPSSLChannel.html#n1">autoDeleteContext</a> = FALSE 00470 );00471 <a class="code" href="classPSSLChannel.html#a0">PSSLChannel</a>(00472 <a class="code" href="classPSSLContext.html">PSSLContext</a> & <a class="code" href="classPSSLChannel.html#n0">context</a> 00473 );00474 00477 <a class="code" href="classPSSLChannel.html#a2">~PSSLChannel</a>();00478 00479 <span class="comment">// Overrides from PChannel</span>00480 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#a3">Read</a>(<span class="keywordtype">void</span> * buf, PINDEX len);00481 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#a4">Write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> * buf, PINDEX len);00482 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#a5">Close</a>();<a name="l00483"></a><a class="code" href="classPSSLChannel.html#a6">00483</a> <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#a6">Shutdown</a>(<a class="code" href="classPChannel.html#z53_0">ShutdownValue</a>) { <span class="keywordflow">return</span> TRUE; }00484 <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPSSLChannel.html#a7">GetErrorText</a>(<a class="code" href="classPChannel.html#z55_1">ErrorGroup</a> group = <a class="code" href="classPChannel.html#z55_1s21">NumErrorGroups</a>) <span class="keyword">const</span>;00485 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#a8">ConvertOSError</a>(<span class="keywordtype">int</span> error, <a class="code" href="classPChannel.html#z55_1">ErrorGroup</a> group = <a class="code" href="classPChannel.html#z55_1s20">LastGeneralError</a>);00486 00487 <span class="comment">// New functions</span>00492 <span class="comment"></span> BOOL <a class="code" href="classPSSLChannel.html#a9">Accept</a>();00493 00496 BOOL <a class="code" href="classPSSLChannel.html#a9">Accept</a>(00497 <a class="code" href="classPChannel.html">PChannel</a> & channel 00498 );00499 00502 BOOL <a class="code" href="classPSSLChannel.html#a9">Accept</a>(00503 <a class="code" href="classPChannel.html">PChannel</a> * channel, 00504 BOOL autoDelete = TRUE 00505 );00506 00507 00512 BOOL <a class="code" href="classPSSLChannel.html#a12">Connect</a>();00513 00516 BOOL <a class="code" href="classPSSLChannel.html#a12">Connect</a>(00517 <a class="code" href="classPChannel.html">PChannel</a> & channel 00518 );00519 00522 BOOL <a class="code" href="classPSSLChannel.html#a12">Connect</a>(00523 <a class="code" href="classPChannel.html">PChannel</a> * channel, 00524 BOOL autoDelete = TRUE 00525 );00526 00529 BOOL <a class="code" href="classPSSLChannel.html#a15">UseCertificate</a>(00530 <span class="keyword">const</span> <a class="code" href="classPSSLCertificate.html">PSSLCertificate</a> & certificate00531 );00532 00535 BOOL <a class="code" href="classPSSLChannel.html#a16">UsePrivateKey</a>(00536 <span class="keyword">const</span> <a class="code" href="classPSSLPrivateKey.html">PSSLPrivateKey</a> & key00537 );00538 <a name="l00539"></a><a class="code" href="classPSSLChannel.html#s3">00539</a> <span class="keyword">enum</span> <a class="code" href="classPSSLChannel.html#s3">VerifyMode</a> {00540 <a class="code" href="classPSSLChannel.html#s3s0">VerifyNone</a>,00541 <a class="code" href="classPSSLChannel.html#s3s1">VerifyPeer</a>,00542 <a class="code" href="classPSSLChannel.html#s3s2">VerifyPeerMandatory</a>,00543 };00544 00545 <span class="keywordtype">void</span> <a class="code" href="classPSSLChannel.html#a17">SetVerifyMode</a>(00546 <a class="code" href="classPSSLChannel.html#s3">VerifyMode</a> mode00547 );00548 <a name="l00549"></a><a class="code" href="classPSSLChannel.html#a18">00549</a> <a class="code" href="classPSSLContext.html">PSSLContext</a> * <a class="code" href="classPSSLChannel.html#a18">GetContext</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPSSLChannel.html#n0">context</a>; }00550 00551 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#a19">RawSSLRead</a>(<span class="keywordtype">void</span> * buf, PINDEX & len);00552 00553 <span class="keyword">protected</span>:00563 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSSLChannel.html#b0">OnOpen</a>();00564 00565 <span class="keyword">protected</span>:<a name="l00566"></a><a class="code" href="classPSSLChannel.html#n0">00566</a> <a class="code" href="classPSSLContext.html">PSSLContext</a> * <a class="code" href="classPSSLChannel.html#n0">context</a>;<a name="l00567"></a><a class="code" href="classPSSLChannel.html#n1">00567</a> BOOL <a class="code" href="classPSSLChannel.html#n1">autoDeleteContext</a>;<a name="l00568"></a><a class="code" href="classPSSLChannel.html#n2">00568</a> ssl_st * <a class="code" href="classPSSLChannel.html#n2">ssl</a>;00569 };00570 00571 <span class="preprocessor">#endif // _PSSL_H</span></pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:11 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -