1

いくつかの背景情報

Microsoft HealthVault と対話することになっている PHP アプリケーションに取り組んでいます。https://sourceforge.net/projects/healthvaultphp/から Health Vault ライブラリをダウンロードし、healthvault テスト アカウントに保存されているデータを取得できました。

現在、ライブラリには「サンドボックス」app.id、app.cer など、すべての認証が含まれています。したがって、私が抱えている問題は、php アプリのライブ証明書を取得する方法です。Microsoft から makecert.exe ファイルをダウンロードして証明書を生成しましたが、healthvaultphp ライブラリに含まれているテキスト ファイルとは異なり、バイナリ ファイルが生成されます。

私の質問

次のファイルにどのように、何を入れる必要がありますか?

認証/app.cer

authentication/app.fp

認証/app.pem

4

1 に答える 1

1

この質問をここに投稿したことを完全に忘れました...この問題を解決した方法は次のとおりです。

必要なPHPファイルでのMicrosoftHealthvaultのセットアップ:

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 Developer Center http://msdn.microsoft.com/en-us/healthvault/bb688183

HealthVaultThingの定義 http://developer.healthvault.com/types/types.aspx

于 2011-09-16T20:03:46.390 に答える