Which expert has delphi related information or code signed by openssl md5withRSA?
Step 1: download two dlls that indy9 supports ssllib. CSDN has! Step 2: surf Baidu libay32.pas Step 3: modify libay32.pas and add ProcedureVP _ MD _ CTX _ init (CTX: pevp _ MD _ CTX) yourself; Cdeclprocedure VP _ MD _ CTX _ cleaning (CTX: pevp _ MD _ CTX); cdeclfunction RSA _ sign(len:integer; _ m:PCharacter; _m_length: integer; from:PCharacter; _to: pointer; Rsa:pRSA): integer; Step 4 of cdecl: DELPHI code: FunctionloadPrivateKey (file name: string): pevp _ pkeyvarbp:PBIO;; a、PKEY:PEVP _ PKEY; begina:= nil; BP:= BIO _ new(BIO _ s _ file()); BIO_read_filename(bp, PChar (file name)); pkey:= PEM _ read _ bio _ private key(BP,a,nil,NIL); BIO _ free(BP); Result: = end of PKEY; FunctionSign (file name, message: string): string; var CTX:EVP _ MD _ CTX; buf _ in:Pchar; M_len, outl: Cardinal; pKey:PEVP _ pKey; m,buf_out:array[0.. 1024]of char; P: array [0 ... 255] of char; I: integer; begin buf _ out:=“”; if filename = ' ' thenbeginResult:= ' '; Quit; End; PKey:=LoadPrivateKey (file name); buf _ in:= PChar(msg); EVP _ MD _ CTX _ init(@ CTX); //initialize EVP _ signinit (@ CTX, EVP _ sha1()); //Save the summary algorithm to be used in ctxl in EVP _ signupdate (@ CTX, BUF _ in, Length (BUF _ in)); //store the coded value EVP_DigestFinal(@ctx, m, m _ len); //The length of the found code is m_len, and the code stored in m is RSA _ sign (EVP _ SHA 1 (). _ Type,m,m _ len,BUF _ OUT,@ OUTL,pkey . pkey . RSA); //64 nidep _ MD _ CTX _ clean up(@ CTX) with sha1; Results: = encodestring (strpas (buf _ out));