#ifndef NSSL_INIT_H #define NSSL_INIT_H /*---------------------------------------------------------------------------* Project: Nintendo SSL Client File: nssl_init.h Description: This file provides the minimum set of SSL client side APIs to use middlewares Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif /*---------------------------------------------------------------------------* * * Globals/Externs * -- Variables/Functions -- * *---------------------------------------------------------------------------*/ /* Return codes */ #define NSSL_RVAL_OK 0 #define NSSL_RVAL_INVALID_NSSL_CTX -2621441 #define NSSL_RVAL_INVALID_CERTID -2621442 #define NSSL_RVAL_CERT_LIMIT -2621443 #define NSSL_RVAL_INVALID_NSSL_CONNECTION -2621444 #define NSSL_RVAL_INVALID_CERT -2621445 #define NSSL_RVAL_ZERO_RETURN -2621446 #define NSSL_RVAL_WANT_READ -2621447 #define NSSL_RVAL_WANT_WRITE -2621448 #define NSSL_RVAL_IO_ERROR -2621449 #define NSSL_RVAL_NSSLLIB_ERROR -2621450 #define NSSL_RVAL_UNKNOWN -2621451 #define NSSL_RVAL_OUT_OF_MEMORY -2621452 #define NSSL_RVAL_INVALID_STATE -2621453 #define NSSL_RVAL_HANDSHAKE_ERROR -2621454 #define NSSL_RVAL_NO_CERT -2621455 #define NSSL_RVAL_INVALID_FD -2621456 #define NSSL_RVAL_LIB_NOT_READY -2621457 #define NSSL_RVAL_IPC_ERROR -2621458 #define NSSL_RVAL_RESOURCE_LIMIT -2621459 #define NSSL_RVAL_INVALID_HANDLE -2621460 #define NSSL_RVAL_INVALID_CERT_TYPE -2621461 #define NSSL_RVAL_INVALID_KEY_TYPE -2621462 #define NSSL_RVAL_INVALID_SIZE -2621463 #define NSSL_RVAL_NO_PEER_CERT -2621464 #define NSSL_RVAL_INSUFFICIENT_SIZE -2621465 #define NSSL_RVAL_NO_CIPHER -2621466 #define NSSL_RVAL_INVALID_ARG -2621467 #define NSSL_RVAL_INVALID_NSSL_SESSION -2621468 #define NSSL_RVAL_NO_SESSION -2621469 #define NSSL_RVAL_SSL_SHUTDOWN_ERROR -2621470 #define NSSL_RVAL_CERT_SIZE_LIMIT -2621471 #define NSSL_RVAL_CERT_NO_ACCESS -2621472 #define NSSL_RVAL_INVALID_CERT_ID -2621473 #define NSSL_RVAL_CERT_READ_ERROR -2621474 #define NSSL_RVAL_CERTSTORE_INIT_FAILURE -2621475 #define NSSL_RVAL_INVALID_CERT_ENCODING -2621476 #define NSSL_RVAL_CERTSTORE_ERR -2621477 #define NSSL_RVAL_PVTKEY_READ_ERROR -2621478 #define NSSL_RVAL_INVALID_PVTKEY -2621479 #define NSSL_RVAL_NOT_READY -2621480 #define NSSL_RVAL_ENCRYPTION_ERROR -2621481 #define NSSL_RVAL_NO_CERTSTORE -2621482 #define NSSL_RVAL_PVTKEY_SIZE_LIMIT -2621483 #define NSSL_RVAL_PROC_MAX_EXT_CERTS -2621484 #define NSSL_RVAL_PROC_MAX_CONTEXTS -2621485 #define NSSL_RVAL_PROC_MAX_CONNECTIONS -2621486 #define NSSL_RVAL_CERT_NOT_EXPORTALE -2621487 #define NSSL_RVAL_INVALID_CERT_SIZE -2621488 #define NSSL_RVAL_INVALID_KEY_SIZE -2621489 #define NSSL_RVAL_CRL_SIZE_LIMIT -2621490 #define NSSL_RVAL_INVALID_CRL -2621491 #define NSSL_RVAL_INVALID_CRL_TYPE -2621492 #define NSSL_RVAL_INVALID_CTX_MODE -2621493 typedef int NSSL_RVAL; /*---------------------------------------------------------------------------* * * PUBLIC METHODS * *---------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- Name: NSSLInit() Description: Initialize NSSL library Arguments: None Returns: NSSL_RVAL_OK on success. Appropriate error code on failure. *---------------------------------------------------------------------------*/ NSSL_RVAL NSSLInit(void); /*--------------------------------------------------------------------------- Name: NSSLFinish() Description: Cleanup NSSL library after application has finished using it. Arguments: None Returns: NSSL_RVAL_OK on success. Appropriate error code on failure. *---------------------------------------------------------------------------*/ NSSL_RVAL NSSLFinish(void); #ifdef __cplusplus } #endif #endif /* NSSL_INIT_H */