Open frankyclu opened 8 years ago
@diegomasini, please, may you take care of this?
@frankyclu, the piece of code you posted is fine.
accidentally deleted previous post, re-post for record keeping purpose.
I had confusion on in.sign and in.sig, looked almost the same to me
`// validate request signature sig := in.Sig in.Sig = nil
r, s := big.NewInt(0), big.NewInt(0)
r.UnmarshalText(sig.R)
s.UnmarshalText(sig.S)
if in.Sign.Type != pb.CryptoType_ECDSA {
return nil, errors.New("unsupported key type")
}
skey, err := x509.ParsePKIXPublicKey(in.Sign.Key)
`
"The CreateCertificatePair functions allows a user to create and read her enrollment certificate pair. For this, the user has to do two successive invocations of this functions"
from usability stand point this is difficult to follow, can we split this into two APIs? this should be trivial since state used to differentiate 2 separate calls is persisted into db