OpenSSL interoperability broken #15 - dsa part
Karel Miko
7 years ago
168 | 168 | |
169 | 169 | RETVAL = newSVpvn(NULL, 0); /* undef */ |
170 | 170 | if (strnEQ(type, "private", 7)) { |
171 | rv = dsa_export(out, &out_len, PK_PRIVATE, &self->key); | |
172 | if (rv != CRYPT_OK) croak("FATAL: dsa_export(PK_PRIVATE) failed: %s", error_to_string(rv)); | |
171 | rv = dsa_export(out, &out_len, PK_PRIVATE|PK_STD, &self->key); | |
172 | if (rv != CRYPT_OK) croak("FATAL: dsa_export(PK_PRIVATE|PK_STD) failed: %s", error_to_string(rv)); | |
173 | 173 | RETVAL = newSVpvn((char*)out, out_len); |
174 | 174 | } |
175 | 175 | else if (strnEQ(type, "public", 6)) { |
176 | rv = dsa_export(out, &out_len, PK_PUBLIC, &self->key); | |
176 | rv = dsa_export(out, &out_len, PK_PUBLIC|PK_STD, &self->key); | |
177 | 177 | if (rv != CRYPT_OK) croak("FATAL: dsa_export(PK_PUBLIC|PK_STD) failed: %s", error_to_string(rv)); |
178 | 178 | RETVAL = newSVpvn((char*)out, out_len); |
179 | 179 | } |