diff options
-rw-r--r-- | security/nss/lib/smime/smime.def | 6 | ||||
-rw-r--r-- | security/nss/lib/smime/smimeutil.c | 25 |
2 files changed, 31 insertions, 0 deletions
diff --git a/security/nss/lib/smime/smime.def b/security/nss/lib/smime/smime.def index f1c0f293d..d80a80639 100644 --- a/security/nss/lib/smime/smime.def +++ b/security/nss/lib/smime/smime.def @@ -169,3 +169,9 @@ SEC_PKCS12SetPreferredCipher; ;+ local: ;+ *; ;+}; +;+NSS_3.2 { # NSS 3.2 release +;+ global: +NSSSMIME_VersionCheck; +;+ local: +;+ *; +;+}; diff --git a/security/nss/lib/smime/smimeutil.c b/security/nss/lib/smime/smimeutil.c index 1a4d4073e..b76a58883 100644 --- a/security/nss/lib/smime/smimeutil.c +++ b/security/nss/lib/smime/smimeutil.c @@ -715,3 +715,28 @@ loser: return cert; } + +extern const char __nss_smime_rcsid[]; +extern const char __nss_smime_sccsid[]; + +PRBool +NSSSMIME_VersionCheck(const char *importedVersion) +{ + /* + * This is the secret handshake algorithm. + * + * This release has a simple version compatibility + * check algorithm. This release is not backward + * compatible with previous major releases. It is + * not compatible with future major, minor, or + * patch releases. + */ + int vmajor = 0, vminor = 0, vpatch = 0; + const char *ptr = importedVersion; + volatile char c; /* force a reference that won't get optimized away */ + + c = __nss_smime_rcsid[0] + __nss_smime_sccsid[0]; + + return NSS_VersionCheck(importedVersion); +} + |