vitasdk
Documentation of the vitasdk

Exports for User. More...

Data Structures

struct  SceSslCertificateAuthorityEntry
 Certificate list node stored inside the caller's output buffer. More...
 
struct  SceSslMemoryPoolStats
 

Macros

#define sceSslEnd()   sceSslTerm()
 

Typedefs

typedef void SceSslCert
 
typedef void SceSslCertName
 

Enumerations

enum  SceSslErrorCode {
  SCE_SSL_ERROR_BEFORE_INIT = 0x80435001 , SCE_SSL_ERROR_ALREADY_INITED = 0x80435020 , SCE_SSL_ERROR_OUT_OF_MEMORY = 0x80435022 , SCE_SSL_ERROR_NOT_FOUND = 0x80435025 ,
  SCE_SSL_ERROR_INTERNAL = 0x80435026 , SCE_SSL_ERROR_INVALID_FORMAT = 0x80435108 , SCE_SSL_ERROR_INVALID_VALUE = 0x804351FE
}
 
enum  SceSslCertIssuer {
  SCE_SSLCERT_ISSUER_ALL = 0 , SCE_SSLCERT_ISSUER_SCE = 1 , SCE_SSLCERT_ISSUER_VERISIGN = 2 , SCE_SSLCERT_ISSUER_GEOTRUST = 3 ,
  SCE_SSLCERT_ISSUER_THAWTE = 4 , SCE_SSLCERT_ISSUER_COMODO = 5 , SCE_SSLCERT_ISSUER_GLOBALSIGN = 6 , SCE_SSLCERT_ISSUER_CYBERTRUST = 7 ,
  SCE_SSLCERT_ISSUER_ENTRUST = 8 , SCE_SSLCERT_ISSUER_DIGICERT = 9 , SCE_SSLCERT_ISSUER_GODADDY = 10 , SCE_SSLCERT_ISSUER_RSA = 11 ,
  SCE_SSLCERT_ISSUER_STARTCOM = 12 , SCE_SSLCERT_ISSUER_SECOM = 13 , SCE_SSLCERT_ISSUER_TRUSTWAVE = 14 , SCE_SSLCERT_ISSUER_AFFIRMTRUST = 15
}
 Built-in certificate-authority issuer groups. More...
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x8, SceSslCertificateAuthorityEntry)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceSslMemoryPoolStats)
 
int sceSslInit (unsigned poolSize)
 
int sceSslTerm (void)
 
int sceSslGetMemoryPoolStats (SceSslMemoryPoolStats *currentStat)
 
int sceSslGetSerialNumber (SceSslCert *sslCert, const char **sboData, unsigned *sboLen)
 
int sceSslGetNotBefore (SceSslCert *sslCert, SceRtcTick *begin)
 
int sceSslGetNotAfter (SceSslCert *sslCert, SceRtcTick *limit)
 
int sceSslGetNameEntryCount (SceSslCertName *certName)
 
int sceSslGetNameEntryInfo (SceSslCertName *certName, int entryNum, char *oidname, unsigned maxOidnameLen, char *value, unsigned maxValueLen, unsigned *valueLen)
 
SceSslCertName * sceSslGetSubjectName (SceSslCert *sslCert)
 
SceSslCertName * sceSslGetIssuerName (SceSslCert *sslCert)
 
int sceSslFreeSslCertName (SceSslCertName *certName)
 
int sceSslInternalGetCertificateAuthority (SceSslCertIssuer issuer_id, int certificate_mask, SceSslCertificateAuthorityEntry **certificate_list, char *buffer, SceSize buffer_size, SceSize *result_size)
 Get built-in certificate-authority certificates.
 

Variables

char * SceSslCertificateAuthorityEntry::pem_certificate
 NUL-terminated PEM certificate stored in the caller's buffer.
 
struct SceSslCertificateAuthorityEntry * SceSslCertificateAuthorityEntry::next
 Next selected certificate, or NULL.
 
unsigned SceSslMemoryPoolStats::poolSize
 
