From df6f6c05341059981459e5f326251a1349060fa2 Mon Sep 17 00:00:00 2001 From: jsw Date: Tue, 28 Apr 1998 07:53:25 +0000 Subject: [PATCH] get type correct for socket --- modules/security/freenav/navstubs.c | 663 ++++++++++++++++++++++++++++ modules/security/freenav/secstubn.h | 236 ++++++++++ 2 files changed, 899 insertions(+) create mode 100644 modules/security/freenav/navstubs.c create mode 100644 modules/security/freenav/secstubn.h diff --git a/modules/security/freenav/navstubs.c b/modules/security/freenav/navstubs.c new file mode 100644 index 000000000000..81a4b2a43bbf --- /dev/null +++ b/modules/security/freenav/navstubs.c @@ -0,0 +1,663 @@ +/* + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +#include "secnav.h" +#include "libmocha.h" +#include "prlink.h" +#include "prinrval.h" + +int +SSL_SetSockPeerID(PRFileDesc *fd, char *peerID) +{ + return(0); +} + +void +SECNAV_Posting(PRFileDesc *fd) +{ + return; +} + +void +SECNAV_HTTPHead(PRFileDesc *fd) +{ + return; +} + +void +SECNAV_RegisterNetlibMimeConverters() +{ + return; +} + +char * +SECNAV_MungeString(const char *unmunged_string) +{ + return(NULL); +} + +char * +SECNAV_UnMungeString(const char *munged_string) +{ + return(NULL); +} + +PRBool +SECNAV_GenKeyFromChoice(void *proto_win, LO_Element *form, + char *choiceString, char *challenge, + char *typeString, char *pqgString, + char **pValue, PRBool *pDone) +{ + return(PR_FALSE); +} + + +char ** +SECNAV_GetKeyChoiceList(char *type, char *pqgString) +{ + return(NULL); +} + +PRBool +SECNAV_SecurityDialog(MWContext *context, int state) +{ + return (state == SD_INSECURE_POST_FROM_INSECURE_DOC); +} + +JSObject * +lm_DefinePkcs11(MochaDecoder *decoder) +{ + return((JSObject *)1); +} + +JSObject * +lm_DefineCrypto(MochaDecoder *decoder) +{ + return((JSObject *)1); +} + +void +NET_InitCertLdapProtocol(void) +{ +} + + +CERTCertificate * +CERT_DupCertificate(CERTCertificate *cert) +{ + return(NULL); +} + +void +CERT_DestroyCertificate(CERTCertificate *cert) +{ + return; +} + +CERTCertificate * +CERT_NewTempCertificate (CERTCertDBHandle *handle, SECItem *derCert, + char *nickname, PRBool isperm, PRBool copyDER) +{ + return(NULL); +} + +CERTCertDBHandle * +CERT_GetDefaultCertDB(void) +{ + return(NULL); +} + +CERTCertificate * +CERT_DecodeCertFromPackage(char *certbuf, int certlen) +{ + return(NULL); +} + +char * +CERT_HTMLCertInfo(CERTCertificate *cert, PRBool showImages, PRBool showIssuer) +{ + return(NULL); +} + +PRBool +CERT_CompareCertsForRedirection(CERTCertificate *c1, CERTCertificate *c2) +{ + return(PR_FALSE); +} + +const char * +SECNAV_GetPolicyNameString(void) +{ + return(NULL); +} + +int +SECNAV_InitConfigObject(void) +{ + return(0); +} + +int +SECNAV_RunInitialSecConfig(void) +{ + return(0); +} + +void +SECNAV_EarlyInit(void) +{ + return; +} + +void +SECNAV_Init(void) +{ + return; +} + +void +SECNAV_Shutdown(void) +{ + return; +} + +void +SECNAV_SecurityAdvisor(void *proto_win, URL_Struct *url) +{ + return; +} + +char * +SECNAV_MakeCertButtonString(CERTCertificate *cert) +{ + return(NULL); +} + +int +SECNAV_SecURLData(char *which, NET_StreamClass *stream, MWContext *cx) +{ + return(-1); +} + +char * +SECNAV_SecURLContentType(char *which) +{ + return(NULL); +} + +int +SECNAV_SecHandleSecurityAdvisorURL(MWContext *cx, const char *which) +{ + return(-1); +} + +void +SECNAV_HandleInternalSecURL(URL_Struct *url, MWContext *cx) +{ + return; +} + +PRBool +SSL_IsDomestic(void) +{ + return(PR_FALSE); +} + +SECStatus +SECNAV_ComputeFortezzaProxyChallengeResponse(MWContext *context, + char *asciiChallenge, + char **signature_out, + char **clientRan_out, + char **certChain_out) +{ + return(SECFailure); +} + + +char * +SECNAV_PrettySecurityStatus(int level, unsigned char *status) +{ + return(NULL); +} + +char * +SECNAV_SecurityVersion(PRBool longForm) +{ + return("N"); +} + +char * +SECNAV_SSLCapabilities(void) +{ + return(NULL); +} + +unsigned char * +SECNAV_SSLSocketStatus(PRFileDesc *fd, int *return_security_level) +{ + return(NULL); +} + +unsigned char * +SECNAV_CopySSLSocketStatus(unsigned char *status) +{ + return(NULL); +} + + +unsigned int +SECNAV_SSLSocketStatusLength(unsigned char *status) +{ + return(0); +} + +char * +SECNAV_SSLSocketCertString(unsigned char *status) +{ + return(NULL); +} + +PRBool +SECNAV_CompareCertsForRedirection(unsigned char *status1, + unsigned char *status2) +{ + return(PR_FALSE); +} + +CERTCertificate * +SECNAV_CertFromSSLSocketStatus(unsigned char *status) +{ + return(NULL); +} + +SECStatus +RNG_RNGInit(void) +{ + return(SECSuccess); +} + +/* + * probably need to provide something here + */ +SECStatus +RNG_GenerateGlobalRandomBytes(void *dest, size_t len) +{ + /* This is a temporary implementation to avoid */ + /* the cache filename horkage. This needs to have a more */ + /* secure/free implementation here - Gagan */ + + char* output=dest; + size_t i; + srand((unsigned int) PR_IntervalToMilliseconds(PR_IntervalNow())); + for (i=0;i