#51 Re: mORMot 2 » CompareMem function problem » 2023-10-08 03:20:50

Thanks
this issue has been solved,
but this mormot.net.acme has found a new issue here, I have submitted a new topic

#52 mORMot 2 » mormot.net.acme error » 2023-10-08 03:14:29

lfyey121
Replies: 17

An error occurred while calling the completedomainregistero function:

   EXC   EJwsHttp {Message:"Error 400 [Error parsing certificate request: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} certificateRequest @2] while querying https://acme-v02.api.letsencrypt.org/acme/finalize/1349321746/213579860876"} [CheckCertificates] at 4c4526

#53 Re: mORMot 2 » CompareMem function problem » 2023-10-07 12:45:00

I trace that in asm code, the comparison of the first 4 bytes is already inconsistent

#54 Re: mORMot 2 » CompareMem function problem » 2023-10-07 12:28:06

The received data url:

  /.well-known/acme-challenge/Fx3W3J_cIlgHswjpA_NMDES4GPJ0acGEBHtXaCgTlsM

#55 mORMot 2 » CompareMem function problem » 2023-10-07 12:22:17

lfyey121
Replies: 4

In line 1264 of the mormot.net.acme unit, CompareMem(P, @_ACME_CHALLENGE_PATH, ACME_CHALLENGE_PATH_LEN) executes incorrectly and returns false all the time.

My environment is lazarus 3.99, FPC3.3.1(i386), windows 10

#56 Re: mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-12 09:55:13

Thank you for your quick response.

The program is running normally.

Thank you again for your contributions to the world of pascal

#57 Re: mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-12 08:24:01

this is my code:
  registerOpenSsl;
  gAcmeLetsEncryptServer:=TAcmeLetsEncryptServer.create(TsynLog, TacmeDaemonSettings(settings).keyStoreFolder,
      ACME_LETSENCRYPT_URL,'','abcdefg',-1,'8084');
  gAcmeLetsEncryptServer.LoadFromKeyStoreFolder;
  gAcmeLetsEncryptServer.Redirect('xxxx.com','https://www.xxxx.com');
  gAcmeLetsEncryptServer.Redirect('www.xxxx.com','https://www.xxxx.com');   

the “AcmeLetsEncryptServer.Redirect ” has an error at runtime:
  Project acmeDaemon raised exception class 'External:ACCESS VIOLATION' with message:Access violation reading from address $7331322D.
  in file 'mormot.core.base.pas' at line 4819:if PStrLen(p1-_STRLEN)^=len then

This error is in the execution TAcmeLetsEncrypt. GetClient statements,

#58 Re: mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-12 02:27:03

Error is in the call:
  AcmeLetsEncryptServer. Redirect (' xxxx.com ', 'https://www.xxxx.com');

#59 Re: mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-12 02:18:59

After introducing the mormot.crypt.openssl unit and calling registerOpenSsl, the issue of x509-es256 not being supported was resolved. But a memory conflict occurred again. When I traced the call to the getClient part of the getClientLocked method in mormot.net.acme, the value of the servername parameter passed changed to an invalid string, causing an error when the FindPropName method was called.

#60 Re: mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-11 12:32:22

I'm testing this because I got a run-time error when I was using mormot.net.acme saying that X509-es256 is not supported, and acme relies on openssl, so I'm testing to see if openssl has errors

#61 Re: mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-11 12:23:27

Is my problem, add compile parameter -dUSE_OPENSSL; FORCE_OPENSSL, needs to be recompiled, I am running directly.

#62 mORMot 2 » mormot2tests fails to compile when the option USE_OPENSSL is set » 2023-09-10 12:23:13

lfyey121
Replies: 10

mormot2tests project, when setting the compilation option USE_OPENSSL; FORCE_OPENSSL, the project could not compile, indicating that many open_SSL-related variables could not be found.


FPC 3.2.2 ,lazarus 2.2.6

FPC 3.3.1,lazarus 3.99

I've tested the above versions and they don't work.

Also, I found that lazarus.lpk does not contain the file mormot.crypt.x509

#63 Re: mORMot 2 » Collections.newKeyValue<RawUtf8,variant>() prompting syntax errors » 2023-07-31 13:15:47

Thank you. Yes, you're right. It's up and running.

I want to sort the elements of IKeyValue by Key, and I don't know any good way to do that.

#64 mORMot 2 » Collections.newKeyValue<RawUtf8,variant>() prompting syntax errors » 2023-07-30 13:51:44

lfyey121
Replies: 3

FPC 3.2.2  lazarus2.2.6

Use the class IkeyValue in mormot.core.collections

The following code keeps getting errors:  Fatal: Syntax error, ";" expected but "," found.

  vparams:specialize IkeyValue<RawUtf8,variant>;

  vParams:=Collections.NewPlainKeyValue<RawUtf8, variant>();    //There are errors in this line

#66 Re: mORMot 2 » Is there a urlEncode/urlDecode function that implements RFC3986 » 2023-07-29 09:03:26

The encoded URI is transmitted, but a signature field is added, and the signature field is based on this encoded URI. The result is definitely different if the string contains ~ and %7E

#67 Re: mORMot 2 » Is there a urlEncode/urlDecode function that implements RFC3986 » 2023-07-29 07:44:01

api calls from ali,tencent, or other services will sign the encoded url. If the encoding results are inconsistent, the signature verification will fail

#68 Re: mORMot 2 » Is there a urlEncode/urlDecode function that implements RFC3986 » 2023-07-29 07:29:53

or You can add an argument to the urlencode(urlEncodeName) function, and it is up to the user to decide whether ~ is encoded or not

#69 Re: mORMot 2 » Is there a urlEncode/urlDecode function that implements RFC3986 » 2023-07-29 04:07:31

