惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
L
LINUX DO - 热门话题
T
Threat Research - Cisco Blogs
T
Tenable Blog
TaoSecurity Blog
TaoSecurity Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
AI
AI
P
Proofpoint News Feed
A
About on SuperTechFans
P
Privacy International News Feed
月光博客
月光博客
雷峰网
雷峰网
S
Secure Thoughts
博客园 - 叶小钗
博客园 - 聂微东
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
The Cloudflare Blog
SecWiki News
SecWiki News
The Hacker News
The Hacker News
V
Vulnerabilities – Threatpost
罗磊的独立博客
A
Arctic Wolf
阮一峰的网络日志
阮一峰的网络日志
Know Your Adversary
Know Your Adversary
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Troy Hunt's Blog
The Last Watchdog
The Last Watchdog
Schneier on Security
Schneier on Security
小众软件
小众软件
有赞技术团队
有赞技术团队
博客园 - 司徒正美
T
Tailwind CSS Blog
量子位
C
Cybersecurity and Infrastructure Security Agency CISA
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Security @ Cisco Blogs
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
L
Lohrmann on Cybersecurity

博客园 - protorock

WPF:通过Window.DataContext实现窗口间传值 How to add dependency on a Windows Service AFTER the service is installed 实现泛型IEnumerable接口 关于Local System/Local Service/Network Service账户 vs2010 c# 管理win7防火墙 WIN7系统中连接点(Junction Points) VISUAL STUDIO 2010 单元测试 Windows Server 2008 R2上Ext.net 生产环境搭建 在Windows7 (SP1)配置IIS7.5 + .Net Framework 4.0.30319 将Google Map 与ASP.NET AJAX 扩展集成 web.config 加密步骤 - protorock - 博客园 GridView 与自定义对象的绑定和分页 在Windows 2003 中发布 ASP.NET 2.0 + SQL SERVER Express SQL Server 2005 Express Edition 用户实例 在 windows2003 Server VS2005 安装 .Net 3.0 .net framework 2.0,3.0与3.5之间的关系 SharpMap AjaxMapControl 中 Zoomin/Zoomout 操作时冻结问题 Sharpmap AjaxMapControl 分析 HTTP 协议概要(二) 持久连接
程序集强名称(Strong Name)延迟签名与签名
protorock · 2012-12-14 · via 博客园 - protorock

一、原理

二、延迟签名与签名操作

假设正在开发一个类库 YourLibrary.dll

1)生成公钥/私钥对
  sn -k Your.snk
2)提取出公钥并存放在public.snk中。public.snk的目的是为了便于分发;在Your.snk中的私钥是无法提取出来的
  sn -p Your.snk public.snk
3)对程序集进行延迟签名
  csc /keyfile:public.snk /delaysign /t:library YourLibrary.cs
4)让CLR信任程序集的内容,不执行签名验证
  sn -Vr YourLibrary.dll
这个命令会在注册表中添加相应项,所以对同一程序集只需执行一次。至此  YourLibrary.dll就可以安装到GAC中
5)在开发过程,开发人员可以引用此程序集,就好像强命名程序集一样
6)在最终部署前,一定要用私钥进行签名。否则,其他人可以用公钥做一个相同签名的程序集,替换掉这个程序集。
  sn -R YourLibrary.dll Your.snk
7)打开验证,在4)中的注册表项会被相应移除
  sn -Vu YourLibrary.dll