Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You had mail. Paul read it, so ask him what it said.


devel / comp.lang.clipper.visual-objects / Work with certificate

SubjectAuthor
* Work with certificatefernando moreno
`* Re: Work with certificateJamal
 `* Re: Work with certificatefernando moreno
  `* Re: Work with certificateJamal
   `* Re: Work with certificatefernando moreno
    `- Re: Work with certificateJamal

1
Work with certificate

<008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=816&group=comp.lang.clipper.visual-objects#816

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:622a:48b:: with SMTP id p11mr14394193qtx.346.1622458958942;
Mon, 31 May 2021 04:02:38 -0700 (PDT)
X-Received: by 2002:a05:6214:e82:: with SMTP id hf2mr16295915qvb.22.1622458958774;
Mon, 31 May 2021 04:02:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Mon, 31 May 2021 04:02:38 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=81.34.162.51; posting-account=4SonegoAAAAS2c5HG9pgihXJqCiCcR51
NNTP-Posting-Host: 81.34.162.51
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com>
Subject: Work with certificate
From: fmaplisoft@gmail.com (fernando moreno)
Injection-Date: Mon, 31 May 2021 11:02:38 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fernando moreno - Mon, 31 May 2021 11:02 UTC

Good evening:

Does anyone know any library or sample to work with certificates? For example: extract signature, date of expiration and provide.

Thanks for your atention

Re: Work with certificate

<s9b4u6$s1a$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=817&group=comp.lang.clipper.visual-objects#817

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!aioe.org!5khQQ74EcbbAsV5j3NyilA.user.gioia.aioe.org.POSTED!not-for-mail
From: nospam@example.com (Jamal)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Work with certificate
Date: Thu, 3 Jun 2021 13:53:12 -0400
Organization: Aioe.org NNTP Server
Lines: 20
Message-ID: <s9b4u6$s1a$1@gioia.aioe.org>
References: <008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com>
NNTP-Posting-Host: 5khQQ74EcbbAsV5j3NyilA.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Jamal - Thu, 3 Jun 2021 17:53 UTC

Hello Fernando!

Chilkatsoft has free (no licene required) ActiveX and .NET versions of
their components: Cert, CertChain and CertStore which have methods and
properties to handle certificates.

https://www.chilkatsoft.com/downloads.asp

Jamal

Check the docs at:
On 5/31/2021 7:02 AM, fernando moreno wrote:
> Good evening:
>
> Does anyone know any library or sample to work with certificates? For example: extract signature, date of expiration and provide.
>
> Thanks for your atention
>

Re: Work with certificate

<7d459deb-8e2e-4813-99d0-dec7c6dccd1an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=822&group=comp.lang.clipper.visual-objects#822

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:ac8:7c50:: with SMTP id o16mr25195996qtv.153.1623237876829;
Wed, 09 Jun 2021 04:24:36 -0700 (PDT)
X-Received: by 2002:a37:44f:: with SMTP id 76mr24385977qke.161.1623237876616;
Wed, 09 Jun 2021 04:24:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Wed, 9 Jun 2021 04:24:36 -0700 (PDT)
In-Reply-To: <s9b4u6$s1a$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=81.34.162.51; posting-account=4SonegoAAAAS2c5HG9pgihXJqCiCcR51
NNTP-Posting-Host: 81.34.162.51
References: <008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com> <s9b4u6$s1a$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7d459deb-8e2e-4813-99d0-dec7c6dccd1an@googlegroups.com>
Subject: Re: Work with certificate
From: fmaplisoft@gmail.com (fernando moreno)
Injection-Date: Wed, 09 Jun 2021 11:24:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fernando moreno - Wed, 9 Jun 2021 11:24 UTC

El jueves, 3 de junio de 2021 a las 19:53:16 UTC+2, Jamal escribió:
> Hello Fernando!
>
> Chilkatsoft has free (no licene required) ActiveX and .NET versions of
> their components: Cert, CertChain and CertStore which have methods and
> properties to handle certificates.
>
> https://www.chilkatsoft.com/downloads.asp
>
> Jamal
>
>
> Check the docs at:
> On 5/31/2021 7:02 AM, fernando moreno wrote:
> > Good evening:
> >
> > Does anyone know any library or sample to work with certificates? For example: extract signature, date of expiration and provide.
> >
> > Thanks for your atention
> >
Thanks you for your help.

Have you worked with these classes?

I have problems with the Init.

METHOD bGenerar2( ) CLASS Certificados
local cTexto as string
local nElemento :=1 as int
local numCerts :=0 as int
local cert :='' as string
local osCert as Chilkat_9_5_0_CertStore_1
local lReadOnly :=true as logic
local success :=true as logic

oscert:=Chilkat_9_5_0_CertStore_1{}
success := oscert:OpenCurrentUserStore(lReadOnly)
If !success
AVISOS(self,"error",oscert:LastErrorText,true)
return
EndIf
cTexto:=''
numCerts:= oscert:NumCertificates_
for nElemento:=i to numCerts
cert := oscert:GetCertificate(i)
cTexto :=oscert:subjetDN+" - "+oscert:SubjectE+crlf
next

self:oDCmCert:Value :=cTexto
return true

Re: Work with certificate

<s9sh2j$hkl$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=823&group=comp.lang.clipper.visual-objects#823

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!aioe.org!5khQQ74EcbbAsV5j3NyilA.user.gioia.aioe.org.POSTED!not-for-mail
From: nospam@example.com (Jamal)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Work with certificate
Date: Thu, 10 Jun 2021 04:04:36 -0400
Organization: Aioe.org NNTP Server
Lines: 154
Message-ID: <s9sh2j$hkl$1@gioia.aioe.org>
References: <008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com>
<s9b4u6$s1a$1@gioia.aioe.org>
<7d459deb-8e2e-4813-99d0-dec7c6dccd1an@googlegroups.com>
NNTP-Posting-Host: 5khQQ74EcbbAsV5j3NyilA.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Jamal - Thu, 10 Jun 2021 08:04 UTC

I did not work with them (until just now), but you have quite a few
errors that you must clear in your declarations and loop. I suggest your
read the ActiveX documentation carefully.

For example:
1. OpenCurrentUserStore() returns a long not a logic.
2. The the loop must start at 0 to numCerts - 1.
3. GetCertificate() returns a ChilkatCert not a string!

I created automation server classes for: IChilkatCertStore and IChilkatCert

Here is a working sample in VO 2.8 - 2838:

METHOD GetCertificates( ) CLASS TestDlg

local cTexto := "" as string
local i as int
local numCerts := 0 as int

local lReadOnly := true as logic
local ok as long

local oCertStore as IChilkatCertStore
local oChilkatCert as IChilkatCert

oChilkatCert := IChilkatCert{}

oCertStore := IChilkatCertStore{}
ok := oCertStore:OpenCurrentUserStore(lReadOnly)
If ok == 0 // error
InfoBox{self,"error", oCertStore:LastErrorText}:show()
oCertStore := null_object
return self
else

numCerts := oCertStore:NumCertificates

for i := 0 to numCerts - 1

oChilkatCert := oCertStore:GetCertificate(i)

if oChilkatCert != null_object

cTexto += AsString(oChilkatCert:SubjectDN) +" - "+
AsString(oChilkatCert:SubjectE) + crlf
else
? "oChilkatCert Error: " + oChilkatCert:LastErrorText
endif
next

self:oDCmCert:Value :=cTexto

endif

oChilkatCert := null_object
oCertStore := null_object

RETURN self

Note: if you get a class mismatch on oCertStore:GetCertificate(i),
either make sure you uncheck Class Checking option in Compiler options
or change the GetCertificate() method to return IChilkatCert class object:

METHOD GetCertificate(;
index; // AS LONG
) CLASS IChilkatCertStore

LOCAL oMethod AS cOleMethod
LOCAL uRetValue AS USUAL

oMethod := cOleMethod{}
oMethod:symName := String2Symbol("GetCertificate")
oMethod:iMemberid := 116
oMethod:wInvokeKind := INVOKE_METHOD
oMethod:nParams := 1
oMethod:lNamedArgs := TRUE
oMethod:cParamTypes := VTS_I4
oMethod:bRetType := VT_DISPATCH

uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())
// To use a pre-defined class here,
// change OLEAutoObject to desired class name
uRetValue := iif( uRetValue:pInterface != null_ptr ,
IChilkatCert{uRetValue}, null_object)

RETURN (uRetValue)

Jamal

On 6/9/2021 7:24 AM, fernando moreno wrote:
> El jueves, 3 de junio de 2021 a las 19:53:16 UTC+2, Jamal escribió:
>> Hello Fernando!
>>
>> Chilkatsoft has free (no licene required) ActiveX and .NET versions of
>> their components: Cert, CertChain and CertStore which have methods and
>> properties to handle certificates.
>>
>> https://www.chilkatsoft.com/downloads.asp
>>
>> Jamal
>>
>>
>> Check the docs at:
>> On 5/31/2021 7:02 AM, fernando moreno wrote:
>>> Good evening:
>>>

>>> Does anyone know any library or sample to work with certificates? For example: extract signature, date of expiration and provide.
>>>
>>> Thanks for your atention
>>>
> Thanks you for your help.
>
> Have you worked with these classes?
>
> I have problems with the Init.
>
> METHOD bGenerar2( ) CLASS Certificados
> local cTexto as string
> local nElemento :=1 as int
> local numCerts :=0 as int
> local cert :='' as string
> local osCert as Chilkat_9_5_0_CertStore_1
> local lReadOnly :=true as logic
> local success :=true as logic
>
> oscert:=Chilkat_9_5_0_CertStore_1{}
> success := oscert:OpenCurrentUserStore(lReadOnly)
> If !success
> AVISOS(self,"error",oscert:LastErrorText,true)
> return
> EndIf
> cTexto:=''
> numCerts:= oscert:NumCertificates_
> for nElemento:=i to numCerts
> cert := oscert:GetCertificate(i)
> cTexto :=oscert:subjetDN+" - "+oscert:SubjectE+crlf
> next
>
> self:oDCmCert:Value :=cTexto
> return true
>

Re: Work with certificate

<29a38463-682c-479a-8d60-bf79783d3823n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=829&group=comp.lang.clipper.visual-objects#829

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a37:c447:: with SMTP id h7mr3090319qkm.63.1623927852084;
Thu, 17 Jun 2021 04:04:12 -0700 (PDT)
X-Received: by 2002:ae9:e910:: with SMTP id x16mr3176693qkf.397.1623927851870;
Thu, 17 Jun 2021 04:04:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Thu, 17 Jun 2021 04:04:11 -0700 (PDT)
In-Reply-To: <s9sh2j$hkl$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=81.34.162.51; posting-account=4SonegoAAAAS2c5HG9pgihXJqCiCcR51
NNTP-Posting-Host: 81.34.162.51
References: <008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com>
<s9b4u6$s1a$1@gioia.aioe.org> <7d459deb-8e2e-4813-99d0-dec7c6dccd1an@googlegroups.com>
<s9sh2j$hkl$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <29a38463-682c-479a-8d60-bf79783d3823n@googlegroups.com>
Subject: Re: Work with certificate
From: fmaplisoft@gmail.com (fernando moreno)
Injection-Date: Thu, 17 Jun 2021 11:04:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fernando moreno - Thu, 17 Jun 2021 11:04 UTC

El jueves, 10 de junio de 2021 a las 10:04:38 UTC+2, Jamal escribió:
> I did not work with them (until just now), but you have quite a few
> errors that you must clear in your declarations and loop. I suggest your
> read the ActiveX documentation carefully.
>
> For example:
> 1. OpenCurrentUserStore() returns a long not a logic.
> 2. The the loop must start at 0 to numCerts - 1.
> 3. GetCertificate() returns a ChilkatCert not a string!
>
> I created automation server classes for: IChilkatCertStore and IChilkatCert
>
> Here is a working sample in VO 2.8 - 2838:
>
> METHOD GetCertificates( ) CLASS TestDlg
>
> local cTexto := "" as string
> local i as int
> local numCerts := 0 as int
>
> local lReadOnly := true as logic
> local ok as long
>
> local oCertStore as IChilkatCertStore
> local oChilkatCert as IChilkatCert
>
> oChilkatCert := IChilkatCert{}
>
> oCertStore := IChilkatCertStore{}
>
> ok := oCertStore:OpenCurrentUserStore(lReadOnly)
>
> If ok == 0 // error
> InfoBox{self,"error", oCertStore:LastErrorText}:show()
> oCertStore := null_object
> return self
> else
>
> numCerts := oCertStore:NumCertificates
>
> for i := 0 to numCerts - 1
>
> oChilkatCert := oCertStore:GetCertificate(i)
>
> if oChilkatCert != null_object
>
> cTexto += AsString(oChilkatCert:SubjectDN) +" - "+
> AsString(oChilkatCert:SubjectE) + crlf
> else
> ? "oChilkatCert Error: " + oChilkatCert:LastErrorText
> endif
> next
>
> self:oDCmCert:Value :=cTexto
> endif
>
> oChilkatCert := null_object
> oCertStore := null_object
>
>
> RETURN self
>
> Note: if you get a class mismatch on oCertStore:GetCertificate(i),
> either make sure you uncheck Class Checking option in Compiler options
> or change the GetCertificate() method to return IChilkatCert class object:
>
> METHOD GetCertificate(;
> index; // AS LONG
> ) CLASS IChilkatCertStore
>
> LOCAL oMethod AS cOleMethod
> LOCAL uRetValue AS USUAL
>
> oMethod := cOleMethod{}
> oMethod:symName := String2Symbol("GetCertificate")
> oMethod:iMemberid := 116
> oMethod:wInvokeKind := INVOKE_METHOD
> oMethod:nParams := 1
> oMethod:lNamedArgs := TRUE
> oMethod:cParamTypes := VTS_I4
> oMethod:bRetType := VT_DISPATCH
>
> uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())
> // To use a pre-defined class here,
> // change OLEAutoObject to desired class name
> uRetValue := iif( uRetValue:pInterface != null_ptr ,
> IChilkatCert{uRetValue}, null_object)
>
>
> RETURN (uRetValue)
>
>
>
>
>
> Jamal
> On 6/9/2021 7:24 AM, fernando moreno wrote:
> > El jueves, 3 de junio de 2021 a las 19:53:16 UTC+2, Jamal escribió:
> >> Hello Fernando!
> >>
> >> Chilkatsoft has free (no licene required) ActiveX and .NET versions of
> >> their components: Cert, CertChain and CertStore which have methods and
> >> properties to handle certificates.
> >>
> >> https://www.chilkatsoft.com/downloads.asp
> >>
> >> Jamal
> >>
> >>
> >> Check the docs at:
> >> On 5/31/2021 7:02 AM, fernando moreno wrote:
> >>> Good evening:
> >>>
>
>
> >>> Does anyone know any library or sample to work with certificates? For example: extract signature, date of expiration and provide.
> >>>
> >>> Thanks for your atention
> >>>
> > Thanks you for your help.
> >
> > Have you worked with these classes?
> >
> > I have problems with the Init.
> >
> > METHOD bGenerar2( ) CLASS Certificados
> > local cTexto as string
> > local nElemento :=1 as int
> > local numCerts :=0 as int
> > local cert :='' as string
> > local osCert as Chilkat_9_5_0_CertStore_1
> > local lReadOnly :=true as logic
> > local success :=true as logic
> >
> > oscert:=Chilkat_9_5_0_CertStore_1{}
> > success := oscert:OpenCurrentUserStore(lReadOnly)
> > If !success
> > AVISOS(self,"error",oscert:LastErrorText,true)
> > return
> > EndIf
> > cTexto:=''
> > numCerts:= oscert:NumCertificates_
> > for nElemento:=i to numCerts
> > cert := oscert:GetCertificate(i)
> > cTexto :=oscert:subjetDN+" - "+oscert:SubjectE+crlf
> > next
> >
> > self:oDCmCert:Value :=cTexto
> > return true
> >
Thank you, but it doesn't work well.

It shows an error in the init:

***********************ERROR********************************
Visual Objects (Version 2.8. Build 0.2816), Version 2.8
07/08/2020 19:30:09
Application: C:\QR\Application.DBG
Error message:
--------------
Error Code: Invalid argument type.
Subsystem: GUI Classes
Function: CONTROL:INIT
Argument: NIL
Argument Number: 1
Description: Invalid argument type.
CallStack:
APP:START (Line:6)
START (Line:6)

Error Object created:
--------------------
SubSystem :GUI Classes
SubCode :0
GenCode :Waiting...
OsCode :0
ArgType :NIL
FuncPtr :0x00000000
ArgNum :1
FuncSym :CONTROL:INIT
Severity :0
CanDefault :.T.
CanRetry :.F.
CanSubstitute :.F.
Operation :
Description :Invalid argument type.
FileName :
Tries :1
FileHandle :0
SubCodeText :
Arg :NIL
ArgTypeReq :NIL
MaxSize :0
SubstituteType :NIL
CallFuncSym :
--------------------

Could we please talk in private?

Re: Work with certificate

<safqgl$dst$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=830&group=comp.lang.clipper.visual-objects#830

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: nospam@example.com (Jamal)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Work with certificate
Date: Thu, 17 Jun 2021 11:42:12 -0400
Organization: A noiseless patient Spider
Lines: 209
Message-ID: <safqgl$dst$1@dont-email.me>
References: <008ed1ac-5a66-41e3-9fc5-04a91d6e93b8n@googlegroups.com>
<s9b4u6$s1a$1@gioia.aioe.org>
<7d459deb-8e2e-4813-99d0-dec7c6dccd1an@googlegroups.com>
<s9sh2j$hkl$1@gioia.aioe.org>
<29a38463-682c-479a-8d60-bf79783d3823n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 17 Jun 2021 15:42:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d5b864a7072797796647c215d7d5ced0";
logging-data="14237"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CaQIA6PYS9M8wj83S+Yb7gLzS7CTGa/E="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:Moe2I34pNHxW4GQKLmbJeumtQJk=
In-Reply-To: <29a38463-682c-479a-8d60-bf79783d3823n@googlegroups.com>
Content-Language: en-US
 by: Jamal - Thu, 17 Jun 2021 15:42 UTC

Privately?

I offer VO consulting services if you are interested. You may contact me
at vodotnet AT gmail.com for details.

Jamal

On 6/17/2021 7:04 AM, fernando moreno wrote:
> El jueves, 10 de junio de 2021 a las 10:04:38 UTC+2, Jamal escribió:
>> I did not work with them (until just now), but you have quite a few
>> errors that you must clear in your declarations and loop. I suggest your
>> read the ActiveX documentation carefully.
>>
>> For example:
>> 1. OpenCurrentUserStore() returns a long not a logic.
>> 2. The the loop must start at 0 to numCerts - 1.
>> 3. GetCertificate() returns a ChilkatCert not a string!
>>
>> I created automation server classes for: IChilkatCertStore and IChilkatCert
>>
>> Here is a working sample in VO 2.8 - 2838:
>>
>> METHOD GetCertificates( ) CLASS TestDlg
>>
>> local cTexto := "" as string
>> local i as int
>> local numCerts := 0 as int
>>
>> local lReadOnly := true as logic
>> local ok as long
>>
>> local oCertStore as IChilkatCertStore
>> local oChilkatCert as IChilkatCert
>>
>> oChilkatCert := IChilkatCert{}
>>
>> oCertStore := IChilkatCertStore{}
>>
>> ok := oCertStore:OpenCurrentUserStore(lReadOnly)
>>
>> If ok == 0 // error
>> InfoBox{self,"error", oCertStore:LastErrorText}:show()
>> oCertStore := null_object
>> return self
>> else
>>
>> numCerts := oCertStore:NumCertificates
>>
>> for i := 0 to numCerts - 1
>>
>> oChilkatCert := oCertStore:GetCertificate(i)
>>
>> if oChilkatCert != null_object
>>
>> cTexto += AsString(oChilkatCert:SubjectDN) +" - "+
>> AsString(oChilkatCert:SubjectE) + crlf
>> else
>> ? "oChilkatCert Error: " + oChilkatCert:LastErrorText
>> endif
>> next
>>
>> self:oDCmCert:Value :=cTexto
>> endif
>>
>> oChilkatCert := null_object
>> oCertStore := null_object
>>
>>
>> RETURN self
>>
>> Note: if you get a class mismatch on oCertStore:GetCertificate(i),
>> either make sure you uncheck Class Checking option in Compiler options
>> or change the GetCertificate() method to return IChilkatCert class object:
>>
>> METHOD GetCertificate(;
>> index; // AS LONG
>> ) CLASS IChilkatCertStore
>>
>> LOCAL oMethod AS cOleMethod
>> LOCAL uRetValue AS USUAL
>>
>> oMethod := cOleMethod{}
>> oMethod:symName := String2Symbol("GetCertificate")
>> oMethod:iMemberid := 116
>> oMethod:wInvokeKind := INVOKE_METHOD
>> oMethod:nParams := 1
>> oMethod:lNamedArgs := TRUE
>> oMethod:cParamTypes := VTS_I4
>> oMethod:bRetType := VT_DISPATCH
>>
>> uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())
>> // To use a pre-defined class here,
>> // change OLEAutoObject to desired class name
>> uRetValue := iif( uRetValue:pInterface != null_ptr ,
>> IChilkatCert{uRetValue}, null_object)
>>
>>
>> RETURN (uRetValue)
>>
>>
>>
>>
>>
>> Jamal
>> On 6/9/2021 7:24 AM, fernando moreno wrote:
>>> El jueves, 3 de junio de 2021 a las 19:53:16 UTC+2, Jamal escribió:
>>>> Hello Fernando!
>>>>
>>>> Chilkatsoft has free (no licene required) ActiveX and .NET versions of
>>>> their components: Cert, CertChain and CertStore which have methods and
>>>> properties to handle certificates.
>>>>
>>>> https://www.chilkatsoft.com/downloads.asp
>>>>
>>>> Jamal
>>>>
>>>>
>>>> Check the docs at:
>>>> On 5/31/2021 7:02 AM, fernando moreno wrote:
>>>>> Good evening:
>>>>>
>>
>>
>>>>> Does anyone know any library or sample to work with certificates? For example: extract signature, date of expiration and provide.
>>>>>
>>>>> Thanks for your atention
>>>>>
>>> Thanks you for your help.
>>>
>>> Have you worked with these classes?
>>>
>>> I have problems with the Init.
>>>
>>> METHOD bGenerar2( ) CLASS Certificados
>>> local cTexto as string
>>> local nElemento :=1 as int
>>> local numCerts :=0 as int
>>> local cert :='' as string
>>> local osCert as Chilkat_9_5_0_CertStore_1
>>> local lReadOnly :=true as logic
>>> local success :=true as logic
>>>
>>> oscert:=Chilkat_9_5_0_CertStore_1{}
>>> success := oscert:OpenCurrentUserStore(lReadOnly)
>>> If !success
>>> AVISOS(self,"error",oscert:LastErrorText,true)
>>> return
>>> EndIf
>>> cTexto:=''
>>> numCerts:= oscert:NumCertificates_
>>> for nElemento:=i to numCerts
>>> cert := oscert:GetCertificate(i)
>>> cTexto :=oscert:subjetDN+" - "+oscert:SubjectE+crlf
>>> next
>>>
>>> self:oDCmCert:Value :=cTexto
>>> return true
>>>
> Thank you, but it doesn't work well.
>
> It shows an error in the init:
>
> ***********************ERROR********************************
> Visual Objects (Version 2.8. Build 0.2816), Version 2.8
> 07/08/2020 19:30:09
> Application: C:\QR\Application.DBG
>
> Error message:
> --------------
> Error Code: Invalid argument type.
> Subsystem: GUI Classes
> Function: CONTROL:INIT
> Argument: NIL
> Argument Number: 1
> Description: Invalid argument type.
> CallStack:
> APP:START (Line:6)
> START (Line:6)
>
> Error Object created:
> --------------------
> SubSystem :GUI Classes
> SubCode :0
> GenCode :Waiting...
> OsCode :0
> ArgType :NIL
> FuncPtr :0x00000000
> ArgNum :1
> FuncSym :CONTROL:INIT
> Severity :0
> CanDefault :.T.
> CanRetry :.F.
> CanSubstitute :.F.
> Operation :
> Description :Invalid argument type.
> FileName :
> Tries :1
> FileHandle :0
> SubCodeText :
> Arg :NIL
> ArgTypeReq :NIL
> MaxSize :0
> SubstituteType :NIL
> CallFuncSym :
> --------------------
>
> Could we please talk in private?
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor