本文介绍了存储在DB的X509Certificate2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 是否有可能一个X509Certificate2存储在SQL Server表,而不是拉从文件系统.p12文件?我敢肯定,你可以,但不知道如何去了解这一点。Is it possible to store an X509Certificate2 in a SQL Server table rather than pull a .p12 file from the file system? I'm sure you can but not sure how to go about this.推荐答案这是绝对有可能的X509Certificate2有一个可以保存RAWDATA 财产到SQL数据库。为了重建可以使用的证书,这个构造This is definitely possible, the X509Certificate2 has a RawData property that can be saved into your SQL Database. To reconstruct the certificate you can use this constructorvar cert = new X509Certificate2(filename);var data = cert.RawData;// save data to database...// Fetch data from database...cert = new X509Certificate2(data); 这篇关于存储在DB的X509Certificate2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-14 17:44