unsigned SceSslMemoryPoolStats::maxInuseSize
 
unsigned SceSslMemoryPoolStats::currentInuseSize
 
int SceSslMemoryPoolStats::reserved
 

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSsl_stub




Data Structure Documentation

◆ SceSslCertificateAuthorityEntry

struct SceSslCertificateAuthorityEntry

Certificate list node stored inside the caller's output buffer.

The caller owns both this node and the string referenced by SceSslCertificateAuthorityEntry::pem_certificate. They remain valid for as long as the output buffer remains valid. No separate list cleanup is needed.

Data Fields
char * pem_certificate NUL-terminated PEM certificate stored in the caller's buffer.
struct SceSslCertificateAuthorityEntry * next Next selected certificate, or NULL.

◆ SceSslMemoryPoolStats

struct SceSslMemoryPoolStats
Data Fields
unsigned poolSize
unsigned maxInuseSize
unsigned currentInuseSize
int reserved

Macro Definition Documentation

◆ sceSslEnd

#define sceSslEnd ( )    sceSslTerm()

Typedef Documentation

◆ SceSslCert

typedef void SceSslCert

◆ SceSslCertName

typedef void SceSslCertName

Enumeration Type Documentation

◆ SceSslErrorCode

Enumerator
SCE_SSL_ERROR_BEFORE_INIT 
SCE_SSL_ERROR_ALREADY_INITED 
SCE_SSL_ERROR_OUT_OF_MEMORY 
SCE_SSL_ERROR_NOT_FOUND 
SCE_SSL_ERROR_INTERNAL 
SCE_SSL_ERROR_INVALID_FORMAT 
SCE_SSL_ERROR_INVALID_VALUE 

◆ SceSslCertIssuer

Built-in certificate-authority issuer groups.

Enumerator
SCE_SSLCERT_ISSUER_ALL 

Select every issuer group.

SCE_SSLCERT_ISSUER_SCE 

FW 3.60 supports certificate mask 0x1F.

SCE_SSLCERT_ISSUER_VERISIGN 

FW 3.60 supports certificate mask 0x1F.

SCE_SSLCERT_ISSUER_GEOTRUST 

FW 3.60 supports certificate mask 0x0F.

SCE_SSLCERT_ISSUER_THAWTE 

FW 3.60 supports certificate mask 0x07.

SCE_SSLCERT_ISSUER_COMODO 

FW 3.60 supports certificate mask 0x07.

SCE_SSLCERT_ISSUER_GLOBALSIGN 

FW 3.60 supports certificate mask 0x03.

SCE_SSLCERT_ISSUER_CYBERTRUST 

FW 3.60 supports certificate mask 0x07.

SCE_SSLCERT_ISSUER_ENTRUST 

FW 3.60 supports certificate mask 0x0F.

SCE_SSLCERT_ISSUER_DIGICERT 

FW 3.60 supports certificate mask 0x07.

SCE_SSLCERT_ISSUER_GODADDY 

FW 3.60 supports certificate mask 0x7F.

SCE_SSLCERT_ISSUER_RSA 

FW 3.60 supports certificate mask 0x03.

SCE_SSLCERT_ISSUER_STARTCOM 

FW 3.60 supports certificate mask 0x03.

SCE_SSLCERT_ISSUER_SECOM 

FW 3.60 supports certificate mask 0x07.

SCE_SSLCERT_ISSUER_TRUSTWAVE 

FW 3.60 supports certificate mask 0x01.

SCE_SSLCERT_ISSUER_AFFIRMTRUST 

FW 3.60 supports certificate mask 0x07.

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/2]

VITASDK_BUILD_ASSERT_EQ ( 0x8  ,
SceSslCertificateAuthorityEntry   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/2]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceSslMemoryPoolStats   
)

◆ sceSslInit()

int sceSslInit ( unsigned  poolSize)

◆ sceSslTerm()

int sceSslTerm ( void  )

◆ sceSslGetMemoryPoolStats()

int sceSslGetMemoryPoolStats ( SceSslMemoryPoolStats *  currentStat)

