Forum Post: RE: Can I use .Net (openssl.net without GUI) library in the openedge webspeed (OE...

  • Thread starter Thread starter xytop
  • Start date Start date
Status
Not open for further replies.
X

xytop

Guest
Thanks! openssl.net - A managed OpenSSL wrapper written in C# for the 2.0 .NET Framework that exposes both the Crypto API and the SSL API. (http://openssl-net.sourceforge.net/) simple app: USING System.*. USING OpenSSL.*. USING OpenSSL.Core.*. USING OpenSSL.Crypto.*. DEFINE VARIABLE key AS CLASS CryptoKey NO-UNDO. DEFINE VARIABLE signiture AS "System.Byte[]". DEFINE VARIABLE isVerified AS LOGICAL NO-UNDO INIT FALSE. DEFINE VARIABLE VK_MAK_STR AS CHARACTER NO-UNDO. DEFINE VARIABLE VK_MAK AS CHARACTER NO-UNDO. ASSIGN VK_MAK = "nb0Yq1CIZtOgBD93m27Ozrd0QWjKFIzPMlQzW5=" VK_MAK_STR = "1234567890123456" . DO ON ERROR UNDO, LEAVE: key = CryptoKey:FromPublicKey(OpenSSL.Core.BIO:File("C:\work\openedge\pkk_pub._key", "r"),?) NO-ERROR. signiture = Convert:FromBase64String(VK_MAK) NO-ERROR. isVerified = MessageDigestContext:Verify(MessageDigest:SHA1, NEW BIO(VK_MAK_STR), signiture, key) NO-ERROR. END. LOG-MANAGER:WRITE-MESSAGE(STRING(isVerified), "RESULT"). In the OE Client works fine, but when compiling in OE WEBSPEED - error: "Could not find class or interface CryptoKey. (12886) ** Could not understand line 6. (196)". Tell me, please, this code will work in OE WEBSPEED (10.2B07 for windows)?

Continue reading...
 
Status
Not open for further replies.
Back
Top