• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            woomsg

            在路上

            2008年11月6日 #

            gloox代碼分析4 - private xml storage

                 摘要: 這部分的作用是客戶端可以存放任意格式的私有xml數(shù)據(jù)到服務(wù)器上,并且在想要查看的時候取回!1.協(xié)議 - XEP-0049 -  http://xmpp.org/extensions/xep-0049.html2. jabber client可以保存任意的xml數(shù)據(jù)到服務(wù)器,通過一個<iq type="set">的請求.該請求需要包含一個名稱空間為jabber:iq:priva...  閱讀全文

            posted @ 2008-11-06 17:18 ysong.lee 閱讀(1216) | 評論 (0)編輯 收藏

            gloox代碼分析3 - 注冊模塊

                 摘要: #jabber協(xié)議中如何注冊一個用戶?首先要與服務(wù)器建立一個連接, 在完成TLS握手之后就可以進行注冊了,為什么不需要SASL握手呢?因為SASL握手只針對已經(jīng)注冊的用戶在登陸服務(wù)器的時候使用.(修改密碼和刪除用戶的時候需要SASL握手)下面以openfire作為服務(wù)器,注冊一個用戶的過程如下:(假設(shè)已經(jīng)完成了TLS握手)1. ( C->S ) <stream:stream  ...  閱讀全文

            posted @ 2008-11-06 12:59 ysong.lee 閱讀(4561) | 評論 (3)編輯 收藏

            2008年11月3日 #

            openssl使用

                 摘要: 1. websiteSSL(secure Socket Layer)TLS(transport Layer Security) - SSL3.0基礎(chǔ)之上提出的安全通信標準,目前版本是1.0openssl 主頁 -> http://www.openssl.org/openssl 中文文檔 -> http://www.chinaunix.net/jh/13/478901.html 2. 如何編譯O...  閱讀全文

            posted @ 2008-11-03 14:08 ysong.lee 閱讀(12164) | 評論 (1)編輯 收藏

            2008年10月29日 #

            如何利用jabber協(xié)議與gtalk服務(wù)器通訊 - 建立會話

             客戶端與gtalk server建立會話的過程如下(默認中間沒有錯誤發(fā)生):

            1. ( C->S ) 連接到服務(wù)器, 發(fā)送'hello'信息.
            <stream:stream to="gmail.com" version="1.0" xmlns:stream="
            2. ( S->C ) 服務(wù)器回應(yīng)'hello'信息
            <?xml version="1.0" encoding="UTF-8"?>
            <stream:stream from="gmail.com" id="A9D1B4DB24EA879C" version="1.0" xmlns:stream="

            3. ( S->C ) 服務(wù)器要求TLS, SASL
             <stream:features>
              <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls>
              <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
                <mechanism>X-GOOGLE-TOKEN</mechanism>
              </mechanisms>
            </stream:features>

            4. ( C->S ) 開始TLS
            <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

            5. ( S->C ) 服務(wù)器允許繼續(xù)TLS
            <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

            6. ( C->S ) TLS握手
            客戶端向服務(wù)器發(fā)起TLS握手請求, 如果握手成功, 執(zhí)行#7 (可以使用openssl實現(xiàn)TLS的握手功能)

            7. ( C->S ) TLS握手結(jié)束后, 發(fā)送新的'hello'消息
            <stream:stream to="gmail.com" version="1.0" xmlns:stream="

            8. ( S->C ) 服務(wù)器回應(yīng)'hello'消息
            <?xml version="1.0" encoding="UTF-8"?>
            <stream:stream from="gmail.com" id="D38877BD862E0EE4" version="1.0" xmlns:stream="

            9. ( S->C ) 服務(wù)器要求SASL
            <stream:features>
              <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
                <mechanism>PLAIN</mechanism>
                <mechanism>X-GOOGLE-TOKEN</mechanism>
              </mechanisms>
            </stream:features>

            10. ( C->S ) 客戶端執(zhí)行SASL
            <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">
              AHlzb25nLmxlZUBnbWFpbC5jb20AeXNvbmdAMTk4NA==
            </auth>

            auth的cdata的格式 '\0'+username+'\0'+password 的base64編碼, username和password必須是經(jīng)過認證的.
            例如:
            '\0' +
            'ysong.lee@gmail.com' + '\0' + 123456 -> 經(jīng)過base64編碼處理后變?yōu)閏data

            11. ( S->C ) SASL成功
            <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>

            12. ( C->S ) 客戶端發(fā)送新的'hello'消息
            <stream:stream to="gmail.com" version="1.0" xmlns:stream="
            13. ( S->C ) 服務(wù)器回應(yīng)'hello'消息
            <?xml version="1.0" encoding="UTF-8"?>
            <stream:stream from="gmail.com" id="00035A2B998BF4B9" version="1.0" xmlns:stream="

            14. ( S->C ) 服務(wù)器要求綁定資源和建立一個會話
            <stream:features>
              <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
              <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
            </stream:features>

            15. ( C->S ) 客戶端綁定申請一個資源
            <iq type="set" id="1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></iq>

            16. ( S->C ) 服務(wù)器返回綁定資源的結(jié)果
            <iq id="1" type="result">
              <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
                <jid>ysong.lee@gmail.com/BC20B630</jid>
              </bind>
            </iq>

            17. ( C->S ) 客戶端申請建立會話
            <iq type="set" id="2">
              <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
            </iq>

            18. ( S->C ) 服務(wù)器返回建立會話成功
            <iq type="result" id="2"/>


            到此, Client和Gtalk server的一個會話已經(jīng)建立, 可以根據(jù)jabber協(xié)議進行其它操作. 請求聯(lián)系人列表, 發(fā)消息等.


            posted @ 2008-10-29 00:29 ysong.lee 閱讀(4319) | 評論 (3)編輯 收藏

            2008年10月22日 #

            openssl使用(補)

                 摘要: 1. 使用OpenSSL內(nèi)置的數(shù)據(jù)結(jié)構(gòu)BIO可以方便的創(chuàng)建安全和非安全鏈接,在IBM Web上的"使用OpenSSL進行安全編程"系列的三篇文章是個不錯的入門:http://www.ibm.com/developerworks/cn/linux/l-openssl.htmlhttp://www.ibm.com/developerworks/cn/linux/l-openssl2.htmlhttp:...  閱讀全文

            posted @ 2008-10-22 10:48 ysong.lee 閱讀(2788) | 評論 (10)編輯 收藏

            2008年10月18日 #

            gloox代碼分析2 - xml parser模塊

            gloox自己實現(xiàn)了xml的解析模塊,沒有用到第三方的庫(tinyXML,expat )
            主要涉及的文件:
            tag.h (tag.cpp)
            taghandler.h
            parser.h (parser.cpp)

            1. Tag一個Tag就是一個XML元素
            例如:
            a.
            <book kind='computer'>
              <store id='23'/>
              <author>
                qiang
              </author>
            </book>
            b. <book id='32'/>
            c. <book>name1</book>

            首先介紹一個概念: escape-string,何為escape-string?
            在escape-string中:
             '&'轉(zhuǎn)換成&amp;, '<'轉(zhuǎn)換成&lt;, '>'轉(zhuǎn)換成&gt;.
            編碼表如下:
            //////////////////////////////////////////////////////////////////////////
            // 編碼表 (中間的空格去掉,這里只是為了方便顯示):
            // -------------------------------------------------------
            // | 字符     | 十進制 | 十六進制 | THML字符集 | Unicode |
            // -------------------------------------------------------
            // | " 雙引號 | & # 34;  | & # x22;   | "          | \u0022  |
            // -------------------------------------------------------
            // | ' 單引號 | & # 39;  | & # x27;   | & apos;     | \u0027  |
            // -------------------------------------------------------
            // | & 與     | & # 38;  | & # x26;   | & amp;      | \u0026  |
            // -------------------------------------------------------
            // | < 小于號 | & # 60;  | & # x3C;   | & lt;       | \u003c  |
            // -------------------------------------------------------
            // | > 大于好 | & # 62;  | & # x3E;   | & gt;       | \u003e  |
            // -------------------------------------------------------
            gloox - APIs
            Tag::escape()    功能: string -> escape-string
            Tag::relax()  功能: escape-string -> string

            主要成員變量:
            attributes - 所有屬性的list
            name - 節(jié)點名字
            cdata - 節(jié)點數(shù)據(jù),例如<name>cdata</name>中的cdata
            children - 所有的子節(jié)點
            parent - 父節(jié)點指針,如果沒有則為空
            bool incoming - 表示構(gòu)造xml node的時候傳入的字符串是否是escape-string,如果是,需要在構(gòu)造的時候調(diào)用relex把escape-string轉(zhuǎn)換成string.

            主要方法:
            也就是一些針對name\children\attributes\cdata進行增加\刪除\修改的方法
            xml()方法返回該節(jié)點的一個完整的xml數(shù)據(jù)流
            findTag和findTagList提供對XPath的支持.

            例如:
            屏幕將輸出:
            <book kind='computer'><store id='23'/><author>qiang</author></book>
             1#include <iostream>
             2#include "tag.h"
             3
             4#pragma comment( lib, "gloox.lib" )
             5using namespace gloox;
             6
             7// <book kind='computer'>
             8//   <store id='23'/>
             9//   <author>
            10//     qiang
            11//   </author>
            12// </book>
            13//
            14
            15
            16int main( int argc, char* argv[] ) {
            17  Tag* tag_book = new Tag( "book");
            18  tag_book->addAttribute( "kind""computer" );
            19  
            20  Tag* tag_store = new Tag( "store" );
            21  tag_store->addAttribute( "id""32" );
            22
            23  Tag* tag_author = new Tag( "author""qiang" );
            24
            25  tag_book->addChild( tag_store );
            26  tag_book->addChild( tag_author );
            27
            28  std::cout<<tag_book->xml()<<std::endl;
            29  return 0;
            30}

            2. TagHandler是一個接收parser解析完成的tag的接口,繼承該類,則可以接收parser解析的tag對象事件.
            只有一個接口
            virtual void handleTag( Tag *tag ) = 0 - 接收解析完的tag

            3. Parser一個XML解析器
            提供的接口非常簡潔,只需要一個TagHandler來構(gòu)造,該handler接收并處理解析的tag,另外只有一個feed接口來填充數(shù)據(jù).
            要注意的是feed接口填充的數(shù)據(jù)必須是一個格式正確的xml,否則無法解析,也就是說parser不會判斷xml的格式。

            例如:
            下面的例子中對feed來說分開填充和一次性填充數(shù)據(jù)的效果是一樣的,也就是scenario1和scenario2的效果是一樣的,這也剛好和上層應(yīng)用中TCP 流處理的方式統(tǒng)一,對于接收到服務(wù)器端的XML流,無論是否完整,只需要直接feed就可以了。handlerTag方法將收到兩個
            xml tag解析完成的事件,分別來自scenario1和scenario2,屏幕將輸出:
            <book kind='computer'><store id='23'/><author>qiang</author></book> 
            <book kind='computer'><store id='23'/><author>qiang</author></book>
             1#include <iostream>
             2#include "tag.h"
             3#include "parser.h"
             4
             5#pragma comment( lib, "gloox.lib" )
             6using namespace gloox;
             7
             8// <book kind='computer'>
             9//   <store id='23'/>
            10//   <author>
            11//     qiang
            12//   </author>
            13// </book>
            14//
            15//
            16
            17class TagHandlerImpl : public TagHandler {
            18public:
            19    ~TagHandlerImpl() {}
            20
            21    void run() {
            22      Parser* parser = new Parser(this);
            23      // scenario1
            24      std::string data = "<book kind='computer'><store id='23'/><author>qiang</author></book>";
            25      parser->feed( data );
            26
            27      // scenario2
            28      std::string data1 = "<book kind='computer";
            29      std::string data2 = "'><store id='23'/><auth";
            30      std::string data3 = "or>qiang</author></book>";
            31      parser->feed( data1 );
            32      parser->feed( data2 );
            33      parser->feed( data3 );
            34    }

            35
            36    void handleTag( Tag *tag ) {
            37      std::cout<<tag->xml()<<std::endl;
            38    }

            39}
            ;
            40
            41int main( int argc, char* argv[] ) {
            42  TagHandlerImpl* taghandlerImpl = new TagHandlerImpl();
            43  taghandlerImpl->run();
            44
            45  return 0;
            46}


            posted @ 2008-10-18 14:51 ysong.lee 閱讀(2580) | 評論 (0)編輯 收藏

            2008年10月17日 #

            gloox代碼分析1 - connect模塊

            主要分析gloox的connect模塊,涉及的文件:
            connectionbase.h
            connectiondatahander.h
            connectionhandler.h
            connectiontcpbase.h (connectiontcpbase.cpp)
            connectiontcpclient.h (connectiontcpclient.cpp)
            connectiontcpserver.h (connectiontcpserver.cpp)

            1. ConnectionBase抽象連接類,表示一個socket連接。
            3個數(shù)據(jù)成員:
            server和ip - 需要連接到的目標地址和端口(在ConnectionTcpServer是要綁定的本地地址)
            connectionState - 連接的當前狀態(tài) (一個三種狀態(tài)disconnected | connecting | connected)
            connectionDataHandler - 處理三類ConnectionBase中的三類事件 ( 數(shù)據(jù)接收 | 連接建立 | 連接斷開 )
            5個主要方法:
            connect - 建立一個socket連接
            disconnect - 斷開一個socket連接
            send - 發(fā)送數(shù)據(jù),該方法直到要發(fā)送的數(shù)據(jù)全部發(fā)送完畢才返回
            recv( int timeout ) - 接收數(shù)據(jù),接收到數(shù)據(jù)或者timeout返回
            receive - 把connection設(shè)置成"接收模式",也就是循環(huán)的調(diào)用recv接收數(shù)據(jù),直到連接斷開該方法返回,
                           該方法保證這個連接可以循環(huán)的接收數(shù)據(jù).

            注意: recv和receive的區(qū)別。


            2. ConnectionDataHandler處理繼承自ConnectionBase的對象的事件
            handlerReceivedData - 接收到數(shù)據(jù)
            handlerConnect - 一個原始的套接字連接建立
            handlerDisconnect - 一個原始的套接字連接斷開

            3. ConnectionTcpBase一個基本的TCP連接,繼承自ConnectionBase
            數(shù)據(jù)成員
            bool cancel - 表示連接是否應(yīng)該斷開,默認為true. (true表示連接斷開)
                                 函數(shù)disconnect也就是僅僅設(shè)置cancel為true.
                                 在函數(shù)receive循環(huán)接收數(shù)據(jù)的邏輯中會檢測cancel,如果為true,則表示連接斷開,則返回,退出"接收模式"
            int bufSize - buf的大小,默認是1024
            char* buf - 緩沖區(qū),大小事bufSize + 1 (在ConnectionTcpBase中并沒有用到這個緩沖區(qū),供上層使用E.g. ConnectionTcpClient的recv來接收數(shù)據(jù))

            實現(xiàn)的主要方法:
            send - 發(fā)送數(shù)據(jù)
            receive - "循環(huán)"接收數(shù)據(jù)
            dataAvailable( int timeout ) - 一個私有方法,作用是測試socket上目前是否有數(shù)據(jù)可讀,如果有返回true. 可以供recv調(diào)用. 避免了阻塞的調(diào)用原始套接字方法::receive或者::accept.

            4. ConnectionTcpClient實現(xiàn)一個基本的TCP連接,繼承自ConnectionTcpBase
            實現(xiàn)的主要方法
            connect - 連接到目標地址,如果成功,則調(diào)用handler->handlerConnect,失敗則調(diào)用handler->handlerDisconnect
            recv - 接收數(shù)據(jù),如果接收到數(shù)據(jù),馬上調(diào)用handler->handlerReceiveData,接收發(fā)生錯誤,表示連接斷開,調(diào)用handler->handlerDisconnect

            5. ConnectionHandler一個抽象類,用來接收一個客戶端連接的請求,該類用于ConnectionTcpServer
            只有一個接口:
            handleIncomingConnection( ConnectionBase *connect ) - &connect表示新建立的連接請求,哪原始的socket做類比相當于accept返回的socket.

            注意: 區(qū)別于ConnectionDataHandler用于處理一個特定連接的中的事件(數(shù)據(jù)到來,連接斷開,連接建立),ConnectionListener用于XMPP Stream.

            6. ConnectionTcpServer,實質(zhì)上就是一個偵聽socket,同原始的socket做類比就是一個調(diào)用了bind/listen之后處于偵聽狀態(tài)的socket.
            主要數(shù)據(jù)成員:
            connectionHandler - 接收新到來的連接,接收到之后調(diào)用handlerIncomingConnection
            主要方法:
            connect - 建立套接字,綁定到本地地址,偵聽bind/listen
            recv - 調(diào)用accept接收一個socket連接,如果成功,則用accpet返回的socket創(chuàng)建一個ConnectionTCPClient,調(diào)用handlerIncomingConnection來處理新進的連接.

            總結(jié):
            ConnectionTcpServer和ConnectionTcpClient的區(qū)別:
            connect (client) - 連接到服務(wù)器,使connection處于可以接收數(shù)據(jù)的狀態(tài)
            connect(server) - 綁定到本地地址,偵聽,使connection處于可以接收新連接的狀態(tài)(accept)

            recv(client) - 接收數(shù)據(jù),調(diào)用connectionDataHandler->handlerReceivedData
            recv(server) - 接收新連接,調(diào)用connectionHandler->handlerIncomingConnection

            receive(Client) - 接收數(shù)據(jù)狀態(tài),循環(huán)接收數(shù)據(jù),調(diào)用disconnect時退出
            receive(Server) - 接收連接狀態(tài),循環(huán)接收連接,調(diào)用disconnect時退出.

            所以ConnectionTcpClient有發(fā)送數(shù)據(jù)和循環(huán)接收數(shù)據(jù)的能力,ConnectionTcpServer有偵聽客戶端連接的能力。當有特定的事件發(fā)生的時候,會自動觸發(fā)相關(guān)的handler來進行處理,如數(shù)據(jù)到來,連接建立\斷開,新連接到來等等。

            問題:
            這種設(shè)計模式使receive處于一個無限的while循環(huán),不斷的調(diào)用select+accpet或者select+receive,是否利于send之類的方法在同一個socket上發(fā)送數(shù)據(jù)?
                                                     

            posted @ 2008-10-17 21:20 ysong.lee 閱讀(1651) | 評論 (0)編輯 收藏

            2008年10月16日 #

            如何在windows編譯gloox

            1. Enviroment
             "gloox - 0.9.9.5" + "Windows Server 2008" + "VC++ 2008"

            2. config.h.win
            HAVE_WINTLS
            HAVE_WINDNS_H
            HAVE_SETSOCKOPT

            默認編譯的時候出錯:
            dns.obj : error LNK2019: unresolved external symbol _DnsFree@8 referenced in function "public: static class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > __cdecl gloox::DNS::resolve(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class gloox::LogSink const &)" (?resolve@DNS@gloox@@SA?AV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@00ABVLogSink@2@@Z)
            dns.obj : error LNK2019: unresolved external symbol _DnsQuery_A@24 referenced in function "public: static class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > __cdecl gloox::DNS::resolve(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class gloox::LogSink const &)" (?resolve@DNS@gloox@@SA?AV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@00ABVLogSink@2@@Z)
            tlsschannel.obj : error LNK2019: unresolved external symbol _EncryptMessage@16 referenced in function "public: virtual bool __thiscall gloox::SChannel::encrypt(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?encrypt@SChannel@gloox@@UAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
            tlsschannel.obj : error LNK2019: unresolved external symbol _DecryptMessage@16 referenced in function "public: virtual int __thiscall gloox::SChannel::decrypt(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?decrypt@SChannel@gloox@@UAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
            tlsschannel.obj : error LNK2019: unresolved external symbol __imp__FreeCredentialsHandle@4 referenced in function "public: virtual void __thiscall gloox::SChannel::cleanup(void)" (?cleanup@SChannel@gloox@@UAEXXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol __imp__DeleteSecurityContext@4 referenced in function "public: virtual void __thiscall gloox::SChannel::cleanup(void)" (?cleanup@SChannel@gloox@@UAEXXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol _FreeContextBuffer@4 referenced in function "public: virtual bool __thiscall gloox::SChannel::handshake(void)" (?handshake@SChannel@gloox@@UAE_NXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol _InitializeSecurityContextA@48 referenced in function "public: virtual bool __thiscall gloox::SChannel::handshake(void)" (?handshake@SChannel@gloox@@UAE_NXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol _AcquireCredentialsHandleA@36 referenced in function "public: virtual bool __thiscall gloox::SChannel::handshake(void)" (?handshake@SChannel@gloox@@UAE_NXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol _QueryContextAttributesA@12 referenced in function "private: void __thiscall gloox::SChannel::setSizes(void)" (?setSizes@SChannel@gloox@@AAEXXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol __imp__CertFreeCertificateChain@4 referenced in function "private: void __thiscall gloox::SChannel::validateCert(void)" (?validateCert@SChannel@gloox@@AAEXXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol __imp__CertVerifyCertificateChainPolicy@16 referenced in function "private: void __thiscall gloox::SChannel::validateCert(void)" (?validateCert@SChannel@gloox@@AAEXXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol __imp__CertGetCertificateChain@32 referenced in function "private: void __thiscall gloox::SChannel::validateCert(void)" (?validateCert@SChannel@gloox@@AAEXXZ)
            tlsschannel.obj : error LNK2019: unresolved external symbol __imp__CertNameToStrA@20 referenced in function "private: void __thiscall gloox::SChannel::certData(void)" (?certData@SChannel@gloox@@AAEXXZ)

            3. 加入需要的lib, 編譯成功
            ws2_32.lib Dnsapi.lib Secur32.lib Crypt32.lib

            posted @ 2008-10-16 20:42 ysong.lee 閱讀(1755) | 評論 (0)編輯 收藏

            僅列出標題  
            久久午夜无码鲁丝片秋霞| 91精品国产乱码久久久久久| 国产亚洲美女精品久久久久狼| AV无码久久久久不卡网站下载| 99久久免费国产特黄| 成人国内精品久久久久影院VR| 亚洲国产成人久久精品99| 无码专区久久综合久中文字幕| 国产精品青草久久久久婷婷 | 国产69精品久久久久观看软件| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 国产精品伊人久久伊人电影| 麻豆久久久9性大片| 国内精品伊人久久久久AV影院| 久久播电影网| 国产99久久精品一区二区| 久久久午夜精品| 久久久精品日本一区二区三区| 久久精品一本到99热免费| 亚洲国产精品一区二区三区久久 | 合区精品久久久中文字幕一区 | 国产69精品久久久久9999| 欧洲成人午夜精品无码区久久| 久久久久国产一级毛片高清板| 久久99国产综合精品免费| 亚洲国产精品无码久久一线| 亚洲欧美成人久久综合中文网 | 99热热久久这里只有精品68| 国产成人久久精品一区二区三区| 久久久久国产精品嫩草影院| 无码乱码观看精品久久| 国产成人无码精品久久久免费 | 中文字幕久久欲求不满| 91久久精品91久久性色| 久久久久高潮毛片免费全部播放| 国产69精品久久久久APP下载| 久久久久国产一区二区三区| 久久国产免费直播| 久久久久久av无码免费看大片| 亚洲国产天堂久久综合网站| 久久精品国产亚洲麻豆|