home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / include / xp_sec.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  65 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef __XP_SEC_h_
  20. #define __XP_SEC_h_
  21.  
  22. #include "xp_core.h"
  23.  
  24. /*
  25. ** Security related XP functions. Useful stuff that makes app writing
  26. ** easier.
  27. */
  28.  
  29. XP_BEGIN_PROTOS
  30.  
  31. struct CERTCertificateStr;
  32.  
  33. /*
  34. ** Return a pretty string that describes the status of the security
  35. ** connection using the argument information.
  36. **     "level" the level of security (HIGH, LOW, or OFF)
  37. **     "cipher" the name of the cipher
  38. **     "keySize" the total size of the cipher key
  39. **     "secretKeySize" the portion of the cipher key that is secret
  40. ** The above values can be easily determined by calling
  41. ** SSL_SecurityStatus().
  42. */
  43. extern char *XP_PrettySecurityStatus(int level, char *cipher, int keySize,
  44.                      int secretKeySize);
  45.  
  46. /*
  47. ** Return a dynamically allocated string which describes what security
  48. ** version the security library supports. The returned string describes
  49. ** in totality the crypto capabilities of the library.
  50. */
  51. extern char *XP_SecurityCapabilities(void);
  52.  
  53. /*
  54. ** Return a short staticly allocated string (NOT MALLOC'D) which
  55. ** describes what security version the security library supports:
  56. ** U.S. or international.
  57. **     "longForm" is non-zero means the return value should be
  58. **      in the long format, otherwise in the short format.
  59. */
  60. extern char *XP_SecurityVersion(int longForm);
  61.  
  62. XP_END_PROTOS
  63.  
  64. #endif /* __XP_SEC_h_ */
  65.