将数字证书从客户端发送到服务器 [英] Sending a digital certificate from a client to a server

查看:131
本文介绍了将数字证书从客户端发送到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨,,



我正在构建一个SSL客户端/服务器应用程序(在单独的项目中),我正在尝试发送数字证书使用SendString()方法从客户端到服务器,但问题是我试图发送的证书类型为CkCert *(因为我使用的是chilkat软件组件)和sendString( )方法只采用字符串类型。而在另一端(服务器)recieveString()方法也只采用字符串类型。



所以,请问如何从转换证书 CkCert *插入const char *类型?



关注

Hi,,

I''m building an SSL client/server application (in separate projects), and i''m trying to send a digital certificate from the client to the server using SendString() method, but the problem is that the certificate i''m trying to send is of type "CkCert* " (since i''m using the chilkat software component), and the sendString() method only takes a "String" type. And at the other end (server) the recieveString() method only takes a "String" type also.

So, kindly how can i convert the certificate from a "CkCert* " typt into a "const char *" type?

Regards

推荐答案

技术上,那里没有办法将CkCert直接发送到套接字上。你可以做的就是在可能的情况下使用它来制作它,并在另一端使用unmashal。或者发送内存缓冲区和大小,然后在获取确切的缓冲区大小时转换为CkCert。
technically,there is no way to send CkCert derictly across sockets.What you can do is to mashal it if possible and so unmashal at the other side. or send the memory buffer and size, then cast to CkCert when fetch the exact buffer size.


这篇关于将数字证书从客户端发送到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