来自基于 PHP 的应用程序的 Microsoft HealthVault 证书

发布于 2024-11-26 21:34:07 字数 521 浏览 0 评论 0原文

一些背景信息

我正在开发一个应该与 Microsoft HealthVault 交互的 PHP 应用程序。我能够从 https://sourceforge.net/projects/healthvaultphp/ 下载健康库库并获取存储在我的 healthvault 测试帐户中的数据。

现在,该库附带了“沙箱”app.id、app.cer 等所有身份验证内容。所以我遇到的问题是如何为我的 php 应用程序获取实时证书。我从微软下载了 makecert.exe 文件来为我生成证书,但与 healthvaultphp 库中包含的文本文件相比,它生成了一个二进制文件。

我的问题

以下文件中应如何以及包含哪些内容?

身份验证/app.cer

身份验证/app.fp

身份验证/app.pem

Some background Info

I am working on a PHP application that is supposed to interact with Microsoft HealthVault. I was able to download the health vault library from https://sourceforge.net/projects/healthvaultphp/ and get the data stored in my healthvault test account.

Now the library came with "sandbox" app.id, app.cer, etc. all the authentication stuff. So the issue I am having is how to get live certificate for my php app. I downloaded the makecert.exe file from microsoft to generate a certificate for me, but it generates a binary file compared to the text files included in the healthvaultphp library.

my question

How and what should go into following files?

authentication/app.cer

authentication/app.fp

authentication/app.pem

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

べ映画 2024-12-03 21:34:07

我完全忘记了我在这里发布了这个问题...以下是我解决此问题的方法:

Microsoft Healthvault setup in PHP
所需文件:

app.pem
    RSA private key
app.cer
    Certificate file
app.id
    Application ID
app.fp
    Application thumbprint

生成 PEM 和 CER 文件

Download and install Microsoft Healthvault SDK
    http://msdn.microsoft.com/en-us/healthvault/bb688183
    Install as an administrator
Once installed create new application
    Click ‘Create New Application’ button
    Uncheck ‘Automatially…website…application’ box
    Click ‘Create and Register application’ button
    It will create a certificate name ‘WildcatApp-<appid>’
        app.id will contain <appid> 
    At this point you can click on the ‘HealthVault Application Configuration Center’ link and setup your HealthVault application.
Generate the PFX file
    Right-click on your ‘Certificate Name’
    Click ‘Export public and private keys (.pfx)’ menu item
    Select the desired location for the .pfx file, preferably in third_party/microsoftHealthVault/authentication
Converting PFX file to certificate and private key files
    Do this in your linux vm, you should at this point have access to .pfx file because you put in location mentioned on 3.c
    You will need to use ‘openssl’ to do the next steps
    Generate app.cer
        openssl pkcs12 -in <filename>.pfx -clcerts -nokeys -out app.cer
        press ‘enter’ when asked for ‘import password’
        This file should only contain text starting at ---BEGIN CERTIFICATE--- to ----END CERTIFICATE---- everything before and after should be deleted
        Now you have app.cer file
    Generate app.pem
        openssl pkcs12 -in <filename>.pfx -out app_enc.pem –nocerts
        press ‘enter’ when asked for ‘import password’
        type in your host windows login password for ‘PEM pass phrase’
        This will generate an encrypted private key file
        The encrypted private key file needs to be unencrypted to be able to use in the application
        openssl rsa -in app_enc.pem -out app.pem
        Now you have the app.pem file
Log in to your healthvault configuration screen to get the app id and thumbprint
    https://config.healthvault-ppe.com/default.aspx
    Copy the ‘Application Id’ and insert it in the app.id file
    Click on the ‘Application Id’
    Click on the ‘Public certs’ tab
    Copy the ‘Thumbprint’ and insert it in the app.fp file

此时,您的 app.cer、app.pem、app.id 和 app.fp 文件已可供使用。

Healthvault 应用程序配置
https://config.healthvault-ppe.com/default.aspx

HealthVault 开发人员中心
http://msdn.microsoft.com/en-us/healthvault/bb688183

HealthVault 事物定义
http://developer.healthvault.com/types/types.aspx

I completely forgot that I had posted this question here... following is how I resolved this issue:

Microsoft Healthvault setup in PHP
Files needed:

app.pem
    RSA private key
app.cer
    Certificate file
app.id
    Application ID
app.fp
    Application thumbprint

Generating PEM and CER files

Download and install Microsoft Healthvault SDK
    http://msdn.microsoft.com/en-us/healthvault/bb688183
    Install as an administrator
Once installed create new application
    Click ‘Create New Application’ button
    Uncheck ‘Automatially…website…application’ box
    Click ‘Create and Register application’ button
    It will create a certificate name ‘WildcatApp-<appid>’
        app.id will contain <appid> 
    At this point you can click on the ‘HealthVault Application Configuration Center’ link and setup your HealthVault application.
Generate the PFX file
    Right-click on your ‘Certificate Name’
    Click ‘Export public and private keys (.pfx)’ menu item
    Select the desired location for the .pfx file, preferably in third_party/microsoftHealthVault/authentication
Converting PFX file to certificate and private key files
    Do this in your linux vm, you should at this point have access to .pfx file because you put in location mentioned on 3.c
    You will need to use ‘openssl’ to do the next steps
    Generate app.cer
        openssl pkcs12 -in <filename>.pfx -clcerts -nokeys -out app.cer
        press ‘enter’ when asked for ‘import password’
        This file should only contain text starting at ---BEGIN CERTIFICATE--- to ----END CERTIFICATE---- everything before and after should be deleted
        Now you have app.cer file
    Generate app.pem
        openssl pkcs12 -in <filename>.pfx -out app_enc.pem –nocerts
        press ‘enter’ when asked for ‘import password’
        type in your host windows login password for ‘PEM pass phrase’
        This will generate an encrypted private key file
        The encrypted private key file needs to be unencrypted to be able to use in the application
        openssl rsa -in app_enc.pem -out app.pem
        Now you have the app.pem file
Log in to your healthvault configuration screen to get the app id and thumbprint
    https://config.healthvault-ppe.com/default.aspx
    Copy the ‘Application Id’ and insert it in the app.id file
    Click on the ‘Application Id’
    Click on the ‘Public certs’ tab
    Copy the ‘Thumbprint’ and insert it in the app.fp file

At this point your app.cer, app.pem, app.id, and app.fp files are ready to be used.

Healthvault application configuration
https://config.healthvault-ppe.com/default.aspx

HealthVault Developer Center
http://msdn.microsoft.com/en-us/healthvault/bb688183

HealthVault Thing definitions
http://developer.healthvault.com/types/types.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文