PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
Certificat, la propriété ..ValidePourSignature retourne Faux
Certificat, la propriété ..ValidePourSignature retourne Faux
Started by Christophe Navarro, Aug., 06 2022 1:32 AM - No answer
Connect yourself…
Christophe Navarro
#1
Registered member
89 messages
Popularité : +4 (4 votes)
Posted on August, 06 2022 - 1:32 AM
Bonjour à tous,
je bute sur la validité d'un certificat, ca ne doit pas etre grand chose, peut etre pourriez vous m'aider :
j'intègre un webservice et celui-ci utilise un certificat.
il s'agit d'un .p12.
J'installe le .p12 sur windows en double cliquant dessus et en suivant les étapes trés simples du wizard (mot de passe ok, magasin de certificat automatique).
Dans windev, je charge le certificat avec CertificatCharge() dans un tableau de certificats, puis je parcours le résultat pour vérifier que le certificat est bien trouvé, et qu'il est valide pour signature (propriété ..ValidePourSignature).
Mais je me heurte à un soucis : ..ValidePourSignature me retourne faux
On a executé le meme programme sur le poste d'un autre dév qui a installé le meme certificat, et pour lui ..validepoursignature retourne vrai, on ne comprend pas pourquoi...
Je ne trouve pas d'infos pouvant m'aider à solutionner ce problème,
qq'un aurait-il une idée sur ce qui pourrait causer ce comportement sur mon poste ? la facon d'installer ou autre détail...
il s'agit d'un certificat émis par l'ASIP Santé (l'institution informatique du ministère de la santé)
mon code :
s
NomFichierCerticatClient
est une chaîne
=
fRepExe
+
fSep
+
"asip-p12-EL-TEST-ORG-AUTH_CLI-20220607-153606.p12"
s
MotDePasseCertificatClient
est une chaîne
=
"********"
//---------
<
BLOC Chargement du certificat client du prescripteur
>
SI PAS
fFichierExiste
(
s
NomFichierCerticatClient
)
ALORS
ErreurConstruit
(
"Le fichier certificat <%1> n'existe pas"
,
s
NomFichierCerticatClient
)
RETOUR
FIN
ta
Certificats
est un tableau de Certificat
=
CertificatCharge
(
s
NomFichierCerticatClient
,
s
MotDePasseCertificatClient
)
SI
ta
Certificats
..
Occurrence
=
0
ALORS
ErreurConstruit
(
"Aucun certificat trouvé dans <%1>. %2"
,
s
NomFichierCerticatClient
,
ErreurInfo
(
)
)
RETOUR
FIN
C
ertifPS
est un Certificat
dynamique
POUR n
=
1
_À_
ta
Certificats
..
Occurrence
SI
ta
Certificats
[n]
..
ValidePourSignature
ALORS
C
ertifPS
=
ta
Certificats
[n]
SORTIR
FIN
FIN
SI
C
ertifPS
=
Null
_OU_ PAS
C
ertifPS
..
ValidePourSignature
ALORS
ErreurConstruit
(
"Aucun certificat trouvé valide pour signature dans <%1>. %2"
,
s
NomFichierCerticatClient
,
ErreurInfo
(
)
)
RETOUR
FIN
<
FIN
>
Merci
Bon week end à tous
--
Christophe Navarro
Développeur freelance Windev, Webdev, Windev Mobile, MySql
http://www.krinasoft.fr
Perpignan
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text