• Home
  • Raw
  • Download

Lines Matching refs:p1

29 	struct sshbuf *p1;  in sshbuf_misc_tests()  local
37 p1 = sshbuf_new(); in sshbuf_misc_tests()
38 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
39 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0); in sshbuf_misc_tests()
40 sshbuf_dump(p1, out); in sshbuf_misc_tests()
50 sshbuf_free(p1); in sshbuf_misc_tests()
54 p1 = sshbuf_new(); in sshbuf_misc_tests()
55 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
56 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0); in sshbuf_misc_tests()
57 p = sshbuf_dtob16(p1); in sshbuf_misc_tests()
61 sshbuf_free(p1); in sshbuf_misc_tests()
65 p1 = sshbuf_new(); in sshbuf_misc_tests()
66 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
67 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests()
68 p = sshbuf_dtob64_string(p1, 0); in sshbuf_misc_tests()
72 sshbuf_free(p1); in sshbuf_misc_tests()
76 p1 = sshbuf_new(); in sshbuf_misc_tests()
77 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
78 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests()
79 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0); in sshbuf_misc_tests()
80 p = sshbuf_dtob64_string(p1, 0); in sshbuf_misc_tests()
84 sshbuf_free(p1); in sshbuf_misc_tests()
88 p1 = sshbuf_new(); in sshbuf_misc_tests()
89 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
90 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests()
91 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0); in sshbuf_misc_tests()
92 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x33), 0); in sshbuf_misc_tests()
93 p = sshbuf_dtob64_string(p1, 0); in sshbuf_misc_tests()
97 sshbuf_free(p1); in sshbuf_misc_tests()
101 p1 = sshbuf_new(); in sshbuf_misc_tests()
102 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
103 ASSERT_INT_EQ(sshbuf_reserve(p1, 8192, NULL), 0); in sshbuf_misc_tests()
104 bzero(sshbuf_mutable_ptr(p1), 8192); in sshbuf_misc_tests()
105 p = sshbuf_dtob64_string(p1, 0); in sshbuf_misc_tests()
109 sshbuf_free(p1); in sshbuf_misc_tests()
113 p1 = sshbuf_new(); in sshbuf_misc_tests()
114 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
115 ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A=="), 0); in sshbuf_misc_tests()
116 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_misc_tests()
117 ASSERT_U8_EQ(*sshbuf_ptr(p1), 0xd0); in sshbuf_misc_tests()
118 sshbuf_free(p1); in sshbuf_misc_tests()
122 p1 = sshbuf_new(); in sshbuf_misc_tests()
123 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
124 ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A8="), 0); in sshbuf_misc_tests()
125 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_misc_tests()
126 ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), 0xd00f); in sshbuf_misc_tests()
127 sshbuf_free(p1); in sshbuf_misc_tests()
131 p1 = sshbuf_new(); in sshbuf_misc_tests()
132 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
133 ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A/QDw=="), 0); in sshbuf_misc_tests()
134 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_misc_tests()
135 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), 0xd00fd00f); in sshbuf_misc_tests()
136 sshbuf_free(p1); in sshbuf_misc_tests()
140 p1 = sshbuf_new(); in sshbuf_misc_tests()
141 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
143 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
148 ASSERT_INT_EQ(sshbuf_put(p1, "quad1", strlen("quad1")), 0); in sshbuf_misc_tests()
149 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
155 ASSERT_INT_EQ(sshbuf_put(p1, "\0", 1), 0); in sshbuf_misc_tests()
156 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
162 ASSERT_INT_EQ(sshbuf_put(p1, "quad2", strlen("quad2")), 0); in sshbuf_misc_tests()
163 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
165 sshbuf_free(p1); in sshbuf_misc_tests()
169 p1 = sshbuf_from(msg, sizeof(msg) - 1); in sshbuf_misc_tests()
170 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
171 ASSERT_INT_EQ(sshbuf_cmp(p1, 0, "i", 1), 0); in sshbuf_misc_tests()
172 ASSERT_INT_EQ(sshbuf_cmp(p1, 0, "j", 1), SSH_ERR_INVALID_FORMAT); in sshbuf_misc_tests()
173 ASSERT_INT_EQ(sshbuf_cmp(p1, 0, "imploring", 9), 0); in sshbuf_misc_tests()
174 ASSERT_INT_EQ(sshbuf_cmp(p1, 0, "implored", 9), SSH_ERR_INVALID_FORMAT); in sshbuf_misc_tests()
175 ASSERT_INT_EQ(sshbuf_cmp(p1, 10, "ping", 4), 0); in sshbuf_misc_tests()
176 ASSERT_INT_EQ(sshbuf_cmp(p1, 10, "ring", 4), SSH_ERR_INVALID_FORMAT); in sshbuf_misc_tests()
177 ASSERT_INT_EQ(sshbuf_cmp(p1, 28, "over", 4), 0); in sshbuf_misc_tests()
178 ASSERT_INT_EQ(sshbuf_cmp(p1, 28, "rove", 4), SSH_ERR_INVALID_FORMAT); in sshbuf_misc_tests()
179 ASSERT_INT_EQ(sshbuf_cmp(p1, 28, "overt", 5), in sshbuf_misc_tests()
181 ASSERT_INT_EQ(sshbuf_cmp(p1, 32, "ping", 4), in sshbuf_misc_tests()
183 ASSERT_INT_EQ(sshbuf_cmp(p1, 1000, "silence", 7), in sshbuf_misc_tests()
185 ASSERT_INT_EQ(sshbuf_cmp(p1, 0, msg, sizeof(msg) - 1), 0); in sshbuf_misc_tests()
189 p1 = sshbuf_from(msg, sizeof(msg) - 1); in sshbuf_misc_tests()
190 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
191 ASSERT_INT_EQ(sshbuf_find(p1, 0, "i", 1, &sz), 0); in sshbuf_misc_tests()
193 ASSERT_INT_EQ(sshbuf_find(p1, 0, "j", 1, &sz), SSH_ERR_INVALID_FORMAT); in sshbuf_misc_tests()
194 ASSERT_INT_EQ(sshbuf_find(p1, 0, "imploring", 9, &sz), 0); in sshbuf_misc_tests()
196 ASSERT_INT_EQ(sshbuf_find(p1, 0, "implored", 9, &sz), in sshbuf_misc_tests()
198 ASSERT_INT_EQ(sshbuf_find(p1, 3, "ping", 4, &sz), 0); in sshbuf_misc_tests()
200 ASSERT_INT_EQ(sshbuf_find(p1, 11, "ping", 4, &sz), 0); in sshbuf_misc_tests()
202 ASSERT_INT_EQ(sshbuf_find(p1, 20, "over", 4, &sz), 0); in sshbuf_misc_tests()
204 ASSERT_INT_EQ(sshbuf_find(p1, 28, "over", 4, &sz), 0); in sshbuf_misc_tests()
206 ASSERT_INT_EQ(sshbuf_find(p1, 28, "rove", 4, &sz), in sshbuf_misc_tests()
208 ASSERT_INT_EQ(sshbuf_find(p1, 28, "overt", 5, &sz), in sshbuf_misc_tests()
210 ASSERT_INT_EQ(sshbuf_find(p1, 32, "ping", 4, &sz), in sshbuf_misc_tests()
212 ASSERT_INT_EQ(sshbuf_find(p1, 1000, "silence", 7, &sz), in sshbuf_misc_tests()
214 ASSERT_INT_EQ(sshbuf_find(p1, 0, msg + 1, sizeof(msg) - 2, &sz), 0); in sshbuf_misc_tests()