[erlang-questions] PKCS-7 signing

Szoboszlay Dániel dszoboszlay@REDACTED
Mon Nov 25 22:30:54 CET 2013


Hi,

If it is only a manifest file that (I assume) doesn't change very often I  
would rather use "openssl smime" to create the signature.

I was looking into PKCS-7 signing with Erlang recently, but I could avoid  
doing it after all. My impression was that there is no direct support for  
it in OTP, so you'd either have to call the openssl routines via e.g. a  
port driver or use the existing crypto functions to sign your data and put  
together a SignedData structure according to RFC 2315 using the ASN.1  
application. Yet, I might be wrong.

Daniel

On Mon, 25 Nov 2013 20:55:04 -0000, James Wheare <james@REDACTED> wrote:

> Hullo,
>
> I'm working on implementing Apple's Push Notifications for Websites
> system and having some trouble signing the "push package"
>
> The docs [1] say this:
>
> "The signature is a PKCS #7 detached signature of the manifest file.
> Sign the manifest file with the private key associated with your web
> push certificate that you obtained while registering with Apple. In
> PHP, you can do this with the openssl_pkcs7_sign function"
>
> So I'm looking for an equivalent to PHP's openssl_pkcs7_sign [2] in  
> erlang.
>
> The release notes [3] for the public_key module seem to offer some
> hope, with "experimental" PKCS-7 support announced in 0.17, but I
> can't find anything about it in the docs [4]
>
> Any advice on solving this?
>
> Thanks,
> - James
>
> [1]  
> https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW10
> [2] http://php.net/manual/en/function.openssl-pkcs7-sign.php
> [3] http://www.erlang.org/doc/apps/public_key/notes.html
> [4] http://erlang.org/doc/man/public_key.html
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list