File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2061,7 +2061,7 @@ int wolfSSH_ProcessBuffer(WOLFSSH_CTX* ctx,
20612061 int format , int type )
20622062{
20632063 void * heap = NULL ;
2064- byte * der ;
2064+ byte * der = NULL ;
20652065 word32 derSz ;
20662066 int wcType ;
20672067 int ret = WS_SUCCESS ;
@@ -2078,18 +2078,20 @@ int wolfSSH_ProcessBuffer(WOLFSSH_CTX* ctx,
20782078 return WS_BAD_FILETYPE_E ;
20792079 }
20802080
2081- if (type == BUFTYPE_CA ) {
2081+ if (type == BUFTYPE_PRIVKEY ) {
2082+ dynamicType = DYNTYPE_PRIVKEY ;
2083+ wcType = PRIVATEKEY_TYPE ;
2084+ }
2085+ #ifdef WOLFSSH_CERTS
2086+ else if (type == BUFTYPE_CA ) {
20822087 dynamicType = DYNTYPE_CA ;
20832088 wcType = CA_TYPE ;
20842089 }
20852090 else if (type == BUFTYPE_CERT ) {
20862091 dynamicType = DYNTYPE_CERT ;
20872092 wcType = CERT_TYPE ;
20882093 }
2089- else if (type == BUFTYPE_PRIVKEY ) {
2090- dynamicType = DYNTYPE_PRIVKEY ;
2091- wcType = PRIVATEKEY_TYPE ;
2092- }
2094+ #endif
20932095 else {
20942096 return WS_BAD_ARGUMENT ;
20952097 }
You can’t perform that action at this time.
0 commit comments