From 834423c3bad800ca55f24476cdbced893b98bfae Mon Sep 17 00:00:00 2001 From: "javi%netscape.com" Date: Wed, 17 May 2000 00:17:42 +0000 Subject: [PATCH] Add new function for getting the version string that can be used by Mozilla. --- security/psm/lib/protocol/newproto.c | 14 ++++++++++++++ security/psm/lib/protocol/ssmdefs.h | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/security/psm/lib/protocol/newproto.c b/security/psm/lib/protocol/newproto.c index 1a7377aee3d1..a6bb592e9bd0 100644 --- a/security/psm/lib/protocol/newproto.c +++ b/security/psm/lib/protocol/newproto.c @@ -62,6 +62,20 @@ CMT_Free_fn cmt_free = free; #define CM_ntohl ntohl #define CM_htonl htonl +char* SSM_GetVersionString(void) +{ + char *newString; + int strLen; + + strLen = strlen(SSMVersionString); + newString = (char*)malloc(sizeof(char)*(strLen+1)); + if (newString) { + memcpy(newString,SSMVersionString, strlen(SSMVersionString)); + newString[strLen]='\0'; + } + return newString; +} + /************************************************************* * diff --git a/security/psm/lib/protocol/ssmdefs.h b/security/psm/lib/protocol/ssmdefs.h index 3c8b21ef6184..22726fc65e98 100644 --- a/security/psm/lib/protocol/ssmdefs.h +++ b/security/psm/lib/protocol/ssmdefs.h @@ -305,6 +305,13 @@ typedef CMUint32 SSMSSLConnectionRequestType; * library. */ extern char SSMVersionString[]; +#ifdef __cplusplus +extern "C" { +char * SSM_GetVersionString(void); +#endif +#ifdef __cplusplus +} +#endif /* What type of client */ typedef enum