Skip to content

Commit

Permalink
Merge pull request #641 from gojimmypi/PR-ssh-minor-updates
Browse files Browse the repository at this point in the history
Gate PrivBeginPrefix/PrivSuffix; init typeSz in ssh.c
  • Loading branch information
ejohnstown authored Jan 11, 2024
2 parents 66b020c + 1cc6ea4 commit b6889cb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,10 +1488,13 @@ union wolfSSH_key {

static const char* PrivBeginOpenSSH = "-----BEGIN OPENSSH PRIVATE KEY-----";
static const char* PrivEndOpenSSH = "-----END OPENSSH PRIVATE KEY-----";
static const char* PrivBeginPrefix = "-----BEGIN ";
/* static const char* PrivEndPrefix = "-----END "; */
static const char* PrivSuffix = " PRIVATE KEY-----";

#if !defined(NO_FILESYSTEM) && !defined(WOLFSSH_USER_FILESYSTEM)
/* currently only used in wolfSSH_ReadKey_file() */
static const char* PrivBeginPrefix = "-----BEGIN ";
/* static const char* PrivEndPrefix = "-----END "; */
static const char* PrivSuffix = " PRIVATE KEY-----";
#endif

static int DoSshPubKey(const byte* in, word32 inSz, byte** out,
word32* outSz, const byte** outType, word32* outTypeSz,
Expand All @@ -1503,7 +1506,7 @@ static int DoSshPubKey(const byte* in, word32 inSz, byte** out,
char* type = NULL;
char* key = NULL;
int ret = WS_SUCCESS;
word32 newKeySz, typeSz;
word32 newKeySz, typeSz = 0;

WOLFSSH_UNUSED(inSz);
WOLFSSH_UNUSED(heap);
Expand Down

0 comments on commit b6889cb

Please sign in to comment.