- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在生成一个有效的 iPhone 配置 XML 配置文件并通过 Rails 页面提供它。
我正在尝试找出如何使用 x509 证书以编程方式对 XML 文件进行签名,以便 iPhone 将其识别为已签名的配置文件
这是一个很好的教程,介绍了签署 iPhone 配置文件所涉及的内容 http://www.rootmanager.com/iphone-ota-configuration/iphone-ota-setup-with-signed-mobileconfig.html
具体来说,在命令行上执行此操作会签署未签名的文件 company.mobileconfig
openssl smime -sign -in company.mobileconfig -out signed.mobileconfig -signer server.crt -inkey server.key -certfile cert-chain.crt -outform der -nodetach
假设我有字符串形式的 XML 文件,Ruby on Rails 中的等效命令是什么?我可以找到很多关于通过 SSL 连接与 Rails 提供内容的文档,但没有很多关于在交付前签署任意内容的文档。
最佳答案
以下代码行将签署 iPhone 配置 XML 配置文件。
ssl_key_str = File.read("/path/to/private.key”)
ssl_key = OpenSSL::PKey::RSA.new(ssl_key_str)
ssl_cert_str = File.read("/path/to/certificate.crt”)
ssl_cert = OpenSSL::X509::Certificate.new(ssl_cert_str)
profile = File.read("/path/to/profile.mobileconfig")
signed_profile = OpenSSL::PKCS7.sign(ssl_cert, ssl_key, profile, [], OpenSSL::PKCS7::BINARY)
关于iphone - 使用 Ruby on Rails 签署 iPhone 配置 XML 配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4446247/
有人可以告诉我签署我的 clickonce 应用程序的步骤吗? 如果从某人那里购买证书,我该如何安装它在我的开发盒以及我希望它运行的服务器上? 请概述步骤。 马尔科姆 最佳答案 以下是我相信您正在执行
我正在使用命令行 jarsigner.exe -keystore Keys.jks base.apk debug0 使用我自己的 key 退出 APK ,在删除 META-INF/CERT.RSA、C
我使用 iTextSharp 签署 PDF 文件。但是 Adobe Reader 无法验证我的签名。我使用证书颁发机构生成的 SHA-2 测试证书(我也尝试过 SHA-1)。我已经为该机构的测试证
我在尝试签署 F# 类库项目时遇到了很多麻烦。 首先我试过这个thread ,使用 AssemblyKeyFileAttribute 但没有成功。 我还尝试将标志“--keyfile:keyfile.
我正在尝试掌握 .NET dll/程序集的正式签名。 尤其 何时以及如何使用私钥 创建/控制私钥的最佳实践 需要签署什么样的模块/最佳实践 最佳答案 请参阅使用 Strong Name Signatu
我有一个由五个项目组成的解决方案,每个项目都编译成单独的程序集。现在我正在对它们进行代码签名,但我很确定我做错了。这里的最佳做法是什么? 用不同的 key 对每个签名;确保密码不同 用不同的 key
我有一个由五个项目组成的解决方案,每个项目都编译为单独的程序集。现在我正在对它们进行代码签名,但我很确定我做错了。这里的最佳实践是什么? 使用不同的 key 对每个签名进行签名;确保密码不同 使用不同
尝试在 Java 中签署 SOAP 消息时抛出异常: 14:47:39.896 [AWT-EventQueue-0] ERROR com.ui.FinestraPrincipal - WSHandle
我正在运行 java web start 应用程序。由于应用程序数字签名已过期。我已经从 CA 购买了签名,并使用 storetype 作为 pkcs12 对我的 jar 文件进行了签名。 对 JNL
我已经在jar中手动添加了一些类文件。并在服务器中替换。但服务器没有拿出这个新的 jar 说:java.lang.SecurityException:类“test.TestProcess2”的签名者信
我想使用 keytool 对我的插件 jar 进行签名以生成 key 。 我知道有 -validity 选项,但如何设置它以使插件始终有效且永不过期。 谢谢 最佳答案 查看 keytool 文档: V
我有一个需要互联网访问的 Java 应用程序,因为它通过 WebView 嵌入了 Web 浏览器。 JavaFX 组件。 如果应用程序未打包在 Jar 中,则执行不会出现问题。但是,当打包在 Jar
我以前做过,但我完全忘记了如何签署 activeX 控件? 最佳答案 Digital Signing for ActiveX Components (MSDN) 关于activex - 签署 Acti
不知不觉中我删除了通常命名如下的钥匙串(keychain)系统证书 Software Signing com.apple.systemdefault com.apple.kerberos.kdc Ap
我尝试了一些基于 iText v1 或 v2 的数字 PDF 签名实用程序,发现似乎整个 PDF 都加载到内存中(对于 60M PDF 进程可能需要多达 300-400MB 的内存)。 最近的 iTe
我正在尝试使用 Python 对 Amazon 的 SimpleDB 服务进行 API 调用。例如,我使用的是最简单的请求 ListDomains。然而,无论我如何尝试,响应始终是“我们计算的请求签名
我的同事给了我一个Java项目来支持和增强。我需要签署 .jar 文件。我只找到了下一个文件:genkey.bat、project.cer、signjar.bat 和 keystore-jar.jar
目前我正在升级我的旧应用程序,它是使用 itextsharp 5.0.0 完成的到 5.4.5(最新)...但是我在获取等效代码时遇到了问题 PdfSignatureAppearance.SetCry
如果我有一个作为 API 请求发送的复杂对象(例如下面的订单),我应该在生成签名时包括所有属性还是应该只使用一个子集? 我问是因为我不清楚,而且从查看其他 API 的请求参数来看,请求参数是扁平和简单
为什么 WP7 项目不支持强名称签名?项目属性中没有签名选项卡。 无论如何,我已经使用 AssemblyInfo.cs 中的 AssemblyKeyFile 和 AssemblyDelaySign 属
我是一名优秀的程序员,十分优秀!