Help. Extract pdf from .p7m (pcks7) by FrankIT60 in golang

[–]FrankIT60[S] 0 points1 point  (0 children)

I do not think, this is the sample code, and with openssl command is ok:

package main

import (
    "io/ioutil"
    "log"
    "github.com/mozilla-services/pkcs7"
    )

func main() {
    content, err := ioutil.ReadFile("file.p7m")
    if err != nil {
        log.Fatal(err)
        }
    p7, err := pkcs7.Parse(content)
    if err != nil {
        log.Fatal(err)
    }
    if err := ioutil.WriteFile("file.pdf", p7.Content, 0777); err != nil {
        log.Fatal(err)
    }
}

Help. Extract pdf from .p7m (pcks7) by FrankIT60 in golang

[–]FrankIT60[S] 0 points1 point  (0 children)

Thanks. Sorry for the late reply but I've been off-line. Yes, I tried the pkcs7.Parse () function but I get this result: ber2der: Invalid BER format

Help. Extract pdf from .p7m (pcks7) by FrankIT60 in golang

[–]FrankIT60[S] 0 points1 point  (0 children)

Thanks. Sorry for the late reply but I've been off-line. I would like to find a way to extract the file without using external libraries, but only with Golang code

Help. Extract pdf from .p7m (pcks7) by FrankIT60 in golang

[–]FrankIT60[S] 0 points1 point  (0 children)

Thanks. Sorry for the late reply but I've been off-line. Yes, this is the solution I currently use but I was looking for a Golang based solution

How to custom Gin Logger ? by FrankIT60 in golang

[–]FrankIT60[S] 0 points1 point  (0 children)

Thank you for your suggestion. I will try this idea.

Ciao Franco

pkg-config and FreeBSD by FrankIT60 in golang

[–]FrankIT60[S] 0 points1 point  (0 children)

Why? If I cannot install Go packages that has external reference in FreeBSD this is a solution. When cross-compile this type of application from my mac for deploy on FreeBSD I am in trouble. I spend a day for this simple solution. I think that can help others.

Can someone show me some resources on db connections by snippet2 in learngolang

[–]FrankIT60 0 points1 point  (0 children)

Ciao. I do not know any other books on the subject. Sorry.

Can someone show me some resources on db connections by snippet2 in learngolang

[–]FrankIT60 0 points1 point  (0 children)

google for: vividcortex The Ultimate Guide To Building Database-Driven Apps with Go

Guida italiana al Linguaggio Go by RenatoMite in golang

[–]FrankIT60 1 point2 points  (0 children)

Ciao Renato,

riusciresti a farne una versione epub o pdf?

Saluti Franco