/[resiprocate]/branches/b-directory-reorg/resip/sip/test/testPksc7.cxx
ViewVC logotype

Annotation of /branches/b-directory-reorg/resip/sip/test/testPksc7.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2437 - (hide annotations) (download)
Tue Mar 2 01:29:58 2004 UTC (15 years, 11 months ago) by davidb
Original Path: main/sip/resiprocate/test/testPksc7.cxx
File size: 2667 byte(s)
crashes, not sure why

1 davidb 2437 #include <iostream>
2     #include <memory>
3    
4     #include "resiprocate/Pkcs7Contents.hxx"
5     #include "resiprocate/SipMessage.hxx"
6     #include "resiprocate/test/TestSupport.hxx"
7     #include "resiprocate/os/Logger.hxx"
8    
9     using namespace resip;
10     using namespace std;
11    
12     int
13     main(int argc, char** argv)
14     {
15     Log::initialize(Log::COUT, Log::DEBUG, argv[0]);
16    
17     {
18     const Data txt("To: <sip:fluffy@h1.cisco1.sipit.net:5060>\r\n"
19     "From: <sip:user@localhost:5080>;tag=2122f945\r\n"
20     "Via: SIP/2.0/UDP 212.157.205.40:5080;branch=z9hG4bK-c87542-472657511-2--c87542-;rport=5080;received=212.157.205.40\r\n"
21     "Call-ID: 5e50445050086b2e\r\n"
22     "CSeq: 1 MESSAGE\r\n"
23     "Contact: <sip:user@212.157.205.40:5080>\r\n"
24     "Max-Forwards: 70\r\n"
25     "Content-Disposition: attachment;handling=required;filename=smime.p7\r\n"
26     "Content-Type: application/pkcs7-mime;smime-type=enveloped-data;name=smime.p7m\r\n"
27     "User-Agent: SIPimp.org/0.2.3 (curses)\r\n"
28     "Content-Length: 385\r\n"
29     "\r\n"
30     "0%82%01}%06%09*%86H%86%f7%0d%01%07%03%a0%82%01n0%82%01j%02%01%001%82%01%160%\r\n"
31     "82%01%12%02%01%000{0p1%0b0%\r\n"
32     "09%06%03U%04%06%13%02US1%130%11%06%03U%04%08%13%0aCalifornia1%110%0f%06%03U%\r\n"
33     "04%07%13%08San Jose1%0e0%0c\r\n"
34     "%06%03U%04%0a%13%05sipit1)0'%06%03U%04%0b%13 Sipit Test Certificate\r\n"
35     "Authority%02%07U%01%81%02I%00v0%0d%\r\n"
36     "06%09*%86H%86%f7%0d%01%01%01%05%00%04%81%80%80nYR%ba%a1%14%9eV%1c%9b<%f3%80%\r\n"
37     "a7%c3%92%b8%0e%10%7f%n%f2%9\r\n"
38     "1(%83%f1n%94%18dS}yi?%11B%cf%d6%00x1%d0jf$%8f%f5%e0l%d3~%b1%1e%e6%db%b7%af%1\r\n"
39     "0w%ca%fc%b9%19%f9r%b6%8a4%f\r\n"
40     "0%d1,t%83%de+%b0%1f%8b%05'%c6%af%c5%dc9%1d%cb%9f7!%08%15%d2A%0b%f2y\"%03%84%e\r\n"
41     "3R%16%c6%15f%baf%e1/P%04Os%\r\n"
42     "90%ea%e9%a1%a8H1%a2%ad%99%a70K%06%09*%86H%86%f7%0d%01%07%010%14%06%08*%86H%8\r\n"
43     "6%f7%0d%03%07%04%08%d7%a3%1\r\n"
44     "4%02%8fO\"%ef%80(%d1_%05%9e%118@%87%b0%a4%87%e45%e4[1%8b%e6%d2\%b2%e4%d3.%08%\r\n"
45     "93%16%f0%cf(%86%d3%10%b6%ff\r\n"
46     "%cf%88G%81W");
47    
48     auto_ptr<SipMessage> msg(TestSupport::makeMessage(txt.c_str()));
49    
50     Pkcs7Contents* pkc = dynamic_cast<Pkcs7Contents*>(msg->getContents());
51     assert(pkc);
52     }
53    
54     return 0;
55     }

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27