Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problema de funcionamiento #8

Open
grisha-pipoyan opened this issue Nov 7, 2020 · 0 comments
Open

problema de funcionamiento #8

grisha-pipoyan opened this issue Nov 7, 2020 · 0 comments

Comments

@grisha-pipoyan
Copy link

grisha-pipoyan commented Nov 7, 2020

var ocspCerts = ValidateCertificateByOCSP(unsignedProperties, client, issuer, ocspServers, digestMethod);

esta función funciona solo cuando escribí, de lo contrario hay una excepción.
Estoy usando mi tarjeta CA. Vi en todas partes que issuerCert está en la chain[1], pero en mi caso está en la chain[0]. ¿Es normal?

X509Chain chain = new X509Chain();
chain.Build(cert);
var issuer = chain.ChainElements[0].Certificate;
var client = chain.ChainElements[1].Certificate;

y aquí necesito cambiar. Y despues de eso todo esta bien

// original
//byte[] resp = ocsp.QueryBinary(clientCert, issuerCert, ocspUrl);

// Yo lo cambie
byte[] resp = ocsp.QueryBinary(issuerCert,clientCert,ocspUrl);

¿puedes ayudarme a entender por qué? si no hago ningún cambio, hay una excepción "null reference"
string certOcspUrl = ocsp.GetAuthorityInformationAccessOcspUrl(issuerCert);

Obtengo ocspURL cuando uso el índice [0] como emisor, no [1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant