存储在DB的X509Certificate2

编程入门 行业动态 更新时间:2024-10-22 23:33:03
本文介绍了存储在DB的X509Certificate2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否有可能一个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 constructor

var cert = new X509Certificate2(filename); var data = cert.RawData; // save data to database... // Fetch data from database... cert = new X509Certificate2(data);

更多推荐

存储在DB的X509Certificate2

本文发布于:2023-11-05 08:23:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1560352.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:DB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!