开发基于PJLIB库的SSL加密服务与客户端
发布时间
阅读量:
阅读量
提供一个关于PJSIP库的基本介绍的链接:
http://www.zhimax.com/article/tcp/pjlib.html
PJLIB的测试代码链接如下:
https://trac.pjsip.org/repos/browser/pjproject/tags/2.9/pjlib/src?order=name#pjlib-test
在参考了相关测试代码的基础上,自行编写了一个支持SSL加密的TCP服务器与客户端程序。所使用的开发平台为centos7。
服务端代码:
#include <pjlib.h>
#include <iostream>
#include <netinet/in.h>
#include "PQTEL.pb.h"
using namespace std;
using namespace pqtel_msg;
#define CERT_CA_FILE "./ca.crt"
#define CERT_FILE "./server.crt"
#define CERT_PRIVKEY_FILE "./server.pem"
#define CERT_PRIVKEY_P
全部评论 (0)
还没有任何评论哟~