RFC3986 rules will not encode ~, PHP rawUrlEncode from version 5.3 support RFC3986, the previous version will encode ~, Ali, Tencent api coding is to follow this rule.

#71 Re: mORMot 2 » Is there a urlEncode/urlDecode function that implements RFC3986 » 2023-07-29 01:59:33

Thanks for your quick response, but shouldn't the space2plus argument for calling _UrlEncode_ComputeLen in urlencodeName be 48('0')? Should it be 43('+').

#72 mORMot 2 » Is there a urlEncode/urlDecode function that implements RFC3986 » 2023-07-28 09:46:36

lfyey121
Replies: 13

url encoding in RFC3986 is different from urlEncode in mormot.core.buffers. Spaces cannot be replaced with +

#73 Re: mORMot 2 » One small suggestion: Return values for interface-based services » 2023-07-24 06:59:16

My English is poor, most of these contents are written with the help of translation software, some descriptions may not be accurate, which will cause trouble to you.

#74 Re: mORMot 2 » One small suggestion: Return values for interface-based services » 2023-07-24 06:55:38

At your prompt, I read the source code TrestServerUriContext in detail, and it is indeed possible to override ServiceResultStart and ServiceResultEnd requirements through inherited classes.

Thanks again for the tip.

#75 Re: mORMot 2 » One small suggestion: Return values for interface-based services » 2023-07-24 01:50:14

Thank you for your reply.
This is done using method-based services, which do not take advantage of the convenience of interface-based services. Or, in an interface-based service, how do you get the output parameters to be written in such a format?

#76 mORMot 2 » One small suggestion: Return values for interface-based services » 2023-07-23 08:55:01

lfyey121
Replies: 9

In mormot, when the interface-based method returns a value via TrestServerUriContext, can it be wrapped in json format like :
{
  code:errcode,
  msg:'errmsg',
  data/(result):{...  } or [... ]
},
Most Rest servers currently communicate with js clients in a format similar to this

#77 Re: mORMot 2 » Error 'file not found "fastmm4.dcu" in delphi7 using mormot2 » 2023-06-08 13:14:07

Thank you for your reply.


That may be so.

I just have an old project that needs to add some functionality, and I want to use a small part of mormot2's functionality, the wrong part should be left alone. Now delphi7 is rarely used, now using fpc.

#78 Re: mORMot 2 » Error 'file not found "fastmm4.dcu" in delphi7 using mormot2 » 2023-06-08 09:21:54

I am using Windows 7 32-bit +delphi7 on an old machine

#79 Re: mORMot 2 » Error 'file not found "fastmm4.dcu" in delphi7 using mormot2 » 2023-06-08 02:18:31

Thank you for your reply.

I have downloaded and installed fastmm4, but an error occurred while running the test program.

In the unit “test. core. Data " line 820, in TTestCoreProcess. MustacheRenderer procedure, an error occurred when calling httpGet, prompt:winhttp. DLL error 2EE7 .

#80 mORMot 2 » Error 'file not found "fastmm4.dcu" in delphi7 using mormot2 » 2023-06-07 14:04:17

lfyey121
Replies: 6

An error message was displayed for the mormot2Tests project. The test program could not be executed.
Does mormot2 not support delphi7?

#81 Re: mORMot 2 » CsvToIntegerDynArray bug? » 2023-03-11 09:34:51

Thank you, that's what I hope, I don't have to check again if it's an empty string

#82 mORMot 2 » CsvToIntegerDynArray bug? » 2023-03-11 06:10:19

lfyey121
Replies: 2

function CsvToIntegerDynArray(Csv: PUtf8Char; var List: TIntegerDynArray) 

If csv is empty string , list will contain a [0].

Is this a bug? or That should be it

#85 Re: mORMot 2 » Serializing an array of records How To? » 2023-02-22 09:35:41

it should be:  TJsonSerializer.registerObjArrayForJson(T,Tweek)   or  Rtti.registerObjArray(T,Tweek)

#86 Re: mORMot 1 » The Chinese displayName of TsynDaemon is displayed incorrectly » 2022-11-23 09:38:51

Yes, the service description can now be displayed in Chinese normally.

thank you @ab

#87 mORMot 1 » The Chinese displayName of TsynDaemon is displayed incorrectly » 2022-11-16 02:05:43

lfyey121
Replies: 2

I used FPC3.2.4, lazarus 2.2.4 .
TsdExtDaemonSetting to set displayName in Chinese. The service can be installed normally, but in the service manager, the ServiceDescription of the service will display garbled characters.

#88 mORMot 1 » found on error in source(mormot2.net.client) » 2022-10-26 09:51:12

lfyey121
Replies: 1

i m reading/learning the source code of mormot2,

in mormot.net.client
   constructor THttpRequestCached.Create

error:
line 3236:fClient := fClient.Create(aOnlyUseClientSocket);

#89 mORMot 1 » Some file paths in MORmot2.lpk are incorrect » 2022-10-04 03:20:04

lfyey121
Replies: 1

The file path for item96--item98 in file mormot2.lpk is incorrect. Mormot.db.rad.ui.* is in folder src/ui

#91 Re: mORMot 1 » ResultSet is not used in TSqlDataSet.PSExecuteStatement » 2022-08-25 08:28:36

I don't know if you can understand,my english is too poor.

#92 mORMot 1 » ResultSet is not used in TSqlDataSet.PSExecuteStatement » 2022-08-25 08:21:10

lfyey121
Replies: 1

in mormot.db.rad.ui.sql.pas ,
  the parameter:ResultSet is not used in TSqlDataSet.PSExecuteStatement

Board footer

Powered by FluxBB