◆ sceSslGetSerialNumber()

int sceSslGetSerialNumber ( SceSslCert *  sslCert,
const char **  sboData,
unsigned *  sboLen 
)

◆ sceSslGetNotBefore()

int sceSslGetNotBefore ( SceSslCert *  sslCert,
SceRtcTick *  begin 
)

◆ sceSslGetNotAfter()

int sceSslGetNotAfter ( SceSslCert *  sslCert,
SceRtcTick *  limit 
)

◆ sceSslGetNameEntryCount()

int sceSslGetNameEntryCount ( SceSslCertName *  certName)

◆ sceSslGetNameEntryInfo()

int sceSslGetNameEntryInfo ( SceSslCertName *  certName,
int  entryNum,
char *  oidname,
unsigned  maxOidnameLen,
char *  value,
unsigned  maxValueLen,
unsigned *  valueLen 
)

◆ sceSslGetSubjectName()

SceSslCertName * sceSslGetSubjectName ( SceSslCert *  sslCert)

◆ sceSslGetIssuerName()

SceSslCertName * sceSslGetIssuerName ( SceSslCert *  sslCert)

◆ sceSslFreeSslCertName()

int sceSslFreeSslCertName ( SceSslCertName *  certName)

◆ sceSslInternalGetCertificateAuthority()

int sceSslInternalGetCertificateAuthority ( SceSslCertIssuer  issuer_id,
int  certificate_mask,
SceSslCertificateAuthorityEntry **  certificate_list,
char *  buffer,
SceSize  buffer_size,
SceSize *  result_size 
)

Get built-in certificate-authority certificates.

The certificates are loaded from vs0:/data/external/cert/CA_LIST.cer. In output mode, every loaded certificate is checked against a built-in SHA-1 digest before it is returned.

If either certificate_list or buffer is NULL, the function only calculates the required storage size and ignores buffer_size. Output mode requires both pointers to be non-NULL. The required size includes every NUL-terminated PEM string, alignment padding, and one embedded SceSslCertificateAuthorityEntry per certificate.

In output mode, certificate_list receives a linked list whose nodes and PEM strings point into buffer. The function does not allocate output memory. Callers should first query the size, allocate one buffer of that size, and then call the function again to fill it. If output mode fails after processing begins, the buffer and list may contain partial data and should be discarded.

Parameters
[in]issuer_id- One of SceSslCertIssuer.
[in]certificate_mask- Issuer-specific certificate-selection bitmask. For a nonzero issuer_id, -1 selects that issuer's firmware default mask. On FW 3.60 the default is the full supported mask only for SCE, GeoTrust, Thawte, and GoDaddy; it is zero for the other issuer groups. With SCE_SSLCERT_ISSUER_ALL, -1 selects every known certificate.
[out]certificate_list- Receives the first list node in output mode.
[out]buffer- Caller-owned buffer receiving PEM strings and list nodes.
[in]buffer_size- Size of buffer in bytes.
[out]result_size- Optional pointer receiving the total storage required or used on success. If non-NULL, the function sets the output to zero before validation and leaves it zero on error.
Returns
Number of selected certificates on success, including zero when the mask selects none. Returns 0x80010086 for an invalid issuer or unsupported mask, 0x8001000C when the output buffer is too small, SCE_SSL_ERROR_INVALID_VALUE when a certificate digest differs, or another negative file/path error.

Variable Documentation

◆ pem_certificate

char* SceSslCertificateAuthorityEntry::pem_certificate

NUL-terminated PEM certificate stored in the caller's buffer.

◆ next

struct SceSslCertificateAuthorityEntry* SceSslCertificateAuthorityEntry::next

Next selected certificate, or NULL.

◆ poolSize

unsigned SceSslMemoryPoolStats::poolSize

◆ maxInuseSize

unsigned SceSslMemoryPoolStats::maxInuseSize

◆ currentInuseSize

unsigned SceSslMemoryPoolStats::currentInuseSize

◆ reserved

int SceSslMemoryPoolStats::reserved